KR102053175B1 - Method and system for detecting frequent pattern in graph streams - Google Patents

Method and system for detecting frequent pattern in graph streams Download PDF

Info

Publication number
KR102053175B1
KR102053175B1 KR1020180048780A KR20180048780A KR102053175B1 KR 102053175 B1 KR102053175 B1 KR 102053175B1 KR 1020180048780 A KR1020180048780 A KR 1020180048780A KR 20180048780 A KR20180048780 A KR 20180048780A KR 102053175 B1 KR102053175 B1 KR 102053175B1
Authority
KR
South Korea
Prior art keywords
frequent
pattern
frequent pattern
patterns
sliding window
Prior art date
Application number
KR1020180048780A
Other languages
Korean (ko)
Other versions
KR20190124604A (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 KR1020180048780A priority Critical patent/KR102053175B1/en
Publication of KR20190124604A publication Critical patent/KR20190124604A/en
Application granted granted Critical
Publication of KR102053175B1 publication Critical patent/KR102053175B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Fuzzy Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

그래프 스트림에서의 빈발 패턴 검출 방법 및 빈발 패턴 검출 시스템이 개시된다. 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 방법은, 빈발 패턴에 대한 검출이 요청 됨에 따라, 연속적으로 입력되는 그래프 데이터로 이루어진 그래프 스트림을 전처리 하는 단계와, 상기 전처리한 그래프 스트림에서 슬라이딩 윈도우 단위로 확인한 패턴 각각에 대한 발생횟수를 카운트하는 단계와, 상기 발생횟수에 기초하여, 상기 각 패턴 중 상기 그래프 스트림에서 빈발하는 빈발 패턴을 상기 슬라이딩 윈도우를 이동하면서 검출하는 단계, 및 상기 빈발 패턴에 관한 리스트를, 상기 검출을 요청한 단말에 출력하는 단계를 포함한다.A frequent pattern detection method and a frequent pattern detection system in a graph stream are disclosed. According to an embodiment of the present invention, a method of detecting a frequent pattern in a graph stream includes preprocessing a graph stream including continuously input graph data as the detection of a frequent pattern is requested, and in the preprocessed graph stream. Counting the number of occurrences for each of the patterns identified in the sliding window unit, detecting a frequent pattern frequently occurring in the graph stream among the patterns while moving the sliding window, based on the occurrence frequency; And outputting a list of patterns to the terminal requesting the detection.

Description

그래프 스트림에서의 빈발 패턴 검출 방법 및 빈발 패턴 검출 시스템{METHOD AND SYSTEM FOR DETECTING FREQUENT PATTERN IN GRAPH STREAMS}Frequency pattern detection method and graph pattern detection system in a graph stream {METHOD AND SYSTEM FOR DETECTING FREQUENT PATTERN IN GRAPH STREAMS}

본 발명은 슬라이딩 윈도우 방식을 사용하여 연속적으로 입력되는 그래프 스트림으로부터 빈발 패턴을 점진적으로 검출하는 기법에 관한 것으로, 이전 단계에서 검출한 빈발 패턴에 관한 정보를 활용하여 이후 단계에서 빈발 패턴 검출 시 불필요한 계산을 생략할 수 있도록 하여 전체 연산량을 감소시킬 수 있는 빈발 패턴 검출 방법 및 빈발 패턴 검출 시스템에 관한 것이다.The present invention relates to a technique for gradually detecting a frequent pattern from a continuously input graph stream using a sliding window method, and unnecessary calculation when detecting a frequent pattern in a later step by using information about the frequent pattern detected in a previous step. The present invention relates to a frequent pattern detection method and a frequent pattern detection system capable of reducing the total calculation amount.

그래프 데이터는 객체 간의 복잡한 관계를 표현하기 위한 자료구조로서 교통망, 생물정보학, 화학, 소셜 네트워크 등 다양한 분야에 이용되고 있다. 예를 들어, 교통망을 위한 그래프 데이터에서는 지역을 정점으로 표현하고 도로를 간선으로 표현하고 있으며, 소셜 네트워크를 위한 그래프 데이터에서는 사용자를 정점으로 표현하고, 팔로우나 친구 관계를 간선으로 표현하고 있다.Graph data is a data structure for expressing complex relationships between objects, and is used in various fields such as transportation networks, bioinformatics, chemistry, and social networks. For example, graph data for a traffic network expresses regions as peaks and roads as trunks, and graph data for social networks express users as vertices, and expresses follow and friend relationships as trunks.

최근 소셜 네트워크 서비스의 활성화로 인해 사용자의 친구 관계가 매초 변화하고 센서 네트워크 구축 시 센서들 간의 관계 역시 수시로 변화함에 따라 그래프 데이터가 연속적으로 생성되고 있으며 이러한 그래프 형태의 스트림 데이터를 그래프 스트림이라고 할 수 있다.Recently, due to the activation of the social network service, the user's friendship changes every second, and the relationship between the sensors also changes from time to time when constructing the sensor network, and the graph data is continuously generated. Such stream data in the form of a graph may be referred to as a graph stream. .

그래프 스트림은 이상 감지, 실시간 트렌드 분석, 이벤트 검출 등 다양한 분야에 사용되고 있다. 예를 들어, 스마트 팩토리에서는 IoT 기반 센서 네트워크를 구축하여 센서 간의 데이터 흐름을 그래프 스트림으로 표현하고 공정 및 공급망 지능화, 이상 감지 등을 수행하고 있고, 소셜 네트워크 서비스에서도 사용자 간의 관계 및 정보 소비 패턴을 그래프로 표현하고 인적 네트워크 분석 및 실시간 트랜드를 분석하는데 그래프 스트림을 활용하고 있다.Graph streams are used in various fields such as anomaly detection, real-time trend analysis, and event detection. For example, smart factories are building IoT-based sensor networks to represent the flow of data between sensors in graph streams, process and supply chain intelligence, and anomaly detection, and in social network services, graphing relationships and information consumption patterns between users. The graph stream is used to analyze human networks and analyze real-time trends.

이처럼 그래프 스트림이 다양한 분야에 응용되면서, 다양한 그래프 스트림 분석 기법들에 대한 연구가 활발히 진행되고 있다.As the graph stream is applied to various fields, researches on various graph stream analysis techniques are being actively conducted.

특히, 그래프에서 객체들 사이의 관계가 동적으로 변화 함에 따른 그래프의 변화를 탐지하거나 패턴을 분석하기 위한 연구들이 진행되고 있다. 일례로, 그래프 스트림을 분석하는 기법은 그래프 클러스터링, 그래프 스트림 분류, 서브그래프 마이닝, 빈발 패턴 검출 등 다양하다.In particular, studies are being conducted to detect changes in graphs or analyze patterns as dynamic relationships between objects in graphs change. As an example, techniques for analyzing graph streams may vary, such as graph clustering, graph stream classification, subgraph mining, and frequent pattern detection.

이 중에서 빈발 패턴 검출 기법은 그래프 스트림에서 자주 사용되는 분석 기법 중 하나로 특정 기간 동안 자주 발생한 서브 그래프를 검출하는 방법이다. 빈발 패턴 검출 기법은 일례로 스마트 팩토리에서는 고장 예측을 위해 전조 현상들에 대한 패턴을 감지하고, 소셜 네트워크에서는 사용자 간에 친밀 관계를 분석하기 위해 사용자들 사이에 정보 교류 패턴을 판별하는데 이용될 수 있다.Among these, the frequent pattern detection technique is one of analytical techniques frequently used in graph streams and is a method of detecting subgraphs frequently occurring during a specific period. Frequent pattern detection techniques can be used, for example, in smart factories to detect patterns of precursor phenomena for failure prediction, and in social networks to determine patterns of information exchange between users to analyze intimacy between users.

이처럼 최근 그래프 스트림에서 빈발 패턴 검출에 대한 활용이 증가함에 따라 다양한 기법이 활발히 연구되고 있으나, 기존에 제시된 기법에서는 빈발 패턴 검출을 위한 데이터를 저장하기 위해 트리(DSTree)를 구축하고 있어 많은 포인터가 사용되며 트리 구축 시 오랜 시간이 소요될 수 있다. 또한, 기존에 제시된 기법에서는 패턴 간 연결성을 고려하지 않으므로 단순히 빈발하는 패턴을 무의미하게 검출하게 되고, 슬라이딩 윈도우 방식으로 빈발 패턴을 검출 시 중복되는 연산에 대한 처리가 없어 처리 속도가 저하될 수 있다.As the utilization of frequent pattern detection in graph streams is increasing, various techniques are actively researched. However, in the existing method, many pointers are used because a tree (DSTree) is constructed to store data for frequent pattern detection. It can take a long time to build a tree. In addition, the conventionally proposed technique does not consider the connectivity between the patterns, and thus simply detects frequent patterns insignificantly, and there is no processing for overlapping operations when detecting the frequent patterns in a sliding window method, thereby reducing the processing speed.

이에 따라, 이전 슬라이딩 윈도우에서 검출된 패턴이 향후 빈발할지 또는 빈발하지 않을지를 계산한 예측 정보를 활용하여 전체 연산량을 줄이고, 패턴 간의 연결성을 고려하여 유의미한 빈발 패턴을 검출하는 기술이 요구되고 있다.Accordingly, there is a demand for a technique for reducing the total amount of calculation by using prediction information calculated whether the pattern detected in the previous sliding window is frequent or not in the future, and detecting a significant frequent pattern in consideration of the connectivity between the patterns.

본 발명의 실시예는 실시간으로 입력되는 그래프 스트림에서 슬라이딩 윈도우를 이동하면서 점진적으로 빈발 패턴을 검출 시, 이전 슬라이딩 윈도우에서 검출한 빈발 패턴에 관한 정보를 활용하여 필요한 연산만 수행 함으로써, 기존 슬라이딩 윈도우 방식의 문제점인 중복 계산을 해결하고 전체 연산량을 감소시키는 것을 목적으로 한다.According to an exemplary embodiment of the present invention, when detecting a frequent pattern while gradually moving a sliding window in a graph stream input in real time, the existing sliding window method is performed by performing only necessary operations by using information about the frequent pattern detected in the previous sliding window. The purpose of this paper is to solve the problem of redundancy and reduce the total amount of computation.

또한, 본 발명의 실시예는 하나의 슬라이딩 윈도우에 대해 빈발 패턴의 검출이 완료되면 해당 빈발 패턴이 차기의 슬라이딩 윈도우에서 빈발하는지 여부와 연이어 빈발하는 슬라이딩 윈도우의 개수를 예측한 정보를 빈발 패턴 관리 테이블에 유지 함으로써, 이후의 슬라이딩 윈도우에서도 빈발 패턴으로 예측된 패턴에 대해 빈발 패턴 검출을 위한 연산을 생략하는 것을 목적으로 한다.In addition, the embodiment of the present invention, when the detection of the frequent pattern for one sliding window is completed, whether the frequent pattern is frequent in the next sliding window and the information predicting the number of sliding windows that occur frequently in succession pattern management table It is an object of the present invention to omit an operation for detecting a frequent pattern with respect to a pattern predicted as a frequent pattern even in a subsequent sliding window.

또한, 본 발명의 실시예는 빈발 패턴의 검출이 완료된 하나의 슬라이딩 윈도우에 해당하는 그래프 데이터를 메모리부에서 삭제하여, 연속적으로 입력되는 신규의 그래프 데이터의 분석을 위한 메모리 공간을 확보할 수 있도록 하는 것을 목적으로 한다.In addition, the embodiment of the present invention is to delete the graph data corresponding to one sliding window in which the frequent pattern detection is completed in the memory unit, so as to secure a memory space for analyzing the new graph data continuously input For the purpose of

또한, 본 발명의 실시예는 그래프 데이터 간 연결성을 고려하여 서로 연결되어 있는 패턴을 하나의 확장 패턴으로 인식 함으로써, 보다 유의미한 패턴의 빈발 여부를 확인할 수 있도록 하는 것을 목적으로 한다.In addition, an embodiment of the present invention is to make it possible to check the frequency of more significant patterns by recognizing the patterns connected to each other in consideration of the connectivity between the graph data as one expansion pattern.

본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 방법은, 빈발 패턴에 대한 검출이 요청 됨에 따라, 연속적으로 입력되는 그래프 데이터로 이루어진 그래프 스트림을 전처리 하는 단계와, 상기 전처리한 그래프 스트림에서 슬라이딩 윈도우 단위로 확인한 패턴 각각에 대한 발생횟수를 카운트하는 단계와, 상기 발생횟수에 기초하여, 상기 각 패턴 중 상기 그래프 스트림에서 빈발하는 빈발 패턴을 상기 슬라이딩 윈도우를 이동하면서 검출하는 단계, 및 상기 빈발 패턴에 관한 리스트를, 상기 검출을 요청한 단말에 출력하는 단계를 포함한다.According to an embodiment of the present invention, a method of detecting a frequent pattern in a graph stream includes preprocessing a graph stream including continuously input graph data as the detection of a frequent pattern is requested, and in the preprocessed graph stream. Counting the number of occurrences for each of the patterns identified in the sliding window unit, detecting a frequent pattern frequently occurring in the graph stream among the patterns while moving the sliding window, based on the occurrence frequency; And outputting a list of patterns to the terminal requesting the detection.

또한, 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템은, 빈발 패턴에 대한 검출이 요청 됨에 따라, 연속적으로 입력되는 그래프 데이터로 이루어진 그래프 스트림을 전처리 하는 전처리부와, 상기 전처리한 그래프 스트림에서 슬라이딩 윈도우 단위로 확인한 패턴 각각에 대한 발생횟수를 카운트하고, 상기 발생횟수에 기초하여, 상기 각 패턴 중 상기 그래프 스트림에서 빈발하는 빈발 패턴을 상기 슬라이딩 윈도우를 이동하면서 검출하는 빈발 패턴 검출부, 및 상기 빈발 패턴에 관한 리스트를, 상기 검출을 요청한 단말에 출력하는 출력부를 포함한다.In addition, the frequent pattern detection system in the graph stream according to an embodiment of the present invention, the pre-processing unit for pre-processing the graph stream consisting of the continuously input graph data as the detection of the frequent pattern, and the pre-processing A frequency pattern detection unit for counting the number of occurrences of each of the patterns identified in the sliding stream unit in the graph stream, and detecting the frequent pattern occurring in the graph stream among the patterns while moving the sliding window based on the occurrence frequency; And an output unit for outputting a list of the frequent patterns to the terminal requesting the detection.

본 발명의 일실시예에 따르면, 이전 슬라이딩 윈도우에서 검출된 패턴이 향후 빈발할지 또는 빈발하지 않을지를 계산한 빈발 패턴 관리 테이블을 활용하여, 차기의 윈도우 슬라이드에서 재계산 여부를 판별해 필요한 계산만 수행하도록 함으로써 기존 슬라이딩 윈도우 방식의 문제점인 중복 계산을 해결하고 전체 연산량을 감소시킬 수 있다.According to an embodiment of the present invention, by using a frequent pattern management table that calculates whether a pattern detected in a previous sliding window will be frequent or not frequently, determine whether to recalculate the next window slide and perform only necessary calculations. By doing so, it is possible to solve the redundancy calculation which is a problem of the existing sliding window method and reduce the total computation amount.

또한, 본 발명의 일실시예에 따르면, DSMatrix라는 2차원 배열구조를 이용해 적은 공간에 효율적으로 많은 그래프 스트림 데이터를 저장해 빈발 패턴을 분석할 수 있다.In addition, according to an embodiment of the present invention, using a two-dimensional array structure called DSMatrix it is possible to efficiently store a large number of graph stream data in a small space to analyze the frequent patterns.

또한, 본 발명의 일실시예에 따르면, 정점 또는 간선으로 서로 연결되어 있는 패턴을 하나의 패턴으로 인식하여 보다 유의미한 패턴을 검출할 수 있다.In addition, according to an embodiment of the present invention, a pattern that is connected to each other by a vertex or an edge may be recognized as one pattern to detect a more significant pattern.

또한, 본 발명의 일실시예에 따르면, 분석이 완료된 그래프 스트림 데이터를 삭제하여 메모리 공간을 확보할 수 있다.In addition, according to an embodiment of the present invention, memory space may be secured by deleting the analyzed graph stream data.

도 1은 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템의 구성을 도시한 블록도이다.
도 2는 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템에서, 연속적으로 입력되는 그래프 스트림의 일례를 도시한 도면이다.
도 3a는 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템에서, 간선의 유무에 따라 구성한 매트릭스의 일례를 도시한 도면이다.
도 3b는 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템에서, 초기 빈발 패턴 관리 테이블의 일례를 도시한 도면이다.
도 4는 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템에서, 빈발 패턴이 향후 이어서 빈발하게 될 슬라이딩 윈도우의 개수(slideNum)를 계산하는 알고리즘을 도시한 도면이다.
도 5a 내지 도 5c는 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템에서, 슬라이딩 윈도우를 이동한 후 빈발 패턴 관리 테이블을 활용하여 빈발 패턴을 검출하는 과정을 설명하기 위한 도면이다.
도 6은 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 방법의 순서를 도시한 흐름도이다.
1 is a block diagram illustrating a configuration of a frequent pattern detection system in a graph stream according to an embodiment of the present invention.
2 is a diagram illustrating an example of a graph stream continuously input in the frequent pattern detection system in the graph stream according to an embodiment of the present invention.
3A illustrates an example of a matrix configured according to the presence or absence of edges in a frequent pattern detection system in a graph stream according to an embodiment of the present invention.
3B illustrates an example of an initial frequent pattern management table in a frequent pattern detection system in a graph stream according to an exemplary embodiment of the present invention.
FIG. 4 is a diagram illustrating an algorithm for calculating a number of sliding windows in which a frequent pattern will subsequently occur frequently in a frequent pattern detection system in a graph stream according to an exemplary embodiment of the present invention.
5A to 5C are diagrams for describing a process of detecting a frequent pattern using a frequent pattern management table after moving a sliding window in a frequent pattern detection system in a graph stream according to an embodiment of the present invention.
6 is a flowchart illustrating a method of detecting a frequent pattern in a graph stream according to an embodiment of the present invention.

이하, 첨부된 도면들을 참조하여 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템에 대해 상세히 설명한다. 그러나, 본 발명이 실시예들에 의해 제한되거나 한정되는 것은 아니다. 각 도면에 제시된 동일한 참조 부호는 동일한 부재를 나타낸다.Hereinafter, a frequent pattern detection system in a graph stream according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings. However, the present invention is not limited or limited by the embodiments. Like reference numerals in the drawings denote like elements.

도 1은 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템의 구성을 도시한 블록도이다.1 is a block diagram illustrating a configuration of a frequent pattern detection system in a graph stream according to an embodiment of the present invention.

도 1을 참조하면, 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템(100)은, 전처리부(110), 빈발 패턴 검출부(120), 테이블 기록부(130), 출력부(140), 메모리부(150) 및 빈발 패턴 관리 테이블(160)을 포함하여 구성할 수 있다.Referring to FIG. 1, the frequent pattern detection system 100 in a graph stream according to an exemplary embodiment of the present invention may include a preprocessor 110, a frequent pattern detector 120, a table recorder 130, and an output unit 140. ), The memory unit 150, and the frequent pattern management table 160.

전처리부(110)는 빈발 패턴에 대한 검출이 요청 됨에 따라, 연속적으로 입력되는 그래프 데이터로 이루어진 그래프 스트림을 전처리 한다.As the preprocessing unit 110 is requested to detect the frequent pattern, the preprocessor 110 preprocesses the graph stream including the continuously input graph data.

일례로 전처리부(110)는 입력되는 그래프 스트림을 메모리부(150)에 효율적으로 저장하기 위한 전처리를 수행할 수 있다.For example, the preprocessor 110 may perform preprocessing to efficiently store the input graph stream in the memory 150.

전처리부(110)는 그래프 스트림이 입력되면 메모리부(150)에 저장하고, 하나의 슬라이딩 윈도우에 해당되는 개수(예를 들어, '9개')의 그래프 데이터가 메모리부(150)에 저장되면 저장된 그래프 데이터로 예를 들어 'DSMatrix'와 같은 매트릭스를 구성할 수 있다. 예를 들어, 전처리부(110)는 도 3a에 도시한 매트릭스(310)과 같은 2차원 배열을 이용하여 적은 공간에 많은 그래프 데이터를 저장할 수 있다.When the graph stream is input, the preprocessing unit 110 stores the graph stream in the memory unit 150, and when the graph data corresponding to one sliding window (for example, '9') is stored in the memory unit 150. The stored graph data can form a matrix, for example 'DSMatrix'. For example, the preprocessor 110 may store a large amount of graph data in a small space by using a two-dimensional array such as the matrix 310 illustrated in FIG. 3A.

또한, 전처리부(110)는 연속적으로 입력되는 그래프 스트림 중에서 현재 입력된 그래프 데이터 뿐만 아니라 전후의 그래프 데이터를 모두 고려해서 빈발 패턴이 검출될 수 있도록, 예를 들어 'DSMatrix'이라는 2차원 배열구조를 이용하여 입력된 그래프 데이터를 저장할 수 있다.In addition, the preprocessing unit 110 may generate a two-dimensional array structure, for example, 'DSMatrix' so that frequent patterns may be detected in consideration of not only current graph data but also front and rear graph data among consecutively input graph streams. You can save the entered graph data.

여기서 'DSMatrix'는 boolean 형식의 배열이기 때문에 기존의 DSTree 보다 적은 공간에 많은 데이터를 저장할 수 있으며, 그래프 데이터에서 간선의 유무를 '1' 또는 '0'으로 표현하기 때문에 그래프 데이터의 빠른 추가, 삭제가 가능하여 슬라이딩 윈도우 방식에 적합하다.In this case, 'DSMatrix' is a boolean type array, so more data can be stored in less space than the existing DSTree, and the presence or absence of edges in the graph data is expressed as '1' or '0', so the graph data can be added or deleted quickly. It is possible to fit the sliding window method.

'DSMatrix'에서 하나의 윈도우 슬라이드는 단말에 의해 사전에 규정된 개수(예를 들어, '9개')의 그래프 데이터를, 배치(Batch) 단위로 구분해서 포함할 수 있다. In the DSMatrix, one window slide may include a predetermined number of graph data (for example, '9') by the terminal in a batch unit.

또한, 전처리부(110)는 그래프 스트림을 입력되는 순서에 따라 저장하는 메모리부(150)에, 상기 슬라이딩 윈도우에서 규정하는 개수(예를 들어, '9개')의 그래프 데이터가 저장되면, 상기 슬라이딩 윈도우에 포함되는 그래프 데이터 각각에서 두 정점을 잇는 간선의 유무에 따라, '1' 또는 '0'의 2차원 배열값을 부여한 매트릭스를 구성하고, 상기 2차원 배열값이 '1'로 부여된 간선 및 상기 간선으로 이어진 두 정점을 포함한 서브 그래프를, 상기 패턴으로 확인할 수 있다.In addition, if the pre-processing unit 110 stores the graph data defined by the sliding window (for example, '9') in the memory unit 150 storing the graph stream in the order of input, the pre-processing unit 110 stores the graph stream. In the graph data included in the sliding window, a matrix giving a two-dimensional array value of '1' or '0' is formed according to the presence or absence of edges connecting two vertices, and the two-dimensional array value is given as '1'. The subgraph including the edges and two vertices leading to the edges can be identified with the pattern.

예를 들어, 도 2를 참조하면, 전처리부(110)는 하나의 슬라이딩 윈도우에 해당하는 9개의 그래프 데이터(a 내지 i)로 이루어진 그래프 스트림(200)이 연속적으로 입력되면, 입력되는 순서대로 그래프 스트림(200)을 메모리부(150)에 저장하여 도 3a에 도시한 것 같은 매트릭스(310)를 구성할 수 있다.For example, referring to FIG. 2, when the graph stream 200 composed of nine graph data a to i corresponding to one sliding window is continuously input, the preprocessing unit 110 graphs in the order of input. The stream 200 may be stored in the memory unit 150 to form a matrix 310 as shown in FIG. 3A.

여기서, 하나의 슬라이딩 윈도우는 3개의 배치(batch)로 구성되고 각 배치는 3개의 그래프 데이터로 구성될 수 있으며, 슬라이딩 윈도우는 그래프 스트림(200)에서 1개의 배치 단위로 이동할 수 있다.Here, one sliding window may consist of three batches, each batch may consist of three graph data, and the sliding window may move in one batch unit in the graph stream 200.

도 3a를 참조하면, 전처리부(110)는 그래프 스트림(200) 내의 그래프 데이터(a 내지 i) 각각에서 간선(301 내지 305)이 있으면 '1'을 부여하고, 없으면 '0'을 부여하여 도 3a와 같이 매트릭스(310)를 구성할 수 있다.Referring to FIG. 3A, the preprocessing unit 110 grants '1' if there are edges 301 to 305 in each of the graph data a to i in the graph stream 200, and gives '0' if not. The matrix 310 can be configured as shown in 3a.

이때, 전처리부(110)는 각 간선(301 내지 305)의 이름(row)을 두 정점의 번호를 이용하여 표현할 수 있다.In this case, the preprocessor 110 may express the names (rows) of the respective edges (301 to 305) using the numbers of the two vertices.

예를 들어, 전처리부(110)는 정점('1')과 정점('2')을 연결한 간선을 '1/2'(301)로 표현하고, 간선('1/2')(301)이 그래프 데이터(a 내지 i)에 모두 있으므로 1행의 모든 열 값(Contents)을 모두 '1'로 부여할 수 있다.For example, the preprocessor 110 expresses the edge connecting the vertex '1' and the vertex '2' as '1/2' 301, and displays the edge ('1/2') 301. ) Are all in the graph data (a to i), so that all column values (Contents) in one row can be given as '1'.

또한, 전처리부(110)는 정점('1')과 정점('3')을 연결한 간선('1/3')(302)이 그래프 데이터(d)에만 없으므로, 2행의 d열 값만 '0'으로 부여하고 나머지는 모두 '1'로 부여할 수 있다.In addition, the preprocessor 110 does not include the edge ('1/3') 302 connecting the vertex ('1') and the vertex ('3') only in the graph data (d). It can be given as '0' and all others as '1'.

전처리부(110)는 DS 매트릭스(310)에서 열 값이 '1'로 부여된 간선과 그 간선으로 이어진 두 정점을 포함한 서브 그래프를 '패턴'으로 확인할 수 있다. 이를 통해, 전처리부(110)는 DS 매트릭스(310)에서 단일 간선으로 이루어진 패턴의 발생을 확인할 수 있다.The preprocessor 110 may identify a subgraph including an edge having a column value of '1' in the DS matrix 310 and two vertices leading to the edge as a 'pattern'. Through this, the preprocessor 110 may check the occurrence of the pattern consisting of a single edge in the DS matrix 310.

또한, 전처리부(110)는 그래프 스트림이 연속적으로 입력되기 때문에 그래프 데이터가 입력될 때마다 메모리부(150)에 저장하고, 빈발 패턴의 검출이 완료되면 메모리부(150)에 저장된 그래프 데이터를 삭제해서 다음에 입력될 그래프 데이터로부터 연속적으로 빈발 패턴이 검출되도록 할 수 있다.In addition, the preprocessing unit 110 stores the graph data stored in the memory unit 150 every time the graph data is input since the graph streams are continuously input, and deletes the graph data stored in the memory unit 150 when the detection of the frequent pattern is completed. Thus, the frequent pattern can be detected continuously from the graph data to be input next.

빈발 패턴 검출부(120)는 상기 전처리한 그래프 스트림에서 슬라이딩 윈도우 단위로 확인한 패턴 각각에 대한 발생횟수를 카운트하고, 상기 발생횟수에 기초하여, 상기 각 패턴 중 상기 그래프 스트림에서 빈발하는 빈발 패턴을 상기 슬라이딩 윈도우를 이동하면서 검출한다.The frequent pattern detection unit 120 counts the number of occurrences for each of the patterns identified in the sliding window unit in the preprocessed graph stream, and based on the occurrence frequency, sliding the frequent patterns in the graph stream among the patterns. Detect while moving window.

즉, 빈발 패턴 검출부(120)는 하나의 슬라이딩 윈도우에서 패턴 별로 발생횟수를 카운트하고 그 발생횟수가 임계치 이상인 패턴을 빈발 패턴으로 검출할 수 있다.That is, the frequent pattern detection unit 120 may count the number of occurrences for each pattern in one sliding window, and detect a pattern having the occurrence number more than a threshold as a frequent pattern.

일례로, 빈발 패턴 검출부(120)는 그래프 스트림에서 빈발 패턴을 검출하기 위해 먼저 단일 간선으로 이루어진 패턴의 빈발 여부를 판단할 수 있다.For example, the frequent pattern detector 120 may first determine whether a pattern consisting of a single trunk line is frequent to detect a frequent pattern in a graph stream.

구체적으로, 빈발 패턴 검출부(120)는 패턴 별로 상기 2차원 배열값을 합산하여, 상기 슬라이딩 윈도우에 포함되는 그래프 데이터 각각에서, 상기 패턴이 발생되는 FiS(Frequency in Sliding window) 횟수를 카운트 할 수 있다.Specifically, the frequent pattern detection unit 120 may add the two-dimensional array values for each pattern, and count the number of frequency in sliding windows (FiS) in which the pattern is generated from the graph data included in the sliding window. .

이때, 빈발 패턴 검출부(120)는 상기 슬라이딩 윈도우는 복수의 배치(batch)로 구성되는 경우, 상기 각 배치 내에서 상기 2차원 배열값을 상기 패턴 별로 합산하여, 하나의 배치에서 상기 패턴이 발생되는 FiB(Frequency in Batch) 횟수를 카운트하고, 상기 복수의 배치 각각으로 카운트한 상기 FiB 횟수를 더 합산하여, 상기 FiS 횟수를 카운트할 수 있다.In this case, when the sliding window is composed of a plurality of batches, the frequent pattern detection unit 120 sums the two-dimensional array values for each of the patterns in the respective batches to generate the patterns in one batch. The number of FiBs may be counted by counting the number of FiBs (Frequency in Batch), and further adding up the number of FiBs counted in each of the plurality of batches.

예를 들어, 도 3a 및 도 3b를 참조하면, 빈발 패턴 검출부(120)는 전처리 과정에서 구성한 도 3a의 매트릭스(310)에서, 간선('1/2')(301)의 슬라이딩 윈도우 내에서의 발생횟수(FiS 횟수)를 카운트하기 위해 먼저 하나의 슬라이딩 윈도우를 이루는 3개의 배치 각각에서의 발생횟수(FiB 횟수)를 카운트 한 후, 이를 합산할 수 있다.For example, referring to FIGS. 3A and 3B, the frequent pattern detection unit 120 includes a matrix 310 of FIG. 3A configured in a preprocessing process, within the sliding window of the trunk lines '1/2' 301. In order to count the number of occurrences (FiS number), the number of occurrences (FiB number) in each of the three batches forming one sliding window may be counted and then summed.

빈발 패턴 검출부(120)는 간선('1/2')(301)이 배치 1(그래프 데이터 a, b, c) 내에서 발생한 FiB 횟수('3')와, 배치 2(그래프 데이터 d, e, f) 내에서 발생한 FiB 횟수('3')와, 배치 3(그래프 데이터 g, h, i) 내에서의 발생한 FiB 횟수('3')를 합산하여, 도 3b와 같이 FiS 횟수('9')를 카운트 할 수 있다. 마찬가지로, 빈발 패턴 검출부(120)는 다른 단일 간선(302 내지 305)에 대해서도 도 3b와 같이 FiS 횟수를 카운트 할 수 있다.The frequent pattern detection unit 120 includes the number of FiBs ('3') in which the trunk line ('1/2') 301 occurs in batch 1 (graph data a, b, and c), and batch 2 (graph data d, e). , f) the number of FiBs generated in '3' and the number of FiBs generated in batch 3 (graph data g, h, i) ('3') are added together, and the number of FiSs ('9') is shown in FIG. 3B. ') Can be counted. Similarly, the frequent pattern detection unit 120 may count the number of FiSs for the other single edges 302 to 305 as shown in FIG. 3B.

빈발 패턴 검출부(120)는 상기 FiS 횟수가 임계치 이상인 패턴을 빈발 패턴으로서 검출하여, 상기 리스트에 포함시킬 수 있다.The frequent pattern detection unit 120 may detect a pattern having the number of FiSs equal to or greater than a threshold value as a frequent pattern, and include it in the list.

예를 들어, 빈발 패턴 검출부(120)는 임계치(τ)가 '5'로 설정되면, 도 3b에서 FiS 횟수가 임계치 '5' 이상인 간선('1/2', '1/3', '3/4')(301, 302, 305)을 빈발 패턴으로서 검출할 수 있다. 다시 말해, 빈발 패턴 검출부(120)는 도 2의 그래프 스트림(200)으로부터 단일 간선으로 된 3개의 빈발 패턴을 검출할 수 있다.For example, when the threshold value τ is set to '5', the frequent pattern detection unit 120 has trunk lines '1/2', '1/3', and '3' in which the number of FiSs is greater than or equal to the threshold '5' in FIG. 3B. / 4 ') 301, 302, and 305 can be detected as a frequent pattern. In other words, the frequent pattern detector 120 may detect three frequent patterns of a single trunk line from the graph stream 200 of FIG. 2.

다른 일례로, 빈발 패턴 검출부(120)는 두 개 이상의 간선으로 이루어진 확장 패턴의 빈발 여부를 판단하기 위해, 단일 간선으로 이루어진 두 패턴의 발생횟수를 AND 연산하여 카운트할 수 있다.As another example, the frequent pattern detection unit 120 may perform an AND operation on the number of occurrences of two patterns consisting of a single edge to count whether or not an extension pattern consisting of two or more edges is frequent.

실시예에 따라, 빈발 패턴 검출부(120)는 상기 그래프 스트림에서 단일의 간선으로 이루어진 패턴 중에서 상기 빈발 패턴의 검출이 완료되면, 동일한 정점을 가지며 서로 이웃하는 복수의 패턴을 선별하고, 상기 복수의 패턴 각각에 대한 발생횟수를 AND 연산하여, 상기 복수의 패턴 각각이 동시에 발생하는 확장 패턴에 대한 발생횟수를 카운트하고, 임계치 이상으로 발생횟수가 카운트되는 확장 패턴을, 빈발 패턴으로서 검출하여, 상기 리스트에 포함시킬 수 있다.According to an embodiment, the frequent pattern detection unit 120 selects a plurality of patterns having the same vertices and neighboring each other when the detection of the frequent patterns is completed among the patterns consisting of a single trunk line in the graph stream, and the plurality of patterns An AND operation is performed on each occurrence frequency to count the occurrence frequency for the expansion pattern in which each of the plurality of patterns occurs at the same time, and detect the expansion pattern in which the occurrence frequency is counted above the threshold as a frequent pattern, Can be included.

즉, 빈발 패턴 검출부(120)는 검출된 두 빈발 패턴을 AND 연산을 하여 두 패턴이 동시에 발생한 횟수를 카운트하여 빈발 여부를 검출하고, 이 같은 방식으로 계속적으로 패턴을 확장시킬 수 있다.That is, the frequent pattern detection unit 120 performs an AND operation on the detected two frequent patterns, counts the number of times the two patterns occur at the same time, and detects the frequent occurrence, and continuously expands the pattern in this manner.

예를 들어, 빈발 패턴 검출부(120)는 빈발 패턴으로 검출된 3개의 단일 간선('1/2', '1/3', '3/4')(301, 302, 305) 중에서, 간선('1/2')(301)과 간선('1/3')(302)에 대한 발생횟수를 AND 연산하여 두 간선(301, 302)이 동시 발생하는 확장 패턴의 발생횟수를 카운트 할 수 있다.For example, the frequent pattern detection unit 120 may select an edge line among three single edges ('1/2', '1/3', and '3/4') 301, 302, and 305 detected as a frequent pattern. By generating an AND operation on the number of occurrences of the '1/2') 301 and the edges ('1/3') 302, the number of occurrences of the extended pattern simultaneously occurring between the two edges 301 and 302 may be counted. .

빈발 패턴 검출부(120)는 도 3a에 도시된 매트릭스(310)를 참조하면, 간선('1/2')(301)의 발생횟수 "1 1 1; 1 1 1; 1 1 1"와, 간선('1/3')(302)의 발생횟수는 "1 1 1; 0 1 1; 1 1 1"를 AND 연산하여 얻어진 "1 1 1; 0 1 1; 1 1 1"을 통해, 두 간선(301, 302)이 동시에 발생하는 확장 패턴(1/2/3)(306)의 발생횟수(FiS 횟수 '8')를 카운트할 수 있으며, 임계치를 초과하므로 해당 확장 패턴(306)을 빈발 패턴으로 검출할 수 있다.Referring to the matrix 310 illustrated in FIG. 3A, the frequent pattern detection unit 120 generates a frequency "1 1 1; 1 1 1; 1 1 1" of the trunk line ('1/2') 301 and the trunk line. The number of occurrences of the ('1/3') 302 is obtained by performing an AND operation on "1 1 1; 0 1 1; 1 1 1". It is possible to count the number of occurrences (FiS number '8') of the extended patterns (1/2/3) 306 that 301 and 302 occur at the same time, and since the threshold is exceeded, the corresponding extended pattern 306 may be frequently patterned. Can be detected.

이때, 빈발 패턴 검출부(120)는 여러 패턴이 동시에 발생하는 확장 패턴이, 입력된 그래프 스트림에서 빈발하는지 판단하려고 할 때, 서로 연결되어 있는 빈발 패턴을 이용 함으로써, 유의미한 빈발 패턴을 검출할 수 있다.In this case, the frequent pattern detection unit 120 may detect a significant frequent pattern by using frequent patterns that are connected to each other when determining whether an extended pattern in which several patterns occur simultaneously is frequent in an input graph stream.

다시 말해, 빈발 패턴 검출부(120)는 같은 정점으로 연결되는 1개의 간선으로 된 두 빈발 패턴을 이용하여 2개의 간선으로 된 빈발 패턴을 검출할 수 있고, 마찬가지로, 서로 같은 간선을 포함하는 2개의 간선으로 된 두 빈발 패턴을 이용하여 3개의 간선을 포함하는 빈발 패턴을 검출할 수 있다.In other words, the frequent pattern detection unit 120 may detect a frequent pattern of two trunks using two frequent patterns of one trunk connected to the same vertex, and similarly, two trunks including the same trunk By using the two frequent patterns, the frequent pattern including three trunk lines can be detected.

예를 들면, 빈발 패턴 검출부(120)는 빈발 패턴으로 검출된 3개의 단일 간선('1/2', '1/3', '3/4')(301, 302, 305) 중에서, 간선('1/2')(301)과 간선('3/4')(305)의 경우 중복되는 정점이 없어 연결되어 있지 않으므로 두 빈발 패턴(301, 305)이 동시에 발생하는 확장 패턴을 빈발 패턴에서 제외할 수 있다.For example, the frequent pattern detection unit 120 may select the trunk line among the three single trunk lines ('1/2', '1/3', and '3/4') 301, 302, and 305 detected as the frequent patterns. In the case of the '1/2') 301 and the trunk line ('3/4') 305, since the overlapping vertices are not connected, the extension pattern in which the two frequent patterns 301 and 305 occur at the same time is determined from Can be excluded.

출력부(140)는 상기 빈발 패턴에 관한 리스트를, 상기 검출을 요청한 단말에 출력한다.The output unit 140 outputs the list of the frequent patterns to the terminal that has requested the detection.

즉, 출력부(140)는 검출한 빈발 패턴을 단말에 전달함과 동시에 빈발 패턴과 상기 빈발 패턴에 관한 정보(예, 발생횟수)를 테이블 기록부(130)를 통해 빈발 패턴 관리 테이블(160)에 저장하여, 다음 슬라이딩 윈도우에서 활용하도록 할 수 있다.That is, the output unit 140 transmits the detected frequent patterns to the terminal, and simultaneously transmits the frequent patterns and the information about the frequent patterns (eg, the number of occurrences) to the frequent pattern management table 160 through the table recording unit 130. Can be saved for use in the next sliding window.

예를 들어, 도 3b를 참조하면, 테이블 기록부(130)는 입력된 그래프 스트림으로부터 검출한 단일의 간선으로 된 패턴(301 내지 305)과 확장 패턴(306 내지 308) 각각의 발생횟수를, 빈발 패턴 관리 테이블(160, 320) 내 배치 별 FiB 횟수와 FiS 횟수에 각각 기록할 수 있다.For example, referring to FIG. 3B, the table recording unit 130 may generate the frequency of occurrence of each of the single edge patterns 301 to 305 and the expansion patterns 306 to 308 detected from the input graph stream. The number of FiBs and the number of FiSs per batch in the management tables 160 and 320 may be recorded, respectively.

출력부(140)는 빈발 패턴 관리 테이블(160, 320)에서 FiS 횟수가 임계치('5') 이상인 패턴(301, 302, 305 내지 308)을 빈발 패턴의 리스트에 포함시켜 상기 단말에 전달할 수 있다.The output unit 140 may include the patterns 301, 302, 305 to 308 having the number of FiSs greater than or equal to the threshold '5' in the frequent pattern management tables 160 and 320 in the list of the frequent patterns and transmit them to the terminal. .

상술과 같이 상기 그래프 스트림의 임의 지점에서 상기 빈발 패턴의 검출이 완료될 경우, 전처리부(110)는 메모리부(150)에 저장된 그래프 데이터를 삭제하여 메모리 공간을 확보하고, 테이블 기록부(130)는 검출된 빈발 패턴에 관한 정보를 기록한 빈발 패턴 관리 테이블(160)을 마련하여, 차기의 슬라이딩 윈도우에서 빈발 패턴을 검출 시 이전에 검출한 빈발 패턴의 정보를 활용하도록 할 수 있다.When the detection of the frequent pattern is completed at any point of the graph stream as described above, the preprocessor 110 deletes the graph data stored in the memory unit 150 to secure a memory space, and the table recording unit 130 A frequent pattern management table 160 that records information about the detected frequent patterns may be provided to use information on previously detected frequent patterns when detecting frequent patterns in a next sliding window.

구체적으로, 테이블 기록부(130)는 그래프 스트림의 임의 지점에서 빈발 패턴이 검출되면, 상기 슬라이딩 윈도우가 이동할 상기 그래프 스트림의 차기의 지점에서 상기 빈발 패턴이 다시 검출되는지의 여부, 또는 상기 빈발 패턴을 연이어 검출하는 상기 슬라이딩 윈도우의 이동 지점 개수 중 적어도 하나의 빈발 패턴 예측 정보를 분석하고, 상기 빈발 패턴 예측 정보와 상기 발생횟수를, 패턴 별로 기록한 빈발 패턴 관리 테이블(160)을 마련한다.In detail, when a frequent pattern is detected at any point of the graph stream, the table recording unit 130 consecutively detects whether the frequent pattern is detected again at the next point of the graph stream to which the sliding window is to be moved, or successively. The frequent pattern prediction information of at least one moving point number of the sliding window to be detected is analyzed, and a frequent pattern management table 160 for recording the frequent pattern prediction information and the occurrence frequency for each pattern is provided.

예를 들어, 도 3b 및 도 4를 참조하면, 테이블 기록부(130)는 도 4에 도시된 알고리즘을 이용하여 상기 슬라이딩 윈도우를 통해 검출한 빈발 패턴(301, 302, 304, 305 내지 308)이 연이어 빈발하는 슬라이딩 윈도우의 개수('slideNum')를 계산하여 도 3b의 빈발 패턴 관리 테이블(320) 내 'slideNum' 항목에 기록할 수 있다. For example, referring to FIG. 3B and FIG. 4, the table recording unit 130 successively detects frequent patterns 301, 302, 304, 305 to 308 detected through the sliding window using the algorithm shown in FIG. 4. The number of frequent sliding windows 'slideNum' may be calculated and recorded in the 'slideNum' item in the frequent pattern management table 320 of FIG. 3B.

테이블 기록부(130)는 도 4의 알고리즘에 따르면 빈발 패턴(301, 302, 304, 305 내지 308)이 하나의 슬라이딩 윈도우 내에서의 발생횟수('FiS')가 임계치('th') 보다 큰 경우와 작은 경우로 나누어, 빈발 패턴(301, 302, 304, 305 내지 308)이 연이어 빈발하게 되는 슬라이딩 윈도우의 개수('slideNum')를 계산할 수 있다.According to the algorithm of FIG. 4, the table recorder 130 generates a frequency pattern 'FiS' greater than the threshold 'th' in the frequent patterns 301, 302, 304, and 305 to 308 within one sliding window. The number of sliding windows in which frequent patterns 301, 302, 304, and 305 to 308 are successively frequent may be calculated by dividing into small cases.

먼저, 슬라이딩 윈도우 내에서의 발생횟수('FiS')가 임계치('th') 보다 큰 경우, 테이블 기록부(130)는 현재 슬라이딩 윈도우에서 가장 처음 배치(배치 1)에 포함되는 그래프 데이터(a, b, c)를 삭제했을 때 남은 배치 2와 배치 3에 포함되는 그래프 데이터(d 내지 i)에서의 발생횟수를 계산하여 잔여 배치카운트('BatchCount')에 입력하고, 그 다음으로 새로 입력되는 배치 4에 포함되는 그래프 데이터에서의 발생횟수('FiB[slideNum+1]')가 모두 '0'이라고 가정하여, 'BatchCount'에서 'FiB[slideNum+1]'를 차감한 값이 상기 임계치 보다 작아질 때까지 반복한 횟수를 'slideNum'로서 반환할 수 있다.First, when the number of occurrences 'FiS' in the sliding window is greater than the threshold 'th', the table recording unit 130 may include graph data a, which is included in the first batch (batch 1) in the current sliding window. When b and c) are deleted, the number of occurrences of the graph data (d to i) included in the remaining batch 2 and the batch 3 is calculated and entered into the remaining batch count ('BatchCount'), and the newly entered batch is next. Assuming that the number of occurrences ('FiB [slideNum + 1]') in the graph data included in 4 are all '0', the value obtained by subtracting 'FiB [slideNum + 1]' from 'BatchCount' is smaller than the threshold value. You can return the number of iterations until you lose as 'slideNum'.

다음으로, 슬라이딩 윈도우 내에서의 발생횟수('FiS')가 임계치('th') 보다 작은 경우, 테이블 기록부(130)는 새로 입력되는 배치 4에 포함되는 그래프 데이터에서의 발생횟수('FiB[slideNum+1]')가 모두 '1'이라고 가정하여, 'BatchCount'에서 'FiB[slideNum+1]'를 차감한 값이 상기 임계치 보다 작아질 때까지 반복한 횟수를 'slideNum'로서 반환할 수 있다.Next, when the occurrence frequency 'FiS' in the sliding window is smaller than the threshold 'th', the table recording unit 130 generates the occurrence frequency 'FiB [in the graph data included in the newly input batch 4. assuming slideNum + 1] ') is all' 1 ', the number of times iterations until' BatchCount 'is subtracted from' FiB [slideNum + 1] 'is smaller than the threshold can be returned as' slideNum'. have.

테이블 기록부(130)는 'slideNum'이 '0'으로 반환되는 빈발 패턴(305, 307, 308)을 차기의 슬라이딩 윈도우에서 빈발하지 않는 것으로 분석하고, 'slideNum'이 '0'이 아닌 값(예를 들어 -1', '1' 등)으로 반환되는 빈발 패턴(301, 302, 304, 306)을 차기의 슬라이딩 윈도우에서도 빈발하는 패턴으로 분석하여, 반환된 'slideNum'을 빈발 패턴 관리 테이블(320)에 기록할 수 있다.The table recorder 130 analyzes the frequent patterns 305, 307, and 308 in which 'slideNum' is returned as '0' as not frequent in the next sliding window, and the value where 'slideNum' is not '0' (eg, For example, the frequent patterns 301, 302, 304, and 306 returned as -1 ',' 1 ', etc. are analyzed as frequent patterns in the next sliding window, and the returned' slideNum 'is used as a frequent pattern management table (320). ) Can be recorded.

이때, 테이블 기록부(130)는 반환된 'slideNum'의 절대값을 해당 빈발 패턴이 연이어 빈발하게 되는 슬라이딩 윈도우의 개수로 분석할 수 있다. 즉, 'slideNum'의 절대값이 1인 빈발 패턴은 이후의 1개의 슬라이딩 윈도우에서 빈발하는 패턴임을 의미할 수 있다.In this case, the table recording unit 130 may analyze the absolute value of the returned 'slideNum' as the number of sliding windows in which the frequent pattern is frequent. That is, the frequent pattern having an absolute value of 'slideNum' of 1 may mean that the pattern is frequent in one sliding window.

다시 말해 'SlideNum'는 각 패턴이 다음의 슬라이딩 윈도우 동안 빈발하는지 여부와 또는 다음 몇 번의 슬라이딩 윈도우에서 빈발하는지를 계산한 값을 나타낼 수 있다. In other words, 'SlideNum' may represent a value calculated by calculating whether each pattern is frequent during the next sliding window or how many times in the next sliding window.

예를 들어, 도 3b에 도시된 빈발 패턴 관리 테이블(160)에서 'slideNum'이 '1'로 기록된 간선(1/2)(301)은 바로 다음의 슬라이딩 윈도우까지 빈발 패턴으로 예측될 수 있다.For example, in the frequent pattern management table 160 illustrated in FIG. 3B, the edges 1/2 and 301 in which 'slideNum' is recorded as '1' may be predicted as frequent patterns up to the next sliding window. .

이를 검증하기 위해, 도 5b의 다음의 슬라이딩 윈도우(배치 2, 3, 4)에 대한 매트릭스를 참조하면, 간선(1/2)의 발생횟수가 배치 4에서 모두 '0'으로 입력되었다고 하더라도, 그 이전의 배치 2 및 배치 3에서의 발생횟수가 이미 '6'으로 임계치를 초과하므로 간선(1/2)은 다음의 슬라이딩 윈도우에서도 빈발하는 빈발 패턴일 수 있다. 하지만 다시 그 다음의 슬라이딩 윈도우(배치 3, 4, 5)에서 간선(1/2)의 발생횟수가 배치 5에서 모두 '0'으로 입력되면, 그 이전의 배치 3 및 배치 4에서의 발생횟수가 '3'이므로 더 이상 빈발 패턴이 아닐 수 있다. 따라서 이 경우 간선(1/2)의 'slideNum'은 '1'로 기록될 수 있다.To verify this, referring to the matrix for the next sliding window (batch 2, 3, 4) in FIG. 5B, even if the number of occurrences of the trunk edge 1/2 has been entered as '0' in batch 4, the Since the number of occurrences in the previous batch 2 and batch 3 has already exceeded the threshold at '6', the trunk line 1/2 may be a frequent pattern that also occurs frequently in the next sliding window. However, if the number of occurrences of the edge (1/2) in the next sliding window (batch 3, 4, 5) is all entered as '0' in batch 5, then the number of occurrences in batch 3 and batch 4 before that '3', so it may no longer be a frequent pattern. Therefore, in this case, 'slideNum' of the trunk line 1/2 may be recorded as '1'.

빈발 패턴 검출부(120)는 신규의 그래프 데이터가 입력되면, 상기 신규의 그래프 데이터를 구성으로 갖는 그래프 스트림의 지점으로 상기 슬라이딩 윈도우를 이동하고, 상기 이동한 슬라이딩 윈도우에서 확인되는 패턴 중에서, 상기 빈발 패턴 관리 테이블(160)에 상기 빈발 패턴 예측 정보가 기록된 제1 빈발 패턴을 검출하고, 상기 이동한 슬라이딩 윈도우에서 확인되는 패턴 중에서, 상기 빈발 패턴 예측 정보가 기록되지 않은 패턴에 대해 카운트한 발생횟수에 기초하여 제2 빈발 패턴을 추가 검출하고, 상기 제1 및 제2 빈발 패턴을 상기 리스트에 포함시킬 수 있다.When the new graph data is input, the frequent pattern detection unit 120 moves the sliding window to a point of the graph stream having the new graph data as a configuration, and among the patterns identified in the moved sliding window, the frequent pattern detection unit 120 includes: The first frequent pattern in which the frequent pattern prediction information is recorded in the management table 160 is detected, and among the patterns identified in the moved sliding window, the occurrence frequency counted for the pattern in which the frequent pattern prediction information is not recorded. The second frequent pattern may be additionally detected based on the second frequent pattern, and the first and second frequent patterns may be included in the list.

예를 들어, 도 5a 내지 도 5c를 참조하면, 도 5a에 도시된 것처럼 하나의 배치에 포함되는 그래프 데이터(j, k, l)가 새로 입력되는 경우, 전처리부(110)는 신규의 그래프 데이터(j, k, l)를 배치 4(510)로서 도 5b와 같이 차기의 슬라이딩 윈도우(배치 2, 3, 4)에 해당하는 매트릭스(520)를 구성할 수 있다.For example, referring to FIGS. 5A to 5C, when the graph data j, k and l included in one batch are newly input as shown in FIG. 5A, the preprocessor 110 may generate new graph data. The matrix 520 corresponding to the next sliding window (batch 2, 3, 4) may be configured as (4,510) with (j, k, l) as shown in FIG. 5B.

빈발 패턴 검출부(120)는 먼저 입력된 배치 1 대신에 새로 입력된 배치 4를 포함하여 배치 2, 3, 4를 포함하는 차기의 슬라이딩 윈도우로 이동하고, 차기의 슬라이딩 윈도우에서 빈발 패턴을 검출 시, 도 5c에 도시된 빈발 패턴 관리 테이블(160, 530)에서 'slideNum'이 '0'이 아닌 패턴(501, 502, 504, 506)을, 별도의 연산 처리 없이 상기 제1 빈발 패턴으로서 검출하고, 'slideNum'이 '0'인 나머지 패턴(503, 505, 507, 508)에 대해서만 발생횟수를 카운트하고, FiS 횟수가 임계치 이상인 패턴(503, 505)를 제2 빈발 패턴으로 추가 검출할 수 있다.The frequent pattern detection unit 120 moves to the next sliding window including the batches 2, 3, and 4 including the newly inputted batch 4 instead of the batch 1 inputted first, and when detecting the frequent pattern from the next sliding window, In the frequent pattern management tables 160 and 530 illustrated in FIG. 5C, patterns 501, 502, 504 and 506 in which 'slideNum' is not '0' are detected as the first frequent pattern without any arithmetic processing, The number of occurrences may be counted only for the remaining patterns 503, 505, 507, and 508 in which 'slideNum' is '0', and the patterns 503 and 505 in which the FiS count is greater than or equal to the threshold may be additionally detected as the second frequent pattern.

즉, 빈발 패턴 검출부(120)는 이전 슬라이딩 윈도우(배치 1, 2, 3)에서 검출한 제1 빈발 패턴(501, 502, 504, 506) 및 금번 슬라이딩 윈도우(배치 2, 3, 4)에서 추가 검출한 제2 빈발 패턴(503, 505)을, 금번 슬라이딩 윈도우(배치 2, 3, 4)에서 검출한 빈발 패턴의 리스트에 포함시킬 수 있다.That is, the frequent pattern detection unit 120 adds the first frequent patterns 501, 502, 504, 506 detected in the previous sliding windows (batch 1, 2, 3) and the current sliding windows (batch 2, 3, 4). The detected second frequent patterns 503 and 505 can be included in the list of frequent patterns detected by the sliding windows (batch 2, 3, 4) this time.

이처럼, 빈발 패턴 검출부(120)는 이전 슬라이딩 윈도우에서 검출한 빈발 패턴에 관한 빈발 패턴 예측 정보('slideNum')을 활용하여, 필요한 계산만 수행할 수 있어 전체 연산량을 감소시킬 수 있다.As such, the frequent pattern detection unit 120 may perform only necessary calculation by using the frequent pattern prediction information 'slideNum' related to the frequent patterns detected in the previous sliding window, thereby reducing the total amount of computation.

테이블 기록부(130)는 빈발 패턴의 검출이 완료되면, 빈발 패턴 관리 테이블(160)에서 상기 제1 빈발 패턴에 관해 기록된 빈발 패턴 예측 정보('slideNum')를 수정하고, 상기 제2 빈발 패턴에 대해 카운트한 빈발 패턴 예측 정보와 발생횟수를 추가로 기록할 수 있다.When the detection of the frequent patterns is completed, the table recording unit 130 corrects the frequent pattern prediction information 'slideNum' recorded with respect to the first frequent pattern in the frequent pattern management table 160 and applies the second frequent pattern to the second frequent pattern. The frequent pattern prediction information and the number of occurrences that have been counted can be additionally recorded.

예를 들어, 도 5c에 도시된 빈발 패턴 관리 테이블(530)을 참조하면, 테이블 기록부(130)는 상기 제1 빈발 패턴으로 검출된 패턴(501, 502, 504, 506)의 'slideNum'을 '1' 또는 '-1'에서 '0'으로 수정하고, 제2 빈발 패턴으로 검출된 패턴(503, 505)에 대해 배치 4에 해당하는 발생횟수('FiB 배치 4') 및 현재의 슬라이딩 윈도우에서의 발생횟수('FiS')를 기록할 수 있다.For example, referring to the frequent pattern management table 530 illustrated in FIG. 5C, the table recording unit 130 may define 'slideNum' of the patterns 501, 502, 504, and 506 detected as the first frequent patterns. From 1 'or' -1 'to' 0 ', the number of occurrences corresponding to batch 4 (' FiB batch 4 ') and the current sliding window for the patterns 503 and 505 detected as the second frequent patterns The number of occurrences of 'FiS' can be recorded.

이에 따라, 테이블 기록부(130)는 모든 패턴의 'slideNum'을 '0'으로 기록하게 되므로, 빈발 패턴 검출부(120)는 이후의 슬라이딩 윈도우(배치 3, 4, 5)에서 빈발 패턴을 검출 시, 빈발 패턴 관리 테이블(530)을 활용하지 않고 초기와 마찬가지로 모든 패턴에 대해 발생횟수를 카운트하여 빈발 여부를 확인할 수 있다.Accordingly, since the table recording unit 130 records 'slideNum' of all patterns as '0', the frequent pattern detection unit 120 detects the frequent patterns in the subsequent sliding windows (batch 3, 4, and 5). Without using the frequent pattern management table 530, the occurrence frequency may be counted for all patterns as in the initial stage to check whether there are frequent occurrences.

이와 같이, 본 발명에 따르면, 기존의 점진적 빈발 패턴 검출 기법에서 사용되는 슬라이딩 윈도우 방식의 문제점인 중복 계산으로 인한 성능 저하를 해결하기 위해, 이전에 검출한 빈발 패턴에 관한 정보를 저장한 빈발 패턴 관리 테이블(160)를 활용하여 새로운 빈발 패턴을 검출할 수 있다.As described above, according to the present invention, in order to solve the performance degradation due to the overlap calculation, which is a problem of the sliding window method used in the existing gradual frequent pattern detection technique, frequent pattern management storing information on the frequently detected frequent patterns The new frequency pattern may be detected using the table 160.

본 발명에 따르면, 빈발 패턴 관리 테이블(160)에 기존에 검출된 빈발 패턴이 앞으로 몇 개의 슬라이딩 윈도우에서 빈발하는지를 계산해서 저장하고, 이 값을 통해 다음의 슬라이딩 윈도우에서 필요한 계산만 수행하여 전체 연산량을 감소시킬 수 있다.According to the present invention, the frequent pattern management table 160 calculates and stores how many sliding windows the frequent detected patterns are in the future, and performs only the necessary calculation in the next sliding window through this value to calculate the total amount of computation. Can be reduced.

도 2는 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템에서, 연속적으로 입력되는 그래프 스트림의 일례를 도시한 도면이다.2 is a diagram illustrating an example of a graph stream continuously input in the frequent pattern detection system in the graph stream according to an embodiment of the present invention.

일반적으로 그래프 스트림은 연속적으로 입력되는 다수의 그래프 데이터로 구성되기 때문에, 본 발명의 빈발 패턴 검출 시스템은 광범위하고 연속적인 그래프 스트림을 슬라이딩 윈도우 단위로 구분해서 빈발 패턴을 검출할 수 있다.In general, since the graph stream is composed of a plurality of graph data continuously input, the frequent pattern detection system of the present invention can detect a frequent pattern by dividing a wide and continuous graph stream into sliding window units.

다시 말해, 본 발명의 빈발 패턴 검출 시스템은 하나의 슬라이딩 윈도우에 해당하는 그래프 스트림에서 빈발 패턴을 검출한 후 다음의 슬라이딩 윈도우로 이동하는 방식으로 빈발 패턴을 검출해 나갈 수 있다.In other words, the frequent pattern detection system of the present invention may detect a frequent pattern by detecting a frequent pattern in a graph stream corresponding to one sliding window and then moving to the next sliding window.

도 2에는 하나의 슬라이딩 윈도우에 해당하는 그래프 스트림(200)이 도시되어 있다. 본 명세서에서 하나의 슬라이딩 윈도우는 사용자 단말에 의해 사전에 규정된 개수(예를 들어, '9개')의 그래프 데이터를 포함하도록 구성될 수 있다.2 shows a graph stream 200 corresponding to one sliding window. In the present specification, one sliding window may be configured to include a predetermined number (eg, '9') of graph data by the user terminal.

도 2에 도시된 것처럼, 하나의 슬라이딩 윈도우에 해당하는 그래프 스트림(200)은 9개의 그래프 데이터(a 내지 i)로 구성되며 3개의 배치(batch)로 구분될 수 있다. 하나의 배치 당 3개의 그래프 데이터를 포함하고, 배치 3개가 모여 하나의 슬라이딩 윈도우를 이룰 수 있다.As illustrated in FIG. 2, the graph stream 200 corresponding to one sliding window is composed of nine graph data a to i and may be divided into three batches. Three graph data may be included in one batch, and three batches may form one sliding window.

본 명세서에서 슬라이딩 윈도우는 1개의 배치 단위로 이동할 수 있다. 따라서 본 발명의 빈발 패턴 검출 시스템은 배치 하나를 이루는 3개의 그래프 데이터가 신규로 입력되었을 때 슬라이딩 윈도우를 배치 하나만큼 이동할 수 있다.In the present specification, the sliding window may move in one arrangement unit. Therefore, the frequent pattern detection system of the present invention can move the sliding window by one batch when three graph data constituting one batch are newly input.

도 3a는 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템에서, 간선의 유무에 따라 구성한 매트릭스의 일례를 도시한 도면이다.3A illustrates an example of a matrix configured according to the presence or absence of edges in a frequent pattern detection system in a graph stream according to an embodiment of the present invention.

도 3a를 참조하면, 본 발명의 빈발 패턴 검출 시스템은 하나의 슬라이딩 윈도우에 해당하는 그래프 스트림(도 2의 200 참조)이 입력되면, 입력된 순서대로 그래프 스트림(200)을 메모리부에 저장하고, 그래프 스트림(200)에 포함된 9개의 그래프 데이터(a 내지 i) 각각에서 두 정점을 잇는 간선의 유무를 표현하는 매트릭스(310)를 도 3a와 같이 구성할 수 있다.Referring to FIG. 3A, when a graph stream (see 200 of FIG. 2) corresponding to one sliding window is input, the frequent pattern detection system stores the graph stream 200 in a memory unit in the order of input. A matrix 310 representing the presence or absence of edges connecting two vertices in each of the nine graph data a to i included in the graph stream 200 may be configured as shown in FIG. 3A.

본 발명의 빈발 패턴 검출 시스템은 정점('1')과 정점('2')을 연결한 간선을 '1/2'(301)로 표현하고, a부터 i의 그래프 데이터 중에서 간선('1/2')(301)이 있는 그래프 데이터에 '1' 값을 부여하고 간선('1/2')(301)이 없는 그래프 데이터에 '0'을 부여 함으로써 매트릭스(310)의 1행을 구성할 수 있다.In the frequent pattern detection system of the present invention, the edge connecting the vertex '1' and the vertex '2' is represented by '1/2' 301, and the edge ('1 / 2 ') 301 to assign a value of' 1 'to graph data without edges (' 1/2 ') 301 and to assign' 0 'to graph data without edges (' 1/2 ') 301. Can be.

마찬가지로 본 발명의 빈발 패턴 검출 시스템은 다른 간선(302 내지 305)에 대해서도 각 그래프 데이터(a부터 i)에 대해 간선의 유무에 따른 2차원 배열값('1' 또는 '0')을 부여하여, 도 3a에 도시한 매트릭스(310)를 구성할 수 있다.Similarly, the frequent pattern detection system of the present invention gives a two-dimensional array value ('1' or '0') according to the presence or absence of the trunk line to the respective graph data (a to i) for the other trunks (302 to 305), The matrix 310 shown in FIG. 3A can be configured.

본 발명의 빈발 패턴 검출 시스템은 도 3a에 도시한 매트릭스(310)에서 '1' 값이 부여된 간선을, 패턴이 발생한 것으로 카운트할 수 있다.The frequent pattern detection system of the present invention can count the edges to which the value '1' is assigned in the matrix 310 shown in FIG. 3A as the occurrence of the pattern.

즉 본 발명의 빈발 패턴 검출 시스템은 매트릭스(310)를 구성하여, 하나의 슬라이딩 윈도우에 해당하는 그래프 스트림(200)에서 간선 하나로 이루어진 패턴의 발생을 모두 확인할 수 있다.That is, the frequent pattern detection system of the present invention configures the matrix 310 to identify all occurrences of a pattern composed of one edge in the graph stream 200 corresponding to one sliding window.

도 3b는 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템에서, 초기 빈발 패턴 관리 테이블의 일례를 도시한 도면이다.3B illustrates an example of an initial frequent pattern management table in a frequent pattern detection system in a graph stream according to an exemplary embodiment of the present invention.

도 3b를 참조하면, 본 발명의 빈발 패턴 검출 시스템은 하나의 슬라이딩 윈도우에서 빈발 패턴의 검출이 완료되면 검출된 빈발 패턴에 관한 정보를 기록한 초기 빈발 패턴 관리 테이블(320)을 마련할 수 있다.Referring to FIG. 3B, the frequent pattern detection system of the present invention may provide an initial frequent pattern management table 320 that records information on the detected frequent patterns when the frequent pattern is detected in one sliding window.

즉 본 발명의 빈발 패턴 검출 시스템은 슬라이딩 윈도우 단위로 확인한 패턴에 대한 발생횟수와 빈발하는지 여부 및 이후에 이어서 빈발하는 슬라이딩 윈도우의 개수 중 적어도 하나의 정보를 빈발 패턴 관리 테이블(320)에 기록할 수 있다.That is, the frequent pattern detection system of the present invention may record information on at least one of the number of occurrences and frequent occurrences of the pattern identified in the sliding window unit and the number of frequent sliding windows thereafter in the frequent pattern management table 320. have.

이를 위해, 본 발명의 빈발 패턴 검출 시스템은 도 3a에 도시한 매트릭스(310)에서 간선(301 내지 305) 별로 3개의 배치 각각에서의 발생횟수(FiB 횟수)를 카운트하여 'FiB' 항목에 각각 기록하고, 이를 합산하여 하나의 슬라이딩 윈도우에서의 발생횟수(FiS)를 카운트하고, 'FiS' 항목에 기록할 수 있다.To this end, the frequent pattern detection system of the present invention counts the number of occurrences (FiB times) in each of three arrangements for each of the trunk lines 301 to 305 in the matrix 310 shown in FIG. In addition, the sums may be counted and the number of occurrences (FiS) of one sliding window may be counted and recorded in the 'FiS' item.

예를 들어, 본 발명의 빈발 패턴 검출 시스템은 간선('1/2')(301)이 배치 1(그래프 데이터 a, b, c) 내에서 발생한 FiB 횟수('3')와, 배치 2(그래프 데이터 d, e, f) 내에서 발생한 FiB 횟수('3')와, 배치 3(그래프 데이터 g, h, i) 내에서의 발생한 FiB 횟수('3')를 카운트하고, 이를 각각 합산하여 도 3b와 같이 FiS 횟수('9')를 카운트하고, 카운트한 모든 발생횟수를 빈발 패턴 관리 테이블(320)에 기록할 수 있으며 마찬가지로, 다른 단일 간선(302 내지 305)에 대해서도 FiB 횟수와 FiS 횟수를 카운트하여 빈발 패턴 관리 테이블(320)에 기록할 수 있다.For example, in the frequent pattern detection system of the present invention, the edge ('1/2') 301 has a number of FiBs ('3') generated in batch 1 (graph data a, b, c), and batch 2 ( The number of FiBs ('3') generated in the graph data d, e and f and the number of FiBs generated in the batch 3 (graph data g, h and i) ('3') are counted and summed up, respectively. As shown in FIG. 3B, the number of FiS ('9') can be counted, and all counted occurrences can be recorded in the frequent pattern management table 320. Similarly, the number of FiBs and the number of FiSs for the other single edges 302 to 305 can be recorded. Can be counted and recorded in the frequent pattern management table 320.

여기서, 본 발명의 빈발 패턴 검출 시스템은 FiS 횟수가 설정된 임계치('5') 이상으로 기록된 패턴(301, 302, 305)을 빈발 패턴으로서 검출할 수 있다. 즉, 본 발명의 빈발 패턴 검출 시스템은 도 2의 그래프 스트림(200)으로부터 단일 간선으로 된 3개의 빈발 패턴을 검출할 수 있다.Here, the frequent pattern detection system of the present invention can detect the patterns 301, 302, and 305 recorded above the set threshold '5' of the number of FiS as the frequent patterns. That is, the frequent pattern detection system of the present invention can detect three frequent patterns of a single trunk line from the graph stream 200 of FIG. 2.

또한, 본 발명의 빈발 패턴 검출 시스템은 빈발 패턴으로 검출된 3개의 단일 간선('1/2', '1/3', '3/4')(301, 302, 305) 중에서, 정점('1')을 중복해서 가지는 간선('1/2')(301)과 간선('1/3')(302)에 대한 발생횟수를 AND 연산하여 두 간선(301, 302)이 동시 발생하는 확장 패턴('1/2/3')(306)의 발생횟수(FiS 횟수 '8')를 카운트하고, 마찬가지로 정점('3')을 중복해서 가지는 간선('1/3')(302)과 간선('3/4')(305)에 대한 발생횟수를 AND 연산하여 두 간선(302, 305)이 동시 발생하는 확장 패턴('1/3/4')(307)의 발생횟수(FiS 횟수 '6')를 카운트하여, 빈발 패턴 관리 테이블(320)에 기록할 수 있다.In addition, the frequent pattern detection system of the present invention, among the three single edges ('1/2', '1/3', '3/4') (301, 302, 305) detected in the frequent pattern, vertex (' 1 ") an AND operation of the number of occurrences of the trunk ('1/2') 301 and the trunk ('1/3') 302 that overlap each other, so that the two trunks 301 and 302 simultaneously occur. The number of occurrences of the pattern ('1/2/3') 306 (FiS number '8') is counted, and similarly to the edge ('1/3') 302 having overlapping vertices ('3'). The number of occurrences of the extended pattern ('1/3/4') 307 where the two edges 302 and 305 occur simultaneously by ANDing the occurrences of the edges ('3/4') 305 (FiS times) '6') can be counted and recorded in the frequent pattern management table 320.

또한, 본 발명의 빈발 패턴 검출 시스템은 두 확장 패턴(306, 307)이 중복한 간선('1/3')(302)에 의해 서로 연결되어 있으므로, 두 확장 패턴(306, 307)이 동시 발생하는 확장 패턴('1/2/3/4')(308)의 발생횟수(FiS 횟수 '6')를 AND 연산에 의해 카운트하여, 빈발 패턴 관리 테이블(320)에 기록할 수 있다.In addition, in the frequent pattern detection system of the present invention, since the two expansion patterns 306 and 307 are connected to each other by overlapping trunk lines ('1/3') 302, the two expansion patterns 306 and 307 are simultaneously generated. The number of occurrences (FiS number '6') of the extended pattern ('1/2/3/4') 308 can be counted by the AND operation, and recorded in the frequent pattern management table 320.

여기서, 본 발명의 빈발 패턴 검출 시스템은 발생횟수가 임계치를 초과하는 각 확장 패턴(305, 306, 307)을 빈발 패턴으로서 검출할 수 있다. 즉, 본 발명의 빈발 패턴 검출 시스템은 도 2의 그래프 스트림(200)으로부터 단일 간선으로 된 3개의 빈발 패턴과, 2개의 간선으로 된 2개의 빈발 패턴 및 3개의 간선으로 된 1개의 빈발 패턴을 검출할 수 있다.Here, the frequent pattern detection system of the present invention can detect each expansion pattern 305, 306, 307 whose occurrence frequency exceeds a threshold as a frequent pattern. That is, the frequent pattern detection system of the present invention detects three frequent patterns of a single trunk, two frequent patterns of two trunks, and one frequent pattern of three trunks from the graph stream 200 of FIG. can do.

즉 본 발명의 빈발 패턴 검출 시스템은 빈발 패턴 관리 테이블(320)에서 FiS 횟수가 임계치('5') 이상인 패턴(301, 302, 305 내지 308)을, 도 2의 하나의 슬라이딩 윈도우에서 검출한 빈발 패턴의 리스트에 포함시켜 단말에 전달할 수 있다.That is, the frequent pattern detection system of the present invention detects the patterns 301, 302, 305 to 308 in which the number of FiSs is greater than or equal to the threshold '5' in the frequent pattern management table 320 in one sliding window of FIG. 2. Included in the list of patterns can be delivered to the terminal.

또한, 본 발명의 빈발 패턴 검출 시스템은 도 2에 도시한 슬라이딩 윈도우에 해당하는 그래프 스트림(200)에서 검출한 빈발 패턴(301, 302, 304, 305 내지 308)이 연이어 빈발하는 슬라이딩 윈도우의 개수('slideNum')를 도 4에 도시된 알고리즘을 이용하여 계산하여 도 3b의 빈발 패턴 관리 테이블(320) 내 'slideNum' 항목에 기록할 수 있다.In addition, the frequent pattern detection system of the present invention includes the number of sliding windows in which frequent patterns 301, 302, 304, 305 to 308 detected frequently in the graph stream 200 corresponding to the sliding window shown in FIG. 'slideNum') may be calculated using the algorithm shown in FIG. 4 and recorded in the 'slideNum' item in the frequent pattern management table 320 of FIG. 3B.

여기서, 'slideNum'의 절대값은 도 2에 도시한 슬라이딩 윈도우에서 검출된 빈발 패턴(301, 302, 304, 305 내지 308)이 이후의 슬라이딩 윈도우에서 연이어 빈발하게 되는 슬라이딩 윈도우의 개수를 의미할 수 있다.Here, the absolute value of 'slideNum' may mean the number of sliding windows in which frequent patterns 301, 302, 304, and 305 to 308 detected in the sliding window shown in FIG. 2 frequently occur in subsequent sliding windows. have.

예를 들어 'slideNum'이 '0'인 패턴은 차기의 슬라이딩 윈도우에서 빈발하지 않는 패턴임을 의미하고, 'slideNum'이 '0'이 아닌 값(예컨대 '-1' 또는 '1')인 패턴은 차기의 슬라이딩 윈도우에서도 빈발하는 패턴임을 의미할 수 있다.For example, a pattern with 'slideNum' of '0' means a pattern that does not occur frequently in the next sliding window. A pattern with 'slideNum' other than '0' (for example, '-1' or '1') It may mean that the pattern is also frequent in the next sliding window.

따라서 본 발명의 빈발 패턴 검출 시스템은 차기의 슬라이딩 윈도우에서 빈발 패턴을 검출 시, 빈발 패턴 관리 테이블(320) 내 'slideNum'이 '0'인 패턴에 대해서만 발생횟수를 카운트하여 빈발 여부를 확인하므로 전체 연산량을 감소시키고 중복된 계산을 생략하여 빈발 검출을 위한 성능을 향상시킬 수 있다.Therefore, when the frequent pattern detection system of the present invention detects the frequent pattern in the next sliding window, the frequency of occurrence is only counted for the pattern in which the 'slideNum' is '0' in the frequent pattern management table 320 to check whether there is a frequent occurrence. By reducing the amount of computation and eliminating redundant calculations, the performance for frequent detection can be improved.

도 4는 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템에서, 빈발 패턴이 향후 이어서 빈발하게 될 슬라이딩 윈도우의 개수(slideNum)를 계산하는 알고리즘을 도시한 도면이다.FIG. 4 is a diagram illustrating an algorithm for calculating a number of sliding windows in which a frequent pattern will subsequently occur frequently in a frequent pattern detection system in a graph stream according to an embodiment of the present invention.

도 4를 참조하면, 본 발명의 빈발 패턴 검출 시스템은, 도 3b에서 빈발 패턴으로 검출된 각 패턴(301, 302, 304, 305 내지 308)에 대해, 하나의 슬라이딩 윈도우 내에서의 발생횟수('FiS')가 임계치('th') 보다 큰 경우와 작은 경우로 나누어, 각 패턴(301, 302, 304, 305 내지 308)이 연이어 빈발하게 되는 슬라이딩 윈도우의 개수('slideNum')를 계산할 수 있다.Referring to FIG. 4, in the frequent pattern detection system of the present invention, for each of the patterns 301, 302, 304, and 305 to 308 detected as the frequent patterns in FIG. 3B, the number of occurrences in one sliding window (' FiS ') is divided into a case where the threshold value' th 'is greater than and smaller than the threshold value' th ', thereby calculating the number of sliding windows (' slideNum ') in which each pattern 301, 302, 304, 305 to 308 frequently occurs in succession. .

먼저, 본 발명의 빈발 패턴 검출 시스템은 슬라이딩 윈도우 내에서의 발생횟수('FiS')가 임계치('th') 보다 큰 경우, 현재 슬라이딩 윈도우에서 가장 처음 배치(배치 1)에 포함되는 그래프 데이터(a, b, c)를 삭제했을 때 남은 배치 2와 배치 3에 포함되는 그래프 데이터(d 내지 i)에서의 발생횟수를 계산하여 잔여 배치카운트('BatchCount')에 입력하고, 그 다음으로 새로 입력되는 배치 4에 포함되는 그래프 데이터에서의 발생횟수('FiB[slideNum+1]')가 모두 '0'이라고 가정하여, 'BatchCount'에서 'FiB[slideNum+1]'를 차감한 값이 상기 임계치 보다 작아질 때까지 반복한 횟수를 'slideNum'로서 반환할 수 있다.First, in the frequent pattern detection system of the present invention, when the occurrence frequency 'FiS' in the sliding window is greater than the threshold 'th', the graph data included in the first batch (batch 1) in the current sliding window ( When a, b, and c) are deleted, the number of occurrences of the graph data (d to i) included in the remaining batch 2 and batch 3 is calculated and entered into the remaining batch count ('BatchCount'), and then newly input. Assuming that the number of occurrences ('FiB [slideNum + 1]') in the graph data included in the batch 4 is '0', the value obtained by subtracting 'FiB [slideNum + 1]' from 'BatchCount' is the threshold value. The number of iterations until it gets smaller can be returned as 'slideNum'.

다음으로, 본 발명의 빈발 패턴 검출 시스템은 슬라이딩 윈도우 내에서의 발생횟수('FiS')가 임계치('th') 보다 작은 경우, 새로 입력되는 배치 4에 포함되는 그래프 데이터에서의 발생횟수('FiB[slideNum+1]')가 모두 '1'이라고 가정하여, 'BatchCount'에서 'FiB[slideNum+1]'를 차감한 값이 상기 임계치 보다 작아질 때까지 반복한 횟수를 'slideNum'로서 반환할 수 있다.Next, when the frequency of occurrence 'FiS' in the sliding window is smaller than the threshold 'th', the frequency pattern detection system of the present invention generates the frequency of occurrence (') in the graph data included in the newly input batch 4. Assume that FiB [slideNum + 1] ') is all' 1 ', and returns as' slideNum' the number of iterations until 'BatchCount' is subtracted from 'FiB [slideNum + 1]' until it becomes smaller than the threshold. can do.

본 발명의 빈발 패턴 검출 시스템은 'slideNum'이 '0'으로 반환되는 빈발 패턴(305, 307, 308)을 차기의 슬라이딩 윈도우에서 빈발하지 않는 것으로 분석하고, 'slideNum'이 '0'이 아닌 값(예를 들어 -1', '1' 등)으로 반환되는 빈발 패턴(301, 302, 304, 306)을 차기의 슬라이딩 윈도우에서도 빈발하는 패턴으로 분석하여, 반환된 'slideNum'을 도 3b의 빈발 패턴 관리 테이블(320)에 기록할 수 있다.The frequent pattern detection system of the present invention analyzes the frequent patterns 305, 307, and 308 in which 'slideNum' is returned as '0' as not frequent in the next sliding window, and has a value in which 'slideNum' is not '0'. The frequent patterns 301, 302, 304, and 306 returned as (eg, -1 ',' 1 ', etc.) are analyzed as frequent patterns in the next sliding window, and the returned' slideNum 'is frequently found in FIG. 3B. It can be recorded in the pattern management table 320.

여기서 'SlideNum'는 각 패턴이 다음의 슬라이딩 윈도우 동안 빈발하는지 여부와 또는 다음 몇 번의 슬라이딩 윈도우에서 빈발하는지를 계산한 값을 나타낼 수 있다. 예를 들어, 도 3b에 도시된 빈발 패턴 관리 테이블(320)에서 'slideNum'이 '1'로 기록된 간선(1/2)(301)은 바로 다음의 슬라이딩 윈도우까지 빈발 패턴으로 예측될 수 있다.Here, 'SlideNum' may represent a value calculated by calculating whether each pattern is frequent during the next sliding window or how many times the next sliding window is frequent. For example, in the frequent pattern management table 320 illustrated in FIG. 3B, the trunk lines 1/2 301 in which 'slideNum' is recorded as '1' may be predicted as frequent patterns up to the next sliding window. .

도 5a 내지 도 5c는 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 시스템에서, 슬라이딩 윈도우를 이동한 후 빈발 패턴 관리 테이블을 활용하여 빈발 패턴을 검출하는 과정을 설명하기 위한 도면이다.5A to 5C are diagrams for describing a process of detecting a frequent pattern using a frequent pattern management table after moving a sliding window in a frequent pattern detection system in a graph stream according to an embodiment of the present invention.

도 5a에는 신규로 입력되는 그래프 스트림의 일례가 도시되어 있고, 도 5b에는 슬라이딩 윈도우가 이동한 후에 구성되는 매트릭스가 도시되어 있으며, 도 5c에는 슬라이딩 윈도우의 이동 후에 빈발 패턴 검출에 따라 수정한 빈발 패턴 관리 테이블이 도시되어 있다.5A shows an example of a newly input graph stream, FIG. 5B shows a matrix configured after the sliding window moves, and FIG. 5C shows a frequent pattern modified according to the frequent pattern detection after the sliding window moves. The management table is shown.

도 5a 내지 도 5c를 참조하면, 본 발명의 빈발 패턴 검출 시스템은 도 5a에 도시된 것처럼 하나의 배치를 이루는 3개의 그래프 데이터(j, k, l)가 새로 입력되는 경우, 도 5b에 도시된 차기의 슬라이딩 윈도우(배치 2, 3, 4)에 해당하는 매트릭스(520)에, 신규의 그래프 데이터(j, k, l)를 배치 4(510)로서 더 추가할 수 있다.Referring to FIGS. 5A to 5C, the frequent pattern detection system of the present invention is illustrated in FIG. 5B when three graph data j, k, l forming a batch are newly input as shown in FIG. 5A. New graph data j, k, 1 may be further added as batch 4 510 to the matrix 520 corresponding to the next sliding window (batch 2, 3, 4).

예를 들어, 본 발명의 빈발 패턴 검출 시스템은 새로 입력된 그래프 데이터(j, k, l)에서 간선('1/2', '1/4', '2/4')이 모두 있으므로 "1 1 1"로 부여하고, 간선('1/3')은 모두 없으므로 "0 0 0"으로 부여하고, 간선('3/4')는 그래프 데이터(k)에만 있으므로 "0 1 0"으로 부여한 배치 4(510)의 2차원 배열값을 매트릭스(520)에 추가할 수 있다.For example, in the frequent pattern detection system of the present invention, since all edges ('1/2', '1/4', '2/4') are all present in the newly input graph data (j, k, l), " 1 " 1 1 ", and since there is no edge ('1/3'), it is assigned as" 0 0 0 ". Because edge ('3/4') is only in the graph data (k), it is assigned as" 0 1 0 ". The two-dimensional array of arrangement 4 510 may be added to the matrix 520.

본 발명의 빈발 패턴 검출 시스템은 신규로 입력된 3개의 그래프 데이터(j, k, l)를 배치 4로서 포함하도록 슬라이딩 윈도우를 이동하고, 이동한 슬라이딩 윈도우(차기의 슬라이딩 윈도우)에서 빈발 패턴을 검출 시, 도 5c에 도시된 빈발 패턴 관리 테이블(530)에서 'slideNum'이 '0'이 아닌 패턴(501, 502, 504, 506)을, 별도의 연산 처리 없이 빈발 패턴으로서 검출하고, 'slideNum'을 '1' 또는 '-1'에서 '0'으로 수정할 수 있다.The frequent pattern detection system of the present invention moves the sliding window to include three newly input graph data (j, k, l) as the batch 4, and detects the frequent pattern from the moved sliding window (next sliding window). In the frequent pattern management table 530 illustrated in FIG. 5C, patterns 501, 502, 504, and 506 in which 'slideNum' is not '0' are detected as a frequent pattern without any arithmetic processing, and 'slideNum' Can be modified from '1' or '-1' to '0'.

즉 빈발 패턴 검출 시스템은 'slideNum'이 '1' 또는 '-1'이면, 이후 1개의 슬라이딩 윈도우 동안 빈발 패턴임을 의미하므로 해당 패턴(501, 502, 504, 506)의 빈발 여부 확인을 위한 발생횟수의 카운트 또는 AND 연산을 생략할 수 있다.That is, if the 'slideNum' is '1' or '-1', since the frequent pattern detection system means a frequent pattern during one sliding window, the frequency of occurrence for checking whether the corresponding pattern 501, 502, 504, 506 is frequent The count or AND operation can be omitted.

또한, 본 발명의 빈발 패턴 검출 시스템은 'slideNum'이 '0'이면 이후의 슬라이딩 윈도우에서 빈발하지 않는 패턴임을 의미하므로, 'slideNum'이 '0'인 패턴(503, 505, 507, 508)에 대해서만 발생횟수 카운트를 통해 빈발 여부를 확인할 수 있다.In addition, the frequent pattern detection system of the present invention means that if the slideNum is '0', it means that the pattern is not frequent in the subsequent sliding window, and thus the patterns 503, 505, 507, and 508 in which the 'slideNum' is '0' are used. Only the occurrence count can be checked for frequent occurrences.

본 발명의 빈발 패턴 검출 시스템은 도 5a와 같이 새로운 그래프가 입력되었을 때, 도 5b에 도시된 DSMatrix(520)에 배치 4(510)를 추가하고, 기본적인 빈발 패턴 검출을 위한 FiB와 FiS를 계산하여 도 5c의 빈발 패턴 관리 테이블(530)에 입력할 수 있다.In the frequent pattern detection system of the present invention, when a new graph is input as shown in FIG. 5A, batch 4 510 is added to the DSMatrix 520 illustrated in FIG. 5B, and FiB and FiS are calculated for basic frequent pattern detection. It may be input to the frequent pattern management table 530 of FIG. 5C.

하지만 본 발명의 빈발 패턴 검출 시스템은 'slideNum'이 '0'이 아니라면, 'slideNum'을 '0'으로 감소시킨 후, FiB와 FiS의 계산을 생략할 수 있다. 즉, 본 발명의 빈발 패턴 검출 시스템은 도 5c의 빈발 패턴 관리 테이블(530)에서 간선(501, 502, 504)에 대해서는 FiB와 FiS의 계산을 생략할 수 있다.However, in the frequent pattern detection system of the present invention, if 'slideNum' is not '0', after reducing 'slideNum' to '0', calculation of FiB and FiS may be omitted. That is, in the frequent pattern detection system of the present invention, calculation of FiB and FiS may be omitted for the trunk lines 501, 502, and 504 in the frequent pattern management table 530 of FIG. 5C.

또한, 본 발명의 빈발 패턴 검출 시스템은 여러 간선들로 이루어진 확장 패턴의 빈발 패턴을 검출할 때에도 앞의 과정과 유사한 방법을 이용하며, 도 5c의 빈발 패턴 관리 테이블(530)에서 간선('1/2/3')(506)의 'slideNum'이 '1'이었기 때문에 FiB, FiS을 계산하지 않더라도 빈발 패턴으로 검출할 수 있으며 'slideNum'을 '0'으로 변경한 후 빈발 패턴으로 유지할 수 있다.In addition, the frequent pattern detection system of the present invention uses a method similar to the above process when detecting the frequent pattern of the extended pattern composed of several edges, and the edge ('1 /) in the frequent pattern management table 530 of FIG. 5C. Since 'slideNum' of '2/3') 506 is '1', even if FiB and FiS are not calculated, the frequent pattern can be detected, and after changing 'slideNum' to '0', the frequent pattern can be maintained.

한편, 본 발명의 빈발 패턴 검출 시스템은 확장 패턴인 간선('1/3/4')(507)의 경우에는 'slideNum'이 '0'이었기 때문에, 새로 입력된 배치 4에 대해서만 간선('1/3/4')(507)을 이루는 두 개의 단일 간선('1/3', '3/4')(502, 505)을 AND 연산하여 FiB와 FiS를 계산할 수 있다.On the other hand, in the frequent pattern detection system of the present invention, since 'slideNum' is' 0 'in the case of the trunk line (' 1/3/4 ') 507, which is an extension pattern, the trunk line (' 1) is only applied to the newly inputted batch 4. FiB and FiS may be calculated by performing an AND operation on two single edges ('1/3', '3/4') 502 and 505 constituting (3/4 ') (507).

예를 들어 본 발명의 빈발 패턴 검출 시스템은 도 5b에서 간선('1/3')(502)의 배치 4 부분은 "0 0 0"이고, 간선('3/4')(505)의 배치 4 부분은 "0 1 0"이므로, "0 0 0 & 0 1 0 = 0 0 0"에 따라 배치 4의 FiB를 '0'으로 카운트 하고, 차기의 슬라이딩 윈도우에서의 발생횟수 'FiS'를 '3'으로 카운트 할 수 있으며 'FiS'가 임계치 미만이므로 간선('1/3/4')(507)은 빈발 패턴이 아닌 것으로 판단할 수 있다. 이때 본 발명의 빈발 패턴 검출 시스템은 'FiS'가 임계치 이상이면 간선('1/3/4')(507)을 빈발 패턴으로서 검출하고 도 4에 도시된 알고리즘에 따라 'slideNum'을 계산할 수 있다.For example, in the frequent pattern detection system of the present invention, the arrangement 4 portion of the trunk line ('1/3') 502 in FIG. 5B is "0 0 0" and the arrangement of the trunk line ('3/4') 505. Since the 4 part is "0 1 0", count the FiB of batch 4 as' 0 'according to "0 0 0 & 0 1 0 = 0 0 0" and set the number of occurrences of' FiS 'in the next sliding window to' 3 'and' FiS 'is less than the threshold, so the trunk line (' 1/3/4 ') 507 may determine that it is not a frequent pattern. At this time, the frequent pattern detection system of the present invention may detect the edge ('1/3/4') 507 as the frequent pattern and calculate 'slideNum' according to the algorithm shown in FIG. 4 when the 'FiS' is greater than or equal to the threshold. .

이하, 도 6에서는 본 발명의 실시예들에 따른 빈발 패턴 검출 시스템(100)의 작업 흐름을 상세히 설명한다.Hereinafter, the workflow of the frequent pattern detection system 100 according to the embodiments of the present invention will be described in detail.

도 6은 본 발명의 일실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 방법의 순서를 도시한 흐름도이다. 6 is a flowchart illustrating a method of detecting a frequent pattern in a graph stream according to an embodiment of the present invention.

본 실시예에 따른 그래프 스트림에서의 빈발 패턴 검출 방법은 상술한 빈발 패턴 검출 시스템(100)에 의해 수행될 수 있다.The frequent pattern detection method in the graph stream according to the present embodiment may be performed by the frequent pattern detection system 100 described above.

도 6을 참조하면, 단계(610)에서, 빈발 패턴 검출 시스템(100)은 단말(예를 들어 관리자 단말)로부터 그래프 스트림에 대한 빈발 패턴 검출이 요청되는지 확인한다.Referring to FIG. 6, in step 610, the frequent pattern detection system 100 checks whether frequent pattern detection for a graph stream is requested from a terminal (for example, a manager terminal).

상기 단말에 의해 빈발 패턴 검출이 요청되는 경우, 단계(620)에서, 빈발 패턴 검출 시스템(100)은 연속적으로 입력되는 그래프 데이터로 이루어진 그래프 스트림을 전처리한다.When the frequent pattern detection is requested by the terminal, in step 620, the frequent pattern detection system 100 preprocesses the graph stream including the continuously input graph data.

빈발 패턴 검출 시스템(100)은 연속적으로 입력되는 그래프 스트림 중에서 현재 입력된 그래프 데이터 뿐만 아니라 전후의 그래프 데이터를 모두 고려해서 빈발 패턴이 검출될 수 있도록, 예를 들어 'DSMatrix'이라는 2차원 배열구조를 이용하여 입력된 그래프 데이터를 저장할 수 있다.The frequent pattern detection system 100 generates, for example, a two-dimensional array structure called 'DSMatrix' so that frequent patterns can be detected in consideration of not only current graph data but also front and rear graph data among consecutively input graph streams. You can save the entered graph data.

여기서 'DSMatrix'는 boolean 형식의 배열이기 때문에 기존의 DSTree 보다 적은 공간에 많은 데이터를 저장할 수 있으며, 그래프 데이터에서 간선의 유무를 '1' 또는 '0'으로 표현하기 때문에 그래프 데이터의 빠른 추가, 삭제가 가능하여 슬라이딩 윈도우 방식에 적합하다.In this case, 'DSMatrix' is a boolean type array, so more data can be stored in less space than the existing DSTree, and the presence or absence of edges in the graph data is expressed as '1' or '0', so the graph data can be added or deleted quickly. It is possible to fit the sliding window method.

예를 들어, 도 3a를 참조하면, 빈발 패턴 검출 시스템(100)은 하나의 슬라이딩 윈도우에 해당하는 그래프 스트림에 포함되는 그래프 데이터(a 내지 i)에서 간선(301 내지 305)이 있으면 '1'을 부여하고 없으면 '0'을 부여한 매트릭스(310)를 구성하여 그래프 데이터를 저장할 수 있다.For example, referring to FIG. 3A, the frequent pattern detection system 100 selects '1' if there are edges 301 to 305 in the graph data a to i included in the graph stream corresponding to one sliding window. If not, the graph 310 may be configured to store '0' and store the graph data.

단계(630)에서, 빈발 패턴 검출 시스템(100)은 상기 전처리한 그래프 스트림에서 슬라이딩 윈도우 단위로 확인한 패턴 각각에 대한 발생횟수를 카운트하고, 상기 발생횟수에 기초하여, 상기 각 패턴 중 상기 그래프 스트림에서 빈발하는 빈발 패턴을 상기 슬라이딩 윈도우를 이동하면서 검출한다.In step 630, the frequent pattern detection system 100 counts the number of occurrences for each of the patterns identified in the sliding window unit in the preprocessed graph stream, and based on the occurrence frequency, in the graph stream of the patterns Frequent frequent patterns are detected while moving the sliding window.

즉, 빈발 패턴 검출 시스템(100)은 그래프 스트림 상을 이동하는 슬라이딩 윈도우에서 패턴 별로 발생횟수('FiS')를 카운트하고 그 발생횟수가 임계치 이상인 패턴을 빈발 패턴으로 검출하며, 검출된 빈발 패턴에 관한 정보('slideNum')를 계산하여 빈발 패턴 관리 테이블에 기록하고, 상기 슬라이딩 윈도우를 이동한 후 상기 빈발 패턴 관리 테이블에 기록된 정보('slideNum')를 활용하여 필요한 연산만 수행하여 빈발 패턴을 빠르게 검출해 나갈 수 있다.That is, the frequent pattern detection system 100 counts the number of occurrences ('FiS') for each pattern in the sliding window moving on the graph stream, and detects a pattern having the occurrence frequency more than a threshold as a frequent pattern, and detects the frequent pattern. Calculate the information ('slideNum') in the frequent pattern management table, move the sliding window, and then perform only necessary operations using the information ('slideNum') recorded in the frequent pattern management table to perform frequent patterns. It can be detected quickly.

또한, 본 발명의 빈발 패턴 검출 시스템(100)은 단일 간선으로 이루어진 두 패턴의 발생횟수를 AND 연산하여, 두 개 이상의 간선으로 이루어진 확장 패턴의 빈발 여부를 판단할 수 있다.In addition, the frequent pattern detection system 100 of the present invention may determine whether the expansion pattern composed of two or more trunks is frequent by performing an AND operation on the number of occurrences of two patterns consisting of a single trunk.

예를 들어, 본 발명의 빈발 패턴 검출 시스템(100)은 빈발 패턴으로 검출된 3개의 단일 간선('1/2', '1/3', '3/4')(301, 302, 305) 중에서, 간선('1/2')(301)과 간선('1/3')(302)에 대한 발생횟수를 AND 연산하여 두 간선(301, 302)이 동시 발생하는 확장 패턴의 발생횟수를 카운트 할 수 있다.For example, the frequent pattern detection system 100 of the present invention includes three single edges ('1/2', '1/3', '3/4') 301, 302, and 305 detected as frequent patterns. Of the edges ('1/2') 301 and the number of occurrences of the edges ('1/3') 302 by ANDing the number of occurrences of the extended pattern at which the two edges 301 and 302 simultaneously occur. You can count.

이때, 본 발명의 빈발 패턴 검출 시스템(100)은 두 패턴의 연결성을 고려하여, 동일한 정점을 가지며 서로 이웃하는 복수의 패턴을 선별하여 발생횟수를 AND 연산 함으로써, 그래프 스트림으로부터 유의미한 빈발 패턴을 검출할 수 있다.At this time, the frequent pattern detection system 100 of the present invention can detect a significant frequent pattern from the graph stream by ANDing the number of occurrences by selecting a plurality of patterns having the same vertex and neighboring each other in consideration of the connectivity of the two patterns. Can be.

단계(650)에서, 빈발 패턴 검출 시스템(100)은 상기 빈발 패턴에 관한 리스트를, 상기 검출을 요청한 단말에 출력한다.In step 650, the frequent pattern detection system 100 outputs a list of the frequent patterns to the terminal requesting the detection.

일례로, 빈발 패턴 검출 시스템(100)은 슬라이딩 윈도우 별로 검출한 빈발 패턴에 관한 리스트를 단말에 출력할 수 있다.For example, the frequent pattern detection system 100 may output a list regarding the frequent patterns detected for each sliding window to the terminal.

예를 들어 빈발 패턴 검출 시스템(100)은 도 2에 도시한 슬라이딩 윈도우에 해당하는 그래프 스트림(200)으로부터 검출한 단일 간선으로 된 3개의 빈발 패턴과, 2개의 간선으로 된 2개의 빈발 패턴 및 3개의 간선으로 된 1개의 빈발 패턴을 포함하는 리스트를 단말에 전달할 수 있다.For example, the frequent pattern detection system 100 includes three frequent patterns of single edges detected from the graph stream 200 corresponding to the sliding window shown in FIG. 2, two frequent patterns of two trunks, and three. A list including one frequent pattern of three trunks may be delivered to the terminal.

이와 같이, 본 발명에 따르면, 이전 슬라이딩 윈도우에서 검출된 패턴이 향후 빈발할지 또는 빈발하지 않을지를 계산한 예측 정보를 활용하여 전체 연산량을 줄이고, 패턴 간의 연결성을 고려하여 유의미한 빈발 패턴을 검출할 수 있다.As described above, according to the present invention, it is possible to reduce the overall calculation amount by using prediction information calculated whether the pattern detected in the previous sliding window is frequent or not frequent, and detect a significant frequent pattern in consideration of the connectivity between the patterns. .

본 발명의 실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to an embodiment of the present invention can be implemented in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium. The computer readable medium may include program instructions, data files, data structures, and the like, alone or in combination. The program instructions recorded on the media may be those specially designed and constructed for the purposes of the embodiments, or they may be of the kind well-known and available to those having skill in the computer software arts. Examples of computer readable recording media include magnetic media such as hard disks, floppy disks and magnetic tape, optical media such as CD-ROMs, DVDs, and magnetic disks such as floppy disks. Magneto-optical media, and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include machine code, such as produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like. The hardware device described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described by the limited embodiments and the drawings as described above, various modifications and variations are possible to those skilled in the art from the above description. For example, the described techniques may be performed in a different order than the described method, and / or components of the described systems, structures, devices, circuits, etc. may be combined or combined in a different form than the described method, or other components. Or even if replaced or replaced by equivalents, an appropriate result can be achieved.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are within the scope of the claims that follow.

100: 빈발 패턴 검출 시스템
110: 전처리부 120: 빈발 패턴 검출부
130: 테이블 기록부 140: 출력부
150: 메모리부 160: 빈발 패턴 관리 테이블
100: frequent pattern detection system
110: preprocessing unit 120: frequent pattern detection unit
130: table recording unit 140: output unit
150: memory unit 160: frequent pattern management table

Claims (12)

빈발 패턴에 대한 검출이 요청 됨에 따라,
연속적으로 입력되는 그래프 데이터로 이루어진 그래프 스트림을 전처리 하는 단계;
상기 전처리한 그래프 스트림에서 슬라이딩 윈도우 단위로 확인한 패턴 각각에 대한 발생횟수를 카운트하는 단계;
상기 발생횟수에 기초하여, 상기 각 패턴 중 상기 그래프 스트림에서 빈발하는 빈발 패턴을, 상기 슬라이딩 윈도우를 이동하면서 검출하는 단계;
상기 그래프 스트림의 임의 지점에서 상기 빈발 패턴이 검출되면,
상기 슬라이딩 윈도우가 이동할 상기 그래프 스트림의 차기의 지점에서 상기 빈발 패턴이 다시 검출되는지의 여부, 또는 상기 빈발 패턴을 연이어 검출하는 상기 슬라이딩 윈도우의 이동 지점 개수 중 적어도 하나의 빈발 패턴 예측 정보를 분석하는 단계;
상기 빈발 패턴 예측 정보와 상기 발생횟수를, 패턴 별로 기록한 빈발 패턴 관리 테이블을 마련하는 단계; 및
상기 빈발 패턴에 관한 리스트를, 상기 검출을 요청한 단말에 출력하는 단계
를 포함하고,
상기 검출하는 단계는,
신규의 그래프 데이터가 입력되면, 상기 신규의 그래프 데이터를 구성으로 갖는 그래프 스트림의 지점으로 상기 슬라이딩 윈도우를 이동하는 단계;
상기 이동한 슬라이딩 윈도우에서 확인되는 패턴 중에서, 상기 빈발 패턴 관리 테이블에 상기 빈발 패턴 예측 정보가 기록된 제1 빈발 패턴을 검출하고, 상기 이동한 슬라이딩 윈도우에서 확인되는 패턴 중에서, 상기 빈발 패턴 예측 정보가 기록되지 않은 패턴에 대해 카운트한 발생횟수에 기초하여 제2 빈발 패턴을 추가 검출하는 단계; 및
상기 제1 및 제2 빈발 패턴을 상기 리스트에 포함시키는 단계
를 포함하는 그래프 스트림에서의 빈발 패턴 검출 방법.
As detection for frequent patterns is requested,
Preprocessing a graph stream comprising continuously input graph data;
Counting the number of occurrences of each pattern identified in units of sliding windows in the preprocessed graph stream;
Detecting, based on the number of occurrences, a frequent pattern occurring in the graph stream among the patterns while moving the sliding window;
If the frequent pattern is detected at any point in the graph stream,
Analyzing the frequent pattern prediction information of at least one of whether the frequent pattern is detected again at a next point of the graph stream to which the sliding window is to be moved, or the number of moving points of the sliding window which subsequently detect the frequent pattern; ;
Providing a frequent pattern management table recording the frequent pattern prediction information and the occurrence frequency for each pattern; And
Outputting a list of the frequent patterns to a terminal that has requested the detection;
Including,
The detecting step,
If new graph data is input, moving the sliding window to a point in the graph stream having the new graph data as a configuration;
Among the patterns identified in the moved sliding window, a first frequent pattern in which the frequent pattern prediction information is recorded in the frequent pattern management table is detected, and among the patterns identified in the moved sliding window, the frequent pattern prediction information is Further detecting a second frequent pattern based on the number of occurrences counted for the unrecorded pattern; And
Including the first and second frequent patterns in the list
Frequency pattern detection method in a graph stream comprising a.
제1항에 있어서,
상기 그래프 스트림에서 단일의 간선으로 이루어진 패턴 중에서 상기 빈발 패턴의 검출이 완료되면,
상기 검출하는 단계는,
동일한 정점을 가지며 서로 이웃하는 복수의 패턴을 선별하는 단계;
상기 복수의 패턴 각각에 대한 발생횟수를 AND 연산하여, 상기 복수의 패턴 각각이 동시에 발생하는 확장 패턴에 대한 발생횟수를 카운트하는 단계; 및
임계치 이상으로 발생횟수가 카운트되는 확장 패턴을, 빈발 패턴으로서 검출하여, 상기 리스트에 포함시키는 단계
를 더 포함하는 빈발 패턴 검출 방법.
The method of claim 1,
When the detection of the frequent pattern is completed among the pattern consisting of a single edge in the graph stream,
The detecting step,
Selecting a plurality of patterns having the same vertex and neighboring each other;
Counting the number of occurrences of the extended pattern in which each of the plurality of patterns occurs simultaneously by performing an AND operation on the number of occurrences of each of the plurality of patterns; And
Detecting an extended pattern whose occurrence number is counted above a threshold value as a frequent pattern and including the same in the list;
Frequent pattern detection method further comprising.
삭제delete 삭제delete 제1항에 있어서,
상기 그래프 스트림을 입력되는 순서에 따라 저장하는 메모리부에, 상기 슬라이딩 윈도우에서 규정하는 개수의 그래프 데이터가 저장되면,
상기 전처리 하는 단계는,
상기 슬라이딩 윈도우에 포함되는 그래프 데이터 각각에서 두 정점을 잇는 간선의 유무에 따라, '1' 또는 '0'의 2차원 배열값을 부여한 매트릭스를 구성하는 단계; 및
상기 2차원 배열값이 '1'로 부여된 간선 및 상기 간선으로 이어진 두 정점을 포함한 서브 그래프를, 상기 패턴으로 확인하는 단계
를 포함하는 빈발 패턴 검출 방법.
The method of claim 1,
When the number of graph data defined in the sliding window is stored in the memory unit storing the graph stream in the order of input,
The pretreatment step,
Constructing a matrix to which a two-dimensional array value of '1' or '0' is assigned according to the presence or absence of edges connecting two vertices in each of the graph data included in the sliding window; And
Identifying, by the pattern, a subgraph including the edges given by the two-dimensional array value as '1' and the two vertices leading to the edges;
Frequent pattern detection method comprising a.
제5항에 있어서,
상기 발생횟수를 카운트하는 단계는,
상기 패턴 별로 상기 2차원 배열값을 합산하여, 상기 슬라이딩 윈도우에 포함되는 그래프 데이터 각각에서, 상기 패턴이 발생되는 FiS(Frequency in Sliding window) 횟수를 카운트하는 단계
를 포함하는 빈발 패턴 검출 방법.
The method of claim 5,
Counting the number of occurrences,
Counting the number of frequency in sliding windows (FIS) in which the pattern is generated in each of graph data included in the sliding window by adding the two-dimensional array values for each of the patterns.
Frequent pattern detection method comprising a.
제6항에 있어서,
상기 슬라이딩 윈도우가 복수의 배치(batch)로 구성되는 경우,
상기 발생횟수를 카운트하는 단계는,
상기 각 배치 내에서 상기 2차원 배열값을 상기 패턴 별로 합산하여, 하나의 배치에서 상기 패턴이 발생되는 FiB(Frequency in Batch) 횟수를 카운트하는 단계; 및
상기 복수의 배치 각각으로 카운트한 상기 FiB 횟수를 더 합산하여, 상기 FiS 횟수를 카운트하는 단계
를 더 포함하는 빈발 패턴 검출 방법.
The method of claim 6,
When the sliding window is composed of a plurality of batches,
Counting the number of occurrences,
Counting the number of frequency in batch (FiB) in which the pattern is generated in one batch by adding the two-dimensional array values to each of the patterns in each batch; And
Counting the number of FiSs by further adding up the number of FiBs counted in each of the plurality of batches.
Frequent pattern detection method further comprising.
제6항에 있어서,
상기 검출하는 단계는,
상기 FiS 횟수가 임계치 이상인 패턴을 빈발 패턴으로서 검출하여, 상기 리스트에 포함시키는 단계
를 더 포함하는 빈발 패턴 검출 방법.
The method of claim 6,
The detecting step,
Detecting as a frequent pattern a pattern having the FiS number greater than or equal to a threshold and including the pattern in the list;
Frequent pattern detection method further comprising.
빈발 패턴에 대한 검출이 요청 됨에 따라,
연속적으로 입력되는 그래프 데이터로 이루어진 그래프 스트림을 전처리 하는 전처리부;
상기 전처리한 그래프 스트림에서 슬라이딩 윈도우 단위로 확인한 패턴 각각에 대한 발생횟수를 카운트하고, 상기 발생횟수에 기초하여, 상기 각 패턴 중 상기 그래프 스트림에서 빈발하는 빈발 패턴을, 상기 슬라이딩 윈도우를 이동하면서 검출하는 빈발 패턴 검출부;
상기 그래프 스트림의 임의 지점에서 상기 빈발 패턴이 검출되면,
상기 슬라이딩 윈도우가 이동할 상기 그래프 스트림의 차기의 지점에서 상기 빈발 패턴이 다시 검출되는지의 여부, 또는 상기 빈발 패턴을 연이어 검출하는 상기 슬라이딩 윈도우의 이동 지점 개수 중 적어도 하나의 빈발 패턴 예측 정보를 분석하여, 상기 빈발 패턴 예측 정보와 상기 발생횟수를, 패턴 별로 기록한 빈발 패턴 관리 테이블을 마련하는 테이블 기록부; 및
상기 빈발 패턴에 관한 리스트를, 상기 검출을 요청한 단말에 출력하는 출력부
를 포함하고,
상기 빈발 패턴 검출부는,
신규의 그래프 데이터가 입력되면, 상기 신규의 그래프 데이터를 구성으로 갖는 그래프 스트림의 지점으로 상기 슬라이딩 윈도우를 이동하고,
상기 이동한 슬라이딩 윈도우에서 확인되는 패턴 중에서, 상기 빈발 패턴 관리 테이블에 상기 빈발 패턴 예측 정보가 기록된 제1 빈발 패턴을 검출하고,
상기 이동한 슬라이딩 윈도우에서 확인되는 패턴 중에서, 상기 빈발 패턴 예측 정보가 기록되지 않은 패턴에 대해 카운트한 발생횟수에 기초하여 제2 빈발 패턴을 추가 검출하고,
상기 제1 및 제2 빈발 패턴을 상기 리스트에 포함시키는
그래프 스트림에서의 빈발 패턴 검출 시스템.
As detection for frequent patterns is requested,
A preprocessing unit for preprocessing a graph stream including continuously input graph data;
Counting the number of occurrences for each of the patterns identified in the sliding window unit in the pre-processed graph stream, and detecting, based on the occurrence frequency, the frequent patterns occurring in the graph stream among the patterns while moving the sliding window. A frequent pattern detection unit;
If the frequent pattern is detected at any point in the graph stream,
Analyzing the frequent pattern prediction information of at least one of whether the frequent pattern is detected again at a next point of the graph stream to which the sliding window is to be moved, or the number of moving points of the sliding window which subsequently detect the frequent pattern; A table recording unit for preparing a frequent pattern management table that records the frequent pattern prediction information and the number of occurrences for each pattern; And
An output unit for outputting a list of the frequent patterns to a terminal requesting the detection
Including,
The frequent pattern detection unit,
When new graph data is input, the sliding window is moved to a point of a graph stream having the new graph data as a configuration,
A first frequent pattern in which the frequent pattern prediction information is recorded in the frequent pattern management table is detected among the patterns identified in the moved sliding window,
Among the patterns identified in the moved sliding window, a second frequent pattern is further detected based on the number of occurrences counted for the pattern for which the frequent pattern prediction information is not recorded.
Including the first and second frequent patterns in the list.
Frequency Pattern Detection System in Graph Stream.
제9항에 있어서,
상기 그래프 스트림에서 단일의 간선으로 이루어진 패턴 중에서 상기 빈발 패턴의 검출이 완료되면,
상기 빈발 패턴 검출부는,
동일한 정점을 가지며 서로 이웃하는 복수의 패턴을 선별하고,
상기 복수의 패턴 각각에 대한 발생횟수를 AND 연산하여, 상기 복수의 패턴 각각이 동시에 발생하는 확장 패턴에 대한 발생횟수를 카운트하고,
임계치 이상으로 발생횟수가 카운트되는 확장 패턴을, 빈발 패턴으로서 검출하여, 상기 리스트에 포함시키는
빈발 패턴 검출 시스템.
The method of claim 9,
When the detection of the frequent pattern is completed among the pattern consisting of a single edge in the graph stream,
The frequent pattern detection unit,
Selecting a plurality of patterns having the same vertices and neighboring each other,
ANDing the number of occurrences for each of the plurality of patterns, counting the number of occurrences for the extended pattern in which each of the plurality of patterns occurs simultaneously,
An extended pattern whose occurrence count is counted above a threshold is detected as a frequent pattern and included in the list.
Frequent pattern detection system.
삭제delete 삭제delete
KR1020180048780A 2018-04-26 2018-04-26 Method and system for detecting frequent pattern in graph streams KR102053175B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180048780A KR102053175B1 (en) 2018-04-26 2018-04-26 Method and system for detecting frequent pattern in graph streams

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180048780A KR102053175B1 (en) 2018-04-26 2018-04-26 Method and system for detecting frequent pattern in graph streams

Publications (2)

Publication Number Publication Date
KR20190124604A KR20190124604A (en) 2019-11-05
KR102053175B1 true KR102053175B1 (en) 2019-12-06

Family

ID=68580973

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180048780A KR102053175B1 (en) 2018-04-26 2018-04-26 Method and system for detecting frequent pattern in graph streams

Country Status (1)

Country Link
KR (1) KR102053175B1 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101705778B1 (en) * 2015-01-29 2017-02-13 충북대학교 산학협력단 Sliding window based frequent patterns management method for mining weighted maximal frequent patterns over data stream

Also Published As

Publication number Publication date
KR20190124604A (en) 2019-11-05

Similar Documents

Publication Publication Date Title
Bui et al. Spatial-temporal graph neural network for traffic forecasting: An overview and open research issues
US10089367B2 (en) Expediting pattern matching queries against time series data
CN110210227B (en) Risk detection method, device, equipment and storage medium
CN111210326A (en) Method and system for constructing user portrait
JP6352512B1 (en) Signal processing apparatus, signal processing method, signal processing program, and data structure
CN107016571A (en) Data predication method and its system
WO2015180340A1 (en) Data mining method and device
Mashtalir et al. Spatio-temporal video segmentation
CN110110154B (en) Graph file processing method, device and storage medium
Huo et al. Graph autoencoders for business process anomaly detection
CN115801463B (en) Industrial Internet platform intrusion detection method and device and electronic equipment
CN112087316A (en) Network anomaly root cause positioning method based on anomaly data analysis
KR102039244B1 (en) Data clustering method using firefly algorithm and the system thereof
Wang et al. Reconstruction of missing trajectory data: a deep learning approach
US20150205647A1 (en) Event correlation
KR102053175B1 (en) Method and system for detecting frequent pattern in graph streams
CN110837529B (en) Big data analysis monitoring method and device, server and readable storage medium
JP2012079205A (en) Personal information anonymizing device and method
JP2017054487A (en) Method and system for fusing business data for distributional queries
CN115935208A (en) Online segmentation method, equipment and medium for multi-element time sequence running data of data center equipment
CN113887518A (en) Behavior detection method and device, electronic equipment and storage medium
Cyganek Change detection in multidimensional data streams with efficient tensor subspace model
Oselio et al. Time-varying interaction estimation using ensemble methods
Islam et al. A multi-mode real-time system verification model using efficient event-driven dataset
Tancrez et al. Histogram based bounds and approximations for production lines

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
N231 Notification of change of applicant
E701 Decision to grant or registration of patent right
GRNT Written decision to grant