CN116071160A - Block chain-based transaction implementation method, device and computer readable medium - Google Patents

Block chain-based transaction implementation method, device and computer readable medium Download PDF

Info

Publication number
CN116071160A
CN116071160A CN202211648493.0A CN202211648493A CN116071160A CN 116071160 A CN116071160 A CN 116071160A CN 202211648493 A CN202211648493 A CN 202211648493A CN 116071160 A CN116071160 A CN 116071160A
Authority
CN
China
Prior art keywords
transaction
transactions
dependency graph
blockchain
execution
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202211648493.0A
Other languages
Chinese (zh)
Inventor
王栋
段婷婷
杨菁
余涛
玄佳兴
周磊
李国民
李江涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Power Exchange Center Co ltd
State Grid Blockchain Technology Beijing Co ltd
State Grid Digital Technology Holdings Co ltd
State Grid Corp of China SGCC
State Grid Shanghai Electric Power Co Ltd
Original Assignee
Beijing Power Exchange Center Co ltd
State Grid Blockchain Technology Beijing Co ltd
State Grid Digital Technology Holdings Co ltd
State Grid Corp of China SGCC
State Grid Shanghai Electric Power Co Ltd
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 Beijing Power Exchange Center Co ltd, State Grid Blockchain Technology Beijing Co ltd, State Grid Digital Technology Holdings Co ltd, State Grid Corp of China SGCC, State Grid Shanghai Electric Power Co Ltd filed Critical Beijing Power Exchange Center Co ltd
Priority to CN202211648493.0A priority Critical patent/CN116071160A/en
Publication of CN116071160A publication Critical patent/CN116071160A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06312Adjustment or analysis of established resource schedule, e.g. resource or task levelling, or dynamic rescheduling
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Software Systems (AREA)
  • Educational Administration (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Operations Research (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Game Theory and Decision Science (AREA)
  • Technology Law (AREA)
  • Data Mining & Analysis (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本申请公开一种基于区块链的交易实现方法、装置和计算机可读介质,该方法获取区块链节点上区块内各个交易的交易信息,根据获取的信息,将各个交易构造成包括各交易间依赖关系的交易依赖图,并根据交易依赖图,确定并输出各个交易的交易执行序列,最终按照交易执行序列所表征的交易间的执行次序,对各个交易进行调度执行。可见,本申请提出了将绿证交易等交易流程与区块链相结合的思路,可充分利用区块链的优势特性解决传统中心化绿证交易流程复杂、用户信息易篡改易泄露、绿证的核发耗时耗力且凭证记录不易追溯等问题;同时,通过将区块链处理绿证交易等交易的流程与交易依赖图相结合,可进一步适应交易间关联性较强的场景对区块链的性能需求。

Figure 202211648493

This application discloses a blockchain-based transaction implementation method, device, and computer-readable medium. The method acquires transaction information of each transaction in a block on a blockchain node, and constructs each transaction to include each transaction according to the obtained information. The transaction dependency graph of the dependencies between transactions, and according to the transaction dependency graph, determine and output the transaction execution sequence of each transaction, and finally schedule and execute each transaction according to the execution sequence between transactions represented by the transaction execution sequence. It can be seen that this application proposes the idea of combining transaction processes such as green certificate transactions with the blockchain, which can make full use of the advantages of the blockchain to solve the complex transaction process of traditional centralized green certificates, user information that is easy to be tampered with and leaked, and green certificates. Issues such as time-consuming and labor-intensive verification and hard-to-trace voucher records; at the same time, by combining the process of blockchain processing transactions such as green certificate transactions with the transaction dependency graph, it can further adapt to scenarios with strong correlations between transactions. Chain performance requirements.

Figure 202211648493

Description

基于区块链的交易实现方法、装置和计算机可读介质Blockchain-based transaction implementation method, device, and computer-readable medium

技术领域technical field

本申请属于区块链应用技术领域,尤其涉及一种基于区块链的交易实现方法、装置和计算机可读介质。The present application belongs to the field of block chain application technology, and in particular relates to a block chain-based transaction realization method, device and computer-readable medium.

背景技术Background technique

可再生能源配额制是指政府通过法律、法规等形式对可再生能源电力的市场份额做出强制性规定,强制要求售电公司或者电力消费者使用的电力中含有一定比例的可再生能源电力。绿证交易制度是配额制的重要配套制度,由于电力来源无法从物理层面进行区分,因此引入可再生能源证书(绿证)的概念来表示可再生能源的使用量。政府需向可再生能源发电企业发放与其上网电量相对应数量的绿证,配额义务主体则可通过向发电企业购买绿证以证明完成配额目标。The renewable energy quota system means that the government makes mandatory regulations on the market share of renewable energy power through laws, regulations, etc., and compels electricity sales companies or power consumers to contain a certain proportion of renewable energy power in the electricity used. The green certificate trading system is an important supporting system of the quota system. Since the source of electricity cannot be distinguished from the physical level, the concept of a renewable energy certificate (green certificate) is introduced to represent the amount of renewable energy used. The government needs to issue green certificates corresponding to the amount of on-grid electricity to renewable energy power generation companies, and the subject of quota obligations can purchase green certificates from power generation companies to prove the completion of the quota target.

传统的绿证交易依赖于中心化系统,用户的身份认证、绿证的核发、绿证的交易均由中心化系统完成,不仅整个交易流程繁琐,而且交易数据也面临着被非法篡改获取利益的风险。Traditional green certificate transactions rely on a centralized system. User identity authentication, green certificate issuance, and green certificate transactions are all completed by the centralized system. Not only is the entire transaction process cumbersome, but the transaction data also faces the risk of being illegally tampered with to obtain benefits. risk.

发明内容Contents of the invention

有鉴于此,本申请提供一种基于区块链的交易实现方法、装置和计算机可读介质,通过将绿证交易等交易流程与区块链相结合,利用区块链的优势特性解决传统中心化绿证交易流程复杂、用户信息易篡改易泄露、绿证的核发耗时耗力且凭证记录不易追溯等问题,同时将区块链处理绿证交易等的交易流程与有向无环图相结合,以适应绿证交易等交易场景对区块链的性能需求。In view of this, this application provides a blockchain-based transaction implementation method, device, and computer-readable medium. By combining transaction processes such as green certificate transactions with the blockchain, the advantages of the blockchain are used to solve the problem of traditional center transactions. The transaction process of the green certificate is complicated, the user information is easy to be tampered with and leaked, the issuance of the green certificate is time-consuming and labor-intensive, and the record of the certificate is not easy to trace. Combined to meet the performance requirements of the blockchain in transaction scenarios such as green certificate transactions.

具体方案如下:The specific plan is as follows:

一种基于区块链的交易实现方法,包括:A blockchain-based transaction implementation method, comprising:

获取区块链节点上区块内各个交易的交易信息;Obtain the transaction information of each transaction in the block on the blockchain node;

根据所述各个交易的交易信息,将所述各个交易构造成包括各个交易间的依赖关系的交易依赖图;所述交易依赖图为有向无环图,所述交易依赖图包括多个顶点及顶点之间的有向边,所述交易依赖图中的顶点表示对应的交易,顶点间的有向边表示交易之间的依赖关系;According to the transaction information of each transaction, each transaction is constructed into a transaction dependency graph including dependencies among transactions; the transaction dependency graph is a directed acyclic graph, and the transaction dependency graph includes multiple vertices and Directed edges between vertices, vertices in the transaction dependency graph represent corresponding transactions, and directed edges between vertices represent dependencies between transactions;

根据所述交易依赖图,确定并输出所述各个交易的交易执行序列;Determine and output the transaction execution sequence of each transaction according to the transaction dependency graph;

按照输出的交易执行序列所表征的交易间的执行次序,对所述各个交易进行调度执行。According to the execution sequence between transactions represented by the output transaction execution sequence, the transactions are scheduled for execution.

可选的,根据所述各个交易的交易信息,将所述各个交易构造成包括各个交易间的依赖关系的交易依赖图,包括:Optionally, according to the transaction information of each transaction, each transaction is constructed into a transaction dependency graph including dependencies among transactions, including:

根据所述各个交易的交易信息,对所述各个交易中任意两个交易之间进行交易间的依赖识别;According to the transaction information of each transaction, identify the dependence between transactions between any two transactions in the various transactions;

根据所述各个交易间的依赖关系识别结果,构建所述各个交易对应的交易依赖图;Constructing a transaction dependency graph corresponding to each transaction according to the identification result of the dependency relationship among the transactions;

其中,所述交易依赖图中第一顶点指向第二顶点的有向边,表示所述第二顶点所代表的交易对所述第一顶点所代表的交易存在依赖。Wherein, the directed edge from the first vertex in the transaction dependency graph to the second vertex indicates that the transaction represented by the second vertex depends on the transaction represented by the first vertex.

可选的,所述根据所述交易依赖图,确定并输出所述各个交易的交易执行序列,按照输出的交易执行序列所表征的交易间的执行次序,对所述各个交易进行调度执行,包括:Optionally, determining and outputting the transaction execution sequence of each transaction according to the transaction dependency graph, and scheduling and executing each transaction according to the execution sequence between transactions represented by the output transaction execution sequence, including :

根据所述交易依赖图,确定并输出能用于指征将有依赖关系的交易串行执行,无依赖关系的交易并行执行的交易执行序列;According to the transaction dependency graph, determine and output a transaction execution sequence that can be used to indicate that transactions with dependencies will be executed serially and transactions without dependencies will be executed in parallel;

根据所述交易执行序列,对所述各个交易中存在依赖关系的交易按串行方式调度执行,无依赖关系的交易按并行方式调度执行。According to the transaction execution sequence, among the transactions, transactions with dependencies are scheduled for execution in a serial manner, and transactions without dependencies are scheduled for execution in a parallel manner.

可选的,所述根据所述交易依赖图,确定并输出所述各个交易的交易执行序列,按照输出的交易执行序列,对所述各个交易进行调度执行,包括:Optionally, determining and outputting the transaction execution sequence of each transaction according to the transaction dependency graph, and scheduling and executing each transaction according to the output transaction execution sequence, including:

确定所述交易依赖图中未实现交易调度的各个顶点的入度;determining the in-degree of each vertex in the transaction dependency graph that does not implement transaction scheduling;

输出所确定的当前入度满足预设入度条件的各个目标顶点;output each target vertex whose determined current in-degree satisfies the preset in-degree condition;

将当前入度满足预设入度条件的各个目标顶点所代表交易交由多个工作线程并行执行;Hand over the transactions represented by each target vertex whose current in-degree meets the preset in-degree conditions to multiple worker threads for parallel execution;

在对当前的各个目标顶点所代表交易执行完毕后,消除当前各个目标顶点指向后续节点的有向边,将当前各个目标顶点指向的相应后续顶点的入度减1,并返回至所述确定所述交易依赖图中未实现交易调度的各个顶点的入度的步骤,以循环执行以上处理过程,通过循环执行以上处理过程,使得不同轮的处理过程输出的目标顶点中存在依赖关系的目标顶点串行执行,直至所述交易依赖图中各个顶点所代表交易执行完毕;After the transaction represented by each current target vertex is executed, eliminate the directed edge of each current target vertex pointing to the subsequent node, reduce the in-degree of the corresponding subsequent vertex pointed to by each current target vertex by 1, and return to the determination The step of the in-degree of each vertex in the transaction dependency graph that has not realized the transaction scheduling is used to execute the above processing process cyclically. Through the cyclic execution of the above processing process, there are target vertex strings with dependencies among the target vertices output by different rounds of processing processes. Execute until the transaction represented by each vertex in the transaction dependency graph is executed;

其中,所述交易执行序列包括:循环执行以上处理的过程中,不同轮的处理过程依次输出的入度满足所述预设入度条件的各个目标顶点分别代表的交易。Wherein, the transaction execution sequence includes: during the cyclical execution of the above processing, the transactions respectively represented by the target vertices whose in-degrees output by different rounds of processing sequentially meet the preset in-degree conditions.

可选的,所述交易为绿证交易;Optionally, the transaction is a green certificate transaction;

所述区块链对应的区块链网络为:通过将绿证发行和交易过程中的各参与方作为区块链主体所共同构建的绿证交易区块链网络;所述方法在获取区块链节点上区块内各个交易的交易信息之前,还包括:The block chain network corresponding to the block chain is: the green card transaction block chain network jointly constructed by taking the participants in the green card issuance and transaction process as the main body of the block chain; Before the transaction information of each transaction in the block on the chain node, it also includes:

接收区块链网络中的预设节点广播的包括各个绿证交易的交易信息的区块。Receive the block including the transaction information of each green card transaction broadcast by the preset node in the blockchain network.

可选的,所述区块链节点上嵌入有用于实现绿证交易相应业务流程的智能合约;Optionally, the blockchain node is embedded with a smart contract for realizing the corresponding business process of the green certificate transaction;

所述方法还包括:The method also includes:

在绿证交易执行过程中调用对应的智能合约,将绿证交易所涉及的业务数据存入区块链节点上。During the execution of the green certificate transaction, the corresponding smart contract is called, and the business data involved in the green certificate transaction is stored on the blockchain node.

可选的,所述智能合约包括用户合约和绿证合约;Optionally, the smart contract includes a user contract and a green certificate contract;

其中,所述用户合约用于完成用户身份的注册上链及用户身份信息查看、校验,所述绿证合约用于完成绿证的核发与绿证的转移。Among them, the user contract is used to complete the registration of the user's identity on the chain and the user's identity information viewing and verification, and the green certificate contract is used to complete the issuance and transfer of the green certificate.

一种基于区块链的交易实现装置,包括:A blockchain-based transaction implementation device, comprising:

交易获取单元,用于获取区块链节点上区块内各个交易的交易信息;A transaction acquisition unit, configured to acquire the transaction information of each transaction in the block on the blockchain node;

交易依赖图构造单元,用于根据所述各个交易的交易信息,将所述各个交易构造成包括各个交易间的依赖关系的交易依赖图;所述交易依赖图包括多个顶点及顶点之间的有向边,所述交易依赖图中的顶点表示对应的交易,顶点间的有向边表示交易之间的依赖关系;A transaction dependency graph construction unit, configured to construct each transaction into a transaction dependency graph including dependencies among transactions according to the transaction information of each transaction; the transaction dependency graph includes a plurality of vertices and links between vertices Directed edges, vertices in the transaction dependency graph represent corresponding transactions, and directed edges between vertices represent dependencies between transactions;

交易调度单元,用于根据所述交易依赖图,确定并输出所述各个交易的交易执行序列,以及按照输出的交易执行序列所表征的交易间的执行次序,对所述各个交易进行调度执行。The transaction scheduling unit is configured to determine and output the transaction execution sequence of each transaction according to the transaction dependency graph, and schedule and execute the transactions according to the execution sequence between transactions represented by the output transaction execution sequence.

可选的,所述交易依赖图构造单元,具体用于:Optionally, the transaction dependency graph construction unit is specifically used for:

根据所述各个交易的交易信息,对所述各个交易中任意两个交易之间进行交易间的依赖识别;According to the transaction information of each transaction, identify the dependence between transactions between any two transactions in the various transactions;

根据所述各个交易间的依赖关系识别结果,构建所述各个交易对应的交易依赖图;Constructing a transaction dependency graph corresponding to each transaction according to the identification result of the dependency relationship among the transactions;

其中,所述交易依赖图中第一顶点指向第二顶点的有向边,表示所述第二顶点所代表的交易对所述第一顶点所代表的交易存在依赖。Wherein, the directed edge from the first vertex in the transaction dependency graph to the second vertex indicates that the transaction represented by the second vertex depends on the transaction represented by the first vertex.

一种计算机可读介质,其上存储有计算机程序,所述计算机程序包含用于执行如上文任一项所述的方法的程序代码。A computer readable medium on which is stored a computer program comprising program code for performing the method as described in any one of the preceding items.

根据以上方案可知,本申请提供的基于区块链的交易实现方法、装置和计算机可读介质,获取区块链节点上区块内各个交易的交易信息,根据各个交易的交易信息,将各个交易构造成包括各个交易间的依赖关系的交易依赖图(有向无环图),并根据所述交易依赖图,确定并输出各个交易的交易执行序列,最终按照输出的交易执行序列所表征的交易间的执行次序,对各个交易进行调度执行。可见,本申请提出了将绿证交易等交易流程与区块链相结合的思路,可充分利用区块链的优势特性解决传统中心化绿证交易流程复杂、用户信息易篡改易泄露、绿证的核发耗时耗力且凭证记录不易追溯等问题;同时,绿证交易属于交易间关联性较强的交易之一,本申请通过将区块链处理绿证交易等交易的流程与有向无环图相结合,可进一步适应绿证交易等交易间关联性较强的场景对区块链的性能需求。According to the above scheme, it can be seen that the blockchain-based transaction implementation method, device, and computer-readable medium provided by this application obtain the transaction information of each transaction in the block on the blockchain node, and according to the transaction information of each transaction, each transaction Construct a transaction dependency graph (directed acyclic graph) including the dependencies between transactions, and determine and output the transaction execution sequence of each transaction according to the transaction dependency graph, and finally follow the transaction represented by the output transaction execution sequence The order of execution between transactions is scheduled for execution. It can be seen that this application proposes the idea of combining transaction processes such as green certificate transactions with the blockchain, which can make full use of the advantages of the blockchain to solve the complex transaction process of traditional centralized green certificates, user information that is easy to be tampered with and leaked, and green certificates. Issues such as time-consuming and labor-intensive verification and hard-to-trace voucher records; at the same time, green certificate transactions are one of the transactions with strong correlations between transactions. The combination of ring diagrams can further adapt to the performance requirements of the blockchain in scenarios with strong correlation between transactions such as green certificate transactions.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present application, and those skilled in the art can also obtain other drawings according to the provided drawings without creative work.

图1是本申请提供的基于区块链的交易实现方法的一种流程图;Fig. 1 is a kind of flowchart of the transaction implementation method based on blockchain provided by the application;

图2是本申请提供的基于区块链的交易实现方法的另一种流程图;Fig. 2 is another flow chart of the blockchain-based transaction implementation method provided by the present application;

图3是本申请提供的基于区块链的绿证交易整体逻辑框架;Figure 3 is the overall logical framework of the blockchain-based green certificate transaction provided by this application;

图4是本申请提供的对绿证交易进行处理以实现交易调度执行的一个示例性详细工作流程;Fig. 4 is an exemplary detailed workflow for processing green card transactions to realize transaction scheduling and execution provided by this application;

图5(a)-图5(g)是本申请提供的DAG构建过程的一个示例;Figure 5(a)-Figure 5(g) is an example of the DAG construction process provided by this application;

图6(a)-图6(d)是本申请提供的根据生成的有向无环图输出交易执行序列的一个示例;Figure 6(a)-Figure 6(d) is an example of the output transaction execution sequence according to the generated directed acyclic graph provided by this application;

图7是本申请提供的基于区块链的交易实现装置的组成结构图。Fig. 7 is a structural diagram of the block chain-based transaction implementation device provided by the present application.

具体实施方式Detailed ways

为引用或清楚起见,首先将本申请实施例涉及的相关技术术语、缩写或名词解释如下:For the sake of reference or clarity, the relevant technical terms, abbreviations or nouns involved in the embodiments of the present application are explained as follows:

区块链:区块链是分布式数据存储、P2P网络、共识机制、加密算法、智能合约等计算机技术的新型应用模式,它具有去中心化、集体维护、可编程、无法篡改、安全可信、可追溯等特点。Blockchain: Blockchain is a new application model of computer technology such as distributed data storage, P2P network, consensus mechanism, encryption algorithm, smart contract, etc. It has the characteristics of decentralization, collective maintenance, programmable, tamper-proof, safe and reliable , traceability and other characteristics.

DAG:Directed Acyclic Graph,即有向无环图。DAG: Directed Acyclic Graph, that is, directed acyclic graph.

MVCC:Multi-Version Concurrency Control,即多版本并发控制。MVCC: Multi-Version Concurrency Control, that is, multi-version concurrency control.

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

本申请主要以绿证交易为例,首先将绿证交易流程与区块链相结合,利用区块链的优势特性解决传统中心化绿证交易流程复杂、用户信息易篡改易泄露、绿证的核发耗时耗力且凭证记录不易追溯等问题。This application mainly takes the green certificate transaction as an example. Firstly, the green certificate transaction process is combined with the blockchain, and the advantages of the blockchain are used to solve the traditional centralized green certificate transaction process. Issues such as time-consuming and labor-intensive verification and hard-to-trace voucher records.

区块链网络一般由多个节点组成,每个节点均存储完整数据的副本。交易执行实质上是各个节点各自基于本地数据副本做计算,同时需要保证各个节点计算结果的一致性,当各节点的计算结果达成一致,各节点才更新本地的数据副本,只有这样才能保证各节点各自维护的数据副本始终是相同的。区块链的链上交易是通过调用智能合约来完成,智能合约可视作是一个独立的应用程序,与区块链节点通过网络进行通信,链上交易的执行伴随着大量的网络I/O、磁盘I/O以及涉及使用CPU的计算任务,执行过程极其耗时,传统的区块链系统为了保证数据副本的一致性,采用串行的方式执行交易,串行执行的效率较低,不能充分利用现代计算机CPU多核的计算处理能力,例如6核CPU在串行执行模式下仅有1核在工作,同时也造成了系统资源的浪费。绿证交易场景下,对交易的执行效率有一定的要求,传统区块链串行执行的方式并不能满足执行效率的需求。Blockchain networks generally consist of multiple nodes, each of which stores a complete copy of the data. Transaction execution is essentially that each node performs calculations based on their local data copies. At the same time, it is necessary to ensure the consistency of the calculation results of each node. When the calculation results of each node reach an agreement, each node updates the local data copy. Only in this way can each node be guaranteed The copies of data maintained by each are always identical. The on-chain transaction of the blockchain is completed by calling the smart contract. The smart contract can be regarded as an independent application that communicates with the blockchain nodes through the network. The execution of the on-chain transaction is accompanied by a large number of network I/O , Disk I/O, and computing tasks involving the use of the CPU, the execution process is extremely time-consuming. In order to ensure the consistency of data copies, the traditional blockchain system uses a serial method to execute transactions. The efficiency of serial execution is low and cannot Make full use of the multi-core computing and processing capabilities of modern computer CPUs. For example, only one core of a 6-core CPU is working in serial execution mode, which also causes a waste of system resources. In the green certificate transaction scenario, there are certain requirements for the execution efficiency of the transaction, and the serial execution method of the traditional blockchain cannot meet the requirements of execution efficiency.

联盟链中的代表性项目Hyperledger Fabric采用基于MVCC的交易并发执行策略,虽然能够让交易并发执行,但在交易间关联性较大的场景下,会由于其乐观并发控制的机制导致同一个区块内多笔对相同数据的更改的交易只有第一笔能够成功,其余均会被标记为失败,申请人研究发现,这些交易的失败不是由于本身业务逻辑层的判断导致,而是由该区块链项目内部的机制导致,此时失败的交易需要由业务层去重试,同样会导致性能的下降,处理效率的降低,且绿证交易就属于交易间关联性较大的情形之一。综上所述,目前的区块链难以满足绿证交易场景下的性能需求。Hyperledger Fabric, a representative project in the consortium chain, adopts a transaction concurrent execution strategy based on MVCC. Although transactions can be executed concurrently, in scenarios where transactions are highly correlated, the same block will be generated due to its optimistic concurrency control mechanism. Only the first one of multiple transactions that change the same data can succeed, and the rest will be marked as failed. The applicant found that the failure of these transactions was not caused by the judgment of the business logic layer itself, but by the block Due to the internal mechanism of the chain project, the failed transaction at this time needs to be retried by the business layer, which will also lead to a decrease in performance and processing efficiency, and the green certificate transaction is one of the situations where transactions are highly correlated. To sum up, the current blockchain is difficult to meet the performance requirements in the green certificate transaction scenario.

基于此,本申请进一步将区块链处理绿证交易的流程与有向无环图相结合,以适应绿证交易等交易间关联性较强的交易场景对区块链的性能需求。Based on this, this application further combines the process of processing green certificate transactions in the blockchain with the directed acyclic graph to meet the performance requirements of the blockchain in transaction scenarios with strong correlations between transactions such as green certificate transactions.

结合上述的研究发现,本申请提供一种基于区块链的交易实现方法、装置和计算机可读介质,可选的,所涉及的交易可以为绿证交易等对交易执行效率有一定的要求且交易间关联性较强的交易,本申请实施例将主要以绿证交易为例进行方案说明。In combination with the above research findings, this application provides a blockchain-based transaction implementation method, device, and computer-readable medium. Optionally, the transactions involved can be green certificate transactions, etc., which have certain requirements for transaction execution efficiency and For transactions with strong correlations between transactions, the embodiment of this application will mainly use green certificate transactions as an example to illustrate the solution.

本申请的方法及装置将绿证交易等的交易流程与区块链及有向无环图相结合,主要涉及绿证交易等的交易流程迁移至区块链时所需的相关智能合约的编写,以及区块链底层性能优化的适配。The method and device of this application combine the transaction process of green certificate transactions with blockchain and directed acyclic graph, and mainly involve the preparation of relevant smart contracts required when the transaction process of green certificate transactions is migrated to the blockchain , and the adaptation of the underlying performance optimization of the blockchain.

其中,预先将绿证发行和交易过程中的各参与方作为主体共同构建绿证交易区块链网络,如,将绿证的监管机构、电网公司、省行政区相关机构作为主体共同构建绿证交易区块链网络,区块链网络通过将绿证发行和交易过程中的各参与方以分布式方式链接,构建平等互信的环境。并预先开发对应的智能合约将绿证交易的业务流程迁移至区块链上或使用智能合约对原有的业务流程进行补充完善。Among them, all participants in the process of green certificate issuance and transaction are used as the main body to jointly build a green certificate transaction blockchain network. Blockchain network, the blockchain network builds an environment of equality and mutual trust by linking all participants in the green certificate issuance and transaction process in a distributed manner. And pre-develop the corresponding smart contract to migrate the business process of the green certificate transaction to the blockchain or use the smart contract to supplement and improve the original business process.

针对绿证交易,需要实现的智能合约,主要包括用户合约以及绿证合约两类。For green certificate transactions, the smart contracts that need to be implemented mainly include user contracts and green certificate contracts.

两类合约分别如下:The two types of contracts are as follows:

(一)用户合约(1) User contract

主要用于完成用户身份的注册上链及用户身份信息查看、校验。It is mainly used to complete the registration and on-chain of user identity and view and verify user identity information.

市场主体可以通过相应管理平台(如,各省级管理平台)作为入口进行用户身份注册,各管理平台首先对市场主体的资质进行审查,对于可再生能源供应商,还需确认其具备可再生发电能力,以从源头上保证绿证市场的有序性和绿证流通的合法性。通过审核的用户将由平台分配公私钥对,私钥由用户自行保管,公钥由各管理平台(如,各省级管理平台)上链匿名共享。后续用户在进行绿证交易相关操作时,例如发起绿证的转移时,采用私钥签名,以确保操作由合法的参与方发起且不可抵赖。Market participants can use the corresponding management platforms (for example, provincial management platforms) as entrances to register user identities. Each management platform first reviews the qualifications of market participants. For renewable energy suppliers, it is also necessary to confirm that they have renewable power generation capacity. ability to ensure the orderliness of the green certificate market and the legitimacy of the green certificate circulation from the source. Users who pass the review will be assigned a public-private key pair by the platform, the private key will be kept by the user, and the public key will be shared anonymously on the chain by each management platform (for example, each provincial management platform). Subsequent users will use private key signatures when performing operations related to green certificate transactions, such as initiating the transfer of green certificates, to ensure that the operations are initiated by legitimate participants and cannot be repudiated.

(二)绿证合约(2) Green certificate contract

主要用于完成绿证的核发与绿证的转移。It is mainly used to complete the issuance and transfer of green certificates.

绿证的核发:通过注册审核的市场主体用户(如可再生能源提供商)可由电网公司安装或升级智能电表。在此基础上,供应商等用户可申请绿证的核发,由电网公司计量其实际上网的可再生能源电量以便按照设定的换算标准(如,1MW·h对应一张绿证的换算标准)生成等量的绿证,具体的,电网公司计量的结果交由绿证审核机构进行审核与校对,确认无误后由绿证审核机构生成绿证,其中,每张绿证至少包含审核机构编号、供应商编号、绿证编号、绿证归属者编号、能源类型(风电/光伏等)、核发时间等信息。绿证的审查机构将调用智能合约将绿证存入供应商的账户中。Issuance of green certificates: Market subject users (such as renewable energy providers) who have passed the registration review can have smart meters installed or upgraded by the grid company. On this basis, suppliers and other users can apply for the issuance of green certificates, and the power grid company will measure their actual grid renewable energy in order to follow the set conversion standards (for example, 1MW·h corresponds to the conversion standard of a green certificate) Generate an equal number of green certificates. Specifically, the measurement results of the power grid company are submitted to the green certificate review agency for review and proofreading. After confirmation, the green certificate review agency generates a green certificate. Each green certificate contains at least the review agency number, Supplier number, green certificate number, green certificate owner number, energy type (wind power/photovoltaic, etc.), issuance time and other information. The review agency of the green certificate will call the smart contract to deposit the green certificate into the supplier's account.

绿证的转移:绿证的转移采用场内交易机制。绿证的卖方和买方可以在交易平台上挂牌和摘牌。绿证的卖方在交易平台上公开自己的绿证出售意向,包括绿证的出售单价、出售量等信息。绿证的买方可以通过交易平台获取最新的市场动态,选择合适的绿证卖方进行交易协商,当买卖双方就交易数量、交易单价达成一致意见以后,先由绿证买方将预付款项交给交易平台,当绿证卖方调用智能合约完成绿证的转移以后,交易平台才将交易款项交给绿证卖方。每次绿证转移需要记录的数据包括但不限于卖方编号、买方编号、绿证编号、绿证数量、成交价格、交易时间等信息。Transfer of green certificates: The transfer of green certificates adopts an on-site trading mechanism. The seller and buyer of the green certificate can list and delist on the trading platform. The seller of the green certificate discloses his intention to sell the green certificate on the trading platform, including information such as the unit price and sales volume of the green certificate. The buyer of the green certificate can obtain the latest market dynamics through the trading platform, select a suitable green certificate seller for transaction negotiation, and when the buyer and the seller reach an agreement on the transaction quantity and transaction unit price, the green certificate buyer will first hand over the prepayment to the trading platform , when the green certificate seller calls the smart contract to complete the transfer of the green certificate, the trading platform will hand over the transaction funds to the green certificate seller. The data to be recorded for each green certificate transfer includes but is not limited to seller number, buyer number, green certificate number, number of green certificates, transaction price, transaction time and other information.

区块链底层性能优化的适配主要包括交易依赖图构造以及交易任务的调度两个方面。分别如下:The adaptation of the underlying performance optimization of the blockchain mainly includes two aspects: the construction of the transaction dependency graph and the scheduling of transaction tasks. They are as follows:

交易依赖图构造:根据绿证交易等交易之间的关联关系,将区块内的一批交易组织成一张有向无环图。区块内的每笔交易可视为图中的一个顶点(或称为图的“节点”),顶点与顶点之间的边代表着两个交易之间有关联关系。Transaction dependency graph construction: According to the relationship between transactions such as green certificate transactions, a batch of transactions in the block are organized into a directed acyclic graph. Each transaction in a block can be regarded as a vertex in the graph (or called a "node" of the graph), and the edges between vertices represent the relationship between two transactions.

交易任务调度:根据区块内交易构造的有向无环图对交易进行调度并执行交易。如果两笔交易之间有关联关系,则让它们串行执行,如果两笔交易无关联关系,则让它们并发执行。可选的,此过程利用图的拓扑排序算法的思想,保证在执行某个交易时,其所有前序交易都已经执行完毕。Transaction task scheduling: Schedule and execute transactions according to the directed acyclic graph constructed by the transactions in the block. If there is a relationship between the two transactions, let them execute serially, and if the two transactions are not related, let them execute concurrently. Optionally, this process uses the idea of graph topology sorting algorithm to ensure that when a certain transaction is executed, all its previous transactions have been executed.

在此基础上,参见图1示出的基于区块链的交易实现方法流程图,本申请提供的基于区块链的交易实现方法,至少包括如下处理步骤:On this basis, referring to the block chain-based transaction implementation method flow chart shown in Figure 1, the block chain-based transaction implementation method provided by this application at least includes the following processing steps:

步骤101、获取区块链节点上区块内各个交易的交易信息。Step 101. Obtain the transaction information of each transaction in the block on the blockchain node.

参见图1提供的区块链基础交易结构的一个示例,其为区块链中交易信息的典型结构,该结构是一种通用的结构,如图1所示,交易的基础结构信息包括但不限于交易发起者(Sender)、调用的合约名(CallContractName)、调用的合约方法(CallContractMethod)、合约调用参数(CallArgs)、交易发起者对交易的签名(Signature)等信息,除此之外,还可以包括交易双方的相关交易信息,如绿证售方、绿证购方、绿证交易数量等。See Figure 1 for an example of the basic transaction structure of the blockchain, which is a typical structure of transaction information in the blockchain. This structure is a general structure. As shown in Figure 1, the basic structure information of the transaction includes but does not It is limited to information such as the transaction initiator (Sender), the called contract name (CallContractName), the called contract method (CallContractMethod), the contract call parameters (CallArgs), the transaction initiator's signature (Signature) on the transaction, and other information. It can include relevant transaction information of both parties to the transaction, such as the seller of the green certificate, the buyer of the green certificate, the number of green certificate transactions, etc.

表1区块链交易结构Table 1 Blockchain transaction structure

Figure BDA0004010861870000081
Figure BDA0004010861870000081

区块链在执行交易时可根据合约名(CallContractName)、调用的合约方法(CallContractMethod)及合约调用参数(CallArgs)定位到特定的智能合约以及特定的合约方法,再给予特定的合约调用参数,以此完成合约方法的调用以承载不同的业务逻辑。例如CallContractName=Proof以及CallContractMethod=StoreProof可以定位到存证合约的存证方法,再给予该方法调用所需要的参数CallArgs,调用StoreProof即可完成存证的业务逻辑。When executing a transaction, the blockchain can locate a specific smart contract and a specific contract method according to the contract name (CallContractName), the called contract method (CallContractMethod) and the contract call parameters (CallArgs), and then give specific contract call parameters to This completes the call of the contract method to carry different business logic. For example, CallContractName=Proof and CallContractMethod=StoreProof can locate the proof storage method of the proof storage contract, and then give the parameter CallArgs required for calling the method, and call StoreProof to complete the proof storage business logic.

针对绿证交易,区块链对应的区块链网络相应可以为:通过将绿证发行和交易过程中的各参与方作为区块链主体所共同构建的绿证交易区块链网络。For green certificate transactions, the blockchain network corresponding to the blockchain can be: a green certificate transaction blockchain network jointly constructed by taking all participants in the green certificate issuance and transaction process as the main body of the blockchain.

本申请方法在步骤101之前,还可以包括:接收区块链网络中的预设节点广播的包括各个绿证交易的交易信息的区块。Before step 101, the application method may further include: receiving a block including transaction information of each green card transaction broadcast by a preset node in the blockchain network.

这里的预设节点,可以是基于共识算法从区块链节点中选取的leader节点。The preset node here can be the leader node selected from the blockchain nodes based on the consensus algorithm.

本申请中,区块链网络中的链上交易处理以区块为单位,由共识算法从区块链节点中选取的leader节点选取交易、将选取的交易打包成区块并广播至区块链网络的其他节点,区块链网络内的节点(即区块链节点)收到区块后,各自在本地处理交易。In this application, the on-chain transaction processing in the blockchain network takes blocks as units, and the consensus algorithm selects transactions from the leader node selected from the blockchain nodes, packages the selected transactions into blocks and broadcasts them to the blockchain Other nodes in the network, nodes in the blockchain network (that is, blockchain nodes) each process the transaction locally after receiving the block.

区块链节点在收到区块各自在本地处理交易时,首先获取区块内的各个交易的交易信息,如交易ID、绿证售方、绿证购方、绿证交易数量等。When the blockchain nodes receive the block and process the transaction locally, they first obtain the transaction information of each transaction in the block, such as transaction ID, green certificate seller, green certificate buyer, green certificate transaction quantity, etc.

步骤102、根据所述各个交易的交易信息,将所述各个交易构造成对应的交易依赖图;所述交易依赖图为有向无环图,所述交易依赖图包括多个顶点及顶点之间的有向边,所述交易依赖图中的顶点表示对应的交易,顶点间的有向边表示交易之间的依赖关系。Step 102: Construct each transaction into a corresponding transaction dependency graph according to the transaction information of each transaction; the transaction dependency graph is a directed acyclic graph, and the transaction dependency graph includes multiple vertices and The directed edges in the transaction dependency graph represent the corresponding transactions, and the directed edges between the vertices represent the dependencies between transactions.

之后,根据区块内各个交易的交易信息,对各个交易中任意两个交易之间进行交易间的依赖识别,并根据各个交易间的依赖关系识别结果,构建各个交易对应的DAG形式的交易依赖图。从而,将区块链处理绿证交易等的交易流程与有向无环图相结合,利用有向无环图来描述绿证交易间的关联关系。Afterwards, according to the transaction information of each transaction in the block, the dependencies between any two transactions in each transaction are identified, and according to the identification results of the dependencies between each transaction, the DAG form of transaction dependencies corresponding to each transaction is constructed. picture. Therefore, the transaction process of blockchain processing green certificate transactions and other transactions is combined with the directed acyclic graph, and the directed acyclic graph is used to describe the relationship between green certificate transactions.

其中,交易依赖图中第一顶点指向第二顶点的有向边,表示第二顶点所代表的交易对第一顶点所代表的交易存在依赖,如,顶点x指向顶点y的有向边表示顶点y所代表的交易必须等待顶点x所代表的交易执行完毕后才能执行,从而有向边也代表了相连接的两个顶点的执行顺序。Among them, the directed edge from the first vertex to the second vertex in the transaction dependency graph indicates that the transaction represented by the second vertex depends on the transaction represented by the first vertex. For example, the directed edge from vertex x to vertex y represents the vertex The transaction represented by y must wait for the execution of the transaction represented by vertex x to be executed, so the directed edge also represents the execution sequence of the two connected vertices.

步骤103、根据所述交易依赖图,确定并输出所述各个交易的交易执行序列。Step 103: Determine and output the transaction execution sequence of each transaction according to the transaction dependency graph.

在此基础上,根据所述交易依赖图,确定并输出对各个交易的交易执行序列。其中,该交易执行序列目的在于指示将区块内有关联的交易串行执行,无关联的交易并行/并发执行,以在保证交易执行结果正确性的同时又有着一定的并发性,充分利用现代计算机CPU多核的计算处理能力,来提升交易处理的效率,适应绿证交易场景下对区块链的性能需求。On this basis, according to the transaction dependency graph, determine and output the transaction execution sequence for each transaction. Among them, the purpose of the transaction execution sequence is to indicate that the associated transactions in the block are executed serially, and the unrelated transactions are executed in parallel/concurrently, so as to ensure the correctness of the transaction execution results and at the same time have a certain degree of concurrency, making full use of the modern The computing and processing capabilities of the computer CPU's multi-core are used to improve the efficiency of transaction processing and meet the performance requirements of the blockchain in the green certificate transaction scenario.

步骤104、按照输出的交易执行序列所表征的交易间的执行次序,对所述各个交易进行调度执行。Step 104: Schedule and execute each transaction according to the execution order of the transactions represented by the output transaction execution sequence.

相应的,可进一步根据输出的交易执行序列,对区块内各个交易中存在依赖关系的交易按串行方式调度执行,无依赖关系的交易按并行方式调度执行。Correspondingly, according to the output transaction execution sequence, the transactions that have dependencies among the transactions in the block can be scheduled and executed in a serial manner, and the transactions without dependencies can be scheduled and executed in a parallel manner.

以下提供步骤103-步骤104的一具体实施方式,参见图2,具体可通过如下处理实现步骤103-步骤104的根据交易依赖图确定并输出各个交易的交易执行序列,以及按照输出的交易执行序列对各个交易进行调度执行的过程:A specific implementation of step 103-step 104 is provided below, referring to Fig. 2, step 103-step 104 can be realized through the following processing to determine and output the transaction execution sequence of each transaction according to the transaction dependency graph, and according to the output transaction execution sequence The process of scheduling execution of each transaction:

11)确定交易依赖图中未实现交易调度的各个顶点的入度;11) Determine the in-degree of each vertex in the transaction dependency graph that has not realized transaction scheduling;

12)输出所确定的当前入度满足预设入度条件的各个目标顶点;12) Outputting each target vertex whose determined current in-degree satisfies the preset in-degree condition;

其中,所述预设入度条件可设置为:顶点的入度为0。Wherein, the preset in-degree condition may be set as: the in-degree of the vertex is 0.

某一顶点的入度为0,表示该顶点代表的交易所依赖的其它交易当前均已完成,或者该顶点代表的交易不依赖于任何其它交易。If the in-degree of a vertex is 0, it means that other transactions that the transaction represented by the vertex depends on are currently completed, or that the transaction represented by the vertex does not depend on any other transactions.

13)将当前入度满足所述预设入度条件的各个目标顶点所代表交易交由多个工作线程并行执行;13) Hand over the transactions represented by each target vertex whose current in-degree satisfies the preset in-degree condition to multiple worker threads for parallel execution;

14)在对当前的各个目标顶点所代表交易执行完毕后,消除当前各个目标顶点指向后续节点的有向边,将当前各个目标顶点指向的相应后续顶点的入度减1,并返回至步骤11),以循环执行以上处理过程,通过循环执行以上处理过程,使得不同轮的处理过程输出的目标顶点中存在依赖关系的目标顶点串行执行,直至交易依赖图中各个顶点所代表交易执行完毕。14) After the transaction represented by each current target vertex is executed, eliminate the directed edge from each current target vertex pointing to the subsequent node, reduce the in-degree of the corresponding subsequent vertex pointed to by each current target vertex by 1, and return to step 11 ), execute the above processing process in a loop, through the loop execution of the above processing process, the target vertices that have dependencies among the target vertices output by different rounds of processing processes are executed serially until the transaction represented by each vertex in the transaction dependency graph is executed.

其中,所述交易执行序列包括:循环执行以上处理的过程中,不同轮的处理过程依次输出的入度满足所述预设入度条件的各个目标顶点分别代表的交易Wherein, the transaction execution sequence includes: during the cyclical execution of the above processing, the in-degrees sequentially output by different rounds of processing processes respectively represent the transactions represented by the target vertices whose in-degrees satisfy the preset in-degree conditions

该实施方式通过不断地输出入度为0的顶点,并对同一时序点输出(即同一轮的处理过程所输出)的同批次入度为0的各个顶点所代表交易按并行/并发方式调度执行,对不同时序点输出的不同批次入度为0的各个顶点所代表交易按时间先后顺序执行,实现将区块内无关联的交易并行/并发执行,有关联的交易串行执行,既能保证交易执行结果正确性,同时又能保证有着一定的并发性。In this implementation, the vertices with an input degree of 0 are continuously output, and the transactions represented by the vertices with an input degree of 0 in the same batch output at the same time sequence point (that is, the output of the same round of processing) are scheduled in a parallel/concurrent manner Execution, the transactions represented by vertices whose in-degree is 0 in different batches output at different timing points are executed in chronological order, so as to realize parallel/concurrent execution of unrelated transactions in the block, and serial execution of associated transactions, both It can ensure the correctness of transaction execution results and at the same time ensure a certain degree of concurrency.

根据以上方案可知,本申请提供的基于区块链的交易实现方法,获取区块链节点上区块内各个交易的交易信息,根据各个交易的交易信息,将各个交易构造成包括各个交易间的依赖关系的交易依赖图(有向无环图),并根据所述交易依赖图,确定并输出各个交易的交易执行序列,最终按照输出的交易执行序列所表征的交易间的执行次序,对各个交易进行调度执行。可见,本申请提出了将绿证交易等交易流程与区块链相结合的思路,可充分利用区块链的优势特性解决传统中心化绿证交易流程复杂、用户信息易篡改易泄露、绿证的核发耗时耗力且凭证记录不易追溯等问题;同时,绿证交易属于交易间关联性较强的交易之一,本申请通过将区块链处理绿证交易等交易的流程与有向无环图相结合,可进一步适应绿证交易等交易间关联性较强的场景对区块链的性能需求。According to the above scheme, it can be seen that the block chain-based transaction implementation method provided by this application obtains the transaction information of each transaction in the block on the block chain node, and constructs each transaction to include the transaction information between each transaction according to the transaction information of each transaction. The transaction dependency graph (directed acyclic graph) of the dependency relationship, and according to the transaction dependency graph, determine and output the transaction execution sequence of each transaction, and finally according to the execution order between transactions represented by the output transaction execution sequence, each Transactions are scheduled for execution. It can be seen that this application proposes the idea of combining transaction processes such as green certificate transactions with the blockchain, which can make full use of the advantages of the blockchain to solve the complex transaction process of traditional centralized green certificates, user information that is easy to be tampered with and leaked, and green certificates. Issues such as time-consuming and labor-intensive verification and hard-to-trace voucher records; at the same time, green certificate transactions are one of the transactions with strong correlations between transactions. The combination of ring diagrams can further adapt to the performance requirements of the blockchain in scenarios with strong correlation between transactions such as green certificate transactions.

可选的,在一实施例中,区块链网络的区块链节点上,嵌入有用于实现绿证交易相应业务流程的智能合约。参见图2示出的基于区块链的交易实现方法流程图,本申请公开的基于区块链的交易实现方法,还可以包括以下处理:Optionally, in an embodiment, the blockchain nodes of the blockchain network are embedded with smart contracts for realizing the corresponding business processes of green certificate transactions. Referring to the flow chart of the blockchain-based transaction implementation method shown in Figure 2, the blockchain-based transaction implementation method disclosed in this application may also include the following processing:

步骤105、在绿证交易执行过程中调用对应的智能合约,将绿证交易所涉及的业务数据存入区块链节点上。Step 105: Invoke the corresponding smart contract during the execution of the green certificate transaction, and store the business data involved in the green certificate transaction into the blockchain node.

针对绿证交易,如上文所述,智能合约主要包括用户合约和绿证合约两类,其中,用户合约主要用于完成用户身份的注册上链及用户身份信息查看、校验,绿证合约主要用于完成绿证的核发与绿证的转移。For green certificate transactions, as mentioned above, smart contracts mainly include user contracts and green certificate contracts. Among them, user contracts are mainly used to complete user identity registration on-chain and user identity information viewing and verification, and green certificate contracts are mainly used It is used to complete the issuance and transfer of green certificates.

相应的,在绿证交易执行过程中,调用对应的智能合约将绿证交易所对应的业务数据存入区块链节点,可以包括但不限于,根据需求调用用户合约进行身份注册上链或用户身份信息查看、校验,并将所涉及的身份注册信息或校验信息等存入区块链节点,以及调用绿证合约进行绿证核发、绿证转移等,并将所涉及的相关绿证核发、绿证转移等数据存入区块链节点,以此实现绿证交易的业务流程向区块链的有效迁移及适配。Correspondingly, during the execution of the green certificate transaction, the corresponding smart contract is invoked to store the business data corresponding to the green certificate exchange into the blockchain node, which may include but not limited to, call the user contract to register the identity on the blockchain or user Check and verify identity information, and store the identity registration information or verification information involved in the blockchain node, and call the green certificate contract for green certificate issuance, green certificate transfer, etc., and store the relevant green certificates involved Data such as issuance and green certificate transfer are stored in the blockchain nodes, so as to realize the effective migration and adaptation of the business process of green certificate transactions to the blockchain.

以下进一步提供本申请方法的一应用示例。An application example of the method of the present application is further provided below.

该示例以绿证交易的调度执行为例,主要涉及绿证交易流程迁移至区块链时所需相关智能合约的编写,以及区块链底层性能优化的适配,参见图3所示的基于区块链的绿证交易整体逻辑框架(图中虚线框部分是基于本申请方案提供的核心改进部分),其中,针对所需智能合约的编写,主要实现用户合约以及绿证合约两类智能合约(即图中右边的虚线框部分),两类智能合约的逻辑/功能分别见上文的说明,交易执行过程中会调用智能合约的方法将特定业务数据存入区块链上,例如用户合约的身份注册、绿证合约的绿证核发、绿证的转移等。This example takes the scheduling and execution of green certificate transactions as an example. It mainly involves the compilation of relevant smart contracts required when the green certificate transaction process is migrated to the blockchain, and the adaptation of the underlying performance optimization of the blockchain. See Figure 3. The overall logical framework of the green certificate transaction of the blockchain (the dotted line in the figure is the core improvement part provided by this application scheme), among which, for the preparation of the required smart contracts, two types of smart contracts, the user contract and the green certificate contract, are mainly implemented (that is, the dotted line box on the right side of the figure), the logic/functions of the two types of smart contracts are described above, and the method of smart contracts will be called during transaction execution to store specific business data on the blockchain, such as user contracts Identity registration, green certificate issuance of green certificate contracts, transfer of green certificates, etc.

针对区块链底层性能优化的适配,具体在区块链节点软件新增DAG模块(即图中左边的虚线框部分),DAG模块负责接收区块执行模块传递的区块,将区块内的交易构造成DAG,并交由交易执行线程池进行调度执行,同时DAG模块会记录所有交易执行所产生的结果,将结果返回给区块执行模块,由区块执行模块向账本进行数据的提交。For the adaptation of the underlying performance optimization of the blockchain, a new DAG module (that is, the dotted box on the left in the figure) is added to the blockchain node software. The DAG module is responsible for receiving the block delivered by the block execution module, and the The transactions are constructed into a DAG, which is scheduled and executed by the transaction execution thread pool. At the same time, the DAG module will record the results generated by all transaction executions, and return the results to the block execution module, which will submit the data to the ledger .

该示例中,参见图3,区块链底层性能优化的适配通过进一步将DAG模块分为交易依赖图构造以及交易任务调度两个子模块来实现,其中:In this example, see Figure 3, the adaptation of the underlying performance optimization of the blockchain is realized by further dividing the DAG module into two sub-modules, transaction dependency graph construction and transaction task scheduling, among which:

交易依赖图构造子模块,用于根据绿证交易之间的关联关系,将区块内的一批交易组织成一张有向无环图。区块内的每笔交易可视为图中的一个顶点,顶点与顶点之间的边代表着两个交易之间有关联关系。The transaction dependency graph construction sub-module is used to organize a batch of transactions in the block into a directed acyclic graph according to the association relationship between green certificate transactions. Each transaction in the block can be regarded as a vertex in the graph, and the edge between the vertices represents the relationship between the two transactions.

交易任务调度子模块,用于根据为区块内交易构造的有向无环图调度执行交易。如果两笔交易之间有关联关系,则让它们串行执行,如果两笔交易无关联关系,则让它们并行执行,此过程可以利用图的拓扑排序算法的思想,保证在执行某个交易时,其所有前序交易都已经执行完毕。The transaction task scheduling sub-module is used to schedule and execute transactions according to the directed acyclic graph constructed for intra-block transactions. If there is a relationship between the two transactions, let them be executed serially; if there is no relationship between the two transactions, let them execute in parallel. This process can use the idea of the topological sorting algorithm of the graph to ensure that when a certain transaction is executed , all previous transactions have been executed.

在对绿证交易进行处理以实现交易的调度执行时,基于上述两个子模块中的相应子模块,读取区块内的交易信息,识别交易的依赖,进而基于交易的依赖识别出交易间的关联关系,将交易构造成交易依赖图(DAG图),最终通过图输出交易执行序列,并行或者串行地进行交易的调度,其基本工作流程如图4所示,以下进一步对其工作流程详细说明。When processing the green certificate transaction to realize the scheduling execution of the transaction, based on the corresponding sub-modules in the above two sub-modules, read the transaction information in the block, identify the dependencies of the transactions, and then identify the differences between transactions based on the dependencies of the transactions Association relationship, the transaction is constructed into a transaction dependency graph (DAG graph), and finally the transaction execution sequence is output through the graph, and the transaction is scheduled in parallel or serially. The basic workflow is shown in Figure 4, and the workflow is further detailed below illustrate.

结合参见图4,该示例中,对绿证交易进行处理以实现交易调度执行的一个示例性详细工作流程如下:Referring to Figure 4, in this example, an exemplary detailed workflow for processing green card transactions to implement transaction scheduling is as follows:

21)初始化任务队列以及与CPU核数相等的工作线程,工作线程不断地从任务队列中获取交易进行处理,任务队列中的交易与区块内的交易一一对应,且结构信息相同。初始状态下任务队列为空,工作线程均处于阻塞状态。21) Initialize the task queue and the worker thread equal to the number of CPU cores. The worker thread continuously obtains transactions from the task queue for processing. The transactions in the task queue correspond to the transactions in the block one by one, and the structural information is the same. In the initial state, the task queue is empty, and the worker threads are all blocked.

22)识别区块内交易之间的依赖,将区块内的交易构造成DAG。22) Identify the dependencies between transactions in the block, and construct the transactions in the block into a DAG.

如图5(a)所示的示例,首先从区块中取出交易,每笔交易代表一次绿证的转移过程,初始状态下将每笔交易视为二维平面内的一个节点。In the example shown in Figure 5(a), transactions are first taken out of the block, and each transaction represents a transfer process of a green certificate. In the initial state, each transaction is regarded as a node in a two-dimensional plane.

继续参见图5(b)-图5(g)提供的DAG构建过程示意图,区块内的交易具有一定的顺序,根据交易顺序依次读取每笔交易,提取交易的依赖项,即绿证的购方与售方。如果两笔交易具有相同的依赖项或者依赖项存在交集,则将这两笔交易所对应的节点用一条有向边连接,以图5(d)为例,交易1和交易3都对用户A进行了修改,即交易1和交易3的依赖项存在交集,两笔交易相互关联,则添加一条从节点1指向节点3的有向边。再以图5(e)为例,交易4修改了用户B与用户C,用户B之前已经被交易1修改过,用户C之前已经被交易3修改过,因此在节点1与节点4之间添加一条由节点1指向节点4的有向边,在节点3和节点4之间添加一条由节点3指向节点4的有向边。其中节点x指向节点y的有向边表示节点y所代表的交易必须等待节点x所代表的交易执行完毕后才能执行,即有向边代表相连接的两个节点的执行顺序。Continue to refer to the schematic diagram of the DAG construction process provided in Figure 5(b)-Figure 5(g). The transactions in the block have a certain order, and each transaction is read in turn according to the transaction order, and the dependencies of the transaction are extracted, that is, the green certificate. buyer and seller. If two transactions have the same dependencies or there is an intersection of dependencies, connect the nodes corresponding to the two transactions with a directed edge. Taking Figure 5(d) as an example, transaction 1 and transaction 3 are both for user A A modification has been made, that is, there is an intersection between the dependencies of transaction 1 and transaction 3, and the two transactions are related to each other, and a directed edge from node 1 to node 3 is added. Taking Figure 5(e) again as an example, transaction 4 modifies user B and user C, user B has been modified by transaction 1 before, and user C has been modified by transaction 3 before, so add between node 1 and node 4 A directed edge from node 1 to node 4, and a directed edge from node 3 to node 4 is added between node 3 and node 4. The directed edge from node x to node y means that the transaction represented by node y must wait for the transaction represented by node x to be executed before it can be executed, that is, the directed edge represents the execution order of the two connected nodes.

反复此过程,当区块内的交易读取完毕,步骤2)中平面内的节点也就通过依赖关系形成了一张有向无环图。This process is repeated, and when the transactions in the block are read, the nodes in the plane in step 2) also form a directed acyclic graph through dependencies.

23)根据生成的有向无环图输出交易执行序列,以根据交易执行序列对交易进行串行/并行的调度执行。23) Output the transaction execution sequence according to the generated directed acyclic graph, so as to perform serial/parallel scheduling execution on the transactions according to the transaction execution sequence.

具体的,如图6(a)-图6(d)所示,在根据生成的有向无环图输出交易执行序列时,首先根据有向无环图计算有向无环图中当前未实现调度执行的各顶点/节点的入度,然后不断地输出入度为0的顶点/节点,同一时序节点输出的同批次的这些顶点/节点代表的交易不依赖于其他交易,可以直接并行执行,相应将其丢给任务队列,并唤醒工作线程按并行方式进行交易处理,交易执行完毕后,消除此节点指向后续节点的有向边,并将后续节点的入度减1,产生新一轮入度为0的节点,反复此过程,直到交易执行完毕。Specifically, as shown in Figure 6(a)-Figure 6(d), when outputting the transaction execution sequence according to the generated DAG, first calculate the current unimplemented value in the DAG based on the DAG Scheduling the in-degree of each vertex/node for execution, and then continuously outputting vertices/nodes with an in-degree of 0. The transactions represented by these vertices/nodes in the same batch output by the same timing node do not depend on other transactions and can be directly executed in parallel , Throw it to the task queue accordingly, and wake up the worker thread to process the transaction in parallel. After the transaction is executed, eliminate the directed edge of this node pointing to the subsequent node, and reduce the in-degree of the subsequent node by 1 to generate a new round Nodes with an in-degree of 0 repeat this process until the transaction is executed.

传统区块链采用串行执行的模式来处理区块内的交易,串行执行意味着只有一个交易处理线程在工作,并按顺序处理各个交易。一个交易处理线程最多使用区块链节点所在主机CPU的一个核心,而现代计算机CPU一般为多核,此时区块链节点所在主机的CPU资源没有被充分利用,此外,串行交易处理的效率也很低。如果想通过提升主机配置来提升区块链节点的交易处理能力是受到极大限制的,至少增加CPU核心数不能提升交易处理能力。The traditional blockchain uses a serial execution mode to process transactions within a block. Serial execution means that only one transaction processing thread is working, and each transaction is processed in sequence. A transaction processing thread uses at most one core of the CPU of the host where the blockchain node is located, and modern computer CPUs are generally multi-core. At this time, the CPU resources of the host where the blockchain node is located are not fully utilized. In addition, the efficiency of serial transaction processing is also very high. Low. If you want to improve the transaction processing capability of blockchain nodes by improving the host configuration, it is extremely limited, at least increasing the number of CPU cores cannot improve transaction processing capabilities.

申请人研究发现,传统区块链采用串行执行的原因是为了解决多节点下并发执行交易可能带来的不确定性。例如转账场景,用户A同时发起了两笔转账交易,交易1:用户A给用户B转账20;交易2:用户A给用户C转账30。假如用户A的余额只有30,那么这意味着这两笔转账交易只有一笔能成功,另外一笔会因为用户A余额不足而失败。在区块链多节点的情况下,并发执行可能产生交易1、交易2与交易2、交易1这两种执行顺序,这意味着在某些节点上,交易1成功了,而另外一些节点上,交易2成功了,这会造成各节点的数据不一致。而另外一种情况,用户A、用户B同时发起两笔转账交易,交易1:用户A给用户C转账20,交易2:用户B给用户D转账30,这种情况下,无论按照交易1、交易2还是交易2、交易1这样的顺序执行,都会产生一致的结果。基于上述两种情况,可以得知,在交易之间有关联的情况下,需要按照顺序串行执行,避免并发执行带来执行结果的不确定性;而在交易之间无关联的情况下,可以并发执行,此时串行执行与并发执行总能够产生相同的执行结果。The applicant's research found that the reason why the traditional blockchain adopts serial execution is to solve the uncertainty that may be caused by concurrent execution of transactions under multiple nodes. For example, in the transfer scenario, user A initiates two transfer transactions at the same time, transaction 1: user A transfers 20 to user B; transaction 2: user A transfers 30 to user C. If the balance of user A is only 30, then this means that only one of the two transfer transactions will succeed, and the other will fail due to insufficient balance of user A. In the case of multiple nodes in the blockchain, concurrent execution may generate transaction 1, transaction 2 and transaction 2, transaction 1, which means that on some nodes, transaction 1 succeeds, while on other nodes , transaction 2 is successful, which will cause data inconsistency of each node. In another case, user A and user B initiate two transfer transactions at the same time, transaction 1: user A transfers 20 to user C, transaction 2: user B transfers 30 to user D, in this case, no matter according to transaction 1, Whether transaction 2 or transaction 2, transaction 1 is executed in this order will produce consistent results. Based on the above two situations, it can be known that when transactions are related, they need to be executed serially in order to avoid the uncertainty of execution results caused by concurrent execution; and when there is no connection between transactions, It can be executed concurrently. At this time, serial execution and concurrent execution can always produce the same execution result.

基于上述研究,本申请通过识别交易间的关联关系,将交易组织成一张有向无环图,如果两笔交易有关联,则在这两笔交易之间添加一条有向边,最终通过有向无环图输出交易执行的顺序,让有关联的交易串行执行,消除关联交易并发执行带来的不确定性,让无关联的交易并发执行,可充分利用现代计算机CPU的多核处理能力,并将这样的思想应用于绿证交易等对交易执行效率有要求且交易间关联性强的交易场景,可有效适应绿证交易等交易场景对区块链的性能需求。Based on the above research, this application organizes the transactions into a directed acyclic graph by identifying the relationship between transactions. If two transactions are related, a directed edge is added between the two transactions, and finally through the directed The acyclic graph outputs the order of transaction execution, allowing associated transactions to execute serially, eliminating the uncertainty caused by concurrent execution of associated transactions, allowing unrelated transactions to execute concurrently, which can make full use of the multi-core processing capabilities of modern computer CPUs, and Applying this idea to transaction scenarios such as green certificate transactions that require transaction execution efficiency and strong correlation between transactions can effectively adapt to the performance requirements of blockchain in transaction scenarios such as green certificate transactions.

对应于上述的基于区块链的交易实现方法,本申请实施例还公开一种基于区块链的交易实现装置,该装置的组成结构如图7所示,包括:Corresponding to the above blockchain-based transaction implementation method, the embodiment of the present application also discloses a blockchain-based transaction implementation device. The composition and structure of the device is shown in Figure 7, including:

交易获取单元701,用于获取区块链节点上区块内各个交易的交易信息;A transaction acquisition unit 701, configured to acquire the transaction information of each transaction in the block on the blockchain node;

交易依赖图构造单元702,用于根据所述各个交易的交易信息,将所述各个交易构造成包括各个交易间的依赖关系的交易依赖图;所述交易依赖图包括多个顶点及顶点之间的有向边,所述交易依赖图中的顶点表示对应的交易,顶点间的有向边表示交易之间的依赖关系;A transaction dependency graph constructing unit 702, configured to construct each transaction into a transaction dependency graph including dependencies among transactions according to the transaction information of each transaction; the transaction dependency graph includes a plurality of vertices and between vertices The directed edges in the transaction dependency graph represent the corresponding transactions, and the directed edges between the vertices represent the dependencies between transactions;

交易调度单元703,用于根据所述交易依赖图,确定并输出所述各个交易的交易执行序列,以及按照输出的交易执行序列所表征的交易间的执行次序,对所述各个交易进行调度执行。The transaction scheduling unit 703 is configured to determine and output the transaction execution sequence of each transaction according to the transaction dependency graph, and schedule and execute the transactions according to the execution sequence between transactions represented by the output transaction execution sequence .

在一实施方式中,交易依赖图构造单元702,具体用于:In one embodiment, the transaction dependency graph construction unit 702 is specifically used for:

根据所述各个交易的交易信息,对所述各个交易中任意两个交易之间进行交易间的依赖识别;According to the transaction information of each transaction, identify the dependence between transactions between any two transactions in the various transactions;

根据所述各个交易间的依赖关系识别结果,构建所述各个交易对应的交易依赖图;Constructing a transaction dependency graph corresponding to each transaction according to the identification result of the dependency relationship among the transactions;

其中,所述交易依赖图中第一顶点指向第二顶点的有向边,表示所述第二顶点所代表的交易对所述第一顶点所代表的交易存在依赖。Wherein, the directed edge from the first vertex in the transaction dependency graph to the second vertex indicates that the transaction represented by the second vertex depends on the transaction represented by the first vertex.

在一实施方式中,交易调度单元703,具体用于:In one embodiment, the transaction scheduling unit 703 is specifically used to:

根据所述交易依赖图,确定并输出能用于指征将有依赖关系的交易串行执行,无依赖关系的交易并行执行的交易执行序列;According to the transaction dependency graph, determine and output a transaction execution sequence that can be used to indicate that transactions with dependencies will be executed serially and transactions without dependencies will be executed in parallel;

根据所述交易执行序列,对所述各个交易中存在依赖关系的交易按串行方式调度执行,无依赖关系的交易按并行方式调度执行。According to the transaction execution sequence, among the transactions, transactions with dependencies are scheduled for execution in a serial manner, and transactions without dependencies are scheduled for execution in a parallel manner.

在一实施方式中,交易调度单元703,具体用于:In one embodiment, the transaction scheduling unit 703 is specifically used to:

确定所述交易依赖图中未实现交易调度的各个顶点的入度;determining the in-degree of each vertex in the transaction dependency graph that does not implement transaction scheduling;

输出所确定的当前入度满足预设入度条件的各个目标顶点;output each target vertex whose determined current in-degree satisfies the preset in-degree condition;

将当前入度满足所述预设入度条件的各个目标顶点所代表交易交由多个工作线程并行执行;Hand over the transactions represented by each target vertex whose current in-degree satisfies the preset in-degree condition to multiple worker threads for parallel execution;

在对当前的各个目标顶点所代表交易执行完毕后,消除当前各个目标顶点指向后续节点的有向边,将当前各个目标顶点指向的相应后续顶点的入度减1,并返回至所述确定所述交易依赖图中未实现交易调度的各个顶点的入度的步骤,以循环执行以上处理过程,通过循环执行以上处理过程,使得不同轮的处理过程输出的目标顶点中存在依赖关系的目标顶点串行执行,直至所述交易依赖图中各个顶点所代表交易执行完毕;After the transaction represented by each current target vertex is executed, eliminate the directed edge of each current target vertex pointing to the subsequent node, reduce the in-degree of the corresponding subsequent vertex pointed to by each current target vertex by 1, and return to the determination The step of the in-degree of each vertex in the transaction dependency graph that has not realized the transaction scheduling is used to execute the above processing process cyclically. Through the cyclic execution of the above processing process, there are target vertex strings with dependencies among the target vertices output by different rounds of processing processes. Execute until the transaction represented by each vertex in the transaction dependency graph is executed;

其中,所述交易执行序列包括:循环执行以上处理的过程中,不同轮的处理过程依次输出的入度满足所述预设入度条件的各个目标顶点分别代表的交易。Wherein, the transaction execution sequence includes: during the cyclical execution of the above processing, the transactions respectively represented by the target vertices whose in-degrees output by different rounds of processing sequentially meet the preset in-degree conditions.

在一实施方式中,所述交易为绿证交易;In one embodiment, the transaction is a green card transaction;

所述区块链对应的区块链网络为:通过将绿证发行和交易过程中的各参与方作为区块链主体所共同构建的绿证交易区块链网络;The blockchain network corresponding to the blockchain is: the green certificate transaction blockchain network jointly constructed by taking the participants in the green certificate issuance and transaction process as the main body of the blockchain;

上述装置还包括:区块接收单元,用于在获取区块链节点上区块内各个交易的交易信息之前,接收区块链网络中的预设节点广播的包括各个绿证交易的交易信息的区块。The above device also includes: a block receiving unit, used to receive the transaction information broadcast by the preset node in the blockchain network including the transaction information of each green card transaction before obtaining the transaction information of each transaction in the block on the blockchain node blocks.

在一实施方式中,所述区块链节点上嵌入有用于实现绿证交易相应业务流程的智能合约;In one embodiment, the blockchain node is embedded with a smart contract for realizing the corresponding business process of the green certificate transaction;

上述装置还包括合约调用单元,用于在绿证交易执行过程中调用对应的智能合约,将绿证交易所涉及的业务数据存入区块链节点上。The above device also includes a contract calling unit, which is used to call the corresponding smart contract during the execution of the green certificate transaction, and store the business data involved in the green certificate transaction into the block chain node.

在一实施方式中,智能合约包括用户合约和绿证合约;In one embodiment, the smart contract includes a user contract and a green card contract;

其中,用户合约用于完成用户身份的注册上链及用户身份信息查看、校验,绿证合约用于完成绿证的核发与绿证的转移。Among them, the user contract is used to complete the registration of the user's identity on the chain and the viewing and verification of the user's identity information, and the green certificate contract is used to complete the issuance and transfer of the green certificate.

对于本申请实施例公开的基于区块链的交易实现装置而言,由于其与上文方法实施例公开的基于区块链的交易实现方法相对应,所以描述的比较简单,相关相似之处请参见上文方法实施例的说明即可,此处不再详述。For the block chain-based transaction implementation device disclosed in the embodiment of this application, since it corresponds to the block chain-based transaction implementation method disclosed in the method embodiment above, the description is relatively simple. For related similarities, please refer to Just refer to the descriptions of the method embodiments above, and details will not be described here.

另外,本申请还提供一种计算机可读介质,其上存储有计算机程序,所述计算机程序包含用于执行如上文任一方法实施例公开的基于区块链的交易实现方法的程序代码。In addition, the present application also provides a computer-readable medium on which a computer program is stored, and the computer program includes a program code for executing the method for realizing a transaction based on blockchain as disclosed in any method embodiment above.

在本申请的上下文中,计算机可读介质(机器可读介质)可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of this application, a computer-readable medium (machine-readable medium) may be a tangible medium that may contain or be stored for use by or in conjunction with an instruction execution system, apparatus, or device program of. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.

需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

上述计算机可读介质可以是电子设备中所包含的;也可以是单独存在,而未装配入电子设备中。The above-mentioned computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

综上所述,本申请实施例公开的基于区块链的交易实现方法、装置和计算机可读介质,与现有技术相比,至少具备以下技术优势:To sum up, compared with the prior art, the blockchain-based transaction realization method, device and computer-readable medium disclosed in the embodiment of the present application have at least the following technical advantages:

a)将绿证交易流程与区块链相结合,并提出一套绿证场景下相关智能合约的实现方式,利用区块链的优势特性解决了传统中心化绿证交易流程复杂、用户信息易篡改易泄露、绿证的核发耗时耗力且凭证记录不易追溯等问题。a) Combine the green certificate transaction process with the blockchain, and propose a set of implementation methods for relevant smart contracts in the green certificate scenario, and use the advantages of the blockchain to solve the complex transaction process of the traditional centralized green certificate and easy access to user information. Tampering is easy to leak, the issuance of green certificates is time-consuming and labor-intensive, and the voucher records are not easy to trace.

b)将区块链处理绿证交易的流程与有向无环图相结合,利用有向无环图来描述绿证交易间的关联关系,结合有向无环图以及拓扑排序的思想输出交易执行序列,并行或者串行地调度执行交易,有效提高了区块链的系统吞吐量,且能够适应绿证交易场景下对区块链的性能需求。b) Combining the process of processing green card transactions in blockchain with directed acyclic graph, using directed acyclic graph to describe the relationship between green card transactions, and combining directed acyclic graph and topological sorting to output transactions Execution sequence, parallel or serial scheduling and execution of transactions, effectively improves the system throughput of the blockchain, and can adapt to the performance requirements of the blockchain in the green certificate transaction scenario.

需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. For the same and similar parts in each embodiment, refer to each other, that is, Can.

为了描述的方便,描述以上系统或装置时以功能分为各种模块或单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, when describing the above system or device, functions are divided into various modules or units and described separately. Of course, when implementing the present application, the functions of each unit can be implemented in one or more pieces of software and/or hardware.

通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例或者实施例的某些部分所述的方法。It can be known from the above description of the implementation manners that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general-purpose hardware platform. Based on this understanding, the essence of the technical solution of this application or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in storage media, such as ROM/RAM, disk , CD, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments of the present application.

最后,还需要说明的是,在本文中,诸如第一、第二、第三和第四等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should also be noted that in this text, relational terms such as first, second, third, and fourth, etc. are only used to distinguish one entity or operation from another entity or operation, and not Any such actual relationship or order between these entities or operations is necessarily required or implied. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above description is only the preferred embodiment of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present application, some improvements and modifications can also be made. These improvements and modifications are also It should be regarded as the protection scope of this application.

Claims (10)

1.一种基于区块链的交易实现方法,其特征在于,包括:1. A blockchain-based transaction implementation method, characterized in that, comprising: 获取区块链节点上区块内各个交易的交易信息;Obtain the transaction information of each transaction in the block on the blockchain node; 根据所述各个交易的交易信息,将所述各个交易构造成包括各个交易间的依赖关系的交易依赖图;所述交易依赖图为有向无环图,所述交易依赖图包括多个顶点及顶点之间的有向边,所述交易依赖图中的顶点表示对应的交易,顶点间的有向边表示交易之间的依赖关系;According to the transaction information of each transaction, each transaction is constructed into a transaction dependency graph including dependencies among transactions; the transaction dependency graph is a directed acyclic graph, and the transaction dependency graph includes multiple vertices and Directed edges between vertices, vertices in the transaction dependency graph represent corresponding transactions, and directed edges between vertices represent dependencies between transactions; 根据所述交易依赖图,确定并输出所述各个交易的交易执行序列;Determine and output the transaction execution sequence of each transaction according to the transaction dependency graph; 按照输出的交易执行序列所表征的交易间的执行次序,对所述各个交易进行调度执行。According to the execution sequence between transactions represented by the output transaction execution sequence, the transactions are scheduled for execution. 2.根据权利要求1所述的方法,其特征在于,根据所述各个交易的交易信息,将所述各个交易构造成包括各个交易间的依赖关系的交易依赖图,包括:2. The method according to claim 1, characterized in that, according to the transaction information of each transaction, each transaction is constructed into a transaction dependency graph including dependencies among transactions, including: 根据所述各个交易的交易信息,对所述各个交易中任意两个交易之间进行交易间的依赖识别;According to the transaction information of each transaction, identify the dependence between transactions between any two transactions in the various transactions; 根据所述各个交易间的依赖关系识别结果,构建所述各个交易对应的交易依赖图;Constructing a transaction dependency graph corresponding to each transaction according to the identification result of the dependency relationship among the transactions; 其中,所述交易依赖图中第一顶点指向第二顶点的有向边,表示所述第二顶点所代表的交易对所述第一顶点所代表的交易存在依赖。Wherein, the directed edge from the first vertex in the transaction dependency graph to the second vertex indicates that the transaction represented by the second vertex depends on the transaction represented by the first vertex. 3.根据权利要求1所述的方法,其特征在于,所述根据所述交易依赖图,确定并输出所述各个交易的交易执行序列,按照输出的交易执行序列所表征的交易间的执行次序,对所述各个交易进行调度执行,包括:3. The method according to claim 1, characterized in that, according to the transaction dependency graph, the transaction execution sequence of each transaction is determined and output, according to the execution order between transactions represented by the output transaction execution sequence , to schedule and execute each transaction, including: 根据所述交易依赖图,确定并输出能用于指征将有依赖关系的交易串行执行序列,及无依赖关系的交易并行执行的交易执行序列;According to the transaction dependency graph, determine and output the transaction execution sequence that can be used to indicate the serial execution sequence of transactions with dependencies and the parallel execution of transactions without dependencies; 根据所述交易执行序列,对所述各个交易中存在依赖关系的交易按串行方式调度执行,无依赖关系的交易按并行方式调度执行。According to the transaction execution sequence, among the transactions, transactions with dependencies are scheduled for execution in a serial manner, and transactions without dependencies are scheduled for execution in a parallel manner. 4.根据权利要求1所述的方法,其特征在于,所述根据所述交易依赖图,确定并输出所述各个交易的交易执行序列,按照输出的交易执行序列,对所述各个交易进行调度执行,包括:4. The method according to claim 1, wherein the transaction execution sequence of each transaction is determined and output according to the transaction dependency graph, and the transactions are scheduled according to the output transaction execution sequence Execution, including: 确定所述交易依赖图中未实现交易调度的各个顶点的入度;determining the in-degree of each vertex in the transaction dependency graph that does not implement transaction scheduling; 输出所确定的当前入度满足预设入度条件的各个目标顶点;output each target vertex whose determined current in-degree satisfies the preset in-degree condition; 将当前入度满足所述预设入度条件的各个目标顶点所代表交易交由多个工作线程并行执行;Hand over the transactions represented by each target vertex whose current in-degree satisfies the preset in-degree condition to multiple worker threads for parallel execution; 在对当前的各个目标顶点所代表交易执行完毕后,消除当前各个目标顶点指向后续节点的有向边,将当前各个目标顶点指向的相应后续顶点的入度减1,并返回至所述确定所述交易依赖图中未实现交易调度的各个顶点的入度的步骤,以循环执行以上处理过程,通过循环执行以上处理过程,使得不同轮的处理过程输出的目标顶点中存在依赖关系的目标顶点串行执行,直至所述交易依赖图中各个顶点所代表交易执行完毕;After the transaction represented by each current target vertex is executed, eliminate the directed edge of each current target vertex pointing to the subsequent node, reduce the in-degree of the corresponding subsequent vertex pointed to by each current target vertex by 1, and return to the determination The step of the in-degree of each vertex in the transaction dependency graph that has not realized the transaction scheduling is used to execute the above processing process cyclically. Through the cyclic execution of the above processing process, there are target vertex strings with dependencies among the target vertices output by different rounds of processing processes. Execute until the transaction represented by each vertex in the transaction dependency graph is executed; 其中,所述交易执行序列包括:循环执行以上处理的过程中,不同轮的处理过程依次输出的入度满足所述预设入度条件的各个目标顶点分别代表的交易。Wherein, the transaction execution sequence includes: during the cyclical execution of the above processing, the transactions respectively represented by the target vertices whose in-degrees output by different rounds of processing sequentially meet the preset in-degree conditions. 5.根据权利要求1所述的方法,其特征在于,所述交易为绿证交易;5. The method according to claim 1, wherein the transaction is a green card transaction; 所述区块链对应的区块链网络为:通过将绿证发行和交易过程中的各参与方作为区块链主体所共同构建的绿证交易区块链网络;所述方法在获取区块链节点上区块内各个交易的交易信息之前,还包括:The block chain network corresponding to the block chain is: the green card transaction block chain network jointly constructed by taking the participants in the green card issuance and transaction process as the main body of the block chain; Before the transaction information of each transaction in the block on the chain node, it also includes: 接收区块链网络中的预设节点广播的包括各个绿证交易的交易信息的区块。Receive the block including the transaction information of each green card transaction broadcast by the preset node in the blockchain network. 6.根据权利要求5所述的方法,其特征在于,所述区块链节点上嵌入有用于实现绿证交易相应业务流程的智能合约;6. The method according to claim 5, characterized in that, the blockchain node is embedded with a smart contract for realizing the corresponding business process of the green certificate transaction; 所述方法还包括:The method also includes: 在绿证交易执行过程中调用对应的智能合约,将绿证交易所涉及的业务数据存入区块链节点上。During the execution of the green certificate transaction, the corresponding smart contract is called, and the business data involved in the green certificate transaction is stored on the blockchain node. 7.根据权利要求6所述的方法,其特征在于,所述智能合约包括用户合约和绿证合约;7. The method according to claim 6, wherein the smart contract includes a user contract and a green card contract; 其中,所述用户合约用于完成用户身份的注册上链及用户身份信息查看、校验,所述绿证合约用于完成绿证的核发与绿证的转移。Among them, the user contract is used to complete the registration of the user's identity on the chain and the user's identity information viewing and verification, and the green certificate contract is used to complete the issuance and transfer of the green certificate. 8.一种基于区块链的交易实现装置,其特征在于,包括:8. A blockchain-based transaction implementation device, characterized in that it comprises: 交易获取单元,用于获取区块链节点上区块内各个交易的交易信息;A transaction acquisition unit, configured to acquire the transaction information of each transaction in the block on the blockchain node; 交易依赖图构造单元,用于根据所述各个交易的交易信息,将所述各个交易构造成包括各个交易间的依赖关系的交易依赖图;所述交易依赖图包括多个顶点及顶点之间的有向边,所述交易依赖图中的顶点表示对应的交易,顶点间的有向边表示交易之间的依赖关系;A transaction dependency graph construction unit, configured to construct each transaction into a transaction dependency graph including dependencies among transactions according to the transaction information of each transaction; the transaction dependency graph includes a plurality of vertices and links between vertices Directed edges, vertices in the transaction dependency graph represent corresponding transactions, and directed edges between vertices represent dependencies between transactions; 交易调度单元,用于根据所述交易依赖图,确定并输出所述各个交易的交易执行序列,以及按照输出的交易执行序列所表征的交易间的执行次序,对所述各个交易进行调度执行。The transaction scheduling unit is configured to determine and output the transaction execution sequence of each transaction according to the transaction dependency graph, and schedule and execute the transactions according to the execution sequence between transactions represented by the output transaction execution sequence. 9.根据权利要求8所述的装置,其特征在于,所述交易依赖图构造单元,具体用于:9. The device according to claim 8, wherein the transaction dependency graph construction unit is specifically used for: 根据所述各个交易的交易信息,对所述各个交易中任意两个交易之间进行交易间的依赖识别;According to the transaction information of each transaction, identify the dependence between transactions between any two transactions in the various transactions; 根据所述各个交易间的依赖关系识别结果,构建所述各个交易对应的交易依赖图;Constructing a transaction dependency graph corresponding to each transaction according to the identification result of the dependency relationship among the transactions; 其中,所述交易依赖图中第一顶点指向第二顶点的有向边,表示所述第二顶点所代表的交易对所述第一顶点所代表的交易存在依赖。Wherein, the directed edge from the first vertex in the transaction dependency graph to the second vertex indicates that the transaction represented by the second vertex depends on the transaction represented by the first vertex. 10.一种计算机可读介质,其特征在于,其上存储有计算机程序,所述计算机程序包含用于执行如权利要求1-7任一项所述的方法的程序代码。10. A computer-readable medium, characterized in that a computer program is stored thereon, the computer program comprising program code for executing the method according to any one of claims 1-7.
CN202211648493.0A 2022-12-21 2022-12-21 Block chain-based transaction implementation method, device and computer readable medium Pending CN116071160A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211648493.0A CN116071160A (en) 2022-12-21 2022-12-21 Block chain-based transaction implementation method, device and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211648493.0A CN116071160A (en) 2022-12-21 2022-12-21 Block chain-based transaction implementation method, device and computer readable medium

Publications (1)

Publication Number Publication Date
CN116071160A true CN116071160A (en) 2023-05-05

Family

ID=86174087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211648493.0A Pending CN116071160A (en) 2022-12-21 2022-12-21 Block chain-based transaction implementation method, device and computer readable medium

Country Status (1)

Country Link
CN (1) CN116071160A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116993039A (en) * 2023-09-25 2023-11-03 浙江华云信息科技有限公司 Time sequence feature-based green electricity and power data processing method and system for both sender and sender
CN119228377A (en) * 2024-12-03 2024-12-31 杭州高新区(滨江)区块链与数据安全研究院 Parallel execution method, device, electronic device and program product for blockchain transactions

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116993039A (en) * 2023-09-25 2023-11-03 浙江华云信息科技有限公司 Time sequence feature-based green electricity and power data processing method and system for both sender and sender
CN116993039B (en) * 2023-09-25 2023-12-26 浙江华云信息科技有限公司 Time sequence feature-based green electricity and power data processing method and system for both sender and sender
CN119228377A (en) * 2024-12-03 2024-12-31 杭州高新区(滨江)区块链与数据安全研究院 Parallel execution method, device, electronic device and program product for blockchain transactions

Similar Documents

Publication Publication Date Title
WO2019023286A1 (en) Blockchain-based systems, methods, and apparatus for securing access to information stores
Ahmadisheykhsarmast et al. Decentralized tendering of construction projects using blockchain-based smart contracts and storage systems
CN110490282A (en) Source tracing method, device of tracing to the source, traceability system and storage medium
CN116071160A (en) Block chain-based transaction implementation method, device and computer readable medium
CN110288481A (en) A method and device for asset transfer based on blockchain system
Gajić et al. A distributed ledger-based automated marketplace for the decentralized trading of renewable energy in smart grids
Jnr et al. A framework for standardization of distributed ledger technologies for interoperable data integration and alignment in sustainable smart cities
Nardini et al. A blockchain-based decentralized electronic marketplace for computing resources
CN110727735B (en) Method, device and equipment for cooperatively completing task event based on block chain technology
CN108073699B (en) Big data aggregation analysis method and device
Gupta et al. Determining delay accountability, compensation, and price variation using computable smart contracts in construction
Osterland et al. On the implementation of business process logic in DLT nodes
WO2021073096A1 (en) Resource data transfer method and device, and blockchain system
Duan et al. Form specification of smart contract for intellectual property transaction based on blockchain
CN115983853A (en) Blockchain-based client-side green power application service method, system, and electronic equipment
CN112257080B (en) Distributed crowdsourcing system, method, storage medium and terminal based on block chain
CN114529376A (en) Energy exchange data processing method and device, computer equipment and storage medium
CN114491662A (en) Block chain-based data asset auditing method, system and equipment
Gupta et al. An Intrinsic Review on Securitization using Blockchain
CN114398451A (en) Reliable evidence storing method, device, equipment and medium for electric power spot market data
Antal et al. Distributed Ledger Technology Review and Decentralized Applications Development Guidelines. Future Internet 2021, 13, 62
CN112819564B (en) Method and device for determining block accounting right, block chain network and related equipment
Moltu Utilizing the IOTA Smart Contract Platform in a Local Flexibility Market
Gajić et al. A Distributed Ledger-Based Automated Marketplace for the Decentralized Trading of Renewable Energy in Smart Grids. Energies 2022, 15, 2121
Aung et al. NFT-Based Certificates and Proof of Delivery in Education Sector with Ethereum Blockchain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination