KR20200065662A - P2p energy transaction platform using hyperledger - Google Patents
P2p energy transaction platform using hyperledger Download PDFInfo
- Publication number
- KR20200065662A KR20200065662A KR1020180152338A KR20180152338A KR20200065662A KR 20200065662 A KR20200065662 A KR 20200065662A KR 1020180152338 A KR1020180152338 A KR 1020180152338A KR 20180152338 A KR20180152338 A KR 20180152338A KR 20200065662 A KR20200065662 A KR 20200065662A
- Authority
- KR
- South Korea
- Prior art keywords
- transaction
- energy
- peer
- hyperledger
- chaincode
- Prior art date
Links
- 238000000034 method Methods 0.000 abstract description 10
- 238000004519 manufacturing process Methods 0.000 description 7
- 239000004744 fabric Substances 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 238000010248 power generation Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000005431 greenhouse gas Substances 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 238000004900 laundering Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02E—REDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
- Y02E40/00—Technologies for an efficient electrical power generation, transmission or distribution
- Y02E40/70—Smart grids as climate change mitigation technology in the energy generation sector
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y04—INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
- Y04S—SYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
- Y04S10/00—Systems supporting electrical power generation, transmission or distribution
- Y04S10/50—Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y04—INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
- Y04S—SYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
- Y04S50/00—Market activities related to the operation of systems integrating technologies related to power network operation or related to communication or information technologies
- Y04S50/10—Energy trading, including energy flowing from end-user application to grid
Landscapes
- Business, Economics & Management (AREA)
- Economics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Finance (AREA)
- Accounting & Taxation (AREA)
- Health & Medical Sciences (AREA)
- Marketing (AREA)
- General Physics & Mathematics (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Public Health (AREA)
- Tourism & Hospitality (AREA)
- Primary Health Care (AREA)
- Human Resources & Organizations (AREA)
- General Health & Medical Sciences (AREA)
- Water Supply & Treatment (AREA)
- Development Economics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
본 발명은 P2P 에너지 거래 플랫폼에 관한 것이다.The present invention relates to a P2P energy trading platform.
최근 신 기후체제 합의에 따라 온실가스 배출량을 감축해야 함과 동시에 정부는 탈 원전정책을 시행함으로서 신재생에너지 사업이 발전이 필수적이며 개인이 태양광 등으로 전기를 스스로 생산 및 소비하는 프로슈머(Prosumer)가 증가하고 있다. In addition to the reduction of greenhouse gas emissions in accordance with the recent agreement on the new climate system, the government is implementing a de-nuclear power policy, so the development of a new and renewable energy business is essential, and an individual is a prosumer who produces and consumes electricity by itself, such as solar light. Is increasing.
본 발명은 신재생 에너지를 효율적으로 운용하기 위해 분산전원을 도입하며 동시에 개인의 입장에선 생산과 소비패턴에 따라 생산량이 남을 때 주변 소비자에 판매하고 부족한 경우엔 구매하는 에너지 효율적이며 대인에게 수익을 보장해주고 매우 작은 에너지 거래도 완전하고 지속적으로 추적할 수 있는 투명하고 분산되고 안전한 트랜잭션 로그 기록방식인 블록체인을 도입한 에너지 거래 플랫폼을 제안하는 것을 목적으로 한다.The present invention introduces a distributed power source to efficiently operate renewable energy, and at the same time, it is energy efficient to sell to neighboring consumers when the quantity of production remains according to the production and consumption patterns and purchase in case of shortage, and guarantee profits to the public. The goal is to propose an energy trading platform that introduces a blockchain that is a transparent, decentralized, and secure transaction log recording method that allows complete and continuous tracking of even very small energy transactions.
하이퍼레저를 이용한 P2P 에너지 거래 플랫폼.P2P energy trading platform using hyper leisure.
본 발명은 신재생 에너지를 효율적으로 운용하기 위해 분산전원을 도입하며 동시에 개인의 입장에선 생산과 소비패턴에 따라 생산량이 남을 때 주변 소비자에 판매하고 부족한 경우엔 구매하는 에너지 효율적이며 대인에게 수익을 보장해주고 매우 작은 에너지 거래도 완전하고 지속적으로 추적할 수 있는 투명하고 분산되고 안전한 트랜잭션 로그 기록방식인 블록체인을 도입한 에너지 거래 플랫폼을 제안할 수 있다. The present invention introduces a distributed power source to efficiently operate renewable energy, and at the same time, it is energy efficient to sell to neighboring consumers when the quantity of production remains according to the production and consumption patterns and purchase in case of shortage, and guarantee profits to the public. It is possible to propose an energy trading platform that introduces a blockchain that is a transparent, decentralized, and secure transaction log recording method that can fully and continuously track even small and very small energy transactions.
[도 1] 전형적인 하이퍼레저 네트워크 구조
[도 2] World state
[도 3] 에너지 거래 흐름도
[도 4] MSP와 채널과
[도 5] 체인코드 실행 예시
[도 6] invoke 함수 예시
[도 7] query 함수 예시
[도 8] 판매자 정보
[도 9] 구매자 정보
[도 10] 알고리즘 예시 코드
[도 11]은 판매자 입장에서의 알고리즘의 순서도이다.
[도 12] 간단한 블록 구조[Figure 1] Typical hyperledger network structure
[Figure 2] World state
[Figure 3] Energy transaction flow chart
[Figure 4] MSP and channel
[Figure 5] Chain code execution example
[Figure 6] Example invoke function
[Figure 7] Example query function
[Fig 8] Seller Information
[Fig 9] Buyer Information
[Figure 10] Algorithm example code
11 is a flowchart of the algorithm from the seller's point of view.
[Figure 12] Simple block structure
Ⅰ. IntroductionⅠ. Introduction
최근 신 기후체제 합의에 따라 온실가스 배출량을 감축해야 함과 동시에 정부는 탈 원전정책을 시행함으로서 신재생에너지 사업이 발전이 필수적이며 개인이 태양광 등으로 전기를 스스로 생산 및 소비하는 프로슈머(Prosumer)가 증가하고 있다. 그러나 전력 생산과 소비 패턴이 다른 경우가 많아 저장 문제가 발생하며 한전을 중심으로 중앙 집중형 거래 및 발전은 송전에서 발생하는 에너지 손실 등 에너지 효율의 관점에서도 좋지 못하다.In addition to the reduction of greenhouse gas emissions in accordance with the recent agreement on the new climate system, the government is implementing a de-nuclear power policy, so the development of a new and renewable energy business is essential, and an individual is a prosumer who produces and consumes electricity by itself, such as solar light. Is increasing. However, the power generation and consumption patterns are often different, resulting in storage problems, and centralized transactions and power generation centering on KEPCO are also not good in terms of energy efficiency, such as energy loss in power transmission.
신재생 에너지를 효율적으로 운용하기 위해 분산전원을 도입하며 동시에 개인의 입장에선 생산과 소비패턴에 따라 생산량이 남을 때 주변 소비자에 판매하고 부족한 경우엔 구매하는 에너지 효율적이며 대인에게 수익을 보장해주고 매우 작은 에너지 거래도 완전하고 지속적으로 추적할 수 있는 투명하고 분산되고 안전한 트랜잭션 로그 기록방식인 블록체인을 도입한 에너지 거래 플랫폼을 제안한다. In order to efficiently operate renewable energy, a distributed power source is introduced, and at the same time, it is energy efficient to sell to neighboring consumers when the quantity of production remains according to the production and consumption patterns and purchase in the case of shortage. We propose an energy trading platform that introduces a blockchain that is a transparent, distributed, and secure transaction log recording method that can fully and continuously track energy transactions.
에너지생산 및 소비패턴을 분석함과 동시에 발전기, 송전/수전 데이터를 포함한 전력 생산, 송수신 및 거래 디바이스를 등록하고 해당 기기들로부터 데이터를 받아 AWS에서 지원하는 Hyperledger Fabric Magic용 AWS Blockchain Template를 활용해 처리 속도가 빠르며 효율적인 탈중앙화 P2P거래를 제안한다. Analyze energy production and consumption patterns, register power generation, transmission and reception and transaction devices including generators and transmission/reception data, receive data from the devices, and process it using AWS Blockchain Template for Hyperledger Fabric Magic supported by AWS We propose fast and efficient decentralized P2P transactions.
하이퍼레저는 분산 소프트웨어 아키텍쳐를 제공해 매우 작은 에너지 거래도 완전하고 지속적으로 추적할 수 있는 투명하고 분산되고 안전한 트랜잭션 로그를 기록하므로 기존의 중앙 대규모 집중 방식보다 훨씬 효율적으로 소규모 에너지 거래가 포함된 에너지 시장을 위한 플랫폼에 적절히 대응할 것으로 기대된다. Hyperledger provides a distributed software architecture that records transparent, decentralized, and secure transaction logs that enable complete and continuous tracking of very small energy transactions, making it much more efficient for energy markets with smaller energy transactions than traditional centralized and large-scale methods. It is expected to respond appropriately to the platform.
Ⅱ. Hyperledger FabricⅡ. Hyperledger Fabric
일반적으로 블록체인하면 가장 널리 알려진 응용 프로그램인 비트코인(Bitcoin)과 대안인 이더리움(Ethereum)은 공개형(public), 무허가형(permissionless) 블록체인 기술로 참가자의 신원을 요구하기가 어려워 금융거래의 경우 KYC(Know-Your-Customer)이나 AML(Anti- Money Laundering) 규정을 준수하기 어렵다. In general, Bitcoin, which is the most widely known application, and Ethereum, which is an alternative to blockchain, is a public and permissionless blockchain technology that makes it difficult to request the identity of the participants. In the case of KYC (Know-Your-Customer) or AML (Anti-Money Laundering), it is difficult to comply.
Hyperledger Fabric은 이러한 점을 개선해 처음부터 엔터프라이즈용으로 설계되어 사설(private)이면서 허가형(permissioned)으로 참가자는 인증되어 식별 가능하고 네트워크 관리가 가능하며 트랜잭션 처리량이 높지만 트랜잭션 지연이 낮고 거래와 거래관련 데이터의 기밀성이 유지된다. 또한 고도의 기밀성, 탄력성, 유연성 및 확장성을 제공하는 모듈러 아키텍쳐를 기반으로 하고 있어 MSP(Membership Service Provider)를 통해 사용자와 각 노드들을 등록해 신원 관리를 하며 거래 내용인 원장 데이터는 다양한 DB 모듈을 사용해 다양한 형태로 저장이 가능하며 합의 매커니즘도 모듈화 되어 다양한 알고리즘을 지원한다. 분산 원장 솔루션을 위한 플랫폼으로 모듈형 블록체인 아키텍처에서 엔터프라이즈 급 네트워크 보안, 확장성, 기밀성 및 성능을 제공하는 분산 원장 기술(DLT)의 고유한 구현으로 신원관리, 개인 정보 보호 및 기밀 유지, 효율적인 처리, 체인 코드 기능, 모듈식 디자인을 지원한다. Hyperledger Fabric improves this and is designed for the enterprise from the ground up, making it private and permissive, allowing participants to be authenticated, identifiable, network manageable, high transaction throughput, low transaction latency, low transaction and transaction related data. Confidentiality is maintained. In addition, it is based on a modular architecture that provides a high level of confidentiality, resilience, flexibility, and scalability. It registers users and each node through MSP (Membership Service Provider) to manage identities. It can be used to store in various forms, and the consensus mechanism is modularized to support various algorithms. A unique implementation of Distributed Ledger Technology (DLT) that provides enterprise-class network security, scalability, confidentiality, and performance in a modular blockchain architecture as a platform for distributed ledger solutions. Identity management, privacy and confidentiality, and efficient processing , Chaincode function, modular design support.
Ⅲ. Hyperledger ArchitectureⅢ. Hyperledger Architecture
하이퍼레저의 구조는 사용자는 어플리케이션을 통해 피어로서 채널에 접속해 지정된 체인코드를 통해 다른 피어들과 채널 상에서 트랜잭션을 진행하며 각각의 채널은 각각의 정책을 가지고 있다. 각 피어들 사이에서 이루어진 트랜잭션은 오더링 서비스에서 네트워크 정책에 따라 순서를 정하고 블록을 생성해 모든 피어들에게 배포한다. MSP에서는 관리자를 포함해 모든 노드와 채널, 네트워크와 각 트랜잭션의 CA역할을 한다. [도 1]은 전형적인 하이퍼레저 네트워크 구조를 보여주고 있다. Hyperledger's structure allows users to access channels as peers through applications, and conduct transactions on channels with other peers through designated chaincodes, and each channel has its own policy. Transactions made between each peer are ordered according to the network policy in the ordering service, and blocks are created and distributed to all peers. In MSP, it plays the role of CA for all nodes, channels, networks, and each transaction, including administrators. Figure 1 shows a typical hyper-leisure network structure.
Ⅳ. 하이퍼레저에서 사용하는 용어들Ⅳ. Terms used in Hyper Leisure
하이퍼레저에서 사용되는 용어들은 다음 [표 1]과 같다. The terms used in hyper leisure are as follows [Table 1].
원장에 블록 형태로 거래 정보를 저장(Persist)하고 거래 실행 결과에 따른 상태 정보를 저장하는 상태저장소(State store)로 구성되는 블록체인을 유지한다.Maintain Ledger, execute Chaincode, and manage digital ledger, transactions, and smart contract. It acts to commit the transaction and plays the role of endorsing according to the policy.
Maintain a blockchain consisting of a state store that stores transaction information in the form of a block in the ledger (persist) and stores state information according to the result of the transaction execution.
다른 모든 인증서를 파생시켜 해당 조직의 구성원임을 검증(Root CA)하고 Org의 구성단위, 관리자, 노드 ID, 개인키용 키 저장소를 역할을 하며 신원 확인을 위해 장기적으로 E-Cert(Enrollment Certificate), 각 트랜잭션마다 단기적으로 T-Cert(Transaction Certificate), 통신 채널단위에서 TLS(전송계층보안, SLS도 포함)를 관리한다.It registers and manages the user's ID and verifies the identity of all nodes (administrators, general peers, etc.) accessing the hyperledger fabric and issues network access credentials (=certificates). Public key certificates and private keys can be issued as credentials through a public key-based certification authority (CA) to ensure auditability.
It derives all other certificates and verifies that it is a member of the organization (Root CA), acts as a key store for Org's constituent units, administrators, node IDs, and private keys, and provides long-term E-Cert (Enrollment Certificate) In the short term, each transaction manages T-Cert (Transaction Certificate) and TLS (including transport layer security and SLS) at the communication channel level.
Ⅴ. 거래 흐름(Transaction Flow)Ⅴ. Transaction Flow
하이퍼레저에서 트랜잭션의 순서는 다음과 같이 진행된다. 먼저 클라이언트가 트랜잭션을 시작하면 원장에 데이터를 읽고 쓸 수 있도록 체인코드 함수를 호출(invoke)할 수 있는 거래 제안서를 작성하고 SDK는 트랜잭션 제안서를 패키징하고 사용자의 암호화 자격 증명을 사용해 트랜잭션 제안서에 고유한 서명을 생성한다. 그 후 보증 피어가 서명과 함께 구성, 유효성, 정책 등을 확인하고 현재 상태 DB에 대해 체인 코드를 실행하여 응답 트랜잭션을 생성, 실행한다(이 시점에선 원장이 업데이트 되지 않음). 응용프로그램(SDK)은 피어의 서명과 조건이 맞는지 확인하고 피어들로부터 받은 보증이 포함된 트랜잭션을 모아 오더 시스템에 보내고 트랜잭션 메시지를 오더 서비스에 브로드캐스팅한다. 오더 서비스는 거래 내용은 검사하지 않으며 단순히 모든 채널로부터 수신한 메시지를 정책에 따라 순서대로 배치하고 채널당 블록을 생성한다. 트랜잭션 블록은 모든 피어에 전달되고, 승인 정책과 유효성 등을 검사하고 트랜잭션으로 원장 상태가 변경되는지 확인 후 변경된다면 원장을 업데이트 한다. 각 피어는 블록을 채널 체인에 추가하고 유효한 트랜잭션은 현재 상태 DB에 커밋한다. In Hyperledger, the order of transactions proceeds as follows. First, when a client initiates a transaction, it creates a transaction proposal that can invoke a chaincode function to read and write data to the ledger, and the SDK packages the transaction proposal and uses the user's cryptographic credentials to make it unique to the transaction proposal. Generate a signature. After that, the assurance peer checks the configuration, validity, policy, etc. along with the signature and executes the chain code against the current state DB to generate and execute the response transaction (the ledger is not updated at this point). The application program (SDK) verifies that the peer's signature and conditions are met, collects the transaction containing the guarantees received from the peers, sends it to the order system, and broadcasts the transaction message to the order service. The order service does not check the transaction details, it simply places the messages received from all channels in order according to the policy and creates blocks per channel. The transaction block is delivered to all peers, checks the approval policy and validity, checks whether the status of the ledger is changed by the transaction, and updates the ledger if it is changed. Each peer adds a block to the channel chain and commits a valid transaction to the current state DB.
[도 3]은 피어 내에서의 동작도 포함해 이를 도식화 한 것으로 1. 사용자가 응용프로그램을 통해 피어에 연결하고 2. 피어에 invoke문을 포함한 거래요청 체인코드를 보내면 3. 피어는 체인코드를 호출하고 4 체인코드에서 현재 상태를 query로 읽어와 요청에 응답한다. 5. 피어는 사용자의 요청에 응답하고 6. 응용프로그램은 응답받은 보증과 트랜잭션을 오더러에 보내 7. 오더러는 받은 트랜잭션에 순서를 매기고 블록형태로 각 피어에 전달하면 8. 피어는 받은 내용을 통해 원장을 업데이트하는 순서를 나타내며 [도 4]는 MSP와 채널의 개념을 포함한 그림으로 사용자는 MSP로부터 거래 참여자 인증서를 발급받고 블록체인 가상 네트워크 채널에 가입한다. 판매, 구매를 결정하고 그에 맞게 값을 입력하면 Transaction Flow에 따라 각 피어에 거래를 요청하고 응답받는다. 모든 거래가 완료되면 오더링 서비스는 모든 피어에 트랜잭션을 블록으로 전송하고 이후 각 피어는 원장을 업데이트한다. [Figure 3] is a schematic diagram including the operation within the peer. 1. When the user connects to the peer through an
Ⅵ. 체인 코드 (ChainCode)Ⅵ. Chain Code
체인코드는 고급 프로그래밍 언어인 Go, Node.js, Java로 작성이 가능하도록 지원되며 배포(Deploy), 호출(Invoke), 조회(Query)의 역할을 한다. Chaincode is supported to be written in high-level programming languages Go, Node.js, and Java, and serves as deployment, invoke, and query.
배포는 install(), instantiate() 등으로 피어의 파일 시스템에 체인 코드를 배치하고 특정 채널에서 체인 코드 응용 프로그램을 시작하고 초기화하는 역할이다. 인스턴스 생성 후 체인 코드가 설치된 피어는 호출을 받아들일 수 있으며 해당 내용은 블록에 기록된다. Distribution is the role of placing chaincode in the peer's file system with install(), instantiate(), etc. and starting and initializing the chaincode application on a specific channel. After instantiation, the peer with the chaincode installed can accept the call and its contents are recorded in the block.
호출은 invoke() 등으로 체인코드 함수를 호출하고 Client가 Peer에게 요청하거나 Peer가 Client에게 응답하는 등의 내용이며 블록에 기록된다. The call is the contents such as calling the chaincode function with invoke(), the Client requesting the Peer, or the Peer responding to the Client, etc. and recorded in the block.
조회는 query() 등으로 체인코드를 통해 KVS에서 데이터를 읽으며 블록에 기록되지 않는다. Query is read from KVS through chaincode with query(), etc. and is not recorded in the block.
체인코드의 실행 예시는 [도 5]의 첫 번째 줄부터 각각 체인코드를 설치하고 인스턴스화, 버전 업데이트, 업그레이드, 데이터 조회, 거래를 호출하는 코드이며 [도 6]은 invoke 함수 구조의 예시이며 [도 7]은 query 함수의 예시이다. The execution example of the chaincode is the code that installs the chaincode from the first line of [Figure 5] and calls instantiation, version update, upgrade, data inquiry, transaction, and [Figure 6] is an example of the invoke function structure and [Figure 7] is an example of the query function.
Ⅶ. 에너지 거래 시스템Ⅶ. Energy trading system
거래 시스템은 원장의 자산을 query하고 update하는 과정이며 어플리케이션과 네트워크 간 연동으로 어플리케이션이 API를 통해 스마트계약(=체인코드)을 호출하면 [표 2]와 같은 형식의 체인코드 컨테이너로 구성되어 동작한다. The transaction system is a process of querying and updating the assets of the ledger, and when the application calls the smart contract (=chain code) through the API through interworking between the application and the network, it consists of a chain code container of the form shown in [Table 2] and operates. .
사용자는 구매 할 것인지 판매 할 것인지 선택 후 판매라면 즉시 판매가(kWh/원), 최소판매가(kWh/원), 판매량(kWh), 경매시간(hour)을 등록하고 구매라면 구매 가격(kWh/원)과 구매량(kWh)을 입력한다. 판매자의 (즉시 판매가)가 (구매가)보다 작다면 바로 거래가 이루어지며 (최소 판매가)보다 작다면 거래가 이루어지지 않는다. 구매자가 등록한 (구매가)가 (즉시 판매가)와 (최소 판매가)사이의 가격인 경우 등록한 경매시간동안 가장 높은 가격을 제시한 구매자의 (구매가)로 거래가 이루어진다. (판매량)이 (구매량)보다 큰 경우 (구매량)만큼 거래 후 (판매량 - 구매량)만큼 판매 코드가 다시 작동한다. (구매량)이 (판매량)보다 큰 경우 (판매량)만큼 거래 후 (구매량 - 판매량)만큼 구매 코드가 다시 작동한다. 최소 판매가를 입력하지 않은 경우 즉시 판매가로 정찰 거래가 이루어지며 경매시스템은 동작하지 않는다. After selecting whether to buy or sell, the user immediately registers the selling price (kWh/won), the minimum selling price (kWh/won), the sales volume (kWh), and the auction time (hour) if it is sold. Enter the purchase amount (kWh). If the seller's (immediate selling price) is less than (purchase price), the transaction is made immediately, and if it is less than (minimum selling price), the transaction is not made. If the (purchase price) registered by the buyer is the price between (immediate selling price) and (minimum selling price), the transaction is made with the (purchasing price) of the buyer who presented the highest price during the registered auction time. If (Sales Volume) is greater than (Purchase Amount), after the transaction (Purchase Amount), the sales code works again as (Sales Volume-Purchase Amount). If (Purchase Amount) is greater than (Sales Amount), the purchase code will work again after (Purchase Amount) after trading for (Sales Volume). If the minimum selling price is not entered, a reconnaissance transaction is made immediately at the selling price and the auction system does not work.
다음 [도 8], [도 9], [도 10]은 코드의 예시로 각각 판매자 정보와 구매자 정보를 구성하는 방법과 경매가 포함된 거래 시스템의 알고리즘의 예시이다. The following [FIG. 8], [FIG. 9], and [FIG. 10] are examples of codes and methods of constructing seller information and buyer information, and examples of algorithms of a transaction system including auction.
[도 11]은 판매자 입장에서의 알고리즘의 순서도이다. 11 is a flowchart of the algorithm from the seller's point of view.
Ⅷ. BlockⅧ. Block
블록에는 번호, 이전 해쉬, 데이터 해쉬로 이루어진 블록 헤더와 버전, 블록 생성 시간(Timestamp), 채널 ID, TXID(Transaction ID),와 체인코드 경로, 체인코드 이름, 체인코드 버전, 생성자 ID, 인증서, 체인코드 타입, 1~n 보증 피어의 보증과 인증서, 공개키 등과 함께 이전 블록의 해쉬값(512bits), 합의 과정의 메타데이터(선택가능), 현재 상태의 데이터인 KVS(Key -Value Store)의 해쉬값, 이하 트랜잭션들의 해쉬값이 포함되어 구성된다. The block contains the number, previous hash, block header and version of the data hash, block creation time (Timestamp), channel ID, TXID (Transaction ID), and chaincode path, chaincode name, chaincode version, creator ID, certificate, Chain code type, 1~n guarantee Peer's guarantee and certificate, public key, hash value of the previous block (512 bits), metadata of the consensus process (selectable), and current state data of KVS (Key-Value Store) It consists of a hash value and a hash value of the following transactions.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020180152338A KR20200065662A (en) | 2018-11-30 | 2018-11-30 | P2p energy transaction platform using hyperledger |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020180152338A KR20200065662A (en) | 2018-11-30 | 2018-11-30 | P2p energy transaction platform using hyperledger |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20200065662A true KR20200065662A (en) | 2020-06-09 |
Family
ID=71082154
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020180152338A KR20200065662A (en) | 2018-11-30 | 2018-11-30 | P2p energy transaction platform using hyperledger |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20200065662A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20220106400A (en) | 2021-01-22 | 2022-07-29 | 서강대학교산학협력단 | P2P energy transaction system based on hyperledger blockchain network |
-
2018
- 2018-11-30 KR KR1020180152338A patent/KR20200065662A/en not_active Application Discontinuation
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20220106400A (en) | 2021-01-22 | 2022-07-29 | 서강대학교산학협력단 | P2P energy transaction system based on hyperledger blockchain network |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Yang et al. | A survey on blockchain-based internet service architecture: requirements, challenges, trends, and future | |
Maroufi et al. | On the convergence of blockchain and internet of things (iot) technologies | |
Thakur et al. | Peer to peer energy trade among microgrids using blockchain based distributed coalition formation method | |
CN112434343B (en) | Virtual power plant safety scheduling and trading method based on dual block chain technology | |
Shahidehpour et al. | Blockchain for peer-to-peer transactive energy trading in networked microgrids: Providing an effective and decentralized strategy | |
Kaynak et al. | Cloud manufacturing architecture based on public blockchain technology | |
US12002045B2 (en) | Resource management system and method of operation thereof | |
CN113438084A (en) | Green power source tracing method and system based on R-PBFT consensus algorithm and timestamp | |
EP3736760A1 (en) | Automated transaction protocol linking renewable energy generation assets to energy power consumers applying distributed digital ledger technology and iot energy meters | |
CN114971625A (en) | Microgrid green electricity transaction system based on block chain technology and data storage and settlement method | |
Jiang et al. | A cross-chain solution to integration of iot tangle for data access management | |
US20210326984A1 (en) | Power transaction data storage system based on private blockchain platform and method for verifying and distributedly storing power transaction data using the same | |
CN115705571A (en) | Protecting privacy of auditable accounts | |
Liang et al. | Investigating the adoption of hybrid encrypted cloud data deduplication with game theory | |
Gu et al. | Autonomous resource request transaction framework based on blockchain in social network | |
Nguyen et al. | Analysis of distributed ledger technologies for industrial manufacturing | |
Wen et al. | Application of blockchain technology in data management: advantages and solutions | |
Lian | Blockchain‐Based Secure and Trusted Distributed International Trade Big Data Management System | |
Bilal et al. | Blockchain technology: Opportunities & challenges | |
Cai et al. | Introduction to blockchain basics | |
KR20200065662A (en) | P2p energy transaction platform using hyperledger | |
CN111861117A (en) | Musical instrument evaluation data sharing method and system based on alliance chain | |
Kramer et al. | A blockchain-based micro economy platform for distributed infrastructure initiatives | |
Taherdoost | The role of smart contract blockchain in 6G wireless communication system | |
Kazmi et al. | Is blockchain overrated? |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E601 | Decision to refuse application |