KR102267560B1 - Method for Managing Modified Record of Data Which Can Reduce Size of Data Stored in Block Chain - Google Patents
Method for Managing Modified Record of Data Which Can Reduce Size of Data Stored in Block Chain Download PDFInfo
- Publication number
- KR102267560B1 KR102267560B1 KR1020200151877A KR20200151877A KR102267560B1 KR 102267560 B1 KR102267560 B1 KR 102267560B1 KR 1020200151877 A KR1020200151877 A KR 1020200151877A KR 20200151877 A KR20200151877 A KR 20200151877A KR 102267560 B1 KR102267560 B1 KR 102267560B1
- Authority
- KR
- South Korea
- Prior art keywords
- data
- address
- smart contract
- transaction
- previous
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/219—Managing data history or versioning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
- G06F16/1834—Distributed file systems implemented based on peer-to-peer networks, e.g. gnutella
- G06F16/1837—Management specially adapted to peer-to-peer storage networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/1865—Transactional file systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
- G06F16/2255—Hash tables
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
Abstract
Description
본 발명은 블록 체인에 데이터의 변경 이력을 저장하는 방법에 대한 것으로서 좀 더 구체적으로는 블록 체인에 저장되는 데이터의 크기를 저감할 수 있는 데이터 변경 이력 관리 방법에 대한 것이다.The present invention relates to a method of storing a data change history in a block chain, and more particularly, to a data change history management method capable of reducing the size of data stored in a block chain.
블록 체인은 트랜잭션을 기록하는 분산 원장의 기능을 하며, 모든 네트워크 참여자가 트랜잭션의 유효성을 검사할 수 있으며, 권한 없는 자가 저장된 데이터를 변경하거나 위조하는 것을 원천적으로 차단할 수 있다.The blockchain functions as a distributed ledger that records transactions, all network participants can validate transactions, and can fundamentally block unauthorized persons from altering or forging stored data.
그런데 종래의 블록 체인에 의하면 거래에 참여하는 모든 노드가 모든 트랜잭션 데이터를 보유하고 있는데, 트랜잭션 데이터가 일부 변경되는 경우 변경 전 데이터부터 변경 후의 데이터 전체가 블록 체인에 저장되므로 저장되는 데이터의 양이 증대하는 문제가 있다. 예를 들어 1번 블록에 원본 데이터가, 2번 블록에 1차 변경 내역이 반영된 1차 변경후 데이터가, 3번 블록에 2차 변경 내역이 반영된 2차 변경 후 데이터가 저장되는 방식이므로, 특히 변경 횟수가 늘어날 수록 블록 체인에 저장되는 데이터의 양이 크게 증가한다.However, according to the conventional block chain, all nodes participating in the transaction hold all transaction data. If the transaction data is partially changed, the entire data from before and after the change is stored in the block chain, so the amount of stored data increases. there is a problem with For example, since the original data is stored in block 1, the data after the first change in which the first change is reflected in block 2, and the data after the second change in which the secondary change is reflected in block 3, especially As the number of changes increases, the amount of data stored in the blockchain increases significantly.
본 발명은 블록 체인에 저장되는 데이터에 변경 이력이 발생하는 경우에 블록 체인에 저장되는 데이터의 양을 저감시킬 수 있는 데이터 변경 이력 관리 방법을 제공하는 것을 목적으로 한다.An object of the present invention is to provide a data change history management method that can reduce the amount of data stored in the block chain when a change history occurs in data stored in the block chain.
본 발명은 사용자 단말기와, 데이터 관리 모듈과, 스마트 컨트랙트 모듈과, 블록 체인을 포함하는 환경에서 실행되는 데이터 관리 방법에 관한 것으로서, 데이터 관리 모듈이 사용자 단말기로부터 데이터를 수신하는 제1 단계와; 데이터 관리 모듈이 수신한 데이터가 신규 데이터이면 이전 데이터 주소를 null 값으로 지정하고 데이터와 함께 스마트 컨트랙트 모듈로 전송하는 제2 단계와; 스마트 컨트랙트 모듈이 블록 체인에 상기 데이터를 트랜잭션으로 저장하는 제3 단계와; 스마트 컨트랙트 모듈이 상기 데이터의 트랜잭션 주소를 데이터 관리 모듈로 전달하고 데이터 관리 모듈이 상기 트랜잭션 주소를 저장하는 제4 단계를 포함한다.The present invention relates to a data management method executed in an environment including a user terminal, a data management module, a smart contract module, and a block chain, the data management module comprising: a first step of receiving data from the user terminal; a second step of designating the previous data address as a null value and transmitting the data to the smart contract module together with the data if the data received by the data management module is new data; a third step of the smart contract module storing the data as a transaction in the block chain; and a fourth step in which the smart contract module transmits the transaction address of the data to the data management module and the data management module stores the transaction address.
본 발명에 의한, 데이터의 변경 이력을 관리하는 방법은, 데이터 관리 모듈이, 사용자 단말기로부터 수정 내역이 반영된 수정 데이터를 수신하는 제5 단계와; 데이터 관리 모듈이, 상기 수정 데이터를 스마트 컨트랙트 모듈로 전송하는 제6 단계와; 스마트 컨트랙트 모듈이, 수정 데이터의 직전 주소를 참조하여 해당 주소의 트랜잭션 데이터를 획득하는 제7 단계와; 스마트 컨트랙트 모듈이, 제7 단계에서 획득한 트랜잭션 데이터과 수정 데이터를 비교하여 변경 내역을 추출하는 제8 단계와; 스마트 컨트랙트 모듈이, 제8 단계에서 추출된 변경 내역을, 이전 데이터에 반영하여 변경후 데이터를 생성하는 제9 단계와; 스마트 컨트랙트 모듈이, 제9 단계에서 생성된 변경후 데이터의 해쉬값과, 제6 단계에서 수신한 데이터의 해쉬값이 일치하면 변경 내역을 블록 체인에 저장하는 제10 단계를 포함한다.According to the present invention, there is provided a method for managing a data change history, comprising: a fifth step of receiving, by a data management module, modified data in which the revision details are reflected from a user terminal; a sixth step of sending, by the data management module, the correction data to the smart contract module; a seventh step in which the smart contract module obtains transaction data of the corresponding address with reference to the address immediately preceding the modification data; an eighth step in which the smart contract module compares the transaction data obtained in the seventh step with the modified data to extract the change details; a ninth step in which the smart contract module generates post-change data by reflecting the change details extracted in the eighth step to previous data; The smart contract module includes a tenth step of storing the change details in the block chain when the hash value of the data after the change generated in the ninth step matches the hash value of the data received in the sixth step.
제10 단계는, 직전 데이터의 트랜잭션 주소를 더 저장하는 단계일 수 있다.The tenth step may be a step of further storing the transaction address of the previous data.
제10 단계는, 직전 데이터의 해쉬값을 더 저장하는 단계일 수 있다.The tenth step may be a step of further storing a hash value of the previous data.
제10 단계는, 현재 저장 데이터의 해쉬값을 더 저장하는 단계일 수 있다.The tenth step may be a step of further storing a hash value of the currently stored data.
제7 단계는 직전 주소가 없을 때까지 재귀적으로 반복하는 단계일 수 있다.The seventh step may be a step of recursively repeating until there is no previous address.
본 발명에 의한 데이터 변경 이력 관리 방법은 직전 주소가 없는 트랜잭션 데이터를 원본 데이터로 획득하는 제7-1 단계를 더 포함할 수 있다.The data change history management method according to the present invention may further include a step 7-1 of acquiring transaction data without an immediately preceding address as original data.
본 발명에 의한 데이터 변경 이력 관리 방법은 상기 원본 데이터에 이전 데이터를 반영하여 조립하는 제7-2 단계를 더 포함할 수 있다.The data change history management method according to the present invention may further include a step 7-2 of assembling by reflecting previous data to the original data.
제8 단계는 제7-2 단계에서 조립된 트랜잭션 데이터와, 스마트 컨트랙트 모듈이 제6 단계에서 수신한 수정 데이터를 비교하여 변경 내역을 추출하는 단계일 수 있다.Step 8 may be a step of extracting change details by comparing the transaction data assembled in step 7-2 with the correction data received in step 6 by the smart contract module.
본 발명은 컴퓨터 판독 가능 기록 매체에 기록된 컴퓨터 프로그램에 의해서 실행될 수 있다.The present invention can be implemented by a computer program recorded on a computer-readable recording medium.
본 발명에 의하면 원본 문서에서 변경된 부분만 블록 체인에 저장함으로써 블록 체인에 저장되는 데이터의 양을 현저하게 저감시킬 수 있는 데이터 변경 이력 관리 방법을 제공하는 효과가 있다.According to the present invention, there is an effect of providing a data change history management method that can significantly reduce the amount of data stored in the block chain by storing only the changed part of the original document in the block chain.
도 1은 본 발명이 실행되는 환경의 일례를 도시한 도면.
도 2는 본 발명에 의한 데이터 변경 이력 관리 방법의 흐름도.
도 3은 본 발명에 의해 블록 체인에 저장되는 데이터의 구조.
도 4는 본 발명의 데이터 변경 이력 관리 방법을 설명하기 위한 데이터 구조의 일례.1 shows an example of an environment in which the present invention is practiced;
2 is a flowchart of a data change history management method according to the present invention.
3 is a structure of data stored in a block chain according to the present invention.
4 is an example of a data structure for explaining the data change history management method of the present invention.
이하에서는 첨부 도면을 참조하여 본 발명에 대해서 자세하게 설명한다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.
본 명세서에서 수행되는 정보(데이터) 전송/수신 과정은 필요에 따라서 암호화/복호화가 적용될 수 있으며, 본 명세서 및 특허청구범위에서 정보(데이터) 전송 과정을 설명하는 표현은 별도로 언급되지 않더라도 모두 암호화/복호화하는 경우도 포함하는 것으로 해석되어야 한다. 본 명세서에서 "A로부터 B로 전송(전달)" 또는 "A가 B로부터 수신"과 같은 형태의 표현은 중간에 다른 매개체가 포함되어 전송(전달) 또는 수신되는 것도 포함하며, A로부터 B까지 직접 전송(전달) 또는 수신되는 것 만을 표현하는 것은 아니다. 본 발명의 설명에 있어서 각 단계의 순서는 선행 단계가 논리적 및 시간적으로 반드시 후행 단계에 앞서서 수행되어야 하는 경우가 아니라면 각 단계의 순서는 비제한적으로 이해되어야 한다. 즉 위와 같은 예외적인 경우를 제외하고는 후행 단계로 설명된 과정이 선행 단계로 설명된 과정보다 앞서서 수행되더라도 발명의 본질에는 영향이 없으며 권리범위 역시 단계의 순서에 관계없이 정의되어야 한다. 그리고 본 명세서에서 “A 또는 B”은 A와 B 중 어느 하나를 선택적으로 가리키는 것뿐만 아니라 A와 B 모두를 포함하는 것도 의미하는 것으로 정의된다. 또한, 본 명세서에서 "포함"이라는 용어는 포함하는 것으로 나열된 요소 이외에 추가로 다른 구성요소를 더 포함하는 것도 포괄하는 의미를 가진다.Encryption/decryption may be applied as needed to the information (data) transmission/reception process performed in this specification, and the expressions describing the information (data) transmission process in the present specification and claims are all encrypted/decrypted even if not separately mentioned. It should be interpreted as including the case of decryption. In this specification, expressions such as "transmission (transmission) from A to B" or "A receives from B" include transmission (transmission) or reception by including another medium in the middle, and directly from A to B It does not represent only what is transmitted (delivered) or received. In the description of the present invention, the order of each step should be understood as non-limiting unless the preceding step must be logically and temporally performed before the subsequent step. That is, except for the above exceptional cases, even if the process described as a subsequent step is performed before the process described as the preceding step, the essence of the invention is not affected, and the scope of rights should be defined regardless of the order of the steps. And in the present specification, "A or B" is defined as meaning not only to selectively indicate any one of A and B, but also to include both A and B. In addition, in the present specification, the term "comprising" has a meaning to encompass the inclusion of other components in addition to the elements listed as including.
본 명세서에서 "모듈" 또는 “유니트”라 함은 범용적인 하드웨어와 그 기능을 수행하는 소프트웨어의 논리적 결합을 의미한다.As used herein, the term “module” or “unit” refers to a logical combination of general-purpose hardware and software performing its function.
본 명세서에서는 본 발명의 설명에 필요한 최소한의 구성요소만을 설명하며, 본 발명의 본질과 관계가 없는 구성요소는 언급하지 아니한다. 그리고 언급되는 구성요소만을 포함하는 배타적인 의미로 해석되어서는 아니되며 언급되지 않은 다른 구성요소도 포함할 수 있는 비배타적인 의미로 해석되어야 한다.In this specification, only the minimum components necessary for the description of the present invention are described, and components not related to the essence of the present invention are not mentioned. And it should not be construed as an exclusive meaning including only the mentioned components, and it should be construed as a non-exclusive meaning that may also include other components not mentioned.
본 발명에 의한 방법은 컴퓨터, 태블릿 PC, 모바일폰, 휴대용 연산 장치, 고정식 연산 장치 등의 전자적 연산 장치에 의해서 실행될 수 있다. 또한, 본 발명의 하나 또는 그 이상의 방법 또는 형태가 적어도 하나의 프로세서에 의해 실행될 수 있다는 점이 이해되어야 한다. 프로세서는, 컴퓨터, 태블릿PC, 모바일 장치, 휴대용 연산 장치 등에 설치될 수 있다. 컴퓨터 프로그램 명령을 저장하도록 되어 있는 메모리가 그러한 장치에 설치되어서 프로그램이 저장된 프로그램 명령을 프로세서가 실행하도록 특별히 프로그램되어 하나 또는 그 이상의, 본 명세서에 기재된 기재된 바와 같은 프로세스를 실행할 수 있다. 또한, 본 명세서에 기재된 정보 및 방법 등은, 하나 또는 그 이상의 추가적인 구성요소와 프로세서를 포함하는 컴퓨터, 태블릿PC, 모바일 장치, 휴대용 연산 장치 등에 의해서 실행될 수 있다는 점이 이해되어야 한다. 또한, 제어 로직은, 프로세서, 제어부/제어 유니트 등에 의해 실행가능한 프로그램 명령을 포함하는 비휘발성 컴퓨터 판독 가능 매체로 구현될 수 있다. 컴퓨터 판독 가능 매체의 예로는, ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 플래시 드라이브, 스마트 카드, 광학 데이터 저장 장치 등이 있지만 그에 제한되는 것은 아니다. 또한, 컴퓨터 판독 가능 기록 매체는 네트워크로 연결된 컴퓨터에 분산되어, 컴퓨터 판독 가능 매체가 분산된 방식 예를 들어 원격 서버 또는 CAN(Controller Area Network)에 의해 분산된 방식으로 저장되고 실행될 수도 있다.The method according to the present invention may be executed by an electronic computing device such as a computer, a tablet PC, a mobile phone, a portable computing device, or a stationary computing device. It should also be understood that one or more methods or aspects of the present invention may be executed by at least one processor. The processor may be installed in a computer, a tablet PC, a mobile device, a portable computing device, or the like. A memory adapted to store computer program instructions may be installed in such a device such that the program is specifically programmed to cause the processor to execute the stored program instructions to execute one or more processes as described herein. In addition, it should be understood that the information and methods described herein may be implemented by a computer, tablet PC, mobile device, portable computing device, etc. including one or more additional components and a processor. In addition, the control logic may be implemented in a non-volatile computer-readable medium including program instructions executable by a processor, a controller/control unit, or the like. Examples of computer-readable media include, but are not limited to, ROM, RAM, CD-ROM, magnetic tape, floppy disk, flash drive, smart card, optical data storage device, and the like. In addition, the computer-readable recording medium may be distributed in computers connected to a network, and the computer-readable medium may be stored and executed in a distributed manner, for example, by a remote server or a controller area network (CAN).
본 명세서에서 특정값에 대해 암호화 또는 해쉬 등과 같은 연산을 하여 소정의 값을 획득한다는 의미는 해당 특정값 뿐만 아니라 해당 특정값의 변형값(예를 들어, 특정값에 소정의 값을 추가로 연산하거나 소정의 규칙에 따라서 해당 특정값을 변화시키는 등의 과정을 통해서 산출된 다른 값)에 대한 암호화 또는 해쉬 등의 연산도 포함하는 것으로 정의된다.In the present specification, the meaning of obtaining a predetermined value by performing an operation such as encryption or hashing on a specific value means not only the specific value but also the transformation value of the specific value (eg, additionally calculating a predetermined value on the specific value, or It is defined as including an operation such as encryption or hashing for another value calculated through a process such as changing a specific value according to a predetermined rule.
도 1에는 본 발명이 실행되는 환경의 일례가 도시되어 있다. 본 발명이 실행되는 환경은 도 1에 도시된 바와 같이 사용자 단말기(10)와, 데이터 관리 모듈(20)과, 스마트 컨트랙트 모듈(30)과, 블록 체인(40)과, 통신망(50)을 포함한다1 shows an example of an environment in which the present invention is practiced. The environment in which the present invention is executed includes a
사용자 단말기(10)는 예를 들어 컴퓨터, 태블릿 PC, 모바일폰, 휴대용 연산 장치, 고정식 연산 장치 등의 전자적 연산 장치가 될 수 있다. 데이터 관리 모듈(20)은, 사용자 단말기(10)로부터 수신하는 데이터를 스마트 컨트랙트 모듈(30)로 전송하는 모듈로서, 사용자 단말기(10)에 하드웨어와 함께 작동하는 어플리케이션 프로그램의 형태로 제공될 수도 있고, 또는 클라우드 환경에서 구동되는 별개의 시스템으로 제공될 수도 있다.The
스마트 컨트랙트 모듈(30)은, 본 발명에 의한 데이터 변경 이력 관리 방법의 알고리즘이 설정되어 있는 모듈로서 데이터 관리 모듈(20)과 블록 체인(40) 사이에서 본 발명의 일부 단계를 수행한다.The
도 2에는 본 발명의 데이터 변경 이력 관리 방법의 흐름도가 도시되어 있다. 먼저 도 2를 참조하여 일반적인 설명을 하고, 이후 도 4를 참조하여 구체적인 설명을 한다.2 is a flowchart of a data change history management method of the present invention. First, a general description will be given with reference to FIG. 2 , and then a detailed description will be given with reference to FIG. 4 .
사용자가 사용자 단말기(10)를 통해 입력한 데이터는 데이터 관리 모듈(20)를 거쳐서 스마트 컨트랙트 모듈(30)에 수신된다(단계 200).Data input by the user through the
신규 데이터인 경우 수신되는 데이터의 형식의 예는 다음과 같다. 이후 데이터 형식에서 "***"는 원본 데이터를, "***$$$"는 원본 데이터"***"에 변경 내역 "$$$"가 반영된 변경 후 데이터를 의미한다.In the case of new data, an example of the format of the received data is as follows. In the following data types, "***" refers to the original data, and "***$$$" refers to the data after the change in which the change history "$$$" is reflected in the original data "***".
{{
previous_data_address: nullprevious_data_address: null
current_data: ***current_data: ***
}}
이전에 블록 체인에 저장된 데이터라면 다음과 같은 형식을 가질 수 있다.Data previously stored on the blockchain can have the following format:
{{
previous_data_address: aaaprevious_data_address: aaa
current_data: ***$$$current_data: ***$$$
}}
본 명세서에서 알파벳 소문자 3개로 이루어진 텍스트는 블록 체인에 데이터가 저장된 트랜잭션 주소를 의미한다.In this specification, text consisting of three lowercase letters means a transaction address where data is stored in the block chain.
단계(205)에서 수신한 데이터가 신규 데이터 즉 처음 저장되는 원본 데이터인지를 판단한다. 이 판단은 수신한 데이터에 이전 데이터 주소(previous_data_address)가 있는지 여부로 판단한다.It is determined whether the data received in
신규 데이터로 판단되면 스마트 컨트랙트 모듈(30)은 해당 신규 데이터를 블록 체인에 트랜잭션으로 저장하고(210), 저장된 트랜잭션 주소를 데이터 관리 모듈(20)로 전송한다. 데이터 관리 모듈(20)은 수신한 트랜잭션 주소를 저장한다.If it is determined as new data, the
트랜잭션으로 저장되는 데이터의 구조의 예는 도시되어 있으며 좀 더 구체적으로는 다음과 같을 수 있다.An example of the structure of data stored in a transaction is shown, and more specifically, it may be as follows.
{{
previous_data_address: nullprevious_data_address: null
previous_data_hash: nullprevious_data_hash: null
current_data_hash: HASH(***)current_data_hash: HASH(***)
current_edit_data: ***current_edit_data: ***
}}
수신한 데이터가 신규 데이터가 아니라면 이전 데이터 주소를 참조하여 이전 트랜잭션 데이터를 획득한다(단계 220).If the received data is not new data, the previous transaction data is obtained by referring to the previous data address (step 220).
획득한 트랜잭션 데이터의 도 3 및 상기 데이터 구조를 참조하여 이전 데이터 주소가 있는지를 판단한다(단계 225). 획득한 트랜잭션 데이터에 이전 데이터 주소가 있으면, 그 전에 더 변경된 이력이 있는 것이므로 단계(220)로 복귀하여 해당 이전 데이터 주소를 참조하여 이전 데이터를 획득한다. 이 과정은 획득한 이전 트랜잭션 데이터에 이전 주소가 없을 때까지 즉 원본 데이터가 획득될 때까지 반복한다.With reference to FIG. 3 and the data structure of the acquired transaction data, it is determined whether there is a previous data address (step 225). If there is a previous data address in the acquired transaction data, since there is a more changed history before that, the process returns to step 220 to obtain the previous data by referring to the previous data address. This process is repeated until there is no previous address in the acquired previous transaction data, that is, until the original data is acquired.
획득한 이전 트랜잭션 데이터에 이전 데이터 주소가 없는 것으로 판단되면, 그 획득 트랜잭션 데이터를 원본 데이터로 획득한다(단계 230). 그렇게 획득한 원본 데이터에 단계(220)에서 획득한 적어도 하나의 이전 데이터(변경 부분)를 반영하여 데이터를 조립함으로써, 단계(200)에서 수신한 데이터 직전까지의 최종 데이터를 생성한다(단계 235).If it is determined that there is no previous data address in the acquired previous transaction data, the acquired transaction data is acquired as original data (step 230). By assembling data by reflecting at least one previous data (changed part) acquired in
단계(240)에서는, 단계(200)에서 수신한 데이터와 비교하여 변경 내역을 추출하고, 단계(235)에서 조립된 데이터에 변경 내역을 반영한 데이터를 생성한다(단계 245).In
단계(245)에서 생성된 데이터의 해쉬값을 생성하고(단계 250), 그 해쉬값이 단계(200)에서 수신한 데이터의 해쉬값과 동일한지 비교한다(단계 255). 두 해쉬값이 동일하면, 단계(240)에서 추출된 변경 내역을 트랜잭션에 저장한다(단계 260). 저장되는 데이터의 형식은 다음과 같을 수 있다.A hash value of the data generated in
{{
previous_data_address: aaaprevious_data_address: aaa
previous_data_hash: HASH(***}previous_data_hash: HASH(***}
current_data_hash: HASH($$$)current_data_hash: HASH($$$)
current_edit_data: $$$current_edit_data: $$$
}}
도 4를 참조하여 구체적인 사례를 설명한다.A specific example will be described with reference to FIG. 4 .
도 4에 도시된 데이터는 원본 데이터(410)에, 1차 변경 내역(420)이, 2차 변경 내역(430)이, 3차 변경 내역(430)이 순차적으로 적용되어 변경된 데이터이다.The data shown in FIG. 4 is changed data by sequentially applying the
원본 데이터(410; ***)의 다음과 같은 형식으로 스마트 컨트랙트 모듈(30)로 전달된다.The original data (410; ***) is transmitted to the
{{
previous_data_address: nullprevious_data_address: null
current_data: ***current_data: ***
}}
이 구조의 데이터에는 이전 트랜잭션 주소(previous_data_address)가 없으므로 단계(210)으로 이행하여 트랜잭션 주소(aaa)에 원본 데이터가 저장된다. 저장되는 데이터 형식은 다음과 같을 수 있다.Since the data of this structure does not have a previous transaction address (previous_data_address), the process proceeds to step 210 and the original data is stored in the transaction address (aaa). The data format to be saved may be as follows.
{{
previous_data_address: nullprevious_data_address: null
previous_data_hash: nullprevious_data_hash: null
current_data_hash: HASH(***)current_data_hash: HASH(***)
current_edit_data: ***current_edit_data: ***
}}
저장된 트랜잭션 주소(aaa)는 데이터 관리 모듈(20)로 전송된다(단계 215).The stored transaction address (aaa) is transmitted to the data management module 20 (step 215).
1차 변경 내역(420; $$$)이 발생하면, 원본 데이터(410)에 1차 변경 내역(420)이 반영된 데이터가 단계(200)에서 수신된다. 수신되는 데이터의 형식은 다음과 같을 수 있다.When the first change detail 420 ($$$) occurs, data in which the
{{
previous_data_address: aaaprevious_data_address: aaa
current_data: ***$$$current_data: ***$$$
}}
이 데이터에는 이전 트랜잭션 주소가 "aaa"로 존재하므로 단계(220)로 이행하여 상기 주소를 참조하여 이전 트랜잭션 데이터(410; ***)를 획득한다.Since the previous transaction address exists as “aaa” in this data, the flow advances to step 220 to obtain the
이 때 획득한 이전 트랜잭션 데이터(410)에는 이전 트랜잭션 주소가 존재하지 않으므로 단계(230)으로 이행하여, 획득한 이전 트랜잭션 데이터(410; ***)를 원본 데이터로 획득한다.At this time, since the previous transaction address does not exist in the acquired
그리고 단계(240)에서는, 상기 원본 데이터(410;***)과 단계(200)에서 수신한 데이터를 비교해서 변경 내역을 추출하고, 원본 데이터(410; ***)에 변경 내역을 반영해서 변경 후 데이터를 생성한다(단계 245). 그렇게 생성된 변경 후 데이터의 해쉬값이 단계(200)에서 수신한 해쉬값과 동일한지 여부를 판단하고(단계 255), 동일한 경우에 단계(240)에서 추출한 변경 내역을 현재 데이터로 트랜잭션( 트랜잭션 주소: bbb)에 저장한다(단계 260). 저장되는 데이터의 형식은 다음과 같을 수 있다.And in
{{
previous_data_address: aaaprevious_data_address: aaa
previous_data_hash: HASH(***)previous_data_hash: HASH(***)
current_data_hash: HASH($$$)current_data_hash: HASH($$$)
current_edit_data: $$$current_edit_data: $$$
}}
상기 트랜잭션 주소(bbb)는 데이터 관리 모듈(20)로 전송되어 저장된다.The transaction address (bbb) is transmitted to and stored in the
이후 2차 변경 내역(430)이 발생하면, 원본 데이터(410)에 1차 변경 내역(420) 및 2차 변경 내역(430)이 반영된 데이터가 단계(200)에서 수신된다. 수신되는 데이터의 형식은 다음과 같을 수 있다.Thereafter, when the secondary change details 430 occur, data in which the primary change details 420 and the secondary change details 430 are reflected in the
{{
previous_data_address: bbbprevious_data_address: bbb
current_data: ***$$$&&¤t_data: ***$$$&&&
}}
이 데이터에는 이전 트랜잭션 주소가 "bbb"로 존재하므로 단계(220)로 이행하여 상기 주소를 참조하여 이전 트랜잭션 데이터를 획득한다. 여기서 획득하는 이전 트랜잭션 데이터의 형식은 다음과 같을 수 있다.Since the previous transaction address exists as “bbb” in this data, the flow advances to step 220 to obtain the previous transaction data by referring to the address. The format of the previous transaction data obtained here may be as follows.
{{
previous_data_address: aaaprevious_data_address: aaa
previous_data_hash: HASH(***)previous_data_hash: HASH(***)
current_data_hash: HASH($$$)current_data_hash: HASH($$$)
current_edit_data: $$$current_edit_data: $$$
}}
이 때 획득한 이전 트랜잭션 데이터에는 이전 트랜잭션 주소(aaa)가 존재하므로 단계(220)로 복귀하여 해당 주소를 참조하여 이전 트랜잭션 데이터를 획득한다. 여기서 획득하는 이전 트랜잭션 데이터의 형식은 다음과 같을 수 있다.At this time, since the previous transaction address (aaa) exists in the acquired previous transaction data, the process returns to step 220 to obtain the previous transaction data by referring to the corresponding address. The format of the previous transaction data obtained here may be as follows.
{{
previous_data_address: nullprevious_data_address: null
previous_data_hash: nullprevious_data_hash: null
current_data_hash: HASH(***)current_data_hash: HASH(***)
current_edit_data: ***current_edit_data: ***
}}
여기서 획득한 이전 트랜잭션 데이터에는 이전 트랜잭션 주소가 존재하지 않으므로 단계(230)으로 이행하여, 여기서 획득한 이전 트랜잭션 데이터에 포함된 current_edit-data(410; ***)를 원본 데이터로 획득한다.Since there is no previous transaction address in the previous transaction data obtained here, the process proceeds to step 230, and current_edit-data(410; ***) included in the previous transaction data obtained here is acquired as the original data.
그리고 단계(240)에서는, 상기 원본 데이터(410;***)과 단계(200)에서 수신한 데이터($$$ 및 &&&)를 비교해서 변경 내역을 추출하고, 원본 데이터(410; ***)에 변경 내역을 반영해서 변경 후 데이터를 생성한다(단계 245). 그렇게 생성된 변경 후 데이터의 해쉬값이 단계(200)에서 수신한 해쉬값과 동일한지 여부를 판단하고(단계 255), 동일한 경우에 단계(240)에서 추출한 변경 내역을 현재 데이터로 트랜잭션( 트랜잭션 주소: ccc)에 저장한다(단계 260). 저장되는 데이터의 형식은 다음과 같을 수 있다.And in
{{
previous_data_address: bbbprevious_data_address: bbb
previous_data_hash: HASH($$$)previous_data_hash: HASH($$$)
current_data_hash: HASH(&&&)current_data_hash: HASH(&&&)
current_edit_data: &&¤t_edit_data: &&&
}}
이후의 추가적인 데이터 변경이 있을 경우에도 같은 방식으로 데이터 변경 이력이 블록 체인에 저장된다.Even if there is an additional data change thereafter, the data change history is stored in the block chain in the same way.
본 발명에 의하면, 블록 체인에 저장되는 데이터에 변경 이력이 발생하더라도 변경된 데이터 버전 전체를 매번 블록 체인에 저장할 필요없이 변경된 내역만 저장하면 되므로 데이터 변경 이력을 블록 체인에서 관리함에 있어서 저장되는 데이터의 크기를 현저하게 저감시킬 수 있는 효과가 제공된다.According to the present invention, even if a change history occurs in the data stored in the block chain, it is not necessary to store the entire changed data version in the block chain every time, only the changed details need to be stored. The size of the data stored in managing the data change history in the block chain There is provided an effect that can significantly reduce the
이상 첨부 도면을 참고하여 본 발명에 대해서 설명하였지만 본 발명의 권리범위는 후술하는 특허청구범위에 의해 결정되며 전술한 실시예 및/또는 도면에 제한되는 것으로 해석되어서는 아니된다. 그리고 특허청구범위에 기재된 발명의, 당업자에게 자명한 개량, 변경 및 수정도 본 발명의 권리범위에 포함된다는 점이 명백하게 이해되어야 한다.The present invention has been described above with reference to the accompanying drawings, but the scope of the present invention is determined by the following claims and should not be construed as being limited to the above-described embodiments and/or drawings. And it should be clearly understood that improvements, changes and modifications obvious to those skilled in the art of the invention described in the claims are also included in the scope of the present invention.
10: 사용자 단말기 20: 데이터 관리 모듈
30: 스마트컨트랙트 모듈 40: 블록 체인10: user terminal 20: data management module
30: smart contract module 40: block chain
Claims (13)
데이터 관리 모듈이 사용자 단말기로부터 데이터를 수신하는 제1 단계와,
데이터 관리 모듈이 수신한 데이터가 신규 데이터이면 이전 데이터 주소를 null 값으로 지정하고 데이터와 함께 스마트 컨트랙트 모듈로 전송하는 제2 단계와,
스마트 컨트랙트 모듈이 블록 체인에 상기 데이터를 트랜잭션으로 저장하는 제3 단계와,
스마트 컨트랙트 모듈이 상기 데이터의 트랜잭션 주소를 데이터 관리 모듈로 전달하고 데이터 관리 모듈이 상기 트랜잭션 주소를 저장하는 제4 단계와,
데이터 관리 모듈이, 사용자 단말기로부터 수정 내역이 반영된 수정 데이터를 수신하는 제5 단계와,
데이터 관리 모듈이, 상기 수정 데이터를 스마트 컨트랙트 모듈로 전송하는 제6 단계와,
스마트 컨트랙트 모듈이, 수정 데이터의 직전 주소를 참조하여 해당 주소의 트랜잭션 데이터를 획득하는 제7 단계와,
스마트 컨트랙트 모듈이, 제7 단계에서 획득한 트랜잭션 데이터과 수정 데이터를 비교하여 변경 내역을 추출하는 제8 단계와,
스마트 컨트랙트 모듈이, 제8 단계에서 추출된 변경 내역을, 이전 데이터에 반영하여 변경후 데이터를 생성하는 제9 단계와,
스마트 컨트랙트 모듈이, 제9 단계에서 생성된 변경후 데이터의 해쉬값과, 제6 단계에서 수신한 데이터의 해쉬값이 일치하면 변경 내역을 블록 체인에 저장하는 제10 단계를 포함하는,
데이터의 변경 이력 관리 방법.
A method for managing change history of data executed in an environment including a user terminal, a data management module, a smart contract module, and a block chain,
A first step of the data management module receiving data from the user terminal;
If the data received by the data management module is new data, a second step of designating the old data address as a null value and transmitting the data to the smart contract module together with the data;
A third step of the smart contract module storing the data as a transaction in the block chain;
a fourth step in which the smart contract module transmits the transaction address of the data to the data management module and the data management module stores the transaction address;
A fifth step of receiving, by the data management module, the correction data in which the correction details are reflected from the user terminal;
A sixth step of the data management module transmitting the correction data to the smart contract module;
A seventh step in which the smart contract module obtains the transaction data of the address by referring to the address immediately preceding the modification data;
An eighth step in which the smart contract module compares the transaction data and the modified data obtained in the seventh step to extract the change details;
A ninth step in which the smart contract module generates post-change data by reflecting the change details extracted in the eighth step to previous data;
A smart contract module, including a tenth step of storing the change details in a block chain when the hash value of the data after the change generated in the ninth step and the hash value of the data received in the sixth step match,
How to manage data change history.
제10 단계는, 직전 데이터의 트랜잭션 주소를 더 저장하는 단계인,
데이터의 변경 이력 관리 방법.
The method according to claim 1,
Step 10 is a step of further storing the transaction address of the previous data,
How to manage data change history.
제10 단계는, 직전 데이터의 해쉬값을 더 저장하는 단계인,
데이터의 변경 이력 관리 방법.
4. The method according to claim 3,
Step 10 is a step of further storing the hash value of the previous data,
How to manage data change history.
제10 단계는, 현재 저장 데이터의 해쉬값을 더 저장하는 단계인,
데이터의 변경 이력 관리 방법.
5. The method according to claim 3 or 4,
The tenth step is a step of further storing the hash value of the currently stored data,
How to manage data change history.
제7 단계는 직전 주소가 없을 때까지 재귀적으로 반복하는 단계인,
데이터의 변경 이력 관리 방법.
4. The method according to claim 3,
Step 7 is a step that recursively repeats until there is no previous address,
How to manage data change history.
직전 주소가 없는 트랜잭션 데이터를 원본 데이터로 획득하는 제7-1 단계를 더 포함하는,
데이터 변경 이력 관리 방법.
5. The method according to claim 4,
Further comprising the step 7-1 of obtaining the transaction data without the immediately preceding address as the original data,
How to manage data change history.
상기 원본 데이터에 이전 데이터를 반영하여 조립하는 제7-2 단계를 더 포함하는,
데이터 변경 이력 관리 방법.
8. The method of claim 7,
Further comprising a step 7-2 of assembling by reflecting the previous data to the original data,
How to manage data change history.
제8 단계는 제7-2 단계에서 조립된 트랜잭션 데이터와, 스마트 컨트랙트 모듈이 제6 단계에서 수신한 수정 데이터를 비교하여 변경 내역을 추출하는 단계인,
데이터의 변경 이력 관리 방법.
9. The method of claim 8,
Step 8 is a step of extracting change details by comparing the transaction data assembled in step 7-2 with the correction data received in step 6 by the smart contract module,
How to manage data change history.
A computer-readable recording medium recording a program for executing each step of the method of any one of claims 1, 3, 4, and 6 to 9.
A computer-readable recording medium in which a program for executing each step of the method of claim 5 is recorded.
A computer program stored in a computer-readable recording medium for executing each step of the method of any one of claims 1, 3, 4, and 6 to 9.
A computer program stored in a computer-readable recording medium for executing each step of the method of claim 5 .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020200151877A KR102267560B1 (en) | 2020-11-13 | 2020-11-13 | Method for Managing Modified Record of Data Which Can Reduce Size of Data Stored in Block Chain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020200151877A KR102267560B1 (en) | 2020-11-13 | 2020-11-13 | Method for Managing Modified Record of Data Which Can Reduce Size of Data Stored in Block Chain |
Publications (2)
Publication Number | Publication Date |
---|---|
KR102267560B1 true KR102267560B1 (en) | 2021-06-21 |
KR102267560B9 KR102267560B9 (en) | 2022-03-15 |
Family
ID=76599763
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020200151877A KR102267560B1 (en) | 2020-11-13 | 2020-11-13 | Method for Managing Modified Record of Data Which Can Reduce Size of Data Stored in Block Chain |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102267560B1 (en) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101882805B1 (en) * | 2017-04-17 | 2018-07-27 | 주식회사 코인플러그 | Method for blockchain based management of documents in use of merkle tree structure on the basis of unspent transaction output protocol and document management server using the same |
KR101954268B1 (en) * | 2017-10-24 | 2019-03-05 | 한국조폐공사 | Method for managing electronic document based on blockchain, and electronic document management server using the same |
KR101964692B1 (en) * | 2017-05-12 | 2019-04-02 | 주식회사 엑스블록시스템즈 | Blockchain system and data managing method using blockchain |
KR20190088531A (en) * | 2016-12-28 | 2019-07-26 | 마스터카드 인터내셔날, 인코포레이티드 | Methods and systems for providing validation, auditing, and invariant inputs to smart contracts |
KR20190132938A (en) * | 2018-05-21 | 2019-11-29 | 성신여자대학교 연구 산학협력단 | Method and apparatus for managing subject data based on blockchain |
KR102099861B1 (en) * | 2019-12-03 | 2020-04-16 | 주식회사 아이콘루프 | System and method for verifying documents using blockchain |
CN111105242A (en) * | 2020-01-09 | 2020-05-05 | 江苏恒为信息科技有限公司 | Intelligent contract implementation method for block chain |
CN111144133A (en) * | 2019-12-23 | 2020-05-12 | 传神语联网网络科技股份有限公司 | Translation document keyword modification traceability system and method based on block chain |
KR20200108757A (en) * | 2019-03-11 | 2020-09-21 | 순천향대학교 산학협력단 | Hybrid blockchain system for efficient content change and deletion and XGS injection method using hybrid blockchain |
KR102165272B1 (en) | 2019-02-07 | 2020-10-13 | 아주대학교 산학협력단 | Method and server for managing data stored in block chain |
KR20200125278A (en) * | 2019-04-26 | 2020-11-04 | 유한책임회사 빌드업웍스 | Data Management Method for Network Attached Storage System based on Block Chain |
-
2020
- 2020-11-13 KR KR1020200151877A patent/KR102267560B1/en active IP Right Grant
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20190088531A (en) * | 2016-12-28 | 2019-07-26 | 마스터카드 인터내셔날, 인코포레이티드 | Methods and systems for providing validation, auditing, and invariant inputs to smart contracts |
KR101882805B1 (en) * | 2017-04-17 | 2018-07-27 | 주식회사 코인플러그 | Method for blockchain based management of documents in use of merkle tree structure on the basis of unspent transaction output protocol and document management server using the same |
KR101964692B1 (en) * | 2017-05-12 | 2019-04-02 | 주식회사 엑스블록시스템즈 | Blockchain system and data managing method using blockchain |
KR101954268B1 (en) * | 2017-10-24 | 2019-03-05 | 한국조폐공사 | Method for managing electronic document based on blockchain, and electronic document management server using the same |
KR20190132938A (en) * | 2018-05-21 | 2019-11-29 | 성신여자대학교 연구 산학협력단 | Method and apparatus for managing subject data based on blockchain |
KR102165272B1 (en) | 2019-02-07 | 2020-10-13 | 아주대학교 산학협력단 | Method and server for managing data stored in block chain |
KR20200108757A (en) * | 2019-03-11 | 2020-09-21 | 순천향대학교 산학협력단 | Hybrid blockchain system for efficient content change and deletion and XGS injection method using hybrid blockchain |
KR20200125278A (en) * | 2019-04-26 | 2020-11-04 | 유한책임회사 빌드업웍스 | Data Management Method for Network Attached Storage System based on Block Chain |
KR102099861B1 (en) * | 2019-12-03 | 2020-04-16 | 주식회사 아이콘루프 | System and method for verifying documents using blockchain |
CN111144133A (en) * | 2019-12-23 | 2020-05-12 | 传神语联网网络科技股份有限公司 | Translation document keyword modification traceability system and method based on block chain |
CN111105242A (en) * | 2020-01-09 | 2020-05-05 | 江苏恒为信息科技有限公司 | Intelligent contract implementation method for block chain |
Also Published As
Publication number | Publication date |
---|---|
KR102267560B9 (en) | 2022-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11074245B2 (en) | Method and device for writing service data in block chain system | |
CN110495132B (en) | System and method for generating, uploading and executing code blocks within distributed network nodes | |
CN110689349B (en) | Transaction hash value storage and searching method and device in blockchain | |
US20210083856A1 (en) | Improved hardware security module management | |
US11108555B2 (en) | Performing map iterations in a blockchain-based system | |
US20130081144A1 (en) | Storage device and writing device | |
KR20190018869A (en) | System and method for providing storage service based on block chain | |
US11251969B2 (en) | Performing map iterations in a blockchain-based system | |
US20230039531A1 (en) | Cryptographic data entry blockchain data structure | |
CN111598575A (en) | Business process control method and device, electronic equipment and readable storage medium | |
WO2021174836A1 (en) | Differential package generation method and apparatus, computer device, and storage medium | |
CN105556533A (en) | Automatically generating certification documents | |
US11791985B2 (en) | Tracking, storage and authentication of documented intellectual property | |
CN112860953A (en) | Data importing method, device, equipment and storage medium of graph database | |
CN115248919A (en) | Method and device for calling function interface, electronic equipment and storage medium | |
US11971988B2 (en) | Detection of suspicious objects in customer premises equipment (CPE) | |
CN109858285B (en) | Block chain data processing method, device, equipment and medium | |
CN108600259B (en) | Authentication and binding method of equipment, computer storage medium and server | |
KR102267560B1 (en) | Method for Managing Modified Record of Data Which Can Reduce Size of Data Stored in Block Chain | |
CN111641715A (en) | Data processing method, device, equipment and medium based on block chain | |
CN111722994A (en) | Task request response method and device | |
US20210234686A1 (en) | Information processing device, information processing method, and storage medium | |
US9811669B1 (en) | Method and apparatus for privacy audit support via provenance-aware systems | |
CN113095806A (en) | Work order processing method and device, electronic equipment and computer readable storage medium | |
KR102493431B1 (en) | Method and server of generating content production pattern information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
G170 | Re-publication after modification of scope of protection [patent] |