KR102317205B1 - Method and apparatus for estimating parameters of compression algorithm - Google Patents

Method and apparatus for estimating parameters of compression algorithm Download PDF

Info

Publication number
KR102317205B1
KR102317205B1 KR1020190157684A KR20190157684A KR102317205B1 KR 102317205 B1 KR102317205 B1 KR 102317205B1 KR 1020190157684 A KR1020190157684 A KR 1020190157684A KR 20190157684 A KR20190157684 A KR 20190157684A KR 102317205 B1 KR102317205 B1 KR 102317205B1
Authority
KR
South Korea
Prior art keywords
compression algorithm
data
groups
bit stream
values corresponding
Prior art date
Application number
KR1020190157684A
Other languages
Korean (ko)
Other versions
KR20210067759A (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 KR1020190157684A priority Critical patent/KR102317205B1/en
Publication of KR20210067759A publication Critical patent/KR20210067759A/en
Application granted granted Critical
Publication of KR102317205B1 publication Critical patent/KR102317205B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/41Bandwidth or redundancy reduction
    • H04N1/411Bandwidth or redundancy reduction for the transmission or storage or reproduction of two-tone pictures, e.g. black and white pictures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology

Abstract

압축된 데이터를 복원하는 방법에 있어서, 데이터의 비트 스트림(bit stream)을 각각이 복수 개의 비트들을 포함하는 그룹들로 분할하고, 그룹들 각각에 대응되는 값들의 빈도 분포를 생성하고, 빈도 분포에 기초하여 데이터의 압축 시 사용된 압축 알고리즘을 판단하고, 비트 스트림으로부터 복수의 이진 영상(binary image)들을 획득하고, 복수의 이진 영상들을 합하여 최종 이미지를 획득하고, 최종 이미지를 뉴럴 네트워크에 입력하여 상기 판단된 압축 알고리즘의 파라미터를 추정하고, 파라미터를 이용하여 상기 데이터를 압축 해제하여 복원할 수 있다.In a method for reconstructing compressed data, a bit stream of data is divided into groups each including a plurality of bits, a frequency distribution of values corresponding to each of the groups is generated, and the frequency distribution is Determining a compression algorithm used when compressing data based on, obtaining a plurality of binary images from a bit stream, summing a plurality of binary images to obtain a final image, and inputting the final image into a neural network to The determined parameters of the compression algorithm may be estimated, and the data may be decompressed and restored using the parameters.

Description

압축된 데이터를 복원하는 방법 및 장치{Method and apparatus for estimating parameters of compression algorithm}Method and apparatus for restoring compressed data {Method and apparatus for estimating parameters of compression algorithm}

본 개시는 압축된 데이터를 복원하는 방법 및 장치에 관한 것이다.The present disclosure relates to a method and apparatus for recovering compressed data.

데이터를 더 적은 저장 공간에 효율적으로 기록하기 위해 데이터를 압축시키는 다양한 데이터 압축 알고리즘들이 개발되고 있다. Various data compression algorithms are being developed to compress data in order to efficiently write the data to less storage space.

한편, 압축된 데이터에는 데이터의 압축에 사용된 압축 알고리즘의 종류 및 압축 당시 설정되었던 파라미터 값에 대한 정보를 담는 헤더가 존재할 수 있으나, 헤더가 손상된 경우에는 압축된 데이터를 압축 해제할 수 없다는 문제점이 있다.On the other hand, the compressed data may include a header containing information on the type of compression algorithm used for data compression and the parameter values set at the time of compression. However, if the header is damaged, the compressed data cannot be decompressed. have.

기존에는 이러한 문제점을 해결하기 위해 무차별 대입(brute-force search)을 이용하여, 압축 해제가 될 때까지 다양한 압축 알고리즘들 및 각 압축 알고리즘의 가능한 파라미터의 조합을 통해 압축 해제를 시도하는 방법이 있었으나, 많은 계산량과 긴 시간을 필요로 한다는 한계점이 있었다.In the past, there was a method of attempting decompression through a combination of various compression algorithms and possible parameters of each compression algorithm until decompression using brute-force search to solve this problem. There was a limitation in that a large amount of calculation and a long time were required.

다양한 실시예들은 압축된 데이터를 복원하는 방법 및 장치를 제공하는데 있다. 본 개시가 이루고자 하는 기술적 과제는 상기된 바와 같은 기술적 과제들로 한정되지 않으며, 이하의 실시예들로부터 또 다른 기술적 과제들이 유추될 수 있다.Various embodiments are directed to providing a method and apparatus for restoring compressed data. The technical problems to be achieved by the present disclosure are not limited to the technical problems as described above, and other technical problems may be inferred from the following embodiments.

본 개시의 일 측면에 따르면, 압축된 데이터를 복원하는 방법에 있어서, 상기 데이터의 비트 스트림(bit stream)을 각각이 복수 개의 비트들을 포함하는 그룹들로 분할하는 단계; 상기 그룹들 각각에 대응되는 값들의 빈도 분포를 생성하는 단계; 상기 빈도 분포에 기초하여 상기 데이터의 압축 시 사용된 압축 알고리즘을 판단하는 단계; 상기 비트 스트림으로부터 복수의 이진 영상(binary image)들을 획득하는 단계; 상기 복수의 이진 영상들을 합하여 최종 이미지를 획득하고, 상기 최종 이미지를 뉴럴 네트워크에 입력하여 상기 판단된 압축 알고리즘의 파라미터를 추정하는 단계; 및 상기 파라미터를 이용하여 상기 데이터를 압축 해제하여 복원하는 단계를 포함할 수 있다. According to an aspect of the present disclosure, there is provided a method for reconstructing compressed data, the method comprising: dividing a bit stream of the data into groups each including a plurality of bits; generating a frequency distribution of values corresponding to each of the groups; determining a compression algorithm used when compressing the data based on the frequency distribution; obtaining a plurality of binary images from the bit stream; obtaining a final image by summing the plurality of binary images, and estimating the determined parameters of the compression algorithm by inputting the final image into a neural network; and decompressing and restoring the data using the parameter.

또한, 상기 생성하는 단계는, 상기 그룹들 각각에 포함된 비트들의 개수에 기초하여 0부터 N(N은 자연수)까지의 값을 포함하는 배열을 생성하는 단계; 및 상기 배열 상에 상기 그룹들 각각에 대응되는 값들의 빈도 수를 저장하는 단계; 를 더 포함할 수 있다. In addition, the generating may include: generating an array including values from 0 to N (N is a natural number) based on the number of bits included in each of the groups; and storing the frequency number of values corresponding to each of the groups in the array. may further include.

또한, 상기 판단하는 단계는, 상기 그룹들 각각에 대응되는 값들의 빈도 수를 모두 합한 값에 대한 상기 그룹들 각각에 대응되는 값들 중 기 설정된 구간 내의 값들의 빈도 수를 합한 값의 비율 값이 임계값 미만인지 여부를 판단할 수 있다.In addition, in the determining step, a ratio value of the sum of the frequencies of values within a preset section among the values corresponding to each of the groups to the sum of the frequencies of values corresponding to each of the groups is a threshold value. It can be determined whether the value is less than or not.

또한, 상기 판단하는 단계는, 상기 비율이 임계값 미만인 경우에는, 상기 데이터의 압축 시 사용된 압축 알고리즘은 LZ(Lempel-Ziv)77 압축 알고리즘에 해당한다고 판단하고, 상기 파라미터는 서치 버퍼(search buffer)의 크기 값에 해당할 수 있다.In addition, in the determining step, if the ratio is less than the threshold, it is determined that the compression algorithm used for compressing the data corresponds to the LZ (Lempel-Ziv) 77 compression algorithm, and the parameter is a search buffer ) may correspond to the size value of

또한, 상기 획득하는 단계는, 상기 비트 스트림을 각각이 복수 개의 비트들을 포함하는 1*M(M은 자연수)차원의 벡터들로 분할하는 단계; 및 상기 벡터들 각각을 m*m(m은 자연수)차원의 벡터들로 변환하여 상기 복수의 이진 영상들을 획득하는 단계; 를 포함할 수 있다.In addition, the obtaining may include: dividing the bit stream into 1*M (M is a natural number) dimensional vectors each including a plurality of bits; and converting each of the vectors into m*m (m is a natural number) dimensional vectors to obtain the plurality of binary images. may include.

또한, 상기 최종 이미지는, 상기 벡터들 각각에 포함되는 복수 개의 비트들의 개수 및 상기 판단된 압축 알고리즘의 파라미터에 기초하여 결정될 수 있다. Also, the final image may be determined based on the number of bits included in each of the vectors and the determined parameter of the compression algorithm.

본 개시의 다른 측면에 따르면, 압축된 데이터를 복원하는 방법을 구현하기 위한 프로그램이 기록된, 컴퓨터로 판독 가능한 기록 매체에 있어서, 상기 방법은, 상기 데이터의 비트 스트림(bit stream)을 각각이 복수 개의 비트들을 포함하는 그룹들로 분할하는 단계; 상기 그룹들 각각에 대응되는 값들의 빈도 분포를 생성하는 단계; 상기 빈도 분포에 기초하여 상기 데이터의 압축 시 사용된 압축 알고리즘을 판단하는 단계; 상기 비트 스트림으로부터 복수의 이진 영상(binary image)들을 획득하는 단계; 상기 복수의 이진 영상들을 합하여 최종 이미지를 획득하고, 상기 최종 이미지를 뉴럴 네트워크에 입력하여 상기 판단된 압축 알고리즘의 파라미터를 추정하는 단계; 및 상기 파라미터를 이용하여 상기 데이터를 압축 해제하여 복원하는 단계를 포함할 수 있다.According to another aspect of the present disclosure, in a computer-readable recording medium recorded with a program for implementing a method of restoring compressed data, the method includes a plurality of bit streams of the data. dividing the bits into groups comprising bits; generating a frequency distribution of values corresponding to each of the groups; determining a compression algorithm used when compressing the data based on the frequency distribution; obtaining a plurality of binary images from the bit stream; obtaining a final image by summing the plurality of binary images, and estimating the determined parameters of the compression algorithm by inputting the final image into a neural network; and decompressing and restoring the data using the parameter.

본 개시의 또 다른 측면에 따르면, 하드웨어와 결합되어, 압축된 데이터를 복원하는 방법을 실행시키기 위하여 매체에 저장된 컴퓨터 프로그램에 있어서, 상기 방법은, 상기 데이터의 비트 스트림(bit stream)을 각각이 복수 개의 비트들을 포함하는 그룹들로 분할하는 단계; 상기 그룹들 각각에 대응되는 값들의 빈도 분포를 생성하는 단계; 상기 빈도 분포에 기초하여 상기 데이터의 압축 시 사용된 압축 알고리즘을 판단하는 단계; 상기 비트 스트림으로부터 복수의 이진 영상(binary image)들을 획득하는 단계; 상기 복수의 이진 영상들을 합하여 최종 이미지를 획득하고, 상기 최종 이미지를 뉴럴 네트워크에 입력하여 상기 판단된 압축 알고리즘의 파라미터를 추정하는 단계; 및 상기 파라미터를 이용하여 상기 데이터를 압축 해제하여 복원하는 단계를 포함할 수 있다.According to another aspect of the present disclosure, in combination with hardware, in a computer program stored in a medium to execute a method for restoring compressed data, the method includes: each of a plurality of bit streams of the data dividing the bits into groups comprising bits; generating a frequency distribution of values corresponding to each of the groups; determining a compression algorithm used when compressing the data based on the frequency distribution; obtaining a plurality of binary images from the bit stream; obtaining a final image by summing the plurality of binary images, and estimating the determined parameters of the compression algorithm by inputting the final image into a neural network; and decompressing and restoring the data using the parameter.

본 개시의 또 다른 측면에 따르면, 압축된 데이터를 복원하는 장치는, 하나 이상의 명령어(instruction)를 저장하는 메모리; 및 상기 하나 이상의 명령어를 실행함으로써, 압축된 데이터의 비트 스트림(bit stream)을 각각이 복수 개의 비트들을 포함하는 그룹들로 분할하고, 상기 그룹들 각각에 대응되는 값들의 빈도 분포를 생성하고, 상기 빈도 분포에 기초하여 상기 데이터의 압축 시 사용된 압축 알고리즘을 판단하고, 상기 비트 스트림으로부터 복수의 이진 영상(binary image)들을 획득하고, 상기 복수의 이진 영상들을 합하여 최종 이미지를 획득하고, 상기 최종 이미지를 뉴럴 네트워크에 입력하여 상기 판단된 압축 알고리즘의 파라미터를 추정하고, 상기 파라미터를 이용하여 상기 데이터를 압축 해제하여 복원하는 프로세서를 포함할 수 있다. According to another aspect of the present disclosure, an apparatus for restoring compressed data includes: a memory for storing one or more instructions; and dividing a bit stream of compressed data into groups each comprising a plurality of bits by executing the one or more instructions, generating a frequency distribution of values corresponding to each of the groups, and determining a compression algorithm used in compressing the data based on a frequency distribution, obtaining a plurality of binary images from the bit stream, summing the plurality of binary images to obtain a final image, and the final image and a processor for estimating the determined parameters of the compression algorithm by inputting ? to the neural network, and decompressing and restoring the data using the parameters.

또한, 상기 프로세서는, 상기 그룹들 각각에 포함된 비트들의 개수에 기초하여 0부터 N(N은 자연수)까지의 값을 포함하는 배열을 생성하고, 상기 배열 상에 상기 그룹들 각각에 대응되는 값들의 빈도 수를 저장할 수 있다.Also, the processor generates an array including values from 0 to N (N is a natural number) based on the number of bits included in each of the groups, and a value corresponding to each of the groups on the array It is possible to store the number of frequencies.

또한, 상기 프로세서는, 상기 그룹들 각각에 대응되는 값들의 빈도 수를 모두 합한 값에 대한 상기 그룹들 각각에 대응되는 값들 중 기 설정된 구간 내의 값들의 빈도 수를 합한 값의 비율 값이 임계값 미만인지 여부를 판단할 수 있다.In addition, the processor may be configured such that a ratio value of a sum of the frequency numbers of values within a preset section among the values corresponding to each of the groups to the sum of the frequencies of values corresponding to each of the groups is less than the threshold value. It can be determined whether or not

또한, 상기 프로세서는, 상기 비율이 임계값 미만인 경우에는, 상기 데이터의 압축 시 사용된 압축 알고리즘은 LZ(Lempel-Ziv)77 압축 알고리즘에 해당한다고 판단하고, 상기 파라미터는 서치 버퍼(search buffer)의 크기 값에 해당할 수 있다.In addition, when the ratio is less than the threshold, the processor determines that the compression algorithm used for compressing the data corresponds to the LZ (Lempel-Ziv) 77 compression algorithm, and the parameter is It may correspond to a size value.

또한, 상기 프로세서는, 상기 비트 스트림을 각각이 복수 개의 비트들을 포함하는 1*M(M은 자연수)차원의 벡터들로 분할하고, 상기 벡터들 각각을 m*m(m은 자연수)차원의 벡터들로 변환하여 상기 복수의 이진 영상들을 획득할 수 있다. In addition, the processor divides the bit stream into 1*M (M is a natural number) dimensional vectors each including a plurality of bits, and divides each of the vectors into an m*m (m is a natural number) dimensional vector. , to obtain the plurality of binary images.

또한, 상기 최종 이미지는, 상기 벡터들 각각에 포함되는 복수 개의 비트들의 개수 및 상기 판단된 압축 알고리즘의 파라미터에 기초하여 결정될 수 있다.Also, the final image may be determined based on the number of bits included in each of the vectors and the determined parameter of the compression algorithm.

도 1은 압축된 데이터를 복원하는 장치의 하드웨어 구성의 일 예를 도시한 블록도이다.
도 2는 압축된 데이터를 복원하는 방법의 일 예를 나타내는 흐름도이다.
도 3은 압축되지 않은 데이터로부터 생성한 빈도 분포를 도식화한 일 예이다.
도 4는 LZ77 압축 알고리즘에 의해 압축된 데이터로부터 생성한 빈도 분포를 도식화한 일 예이다.
도 5는 압축된 데이터로부터 최종 이미지를 획득하는 일 예를 나타내는 도면이다.
도 6은 압축 알고리즘의 파라미터를 추정하는 방법에 적용되는 컨볼루션 뉴럴 네트워크의 일 예를 나타내는 도면이다.
도 7은 압축 알고리즘의 파라미터를 추정하는 방법에 적용되는 SVM(support vector machine) 분류기의 일 예를 나타내는 도면이다.
1 is a block diagram illustrating an example of a hardware configuration of an apparatus for restoring compressed data.
2 is a flowchart illustrating an example of a method of restoring compressed data.
3 is an example of a schematic diagram of a frequency distribution generated from uncompressed data.
4 is a schematic example of a frequency distribution generated from data compressed by the LZ77 compression algorithm.
5 is a diagram illustrating an example of obtaining a final image from compressed data.
6 is a diagram illustrating an example of a convolutional neural network applied to a method of estimating a parameter of a compression algorithm.
7 is a diagram illustrating an example of a support vector machine (SVM) classifier applied to a method of estimating a parameter of a compression algorithm.

이하 첨부된 도면을 참조하면서 오로지 예시를 위한 실시예들을 상세히 설명하기로 한다. 하기 설명은 실시예들을 구체화하기 위한 것일 뿐 발명의 권리 범위를 제한하거나 한정하는 것이 아님은 물론이다. 상세한 설명 및 실시예로부터 당해 기술분야의 전문가가 용이하게 유추할 수 있는 것은 권리범위에 속하는 것으로 해석된다.Hereinafter, exemplary embodiments will be described in detail with reference to the accompanying drawings. It goes without saying that the following description is only for specifying the embodiments and does not limit or limit the scope of the invention. What can be easily inferred by an expert in the art from the detailed description and examples is construed as belonging to the scope of the right.

본 명세서에서 사용되는 '구성된다' 또는 '포함한다' 등의 용어는 명세서 상에 기재된 여러 구성 요소들, 또는 여러 단계들을 반드시 모두 포함하는 것으로 해석되지 않아야 하며, 그 중 일부 구성 요소들 또는 일부 단계들은 포함되지 않을 수도 있고, 또는 추가적인 구성 요소 또는 단계들을 더 포함할 수 있는 것으로 해석되어야 한다.As used herein, terms such as 'consisting' or 'comprising' should not be construed as necessarily including all of the various components or various steps described in the specification, and some components or some steps thereof. It should be construed that they may not be included, or may further include additional components or steps.

또한, 본 명세서에서 사용되는 '제 1' 또는 '제 2' 등과 같이 서수를 포함하는 용어는 다양한 구성 요소들을 설명하는데 사용할 수 있지만, 상기 구성 요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성 요소를 다른 구성 요소로부터 구별하는 목적으로만 사용된다.Also, terms including an ordinal number such as 'first' or 'second' used in this specification may be used to describe various elements, but the elements should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another.

본 명세서에서 사용되는 용어는 본 발명에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 발명에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 발명의 전반에 걸친 내용을 토대로 정의되어야 한다.The terms used in this specification have been selected as currently widely used general terms as possible while considering the functions in the present invention, which may vary depending on the intention or precedent of a person skilled in the art, the emergence of new technology, and the like. In addition, in a specific case, there is a term arbitrarily selected by the applicant, and in this case, the meaning will be described in detail in the description of the corresponding invention. Therefore, the term used in the present invention should be defined based on the meaning of the term and the overall content of the present invention, rather than the name of a simple term.

본 실시예들은 압축 알고리즘의 파라미터를 추정하는 방법 및 장치에 관한 것으로서 이하의 실시예들이 속하는 기술 분야에서 통상의 지식을 가진 자에게 널리 알려져 있는 사항들에 관해서는 자세한 설명을 생략한다.The present embodiments relate to a method and an apparatus for estimating parameters of a compression algorithm, and detailed descriptions of matters widely known to those of ordinary skill in the art to which the following embodiments belong will be omitted.

도 1은 압축된 데이터를 복원하는 장치의 하드웨어 구성의 일 예를 도시한 블록도이다. 1 is a block diagram illustrating an example of a hardware configuration of an apparatus for restoring compressed data.

압축된 데이터를 복원하는 장치(100)는 PC(personal computer), 서버 디바이스, 모바일 디바이스, 임베디드 디바이스 등의 다양한 종류의 디바이스들로 구현될 수 있다. 나아가서, 압축된 데이터를 복원하는 장치(100)는 위와 같은 디바이스에 탑재되는 전용 하드웨어 가속기(HW accelerator)에 해당될 수 있고, 압축된 데이터를 복원하는 장치(100)는 뉴럴 네트워크 구동을 위한 전용 모듈인 NPU(neural processing unit), TPU(Tensor Processing Unit), Neural Engine 등과 같은 하드웨어 가속기일 수 있으나, 이에 제한되지 않는다.The apparatus 100 for restoring compressed data may be implemented with various types of devices such as a personal computer (PC), a server device, a mobile device, and an embedded device. Furthermore, the apparatus 100 for restoring compressed data may correspond to a dedicated hardware accelerator mounted on the above device, and the apparatus 100 for restoring compressed data is a dedicated module for driving a neural network. It may be a hardware accelerator such as a neural processing unit (NPU), a tensor processing unit (TPU), a neural engine, or the like, but is not limited thereto.

도 1을 참고하면, 압축된 데이터를 복원하는 장치(100)는 프로세서(110) 및 메모리(120)를 포함한다. 도 1에 도시된 압축된 데이터를 복원하는 장치(100)에는 본 실시예들과 관련된 구성요소들만이 도시되어 있다. 따라서, 압축된 데이터를 복원하는 장치(100)에는 도 1에 도시된 구성요소들 외에 다른 범용적인 구성요소들이 더 포함될 수 있음은 당해 기술분야의 통상의 기술자에게 자명하다.Referring to FIG. 1 , the apparatus 100 for restoring compressed data includes a processor 110 and a memory 120 . Only the components related to the present embodiments are shown in the apparatus 100 for restoring compressed data shown in FIG. 1 . Accordingly, it is apparent to those skilled in the art that the apparatus 100 for restoring compressed data may further include other general-purpose components in addition to the components shown in FIG. 1 .

프로세서(110)는 압축된 데이터를 복원하는 장치(100)를 실행하기 위한 전반적인 기능들을 제어하는 역할을 한다. 예를 들어, 프로세서(110)는 압축된 데이터를 복원하는 장치(100)내의 메모리(120)에 저장된 하나 이상의 명령어 또는 프로그램들을 실행함으로써, 압축된 데이터를 복원하는 장치(100)를 전반적으로 제어한다. 프로세서(110)는 압축된 데이터를 복원하는 장치(100) 내에 구비된 CPU(central processing unit), GPU(graphics processing unit), AP(application processor) 등으로 구현될 수 있으나, 이에 제한되지 않는다.The processor 110 serves to control overall functions for executing the apparatus 100 for restoring compressed data. For example, the processor 110 generally controls the apparatus 100 for restoring compressed data by executing one or more instructions or programs stored in the memory 120 in the apparatus 100 for restoring compressed data. . The processor 110 may be implemented as a central processing unit (CPU), a graphics processing unit (GPU), an application processor (AP), etc. provided in the apparatus 100 for restoring compressed data, but is not limited thereto.

메모리(120)는 압축된 데이터를 복원하는 장치(100)내에서 처리되는 각종 데이터들을 저장하는 하드웨어로서, 예를 들어, 메모리(120)는 압축된 데이터를 복원하는 장치(100)에서 처리된 데이터들 및 처리될 데이터들을 저장할 수 있다. 또한, 메모리(120)는 압축된 데이터를 복원하는 장치(100)에 의해 구동될 애플리케이션들, 드라이버들 등을 저장할 수 있다. 메모리(120)는 DRAM(dynamic random access memory), SRAM(static random access memory) 등과 같은 RAM(random access memory), ROM(read-only memory), EEPROM(electrically erasable programmable read-only memory), CD-ROM, 블루레이 또는 다른 광학 디스크 스토리지, HDD(hard disk drive), SSD(solid state drive), 또는 플래시 메모리(120)를 포함할 수 있다.The memory 120 is hardware for storing various data processed in the apparatus 100 for restoring compressed data, for example, the memory 120 is data processed by the apparatus 100 for restoring compressed data. and data to be processed. In addition, the memory 120 may store applications, drivers, etc. to be driven by the apparatus 100 for restoring compressed data. The memory 120 includes random access memory (RAM), such as dynamic random access memory (DRAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), CD- It may include ROM, Blu-ray or other optical disk storage, a hard disk drive (HDD), a solid state drive (SSD), or flash memory 120 .

프로세서(110)는 압축된 데이터로부터 데이터의 압축 시 사용된 압축 알고리즘을 판단할 수 있다. 판단된 압축 알고리즘은 예를 들어 LZ(Lempel-Ziv)77 압축 알고리즘에 해당할 수 있다.The processor 110 may determine a compression algorithm used when data is compressed from the compressed data. The determined compression algorithm may correspond to, for example, a Lempel-Ziv (LZ) 77 compression algorithm.

프로세서(110)는 압축 시 사용된 압축 알고리즘이 LZ77 압축 알고리즘에 해당한다고 판단한 경우에는, 압축 알고리즘의 파라미터를 추정할 수 있다. 일 실시예로서, 프로세서(110)는 뉴럴 네트워크(Neural Network)를 이용하여 압축 알고리즘의 파라미터를 추정할 수 있다. 뉴럴 네트워크는 시냅스의 결합으로 네트워크를 형성한 인공 뉴런이 학습을 통해 시냅스의 결합 세기를 변화시켜, 문제 해결 능력을 가지는 모델 전반을 의미한다.When it is determined that the compression algorithm used during compression corresponds to the LZ77 compression algorithm, the processor 110 may estimate the parameters of the compression algorithm. As an embodiment, the processor 110 may estimate a parameter of a compression algorithm using a neural network. A neural network refers to an overall model that has problem-solving ability by changing the strength of synaptic bonding through learning in which artificial neurons that form a network through synaptic bonding.

구체적으로, 프로세서(110)는 다수의 숨겨진 계층(Hidden Layer)을 갖는 뉴럴 네트워크 구조인 딥 뉴럴 네트워크(Deep Neural Network)를 이용하여 압축 알고리즘의 파라미터를 효과적으로 추정할 수 있다. Specifically, the processor 110 may effectively estimate the parameters of the compression algorithm using a deep neural network, which is a neural network structure having a plurality of hidden layers.

다른 실시예로서, 프로세서(110)는 압축된 데이터로부터 산출한 특징값들을 SVM(support vector machine) 분류기에 입력하여 LZ77 압축 알고리즘의 파라미터를 추정할 수 있다. As another embodiment, the processor 110 may estimate parameters of the LZ77 compression algorithm by inputting feature values calculated from the compressed data into a support vector machine (SVM) classifier.

LZ77 압축 알고리즘은 무손실 압축 알고리즘에 해당하며, LZ77 압축 알고리즘의 적용 시 사용자는 2개의 파라미터들을 설정할 수 있다. 첫 번째 파라미터는 서치 버퍼 (search buffer)의 크기이고, 두 번째 파라미터는 룩어헤드 버퍼(lookahead buffer)의 크기이다. The LZ77 compression algorithm corresponds to a lossless compression algorithm, and when the LZ77 compression algorithm is applied, the user can set two parameters. The first parameter is the size of the search buffer, and the second parameter is the size of the lookahead buffer.

LZ77 압축 알고리즘은 서치 버퍼와 룩어헤드 버퍼를 사용하여 데이터를 압축할 수 있다. 예를 들어, 압축되지 않은 원본 데이터의 일부 데이터는 룩어헤드 버퍼에 순차적으로 쌓이고, 압축된 데이터의 일부 데이터는 서치 버퍼에 순차적으로 쌓일 수 있다. LZ77 압축 알고리즘은 룩어헤드 버퍼와 서치 버퍼 각각에 존재하는 데이터를 서로 비교하여 두 버퍼 사이에 중복되는 데이터의 시작 위치와 중복되는 부호(code)의 개수에 관한 정보를 이진화하여 저장할 수 있다. 이 때 이진수로 표현되는 비트의 길이는 서치 버퍼의 크기에 따라 하기 수학식 1에 의해 결정될 수 있다.The LZ77 compression algorithm can compress data using a search buffer and a look-ahead buffer. For example, some data of uncompressed original data may be sequentially stacked in the lookahead buffer, and some data of compressed data may be sequentially stacked in the search buffer. The LZ77 compression algorithm may compare data present in each of the look-ahead buffer and the search buffer with each other, and store information on the start position of overlapping data between the two buffers and the number of overlapping codes in binary form. In this case, the length of bits expressed in binary numbers may be determined by Equation 1 below according to the size of the search buffer.

Figure 112019123851554-pat00001
Figure 112019123851554-pat00001

상기 수학식 1에서 S는 서치 버퍼의 크기고, L은 중복되는 데이터의 시작 위치와 중복되는 부호(code)의 개수에 관한 정보를 이진화하는 경우 표현되는 비트의 길이에 해당할 수 있다. 예를 들어 서치 버퍼의 크기가 S=1024=210으로 설정된 경우, L 값은 11이 될 수 있으며 중복되는 데이터의 시작 위치와 중복되는 부호(code)의 개수에 관한 정보는 11비트로 표현될 수 있다.In Equation 1, S is the size of the search buffer, and L may correspond to the length of bits expressed when binarizing information about a start position of overlapping data and the number of overlapping codes. For example, if the size of the search buffer is set to S=1024=2 10 , the L value may be 11, and information about the start position of overlapping data and the number of overlapping codes may be expressed in 11 bits. have.

룩어헤드 버퍼와 서치 버퍼 각각에 존재하는 데이터 간 중복되는 데이터가 없는 경우에, LZ77 압축 알고리즘은 룩어헤드 버퍼의 가장 앞에 위치하는 부호 하나만을 이진화하여 저장할 수 있다. 이 때 부호는 ASCII 테이블을 기반으로 인코딩(encoding)되므로 8비트로 표현될 수 있다.When there is no overlapping data between data in each of the lookahead buffer and the search buffer, the LZ77 compression algorithm can binarize and store only one sign located at the front of the lookahead buffer. At this time, since the code is encoded based on the ASCII table, it can be expressed in 8 bits.

LZ77 압축 알고리즘의 압축 해제는 상술한 압축 과정의 역으로 수행될 수 있다. 압축 해제를 수행하기 위해서는 압축 알고리즘의 적용시 설정된 서치 버퍼의 크기에 해당하는 S를 알아야 한다. 서치 버퍼의 크기인 S를 알면, L에 해당하는 값을 알 수 있으며 이에 따라 압축 해제 시 압축된 데이터를 몇 비트씩 끊어서 읽어들일지 결정할 수 있다. Decompression of the LZ77 compression algorithm may be performed in reverse of the above-described compression process. In order to perform decompression, it is necessary to know S corresponding to the size of the search buffer set when the compression algorithm is applied. If the size of the search buffer, S, is known, the value corresponding to L can be known, and accordingly, when decompressing, it is possible to determine how many bits of compressed data to cut and read.

한편, 압축된 데이터에는 데이터의 압축에 사용된 압축 알고리즘의 종류 및 압축 당시 설정되었던 파라미터 값에 대한 정보를 담는 헤더가 존재할 수 있다. 그러나, 해커의 공격, 저장 매체의 손상, 데이터 전송 과정 중 데이터 손실 등의 이유로 헤더가 손상되는 경우에는 압축된 데이터를 압축 해제 할 수 없다는 문제점이 있다. Meanwhile, in the compressed data, there may be a header containing information on the type of compression algorithm used for data compression and parameter values set at the time of compression. However, there is a problem in that compressed data cannot be decompressed when the header is damaged due to a hacker attack, damage to a storage medium, data loss during data transmission, or the like.

본 발명은 헤더 정보가 없는 경우에, 데이터의 압축에 사용된 압축 알고리즘의 종류를 판단하고, 사용된 압축 알고리즘이 LZ77 압축 알고리즘에 해당한다고 판단한 경우에는 서치 버퍼의 크기를 뉴럴 네트워크를 이용하여 추정하는 방법을 제안한다. In the present invention, when there is no header information, the type of compression algorithm used for data compression is determined, and when it is determined that the compression algorithm used corresponds to the LZ77 compression algorithm, the size of the search buffer is estimated using a neural network. suggest a way

구체적으로, 프로세서(110)는 압축된 데이터의 비트 스트림(bit stream)을 각각이 복수 개의 비트들을 포함하는 그룹들로 분할하고, 그룹들 각각에 대응되는 값들의 빈도 분포를 생성할 수 있다. 프로세서(110)는 빈도 분포에 기초하여 데이터의 압축 시 사용된 압축 알고리즘을 판단할 수 있다. Specifically, the processor 110 may divide a bit stream of compressed data into groups each including a plurality of bits, and generate a frequency distribution of values corresponding to each of the groups. The processor 110 may determine a compression algorithm used when data is compressed based on the frequency distribution.

또한, 프로세서(110)는 압축 시 사용된 압축 알고리즘이 LZ77 압축 알고리즘에 해당한다고 판단한 경우에는, 압축된 데이터의 비트 스트림으로부터 복수의 이진 영상(binary image)들을 획득할 수 있다. Also, when it is determined that the compression algorithm used during compression corresponds to the LZ77 compression algorithm, the processor 110 may acquire a plurality of binary images from the bit stream of the compressed data.

프로세서(110)는 복수의 이진 영상들을 합하여 최종 이미지를 획득하고, 최종 이미지를 뉴럴 네트워크에 입력하여 판단된 압축 알고리즘의 파라미터를 추정할 수 있다.The processor 110 may obtain a final image by summing a plurality of binary images, and may estimate a parameter of the determined compression algorithm by inputting the final image to the neural network.

한편, 프로세서(110)는 벡터들 각각이 포함하는 비트들의 개수 및 압축 알고리즘의 파라미터의 다양한 조합 환경에서 학습 데이터를 이용하여 뉴럴 네트워크를 훈련시킬 수 있다. 학습 데이터는 벡터들 각각이 포함하는 비트들의 개수 및 압축 알고리즘의 파라미터의 조합에 따라 생성되는 최종 이미지와 압축 알고리즘의 적용 시 설정된 파라미터의 크기를 가리키는 라벨 값으로 구성될 수 있다.Meanwhile, the processor 110 may train the neural network using learning data in various combinations of the number of bits included in each of the vectors and the parameters of the compression algorithm. The training data may be composed of a final image generated according to a combination of the number of bits included in each of the vectors and a parameter of the compression algorithm, and a label value indicating the size of a parameter set when the compression algorithm is applied.

다른 실시예로서, 프로세서(110)는 압축된 데이터의 비트 스트림으로부터 산출한 특징값들 및 압축 알고리즘의 파라미터의 다양한 조합 환경에서 학습 데이터를 이용하여 SVM 분류기를 학습시킬 수 있다. 학습 데이터는 압축된 데이터의 비트 스트림으로부터 산출한 특징값들에 관한 정보를 포함하는 특징 벡터 및 압축 알고리즘의 적용 시 설정된 파라미터의 크기를 가리키는 라벨 값으로 구성될 수 있다. SVM 분류기는 주어진 데이터 집합을 바탕으로 하여 새로운 데이터가 어느 카테고리에 속할 것인지 판단하는 비확률적 이진 선형 분류 모델에 해당한다.As another embodiment, the processor 110 may train the SVM classifier using the training data in various combinations of feature values calculated from the bit stream of the compressed data and parameters of the compression algorithm. The training data may be composed of a feature vector including information on feature values calculated from a bit stream of compressed data and a label value indicating the size of a parameter set when a compression algorithm is applied. The SVM classifier corresponds to a non-stochastic binary linear classification model that determines which category the new data belongs to based on a given data set.

프로세서(110)는 추정된 파라미터를 이용하여 압축된 데이터를 압축 해제할 수 있다. The processor 110 may decompress the compressed data using the estimated parameter.

도 2는 압축된 데이터를 복원하는 방법의 일 예를 나타내는 흐름도이다. 2 is a flowchart illustrating an example of a method of restoring compressed data.

200 단계에서, 압축된 데이터를 복원하는 장치(100)는 데이터의 비트 스트림(bit stream)을 각각이 복수 개의 비트들을 포함하는 그룹들로 분할할 수 있다.In operation 200 , the apparatus 100 for restoring compressed data may divide a bit stream of data into groups each including a plurality of bits.

예를 들어, 그룹들 각각에 포함된 비트들의 개수가 8 개인 경우, 압축된 데이터를 복원하는 장치(100)는 압축된 데이터의 비트 스트림을 8 비트씩 끊어서 읽을 수 있다.For example, when the number of bits included in each of the groups is 8, the apparatus 100 for reconstructing compressed data may cut and read the bit stream of the compressed data by 8 bits.

210 단계에서, 압축된 데이터를 복원하는 장치(100)는 그룹들 각각에 대응되는 값들의 빈도 분포를 생성할 수 있다.In operation 210, the apparatus 100 for reconstructing compressed data may generate a frequency distribution of values corresponding to each of the groups.

압축된 데이터를 복원하는 장치(100)는 그룹들 각각에 포함된 비트들의 개수에 기초하여 0부터 N(N은 자연수)까지의 값을 포함하는 배열을 생성할 수 있다. 그룹들 각각에 포함된 비트들의 개수가 n인 경우에는 0부터 2n-1까지의 값을 포함하는 배열을 생성할 수 있다. 예를 들어, 그룹들 각각에 포함된 비트들의 개수가 8 개인 경우, 압축된 데이터를 복원하는 장치(100)는 0부터 255까지의 값을 포함하는 배열을 생성할 수 있다. The apparatus 100 for restoring compressed data may generate an array including values from 0 to N (N is a natural number) based on the number of bits included in each of the groups. When the number of bits included in each of the groups is n, an array including values from 0 to 2 n −1 may be generated. For example, when the number of bits included in each of the groups is 8, the apparatus 100 for reconstructing compressed data may generate an array including values from 0 to 255.

압축된 데이터를 복원하는 장치(100)는 배열 상에 그룹들 각각에 대응되는 값들의 빈도 수를 저장할 수 있다. 예를 들어, 8비트를 포함하는 그룹이 '00011010'에 해당하는 경우, 압축된 데이터를 복원하는 장치(100)는 8비트의 이진수 '00011010'를 십진수 값 26으로 변환할 수 있다. The apparatus 100 for restoring compressed data may store the frequency number of values corresponding to each of the groups in an array. For example, when a group including 8 bits corresponds to '00011010', the apparatus 100 for restoring compressed data may convert an 8-bit binary number '00011010' into a decimal value 26.

압축된 데이터를 복원하는 장치(100)는 해당 십진수 값에 해당하는 배열 내 요소에 저장되어 있는 값을 1 증가시킬 수 있다. 예를 들어, 8비트의 이진수 '00011010'를 십진수 값 26으로 변환한 경우, 압축된 데이터를 복원하는 장치(100)는 배열에서 26으로 색인된 요소의 값을 1만큼 증가시킬 수 있다. The apparatus 100 for restoring compressed data may increase a value stored in an element in an array corresponding to a corresponding decimal value by one. For example, when the 8-bit binary number '00011010' is converted into the decimal value 26, the apparatus 100 for restoring compressed data may increase the value of the element indexed by 26 in the array by 1.

이러한 과정을 압축된 데이터의 입력 비트 스트림의 끝까지 반복할 수 있다. 입력 비트 스트림의 비트 길이가 8의 배수가 아닌 경우에는, 마지막 그룹을 생성한 후에 남은 비트들의 개수가 8보다 작을 수 있다. 이러한 경우에는 남은 비트들을 무시할 수 있다.This process can be repeated until the end of the input bit stream of the compressed data. When the bit length of the input bit stream is not a multiple of 8, the number of bits remaining after generating the last group may be less than 8. In this case, the remaining bits may be ignored.

압축된 데이터를 복원하는 장치(100)는 0부터 255까지의 값들을 x축으로 하고, 배열 내 각 요소에 저장된 값을 y축으로 하여 빈도 분포를 도식화할 수 있다.The apparatus 100 for restoring compressed data may plot the frequency distribution with values from 0 to 255 as the x-axis and the values stored in each element in the array as the y-axis.

220 단계에서, 압축된 데이터를 복원하는 장치(100)는 빈도 분포에 기초하여 데이터의 압축 시 사용된 압축 알고리즘을 판단할 수 있다.In operation 220 , the apparatus 100 for reconstructing compressed data may determine a compression algorithm used when compressing data based on a frequency distribution.

예를 들어, 압축된 데이터를 복원하는 장치(100)는 그룹들 각각에 대응되는 값들의 빈도 수를 모두 합한 값에 대한 그룹들 각각에 대응되는 값들 중 기 설정된 구간 내의 값들의 빈도 수를 합한 값의 비율이 임계값 미만인지 여부를 판단할 수 있다. 이하 도 3 및 도 4를 참조하여 설명한다.For example, the apparatus 100 for reconstructing compressed data is a value obtained by summing the frequencies of values within a preset section among values corresponding to each of the groups with respect to the sum of the frequencies of values corresponding to each of the groups. It can be determined whether the ratio of is less than a threshold value. Hereinafter, it will be described with reference to FIGS. 3 and 4 .

도 3은 압축되지 않은 데이터로부터 생성한 빈도 분포를 도식화한 일 예이다.3 is an example of a schematic diagram of a frequency distribution generated from uncompressed data.

도 3은 y축의 배열 내 각 요소에 저장된 값을 배열 내 각 요소 중 가장 큰 값으로 나누어서 0과 1사이의 값을 갖도록 정규화한 것이다. FIG. 3 is a graph in which a value stored in each element in the y-axis array is divided by the largest value among each element in the array and normalized to have a value between 0 and 1. Referring to FIG.

도 3을 참조하면, 압축되지 않은 데이터의 비트 스트림의 그룹들 각각에 대응되는 값들 중 10부터 129까지의 값들이 높은 빈도수로 존재함을 알 수 있다. 아스키 테이블(ASCII Table)을 참조하면, 10부터 129까지의 값들은‘개행(line feed)', '스페이스(space)', '문장 부호(punctuation marks)', '0에서 9까지의 아라비아 숫자(digits)', '알파벳(alphabet)'과 같이 일반적인 데이터 또는 텍스트 파일에서 자주 사용되는 부호들에 해당한다.Referring to FIG. 3 , it can be seen that values from 10 to 129 exist with high frequency among values corresponding to each of the groups of the bit stream of uncompressed data. Referring to the ASCII Table, values from 10 to 129 are 'line feed', 'space', 'punctuation marks', 'Arabic numbers from 0 to 9 ( Digits)' and 'alphabet' correspond to symbols frequently used in general data or text files.

도 4는 LZ77 압축 알고리즘에 의해 압축된 데이터로부터 생성한 빈도 분포를 도식화한 일 예이다.4 is a schematic example of a frequency distribution generated from data compressed by the LZ77 compression algorithm.

도 4는 y축의 배열 내 각 요소에 저장된 값을 배열 내 각 요소 중 가장 큰 값으로 나누어서 0과 1사이의 값을 갖도록 정규화한 것이다. 4 is a graph in which a value stored in each element in the y-axis array is divided by the largest value among each element in the array and normalized to have a value between 0 and 1. Referring to FIG.

도 4를 참조하면, LZ77 압축 알고리즘에 의해 압축된 데이터는 0부터 255까지의 값들이 비교적 다양하게 존재하며, 0이 비트 스트림의 그룹들 각각에 대응되는 값들 중 0이 가장 높은 빈도수로 존재함을 알 수 있다. 4, the data compressed by the LZ77 compression algorithm has relatively various values from 0 to 255, and 0 is the highest frequency among values corresponding to each of the groups of the bit stream. Able to know.

따라서, 압축된 데이터를 복원하는 장치(100)는 그룹들 각각에 대응되는 값들의 빈도 수를 모두 합한 값에 대한 그룹들 각각에 대응되는 값들 중 기 설정된 구간 내의 값들의 빈도 수를 합한 값의 비율 값이 임계값 미만인 경우에는, 데이터의 압축 시 사용된 압축 알고리즘은 LZ77 압축 알고리즘에 해당한다고 판단할 수 있다. 비율 값 D(β)은 하기 수학식 2와 같이 표현할 수 있다.Accordingly, the apparatus 100 for reconstructing compressed data is a ratio of a sum of the frequencies of values within a preset section among values corresponding to each of the groups to the sum of the frequencies of values corresponding to each of the groups. When the value is less than the threshold, it may be determined that the compression algorithm used for data compression corresponds to the LZ77 compression algorithm. The ratio value D(β) can be expressed as in Equation 2 below.

Figure 112019123851554-pat00002
Figure 112019123851554-pat00002

상기 수학식 2에서 β는 압축된 데이터의 비트 스트림에 해당하고, l은 생성된 배열이 포함하는 요소들에 해당하며, 요소들은 0부터 N(N은 자연수)까지의 값들에 해당한다. dl(β)는 배열의 l번째 요소에 저장된 값이며, 그룹들 각각에 대응되는 값들 중 배열의 l번째 요소에 해당하는 값의 빈도수를 의미할 수 있다. 수학식 1에서는 그룹들 각각에 포함된 비트들의 개수가 8 개인 경우의 비율 값을 나타낸 것으로, 비율 값 D(β)는 수학식 1로 제한되는 것은 아니다.In Equation 2, β corresponds to a bit stream of compressed data, l corresponds to elements included in the generated array, and elements correspond to values from 0 to N (N is a natural number). d l (β) is a value stored in the l-th element of the array, and may mean the frequency of a value corresponding to the l-th element of the array among values corresponding to each of the groups. Equation 1 indicates a ratio value when the number of bits included in each group is 8, and the ratio value D(β) is not limited to Equation 1.

하기 수학식 3 와 같이, 비율 값 D(β)이 임계값 α보다 작은 경우에는, 데이터의 압축 시 사용된 압축 알고리즘은 LZ77 압축 알고리즘에 해당한다고 판단할 수 있다. As shown in Equation 3 below, when the ratio value D(β) is smaller than the threshold value α, it can be determined that the compression algorithm used for data compression corresponds to the LZ77 compression algorithm.

Figure 112019123851554-pat00003
Figure 112019123851554-pat00003

한편, 하기 수학식 4 와 같이 비율 값 D(β)이 임계값 α 이상인 경우에는, 데이터의 압축 시 사용된 압축 알고리즘은 LZ77 압축 알고리즘에 해당하지 않는다고 판단할 수 있다. On the other hand, when the ratio value D(β) is equal to or greater than the threshold value α as shown in Equation 4 below, it may be determined that the compression algorithm used for data compression does not correspond to the LZ77 compression algorithm.

Figure 112019123851554-pat00004
Figure 112019123851554-pat00004

다시 도 2를 참조하면, 230 단계에서 압축된 데이터를 복원하는 장치(100)는 비트 스트림으로부터 복수의 이진 영상(binary image)들을 획득할 수 있다. Referring back to FIG. 2 , the apparatus 100 for reconstructing compressed data in operation 230 may obtain a plurality of binary images from a bit stream.

예를 들어, 압축된 데이터를 복원하는 장치(100)는 비트 스트림을 각각이 복수 개의 비트들을 포함하는 1*M(M은 자연수)차원의 벡터들로 분할할 수 있다. 또한, 압축된 데이터를 복원하는 장치(100)는 벡터들 각각을 m*m(m은 자연수)차원의 벡터들로 변환하여 복수의 이진 영상들을 획득할 수 있다. For example, the apparatus 100 for reconstructing compressed data may divide the bit stream into 1*M (M is a natural number) dimensional vectors each including a plurality of bits. Also, the apparatus 100 for reconstructing compressed data may obtain a plurality of binary images by converting each of the vectors into m*m (m is a natural number) dimensional vectors.

도 5는 압축된 데이터로부터 최종 이미지를 획득하는 일 예를 나타내는 도면이다.5 is a diagram illustrating an example of obtaining a final image from compressed data.

도 5를 참조하면, 압축된 데이터를 복원하는 장치(100)는 압축된 데이터(500)를 각각이 M개의 비트들을 포함하는 1*M 차원의 벡터(510)들로 분할할 수 있다. 이 때, 1*M 차원의 벡터(510)는 하기 수학식 5와 같이 표현될 수 있다. Referring to FIG. 5 , the apparatus 100 for reconstructing compressed data may divide the compressed data 500 into 1*M-dimensional vectors 510 each including M bits. In this case, the 1*M-dimensional vector 510 may be expressed as in Equation 5 below.

Figure 112019123851554-pat00005
Figure 112019123851554-pat00005

상기 수학식 5에서 K(i)는 i번째 1*M 차원의 벡터(510)에 해당할 수 있다. bj(i)(j∈{1,2...M})는 1*M 차원의 벡터(510)에 포함된 비트들이며, 0 또는 1에 해당할 수 있다. In Equation 5, K(i) may correspond to the i-th 1*M-dimensional vector 510 . b j (i)(j∈{1,2...M}) are bits included in the 1*M-dimensional vector 510 and may correspond to 0 or 1.

분할 과정을 통해서 생성된 1*M 차원의 벡터(510)들의 개수는 총 N개일 수 있다. 압축된 데이터(500)가 포함하는 비트들의 총 개수가 M의 배수가 아닌 경우에는, N번째 1*M 차원의 벡터(510)를 생성한 후 남는 비트들의 개수가 M보다 작을 수 있다. 이러한 경우에는 남은 비트들을 무시할 수 있다.The number of 1*M-dimensional vectors 510 generated through the division process may be N in total. When the total number of bits included in the compressed data 500 is not a multiple of M, the number of bits remaining after generating the N-th 1*M-dimensional vector 510 may be smaller than M. In this case, the remaining bits may be ignored.

다음으로, 압축된 데이터를 복원하는 장치(100)는 벡터들 각각을 m*m(m은 자연수)차원의 벡터들로 변환하여 복수의 이진 영상들을 생성할 수 있다. Next, the apparatus 100 for reconstructing compressed data may generate a plurality of binary images by converting each of the vectors into m*m (m is a natural number) dimensional vectors.

압축된 데이터를 복원하는 장치(100)는 생성된 N개의 1*M 차원의 벡터(510)들 각각이 2차원의 배열을 가지도록 구조를 변형할 수 있다. 이 때, 이차원 배열은 m*m 차원의 벡터(520)에 해당할 수 있으며, 하기 수학식 6과 같이 표현된다.The apparatus 100 for reconstructing compressed data may deform the structure so that each of the generated N 1*M-dimensional vectors 510 has a two-dimensional arrangement. In this case, the two-dimensional array may correspond to the m*m-dimensional vector 520, and is expressed as in Equation 6 below.

Figure 112019123851554-pat00006
Figure 112019123851554-pat00006

상기 수학식 6에서 B(i)는 i번째 1*M 차원의 벡터(510)를 이차원 배열 구조로 변형하였을 때 얻어지는 m*m 차원의 벡터(520)에 해당할 수 있다. 도 5를 참조하면, m*m 차원의 벡터(520)는 이진 영상(binary image)에 해당할 수 있다. In Equation 6, B(i) may correspond to an m*m-dimensional vector 520 obtained when the i-th 1*M-dimensional vector 510 is transformed into a two-dimensional array structure. Referring to FIG. 5 , an m*m-dimensional vector 520 may correspond to a binary image.

따라서, N개의 1*M 차원의 벡터(510)들로부터 N개의 이진 영상들이 생성될 수 있다.Accordingly, N binary images may be generated from the N 1*M-dimensional vectors 510 .

다시 도 2를 참조하면, 240 단계에서, 압축된 데이터를 복원하는 장치(100)는 복수의 이진 영상들을 합하여 최종 이미지를 획득하고, 최종 이미지를 뉴럴 네트워크에 입력하여 판단된 압축 알고리즘의 파라미터를 추정할 수 있다.Referring back to FIG. 2 , in step 240 , the apparatus 100 for reconstructing compressed data acquires a final image by summing a plurality of binary images, and inputs the final image to a neural network to estimate parameters of the determined compression algorithm can do.

예를 들어, 압축된 데이터를 복원하는 장치(100)는 N개의 1*M 차원의 벡터(510)들로부터 생성된 N개의 이진 영상들을 하기 수학식 7과 같이 더할 수 있다.For example, the apparatus 100 for reconstructing compressed data may add N binary images generated from N 1*M-dimensional vectors 510 as shown in Equation 7 below.

Figure 112019123851554-pat00007
Figure 112019123851554-pat00007

상기, 수학식 7에서

Figure 112019123851554-pat00008
은 복수의 이진 영상들 각각에 해당하는 m*m(m은 자연수)차원의 벡터들의 동일 위치에 있는 요소(element)들끼리 더하는 요소 별 합 연산자일 수 있다. Z는 N개의 이진 영상들을 모두 합하여 생성되는 이진 영상(530)에 해당할 수 있다.Above, in Equation 7
Figure 112019123851554-pat00008
may be an element-by-element sum operator that adds elements at the same position of m*m (m is a natural number) dimensional vectors corresponding to each of the plurality of binary images. Z may correspond to the binary image 530 generated by summing all N binary images.

또한, 압축된 데이터를 복원하는 장치(100)는 생성된 이진 영상(530) Z를 하기 수학식 8에 의해 정규화시킬 수 있다. Also, the apparatus 100 for reconstructing compressed data may normalize the generated binary image 530 Z by Equation 8 below.

Figure 112019123851554-pat00009
Figure 112019123851554-pat00009

상기 수학식 8에서, I는 이진 영상(530) Z를 정규화 시켰을 때 얻어지는 최종 이미지(540)에 해당한다. 정규화를 통해 최종 이미지(540) I에 해당하는 벡터에 포함된 값들 각각은 0과 1 사이의 값을 가질 수 있다. w는 이진 영상(530) Z에 해당하는 벡터에 포함된 값들 중에서 가장 작은 값을 의미하고, x는 이진 영상(530) Z에 해당하는 벡터에 포함된 값들 중에서 가장 큰 값을 의미할 수 있다.In Equation 8, I corresponds to the final image 540 obtained when the binary image 530 and Z are normalized. Through normalization, each of the values included in the vector corresponding to I of the final image 540 may have a value between 0 and 1. w may mean the smallest value among the values included in the vector corresponding to Z of the binary image 530 , and x may mean the largest value among values included in the vector corresponding to Z of the binary image 530 .

압축된 데이터를 복원하는 장치(100)는 최종 이미지를 뉴럴 네트워크에 입력하여 판단된 압축 알고리즘의 파라미터를 추정할 수 있다. 예를 들어, 압축된 데이터를 복원하는 장치(100)는 LZ77 압축 알고리즘의 적용시 설정된 서치 버퍼의 크기 값을 추정할 수 있다.The apparatus 100 for reconstructing compressed data may estimate parameters of the determined compression algorithm by inputting the final image to the neural network. For example, the apparatus 100 for restoring compressed data may estimate a size value of a search buffer set when the LZ77 compression algorithm is applied.

도 6은 압축 알고리즘의 파라미터를 추정하는 방법에 적용되는 컨볼루션 뉴럴 네트워크의 일 예를 나타내는 도면이다.6 is a diagram illustrating an example of a convolutional neural network applied to a method of estimating a parameter of a compression algorithm.

도 6을 참조하면, 압축된 데이터로부터 생성한 최종 이미지를 입력으로 하여, 압축 알고리즘의 적용 시 설정된 서치 버퍼의 크기를 추정하는 컨볼루션 뉴럴 네트워크의 일 예가 도시되어 있다. Referring to FIG. 6 , an example of a convolutional neural network for estimating the size of a search buffer set when a compression algorithm is applied by inputting a final image generated from compressed data is illustrated.

도 6에서 컨볼루션 뉴럴 네트워크에 입력되는 최종 이미지는 압축된 데이터를 각각이 900 개의 비트들을 포함하는 1*900 차원의 벡터들로 분할한 경우에 획득되는 이미지에 해당된다. 따라서, 입력되는 최종 이미지는 30*30 차원의 벡터에 해당할 수 있다. In FIG. 6 , the final image input to the convolutional neural network corresponds to an image obtained when compressed data is divided into 1*900 dimensional vectors each including 900 bits. Accordingly, the final input image may correspond to a 30*30 dimensional vector.

컨볼루션 뉴럴 네트워크는 3개의 컨볼루션 레이어(convolutional layer) 및 1개의 완전 연결 레이어(fully connected layer)로 구성될 수 있다.A convolutional neural network may include three convolutional layers and one fully connected layer.

첫 번째 컨볼루션 레이어에서는, 입력된 최종 이미지와 5X5의 크기를 갖는 서로 다른 4개의 커널 간의 컨볼루션 연산을 수행하여 피처맵들을 생성할 수 있다. 이때, 생성되는 피처맵들의 개수는 사용된 필터의 개수와 동일할 수 있다. 생성된 4개의 피처맵들 각각에 활성화 함수(activation function)를 적용하여 활성화 맵 (activation map)을 생성할 수 있다. 활성화 함수는 ReLU 함수(Rectified Linear Unit function)에 해당할 수 있으나 이에 제한되는 것은 아니며, 계단 함수(step function) 또는 시그모이드 함수(sigmoid function) 등에 해당할 수도 있다. 한편, ReLU 함수는 하기 수학식 9와 같이 표현할 수 있다.In the first convolution layer, feature maps may be generated by performing a convolution operation between the input final image and four different kernels having a size of 5X5. In this case, the number of generated feature maps may be the same as the number of filters used. An activation map may be generated by applying an activation function to each of the four generated feature maps. The activation function may correspond to a Rectified Linear Unit function (ReLU), but is not limited thereto, and may correspond to a step function, a sigmoid function, or the like. Meanwhile, the ReLU function can be expressed as in Equation 9 below.

Figure 112019123851554-pat00010
Figure 112019123851554-pat00010

또한, 생성된 4개의 활성화 맵들 각각에 대해서 2*2의 크기를 갖는 커널을 이용하여 풀링(pooling)을 수행할 수 있다. 컨벌루션의 연산 결과인 활성화 맵의 데이터의 크기를 줄이기 위하여 풀링을 수행할 수 있으며, 풀링 연산 시 커널이 위치하는 피처맵 내의 값들에서 특정 값을 뽑아낼 수 있다. 정보를 단순화하기 위한 풀링의 예로, 최대 풀링(max-pooling)이 있다. 이 경우, 풀링 연산 시 커널이 위치하는 피처맵 내의 값들에서 최대 값을 뽑아낼 수 있다.In addition, pooling may be performed using a kernel having a size of 2*2 for each of the four generated activation maps. Pooling may be performed to reduce the size of data of the activation map, which is a result of the convolution operation, and a specific value may be extracted from values in the feature map in which the kernel is located during the pooling operation. An example of pooling to simplify information is max-pooling. In this case, the maximum value can be extracted from values in the feature map in which the kernel is located during the pooling operation.

구체적으로, 최대 풀링 연산은 2*2 크기의 커널을 활성화 맵 위에서 지그재그(zigzag)로 옮겨가며, 2*2 커널 내 존재하는 4개의 픽셀들 중 가장 큰 값을 대표값으로 뽑아낼 수 있다. 결과적으로, 활성화 맵의 크기가 30*30에서 15*15 로 줄어들 수 있다. Specifically, the maximum pooling operation may move the 2*2 kernel in a zigzag manner on the activation map, and extract the largest value among 4 pixels existing in the 2*2 kernel as a representative value. As a result, the size of the activation map can be reduced from 30*30 to 15*15.

두 번째 컨볼루션 레이어에서는 15*15 크기의 활성화 맵 4개에 대해서 5*5의 크기를 갖는 서로 다른 8개의 필터를 이용해 컨볼루션 연산을 수행할 수 있다. 그 결과 생성된 생성된 8개의 특징맵들 각각에 ReLU 함수를 적용하여 활성화 맵을 생성할 수 있다. 생성된 8개의 활성화 맵 각각에 대해서 2*2 의 크기를 갖는 필터를 이용하여 맥스 풀링을 수행할 수 있다. 맥스 풀링을 수행한 활성화 맵의 크기는 15*15 에서 8*8 로 줄어들 수 있다. In the second convolution layer, a convolution operation can be performed using 8 different filters with a size of 5*5 for 4 activation maps of size 15*15. As a result, the activation map can be generated by applying the ReLU function to each of the generated eight feature maps. Max pooling may be performed using a filter having a size of 2*2 for each of the generated eight activation maps. The size of the activation map that has been max-pooled can be reduced from 15*15 to 8*8.

세 번째 컨볼루션 레이어에서는 8*8 크기의 활성화 맵 8개에 대해서 5*5 의 크기를 갖는 서로 다른 8개의 필터를 이용해 컨볼루션 연산을 수행하여 특징맵을 생성할 수 있다. 생성된 8개의 특징맵들 각각에 ReLU 함수를 적용하여 활성화 맵을 생성할 수 있다. 최종적으로 8*8 크기의 활성화 맵 8개가 생성되며, 이를 512(=8*8**8)개의 1차원 벡터 형태로 변환할 수 있다. In the third convolution layer, a feature map can be generated by performing a convolution operation on eight 8*8 activation maps using eight different filters having a size of 5*5. An activation map can be generated by applying the ReLU function to each of the eight generated feature maps. Finally, 8 activation maps of size 8*8 are generated, which can be converted into 512 (=8*8**8) one-dimensional vectors.

한편, 세 번째 컨볼루션 레이어와 완전 연결 레이어 사이에 드랍 아웃 (dropout) 레이어를 추가할 수도 있다. 드랍 아웃 레이어는 뉴럴 네트워크가 학습 과정 중에 학습용 데이터에 오버피팅(overfitting)되는 문제를 막기 위한 것이다.Meanwhile, a dropout layer may be added between the third convolutional layer and the fully connected layer. The drop-out layer is to prevent the neural network from overfitting the training data during the training process.

완전 연결 레이어에서는 생성된 512개의 노드들을 F개의 출력 노드들과 완전 연결시킬 수 있다. 이 때 출력 노드의 개수 F는 컨볼루션 뉴럴 네트워크가 추정할 수 있는 서로 다른 서치 버퍼 크기의 개수에 해당할 수 있다. In the fully connected layer, the 512 generated nodes can be fully connected with F output nodes. In this case, the number F of output nodes may correspond to the number of different search buffer sizes that the convolutional neural network can estimate.

도 6에서 F는 4로 설정되었으며, 따라서 컨볼루션 뉴럴 네트워크가 추정할 수 있는 서로 다른 서치 버퍼 크기의 개수는 4이다. 예를 들어, 서로 다른 서치 버퍼의 크기는 각각 1024, 2048, 4096 및 8192일 수 있다. 이 때, 서치 버퍼의 크기 1024는 클래스 0, 서치 버퍼의 크기 2048는 클래스 1, 서치 버퍼의 크기 4096는 클래스 2, 서치 버퍼의 크기 8192는 클래스 3으로 설정할 수 있다. 그리고 컨볼루션 뉴럴 네트워크의 학습 과정에서 각 서치 버퍼의 크기에 해당하는 클래스들은 [1, 0, 0 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]과 같이 원핫 벡터(one-hot vector)로 인코딩되어 사용될 수 있다.In FIG. 6, F is set to 4, so the number of different search buffer sizes that the convolutional neural network can estimate is 4. For example, the sizes of the different search buffers may be 1024, 2048, 4096, and 8192, respectively. In this case, the size of the search buffer 1024 may be set to class 0, the size of the search buffer 2048 may be set to class 1, the size of the search buffer 4096 may be set to class 2, and the size of the search buffer 8192 may be set to class 3. And in the training process of the convolutional neural network, the classes corresponding to the size of each search buffer are [1, 0, 0 0], [0, 1, 0, 0], [0, 0, 1, 0], [0]. , 0, 0, 1] may be encoded and used as a one-hot vector.

완전 연결 레이어에서 출력되는 활성화 값(activation values)들은 소프트맥스 함수(softmax function)로 정규화될 수 있다. 소프트맥스 함수는 하기 수학식 10와 같다.Activation values output from the fully connected layer may be normalized with a softmax function. The softmax function is as shown in Equation 10 below.

Figure 112019123851554-pat00011
Figure 112019123851554-pat00011

상기 수학식 10에서

Figure 112019123851554-pat00012
는 클래스 p에 대응되는 정규화된 활성화 값이며,
Figure 112019123851554-pat00013
yp는 클래스 p에 대응되는 정규화되기 전의 활성화 값이다..In Equation 10 above
Figure 112019123851554-pat00012
is the normalized activation value corresponding to class p,
Figure 112019123851554-pat00013
y p is the activation value before normalization corresponding to class p.

한편 컨볼루션 뉴럴 네트워크를 학습시키기 위해 손실 함수(loss function)를 설정할 수 있다. 손실 함수는 평균 제곱 오차(mean squared error) 및 교차 엔트로피 오차 (cross entropy error) 중 어느 하나에 해당할 수 있으나 이에 제한되는 것은 아니다. 교차 엔트로피 오차는 하기 수학식 11과 같이 나타낼 수 있다.Meanwhile, a loss function may be set to train the convolutional neural network. The loss function may correspond to any one of a mean squared error and a cross entropy error, but is not limited thereto. The cross entropy error can be expressed as Equation 11 below.

Figure 112019123851554-pat00014
Figure 112019123851554-pat00014

상기 수학식 11에서 E는 교차 엔트로피 오차 값이고, T는 클래스의 총 개수이다. Yt는 클래스를 원핫 벡터로 표현하였을 때, 벡터 내 t번째 요소의 값을 의미할 수 있다. In Equation 11, E is the cross entropy error value, and T is the total number of classes. Y t may mean the value of the t-th element in the vector when the class is expressed as a one-hot vector.

컨볼루션 뉴럴 네트워크는 학습 과정에서 손실 함수의 값을 가능한 작게 하는 매개변수 값을 찾을 수 있다. 이 때, 컨볼루션 뉴럴 네트워크는 매개변수의 미분 값을 계산하고, 계산한 미분 값에 기초하여 매개변수 값을 갱신하는 과정을 반복할 수 있다.The convolutional neural network can find parameter values that make the value of the loss function as small as possible during the training process. In this case, the convolutional neural network may repeat the process of calculating the differential value of the parameter and updating the parameter value based on the calculated differential value.

한편, 판단된 압축 알고리즘의 파라미터를 추정하는 다른 실시예로서, 압축된 데이터를 복원하는 장치(100)는 압축된 데이터의 비트 스트림 내 0 및 1의 비율을 나타내는 제 1 특징값 및 비트 스트림 내 동일한 비트의 연속 정도를 나타내는 제 2 특징값을 산출할 수 있다.On the other hand, as another embodiment of estimating the determined parameters of the compression algorithm, the apparatus 100 for reconstructing compressed data includes a first feature value indicating a ratio of 0 and 1 in the bit stream of the compressed data and the same in the bit stream. A second characteristic value indicating the degree of continuity of bits may be calculated.

예를 들어, 압축된 데이터를 복원하는 장치(100)는 압축 시 사용된 압축 알고리즘이 LZ77 압축 알고리즘에 해당한다고 판단한 경우에는, 압축된 데이터의 비트 스트림으로부터 특징값들을 산출할 수 있다. For example, when it is determined that the compression algorithm used during compression corresponds to the LZ77 compression algorithm, the apparatus 100 for restoring compressed data may calculate feature values from the bit stream of the compressed data.

압축된 데이터를 복원하는 장치(100)는 제 1 특징값을 산출하기 위한 제 1 통계적 테스트 및 제 2 특징값을 산출하기 위한 제 2 통계적 테스트를 수행할 수 있다. The apparatus 100 for reconstructing compressed data may perform a first statistical test for calculating a first feature value and a second statistical test for calculating a second feature value.

제 1 통계적 테스트에서, 압축된 데이터를 복원하는 장치(100)는 압축된 데이터의 비트 스트림 β 내에 존재하는 비트 '0'을 '-1'로 변환할 수 있고, 비트 스트림 내에 존재하는 비트 '1'을 '+1'로 변환할 수 있다. In the first statistical test, the apparatus 100 for reconstructing compressed data may convert bit '0' present in the bit stream β of the compressed data to '-1', and bit '1 present in the bit stream ' can be converted to '+1'.

압축된 데이터를 복원하는 장치(100)는 비트 스트림 β 내의 모든 비트들에 대하여 변환 과정이 완료된 경우에, '-1' 또는 '+1'로 변환된 값들을 모두 더할 수 있다. 예를 들어 비트 스트림 β가 '1110'인 경우, '1110'은 '(+1)(+1)(+1)(-1)'로 변환될 수 있다. 따라서 변환된 값들 합 TF는 2에 해당할 수 있다.The apparatus 100 for reconstructing compressed data may add all values converted to '-1' or '+1' when the conversion process is completed for all bits in the bit stream β. For example, when the bit stream β is '1110', '1110' may be converted into '(+1)(+1)(+1)(-1)'. Therefore, the sum of the transformed values T F may correspond to 2.

압축된 데이터를 복원하는 장치(100)는 변환된 값들 합 TF를 비트 스트림 β의 총 길이 N의 제곱근 값으로 나눈 값인 TF/√N을 제 1 특징값으로 산출할 수 있다. 예를 들어, 비트 스트림 β가 '1110'인 경우 N은 4이므로, 1 특징값은 1이 될 수 있다. The apparatus 100 for reconstructing compressed data may calculate T F /√N, which is a value obtained by dividing the sum of the transformed values T F by the square root of the total length N of the bit stream β, as the first feature value. For example, when the bit stream β is '1110', since N is 4, the 1 feature value may be 1.

제 2 통계적 테스트는 압축된 데이터의 비트 스트림 β에서 동일한 비트가 얼마나 연속적으로 나오는 지에 대한 테스트이다. 한편, 압축된 데이터의 비트 스트림 β는 1*N 차원의 벡터인 [β1, β2, β3, ??N] 표현될 수 있다. The second statistical test is a test of how successively the same bit appears in the bit stream β of the compressed data. On the other hand, the bit stream β of the compressed data is a 1*N-dimensional vector [β 1, β 2, β 3, ??N ] can be expressed.

압축된 데이터를 복원하는 장치(100)는 R(β)/√N을 제 2 특징값으로 산출할 수 있으며, R(β)는 하기 수학식 12와 같이 정의될 수 있다.The apparatus 100 for reconstructing compressed data may calculate R(β)/√N as the second characteristic value, and R(β) may be defined as in Equation 12 below.

Figure 112019123851554-pat00015
Figure 112019123851554-pat00015

상기 수학식 12에서 r(n)은 하기 수학식 13과 같이 정의될 수 있다. In Equation 12, r(n) may be defined as Equation 13 below.

Figure 112019123851554-pat00016
Figure 112019123851554-pat00016

상기 수학식 13에서, βn은 압축된 데이터의 비트 스트림 β의

Figure 112019123851554-pat00017
번째 비트 값에 해당할 수 있다. r(n)은 연속한 두 비트의 값이 동일할 경우에는 0, 연속한 두 비트의 값이 서로 다를 경우에는 1로 설정될 수 있다. In Equation 13, βn is the bit stream β of the compressed data.
Figure 112019123851554-pat00017
It may correspond to the th bit value. r(n) may be set to 0 when values of two consecutive bits are the same, and set to 1 when values of two consecutive bits are different from each other.

예를 들어, 입력 비트 스트림 β가 '111010'인 경우, r(1)=0, r(2)=0, r(3)=1, r(4)=1, r(5)=1으로 계산될 수 있다. 따라서, R(β)는 4이다.For example, if the input bit stream β is '111010', then r(1)=0, r(2)=0, r(3)=1, r(4)=1, r(5)=1 can be calculated. Therefore, R(β) is 4.

압축된 데이터를 복원하는 장치(100)는 R(β)를 비트 스트림 β의 총 길이 N의 제곱근 값으로 나눈 값인 R(β)/√N을 제 2 특징값으로 산출할 수 있다. 예를 들어, 비트 스트림 β가 '111010'인 경우 N은 6이므로, 제 2 특징값은 약 2.449(=4/√6)가 될 수 있다.The apparatus 100 for reconstructing compressed data may calculate R(β)/√N, which is a value obtained by dividing R(β) by the square root of the total length N of the bit stream β, as the second feature value. For example, when the bit stream β is '111010', N is 6, so the second feature value may be about 2.449 (=4/√6).

압축된 데이터를 복원하는 장치(100)는 제 1 특징값 및 제 2 특징값을 뉴럴 네트워크에 입력하여 판단된 압축 알고리즘의 파라미터를 추정할 수 있다.The apparatus 100 for reconstructing compressed data may estimate the determined parameters of the compression algorithm by inputting the first and second feature values to the neural network.

도 7은 압축 알고리즘의 파라미터를 추정하는 방법에 적용되는 SVM(support vector machine) 분류기의 일 예를 나타내는 도면이다.7 is a diagram illustrating an example of a support vector machine (SVM) classifier applied to a method of estimating a parameter of a compression algorithm.

먼저, 압축된 데이터를 복원하는 장치(100)는 LZ77 압축 알고리즘의 서치 버퍼 크기를 달리하여 데이터들을 압축하여 다양한 비트 스트림들을 생성할 수 있다. 이 때, 비트 스트림 생성 시 설정된 서치 버퍼 크기를 나타내는 라벨 값 및 비트 스트림 정보를 데이터베이스에 기록할 수 있다.First, the apparatus 100 for restoring compressed data may compress data by varying the search buffer size of the LZ77 compression algorithm to generate various bit streams. In this case, a label value indicating the size of the search buffer set when the bit stream is generated and bit stream information may be recorded in the database.

데이터베이스의 구축이 완료되면, 압축 알고리즘의 파라미터를 추정하는 SVM 분류기의 학습이 진행될 수 있다. When the construction of the database is completed, learning of the SVM classifier for estimating the parameters of the compression algorithm may proceed.

학습 단계에서는 SVM 분류기를 학습시키기 위한 비트 스트림들 및 해당 비트 스트림들 각각의 생성시 설정된 서치 버퍼 크기를 나타내는 라벨 값을 포함하는 정보를 데이터 베이스로부터 가져올 수 있다. 이 때, 비트 스트림들은 특징 벡터 추출부로 입력될 수 있다. 특징 벡터 추출부는 입력된 비트 스트림들에 대하여 제 1 통계적 테스트 및 제 2 통계적 테스트를 수행할 수 있다. 특징 벡터 추출부 입력된 비트 스트림들 각각에 대하여 제 1 특징값 및 제 2 특징값 정보를 포함하는 특징 벡터를 출력할 수 있다. 출력된 특징 벡터 및 라벨 값을 포함하는 정보는 SVM 분류기에 입력되며, SVM 분류기는 라벨 값에 따른 특징 벡터들을 분류할 수 있도록 학습된다. In the learning step, information including bit streams for training the SVM classifier and a label value indicating a search buffer size set when generating each of the bit streams may be obtained from the database. In this case, the bit streams may be input to the feature vector extractor. The feature vector extractor may perform a first statistical test and a second statistical test on the input bit streams. The feature vector extractor may output a feature vector including first feature value and second feature value information for each of the input bit streams. Information including the output feature vector and label value is input to the SVM classifier, and the SVM classifier is trained to classify the feature vectors according to the label value.

시험 단계에서는 학습이 완료된 생성된 SVM 분류기를 이용할 수 있다. 시험 단계에서는 학습 단계에서 사용되지 않은 비트 스트림들을 데이터 베이스로부터 가져올 수 있다. 비트 스트림들은 특징 벡터 추출부로 입력될 수 있으며, 제 1 통계적 테스트 및 제 2 통계적 테스트를 통하여 제 1 특징값 및 제 2 특징값 정보를 포함하는 특징 벡터가 출력될 수 있다. 출력된 특징 벡터는 학습이 완료된 SVM 분류기에 입력되며, SVM 분류기는 입력된 특징 벡터에 대해 추정되는 라벨 값을 출력할 수 있으며, 해당 라벨 값에 대응되는 서치 버퍼의 크기를 구할 수 있다. In the test phase, the generated SVM classifier that has been trained can be used. In the test phase, bit streams not used in the learning phase may be retrieved from the database. The bit streams may be input to the feature vector extractor, and a feature vector including the first feature value and the second feature value information may be output through the first statistical test and the second statistical test. The output feature vector is input to a trained SVM classifier, and the SVM classifier may output an estimated label value for the input feature vector, and obtain a size of a search buffer corresponding to the corresponding label value.

다시 도 2를 참조하면, 250 단계에서, 압축된 데이터를 복원하는 장치(100)는 파라미터를 이용하여 상기 데이터를 압축 해제하여 복원할 수 있다. Referring back to FIG. 2 , in step 250 , the apparatus 100 for restoring compressed data may decompress the data using parameters to restore the data.

상술한 방식으로 학습된 컨볼루션 뉴럴 네트워크는 최종 이미지를 입력 받아 서치 버퍼 크기 값에 해당하는 클래스를 출력할 수 있다. 또는, 상술한 방식으로 학습된 SVM 분류기는 특징 벡터를 입력 받아 서치 버퍼 크기 값에 해당하는 클래스를 출력할 수 있다. 출력된 클래스로부터 대응하는 서치 버퍼의 크기를 알 수 있으며, 이를 이용하여 압축된 데이터를 압축 해제함으로써 압축 전 원본 데이터를 복원할 수 있다.The convolutional neural network trained in the above manner may receive the final image and output a class corresponding to the search buffer size value. Alternatively, the SVM classifier learned in the above manner may receive a feature vector and output a class corresponding to a search buffer size value. The size of the corresponding search buffer can be known from the output class, and the original data before compression can be restored by decompressing the compressed data using this.

한편, 상술한 본 발명의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성 가능하고, 컴퓨터로 읽을 수 있는 기록매체를 이용하여 상기 프로그램을 동작시키는 범용 디지털 컴퓨터에서 구현될 수 있다. 또한, 상술한 본 발명의 실시예에서 사용된 데이터의 구조는 컴퓨터로 읽을 수 있는 기록매체에 여러 수단을 통하여 기록될 수 있다. 상기 컴퓨터로 읽을 수 있는 기록매체는 마그네틱 저장매체(예를 들면, 롬, 플로피 디스크, 하드 디스크 등), 광학적 판독 매체(예를 들면, 시디롬, 디브이디 등)와 같은 저장매체를 포함한다.Meanwhile, the above-described embodiments of the present invention can be written as a program that can be executed on a computer, and can be implemented in a general-purpose digital computer that operates the program using a computer-readable recording medium. In addition, the structure of the data used in the above-described embodiment of the present invention may be recorded in a computer-readable recording medium through various means. The computer-readable recording medium includes a storage medium such as a magnetic storage medium (eg, a ROM, a floppy disk, a hard disk, etc.) and an optically readable medium (eg, a CD-ROM, a DVD, etc.).

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.So far, with respect to the present invention, the preferred embodiments have been looked at. Those of ordinary skill in the art to which the present invention pertains will understand that the present invention can be implemented in a modified form without departing from the essential characteristics of the present invention. Therefore, the disclosed embodiments are to be considered in an illustrative rather than a restrictive sense. The scope of the present invention is indicated in the claims rather than the foregoing description, and all differences within the scope equivalent thereto should be construed as being included in the present invention.

Claims (14)

압축된 데이터를 복원하는 방법에 있어서,
상기 데이터의 비트 스트림(bit stream)을 각각이 복수 개의 비트들을 포함하는 그룹들로 분할하는 단계;
상기 그룹들 각각에 대응되는 값들의 빈도 분포를 생성하는 단계;
상기 빈도 분포에 기초하여 상기 데이터의 압축 시 사용된 압축 알고리즘을 판단하는 단계;
상기 비트 스트림으로부터 복수의 이진 영상(binary image)들을 획득하는 단계;
상기 복수의 이진 영상들을 합하여 최종 이미지를 획득하고, 상기 최종 이미지를 뉴럴 네트워크에 입력하여 상기 판단된 압축 알고리즘의 파라미터를 추정하는 단계; 및
상기 파라미터를 이용하여 상기 데이터를 압축 해제하여 복원하는 단계를 포함하는 방법.
A method for restoring compressed data, comprising:
dividing the bit stream of data into groups each comprising a plurality of bits;
generating a frequency distribution of values corresponding to each of the groups;
determining a compression algorithm used when compressing the data based on the frequency distribution;
obtaining a plurality of binary images from the bit stream;
obtaining a final image by summing the plurality of binary images, and estimating the determined parameter of the compression algorithm by inputting the final image into a neural network; and
and decompressing and restoring the data using the parameter.
제 1 항에 있어서,
상기 생성하는 단계는,
상기 그룹들 각각에 포함된 비트들의 개수에 기초하여 0부터 N(N은 자연수)까지의 값을 포함하는 배열을 생성하는 단계; 및
상기 배열 상에 상기 그룹들 각각에 대응되는 값들의 빈도 수를 저장하는 단계; 를 더 포함하는 방법.
The method of claim 1,
The generating step is
generating an array including values from 0 to N (N is a natural number) based on the number of bits included in each of the groups; and
storing the frequency number of values corresponding to each of the groups in the array; How to include more.
제 2 항에 있어서,
상기 판단하는 단계는,
상기 그룹들 각각에 대응되는 값들의 빈도 수를 모두 합한 값에 대한 상기 그룹들 각각에 대응되는 값들 중 기 설정된 구간 내의 값들의 빈도 수를 합한 값의 비율 값이 임계값 미만인지 여부를 판단하는 방법.
3. The method of claim 2,
The determining step is
A method of determining whether a ratio of the sum of the frequencies of values corresponding to each of the groups to the sum of the frequencies of the values corresponding to each of the groups is less than a threshold value among the values corresponding to each of the groups .
제 3 항에 있어서,
상기 판단하는 단계는,
상기 비율이 임계값 미만인 경우에는,
상기 데이터의 압축 시 사용된 압축 알고리즘은 LZ(Lempel-Ziv)77 압축 알고리즘에 해당한다고 판단하고,
상기 파라미터는 서치 버퍼(search buffer)의 크기 값에 해당하는 방법.
4. The method of claim 3,
The determining step is
If the ratio is less than the threshold,
It is determined that the compression algorithm used when compressing the data corresponds to the LZ (Lempel-Ziv) 77 compression algorithm,
The parameter corresponds to a size value of a search buffer.
제 1 항에 있어서,
상기 획득하는 단계는,
상기 비트 스트림을 각각이 복수 개의 비트들을 포함하는 1*M(M은 자연수)차원의 벡터들로 분할하는 단계; 및
상기 벡터들 각각을 m*m(m은 자연수)차원의 벡터들로 변환하여 상기 복수의 이진 영상들을 획득하는 단계; 를 포함하는 방법.
The method of claim 1,
The obtaining step is
dividing the bit stream into 1*M (M is a natural number) dimensional vectors each including a plurality of bits; and
converting each of the vectors into m*m (m is a natural number) dimensional vectors to obtain the plurality of binary images; How to include.
제 5 항에 있어서,
상기 최종 이미지는,
상기 벡터들 각각에 포함되는 복수 개의 비트들의 개수 및 상기 판단된 압축 알고리즘의 파라미터에 기초하여 결정되는 방법.
6. The method of claim 5,
The final image is
A method determined based on the number of a plurality of bits included in each of the vectors and the determined parameter of the compression algorithm.
압축된 데이터를 복원하는 방법을 구현하기 위한 프로그램이 기록된, 컴퓨터로 판독 가능한 기록 매체에 있어서,
상기 방법은,
상기 데이터의 비트 스트림(bit stream)을 각각이 복수 개의 비트들을 포함하는 그룹들로 분할하는 단계;
상기 그룹들 각각에 대응되는 값들의 빈도 분포를 생성하는 단계;
상기 빈도 분포에 기초하여 상기 데이터의 압축 시 사용된 압축 알고리즘을 판단하는 단계;
상기 비트 스트림으로부터 복수의 이진 영상(binary image)들을 획득하는 단계;
상기 복수의 이진 영상들을 합하여 최종 이미지를 획득하고, 상기 최종 이미지를 뉴럴 네트워크에 입력하여 상기 판단된 압축 알고리즘의 파라미터를 추정하는 단계; 및
상기 파라미터를 이용하여 상기 데이터를 압축 해제하여 복원하는 단계를 포함하는, 기록 매체.
In a computer-readable recording medium in which a program for implementing a method of restoring compressed data is recorded,
The method is
dividing the bit stream of data into groups each comprising a plurality of bits;
generating a frequency distribution of values corresponding to each of the groups;
determining a compression algorithm used when compressing the data based on the frequency distribution;
obtaining a plurality of binary images from the bit stream;
obtaining a final image by summing the plurality of binary images, and estimating the determined parameters of the compression algorithm by inputting the final image into a neural network; and
and decompressing and restoring the data using the parameter.
하드웨어와 결합되어, 압축된 데이터를 복원하는 방법을 실행시키기 위하여 매체에 저장된 컴퓨터 프로그램에 있어서,
상기 방법은,
상기 데이터의 비트 스트림(bit stream)을 각각이 복수 개의 비트들을 포함하는 그룹들로 분할하는 단계;
상기 그룹들 각각에 대응되는 값들의 빈도 분포를 생성하는 단계;
상기 빈도 분포에 기초하여 상기 데이터의 압축 시 사용된 압축 알고리즘을 판단하는 단계;
상기 비트 스트림으로부터 복수의 이진 영상(binary image)들을 획득하는 단계;
상기 복수의 이진 영상들을 합하여 최종 이미지를 획득하고, 상기 최종 이미지를 뉴럴 네트워크에 입력하여 상기 판단된 압축 알고리즘의 파라미터를 추정하는 단계; 및
상기 파라미터를 이용하여 상기 데이터를 압축 해제하여 복원하는 단계를 포함하는, 컴퓨터 프로그램.
In combination with hardware, a computer program stored in a medium to execute a method for restoring compressed data,
The method is
dividing the bit stream of data into groups each comprising a plurality of bits;
generating a frequency distribution of values corresponding to each of the groups;
determining a compression algorithm used when compressing the data based on the frequency distribution;
obtaining a plurality of binary images from the bit stream;
obtaining a final image by summing the plurality of binary images, and estimating the determined parameter of the compression algorithm by inputting the final image into a neural network; and
and decompressing and restoring the data using the parameters.
하나 이상의 명령어(instruction)를 저장하는 메모리; 및
상기 하나 이상의 명령어를 실행함으로써, 압축된 데이터의 비트 스트림(bit stream)을 각각이 복수 개의 비트들을 포함하는 그룹들로 분할하고, 상기 그룹들 각각에 대응되는 값들의 빈도 분포를 생성하고, 상기 빈도 분포에 기초하여 상기 데이터의 압축 시 사용된 압축 알고리즘을 판단하고, 상기 비트 스트림으로부터 복수의 이진 영상(binary image)들을 획득하고, 상기 복수의 이진 영상들을 합하여 최종 이미지를 획득하고, 상기 최종 이미지를 뉴럴 네트워크에 입력하여 상기 판단된 압축 알고리즘의 파라미터를 추정하고, 상기 파라미터를 이용하여 상기 데이터를 압축 해제하여 복원하는 프로세서를 포함하는 장치.
a memory that stores one or more instructions; and
By executing the one or more instructions, a bit stream of compressed data is divided into groups each comprising a plurality of bits, generating a frequency distribution of values corresponding to each of the groups, the frequency determine a compression algorithm used in compressing the data based on the distribution, obtain a plurality of binary images from the bit stream, obtain a final image by summing the plurality of binary images, and obtain the final image and a processor for estimating the determined parameters of the compression algorithm by input to a neural network, and decompressing and restoring the data using the parameters.
제 9 항에 있어서,
상기 프로세서는,
상기 그룹들 각각에 포함된 비트들의 개수에 기초하여 0부터 N(N은 자연수)까지의 값을 포함하는 배열을 생성하고,
상기 배열 상에 상기 그룹들 각각에 대응되는 값들의 빈도 수를 저장하는 장치.
10. The method of claim 9,
The processor is
Create an array including values from 0 to N (N is a natural number) based on the number of bits included in each of the groups,
an apparatus for storing a frequency count of values corresponding to each of the groups in the array.
제 9 항에 있어서,
상기 프로세서는,
상기 그룹들 각각에 대응되는 값들의 빈도 수를 모두 합한 값에 대한 상기 그룹들 각각에 대응되는 값들 중 기 설정된 구간 내의 값들의 빈도 수를 합한 값의 비율 값이 임계값 미만인지 여부를 판단하는 장치.
10. The method of claim 9,
The processor is
Apparatus for determining whether a ratio value of the sum of the frequencies of values corresponding to each of the groups to the sum of the frequencies of values corresponding to each of the groups is less than a threshold value among the values corresponding to each of the groups .
제 11 항에 있어서,
상기 프로세서는,
상기 비율이 임계값 미만인 경우에는,
상기 데이터의 압축 시 사용된 압축 알고리즘은 LZ(Lempel-Ziv)77 압축 알고리즘에 해당한다고 판단하고,
상기 파라미터는 서치 버퍼(search buffer)의 크기 값에 해당하는 장치.
12. The method of claim 11,
The processor is
If the ratio is less than the threshold,
It is determined that the compression algorithm used when compressing the data corresponds to the LZ (Lempel-Ziv) 77 compression algorithm,
The parameter corresponds to a size value of a search buffer.
제 9 항에 있어서,
상기 프로세서는,
상기 비트 스트림을 각각이 복수 개의 비트들을 포함하는 1*M(M은 자연수)차원의 벡터들로 분할하고,
상기 벡터들 각각을 m*m(m은 자연수)차원의 벡터들로 변환하여 상기 복수의 이진 영상들을 획득하는 장치.
10. The method of claim 9,
The processor is
The bit stream is divided into 1 * M (M is a natural number) dimensional vectors each including a plurality of bits,
An apparatus for obtaining the plurality of binary images by converting each of the vectors into m*m (m is a natural number) dimensional vectors.
제 13 항에 있어서,
상기 최종 이미지는,
상기 벡터들 각각에 포함되는 복수 개의 비트들의 개수 및 상기 판단된 압축 알고리즘의 파라미터에 기초하여 결정되는 장치.
14. The method of claim 13,
The final image is
The apparatus is determined based on the number of the plurality of bits included in each of the vectors and the determined parameter of the compression algorithm.
KR1020190157684A 2019-11-29 2019-11-29 Method and apparatus for estimating parameters of compression algorithm KR102317205B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190157684A KR102317205B1 (en) 2019-11-29 2019-11-29 Method and apparatus for estimating parameters of compression algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190157684A KR102317205B1 (en) 2019-11-29 2019-11-29 Method and apparatus for estimating parameters of compression algorithm

Publications (2)

Publication Number Publication Date
KR20210067759A KR20210067759A (en) 2021-06-08
KR102317205B1 true KR102317205B1 (en) 2021-10-25

Family

ID=76399942

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190157684A KR102317205B1 (en) 2019-11-29 2019-11-29 Method and apparatus for estimating parameters of compression algorithm

Country Status (1)

Country Link
KR (1) KR102317205B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101890365B1 (en) * 2017-07-26 2018-08-21 국방과학연구소 Method and apparatus for error detection in compressed data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101590790B1 (en) * 2014-03-04 2016-02-02 김정훈 Binary data compression and restoration method and apparatus

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101890365B1 (en) * 2017-07-26 2018-08-21 국방과학연구소 Method and apparatus for error detection in compressed data

Also Published As

Publication number Publication date
KR20210067759A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
US20180053091A1 (en) System and method for model compression of neural networks for use in embedded platforms
US20190163904A1 (en) Apparatus for detecting variants of malicious code based on neural network learning, method therefor and computer readable recording medium storing program for performing the method
US20180365794A1 (en) Image processing apparatus and method using multi-channel feature map
CN105960647B (en) Compact face representation
US8731317B2 (en) Image classification employing image vectors compressed using vector quantization
US11481613B2 (en) Execution method, execution device, learning method, learning device, and recording medium for deep neural network
US20140254936A1 (en) Local feature based image compression
US11436491B2 (en) System and method for improving convolutional neural network-based machine learning models
CN112163114A (en) Image retrieval method based on feature fusion
KR102242904B1 (en) Method and apparatus for estimating parameters of compression algorithm
CN100535926C (en) Data processing method and apparatus, image processing method and apparatus, image sorting method and apparatus, and storage medium
CN113361589A (en) Rare or endangered plant leaf identification method based on transfer learning and knowledge distillation
KR102317205B1 (en) Method and apparatus for estimating parameters of compression algorithm
CN116783825A (en) Method and system for lossy compression of data log files
JP6856950B2 (en) Conversion device, conversion method, program, and information recording medium
CN116975864A (en) Malicious code detection method and device, electronic equipment and storage medium
JP7233875B2 (en) Creation method, computer and program
EP4237977B1 (en) Method for detection of malware
US20210042550A1 (en) Information processing device, information processing method, and computer-readable recording medium recording information processing program
US11663289B1 (en) Quantum modulation-based data search
JP7242590B2 (en) Machine learning model compression system, pruning method and program
CN109299260B (en) Data classification method, device and computer readable storage medium
CN113038134B (en) Picture processing method, intelligent terminal and storage medium
CN113298892A (en) Image coding method and device, and storage medium
Chung et al. Filter pruning by image channel reduction in pre-trained convolutional neural networks

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant