Transaction platform based on block chain

文档序号:154237 发布日期:2021-10-26 浏览:24次 中文

阅读说明:本技术 一种基于区块链的交易平台 (Transaction platform based on block chain ) 是由 郭永安 陈一杰 于 2021-09-17 设计创作,主要内容包括:本发明公开了一种基于区块链的交易平台,包括基础能力层、区块链层、业务层和应用层,所述基础能力层包括碳排放监控、数据传输、属性基加密基础设施和数据库单元,用于为交易平台的各项功能业务提供基础的支撑;所述区块链层包括接口子层、互联子层和合约子层,用于搭建区块链服务相关的系统;所述业务层包括安全管理、交易管理、溯源管理和数据管理单元,用于实现具体的业务流程;所述应用层包括碳资源持有方、碳指标出售方、碳指标收购方和政府监管方单元,为交易平台中的用户提供相应的应用。本发明通过各层之间进行数据交互,实现碳交易数据的不可篡改、隐私保护与溯源追踪,解决碳交易过程中管理成本高、实施难度大、交易效率低的问题。(The invention discloses a transaction platform based on a block chain, which comprises a basic capability layer, a block chain layer, a service layer and an application layer, wherein the basic capability layer comprises a carbon emission monitoring, data transmission, an attribute-based encryption infrastructure and a database unit and is used for providing basic support for each functional service of the transaction platform; the block chain layer comprises an interface sublayer, an interconnection sublayer and a contract sublayer and is used for building a system related to block chain service; the business layer comprises a safety management unit, a transaction management unit, a source tracing management unit and a data management unit and is used for realizing a specific business process; the application layer comprises a carbon resource holder, a carbon index seller, a carbon index acquirer and a government supervisor unit, and provides corresponding application for users in the transaction platform. According to the invention, through data interaction among the layers, the non-falsification, privacy protection and traceability tracking of carbon transaction data are realized, and the problems of high management cost, high implementation difficulty and low transaction efficiency in the carbon transaction process are solved.)

1. A transaction platform based on a block chain comprises a basic capability layer, a block chain layer, a service layer and an application layer,

the basic capability layer comprises a carbon emission monitoring, data transmission, attribute-based encryption infrastructure and a database unit, and is used for providing collection, encryption and transmission before data chaining for the block chain layer and providing basic support for each function service of the transaction platform;

the block chain layer comprises an interface sublayer, an interconnection sublayer and a contract sublayer, secondary business development is provided for the business layer through an open software development tool package, a system related to block chain service is built, the contract sublayer provides basic guarantee for an interconnection sublayer operation consensus mechanism through calling of an intelligent contract, the interface sublayer integrates lower layer data and business logic, and upwards provides a software development tool package and a corresponding business interface;

the service layer comprises a safety management unit, a transaction management unit, a tracing management unit and a data management unit, and is used for carrying out secondary packaging on a service interface, providing user-friendly application for the application layer and realizing a specific service flow;

the application layer comprises a carbon resource holder, a carbon index seller, a carbon index acquirer and a government supervisor unit, and provides corresponding application for users in the transaction platform.

2. The blockchain-based transaction platform of claim 1, wherein the contract sub-layers comprise an EVM, a transaction execution engine and a distributed storage, the EVM is used as a lightweight virtual machine to construct a running environment of the intelligent contract, the transaction execution engine is used for driving the running of the intelligent contract, and the distributed storage holds the precompiled intelligent contract and a possibly invoked contract library.

3. The blockchain-based transaction platform of claim 1, wherein the interconnection sub-layer includes a consensus mechanism, P2P, and block synchronization, the consensus mechanism is a core of a blockchain network for implementing trusted data transmission, network nodes obey a same set of consensus mechanism, and implement decentralized transmission of data in each node of the network through the P2P, and the consensus mechanism implements data synchronization of all blocks.

4. The blockchain-based transaction platform of claim 1, wherein the interface sub-layer includes a PRC, an SDK and an interactive console, the PRC is an interface for upper layer services to interact with the blockchain network, and the blockchain functions and interfaces are encapsulated as the SDK to implement service development, and the interactive console provides a graphical blockchain data query mechanism.

5. The block chain-based transaction platform according to claim 1, wherein the interconnection sub-layer employs a PBFT consensus mechanism, and realizes network-wide consensus by broadcasting and verifying data between consensus nodes.

6. The blockchain-based carbon trading platform of claim 1, wherein: the attribute-based encryption infrastructure includes a set of improved attribute-based encryption algorithms and an authorization server for attribute-based encryption of uplink data.

7. The blockchain-based transaction platform of claim 1, wherein: the traceability management comprises an improved data traceability description model based on the national standard GB/T34945 and 2017, and the model is used as the standard for the chain storage and circulation of transaction data.

8. The blockchain-based transaction platform of claim 1, wherein: the government supervising party is used as a light node to be added into the blockchain system and has the highest authority of the trading platform, other participating parties are used as consensus nodes to be added into the blockchain system, and platform registration and activities of corresponding authorities are carried out according to the alliance chain standard.

Technical Field

The invention belongs to the technical field of Internet of things, and particularly relates to a transaction platform based on a block chain.

Background

In recent years, the effects of greenhouse effect and global warming have made people around the world aware of the negative consequences of excessive carbon emissions, and carbon emission trading programs have come into play. In an emission trading system, a government issues a certain number of carbon emission licenses to a business on demand or through auction, which is a so-called primary market. In the secondary market, enterprises with excessive or insufficient carbon emission requirements can meet their respective requirements through trading, and therefore it is necessary to establish a carbon trading platform to regulate such market behavior.

At present, 8 carbon transaction platforms are established nationwide, the transaction platforms are traditional centralized platforms, the centralized characteristic brings higher transaction cost, and risks such as single-point failure, privacy disclosure, malicious counterfeiting and the like exist. The characteristics of decentralized and non-falsifiable blockchain technology can make up for the defects of the traditional platform to a certain extent, however, the blockchain system applied to the carbon transaction platform still has the following problems:

(1) the method has the advantages that due to the user privacy problem, enterprises participating in carbon transaction can expose business privacy data of the enterprises in the transaction process, and in a traditional block chain system, transaction information can be randomly inquired on a chain, so that the privacy of participants is difficult to guarantee;

(2) in the data tracing problem, part of the block chain system symmetrically encrypts user data or encrypts the user data based on public key infrastructure so as to ensure the privacy of the user, but the responsibility tracing of the data is difficult when the data is leaked;

(3) in the consensus mechanism problem, part of the block chain system adopts a PoW or PoW-like consensus mechanism, and the transaction enthusiasm is improved by increasing tokens for the participants, so that the transaction confirmation time is greatly prolonged, and the energy consumption of part of nodes is improved, which is contrary to the purpose of proposing a carbon transaction platform.

Disclosure of Invention

The purpose of the invention is as follows: aiming at the defects of the prior art, the invention provides a block chain-based carbon transaction platform, which establishes a alliance chain adopting a PBFT consensus mechanism by introducing an attribute-based encryption mechanism before data chaining so as to balance the relationship between user privacy protection and trusted data traceability, reduce transaction time and improve platform reliability.

The invention provides a transaction platform based on a block chain, which comprises a basic capability layer, a block chain layer, a service layer and an application layer,

the basic capability layer comprises a carbon emission monitoring, data transmission, attribute-based encryption infrastructure and a database unit, and is used for providing collection, encryption and transmission before data chaining for the block chain layer and providing basic support for each function service of the transaction platform;

the block chain layer comprises an interface sublayer, an interconnection sublayer and a contract sublayer, secondary business development is provided for the business layer through an open software development tool package, a system related to block chain service is built, the contract sublayer provides basic guarantee for an interconnection sublayer operation consensus mechanism through calling of an intelligent contract, the interface sublayer integrates lower layer data and business logic, and upwards provides a software development tool package and a corresponding business interface;

the service layer comprises a safety management unit, a transaction management unit, a tracing management unit and a data management unit, and is used for carrying out secondary packaging on a service interface, providing user-friendly application for the application layer and realizing a specific service flow;

the application layer comprises a carbon resource holder, a carbon index seller, a carbon index acquirer and a government supervisor unit, and provides corresponding application for users in the transaction platform.

Further, the contract sub-layer comprises an EVM, a transaction execution engine and a distributed storage, wherein the EVM serves as a lightweight virtual machine and constructs a running environment of the intelligent contract, the transaction execution engine is used for driving the running of the intelligent contract, and the distributed storage stores precompiled intelligent contracts and possibly called contract libraries.

Further, the interconnection sublayer comprises a consensus mechanism, P2P and block synchronization, the consensus mechanism is a core for realizing trusted data transmission in the block chain network, the network nodes obey the same consensus mechanism, decentralized transmission of data in each node of the network is realized through the P2P, the consensus mechanism realizes data synchronization of all blocks, and the block synchronization process is completed through the function of the contract sublayer.

Further, the interface sub-layer includes a remote procedure call PRC, a software development kit SDK, and an interactive console, where the PRC is an interface for interaction between an upper layer service and a blockchain network, and encapsulates blockchain functions and interfaces into the SDK to implement service development, and the interactive console provides a graphical blockchain data query mechanism.

Furthermore, the interconnection sub-layer adopts a common identification mechanism of practical Byzantine fault-tolerant PBFT, and the whole network common identification is realized through the broadcasting and verification of data among common identification nodes.

Further, the attribute-based encryption infrastructure includes a set of improved attribute-based encryption algorithms and an authorization server for attribute-based encryption of uplink data.

Furthermore, the traceability management comprises a set of improved data traceability description model based on the national standard GB/T34945 and 2017, and the model is used as the standard for the on-chain storage and circulation of transaction data.

Further, the government supervisor is used as a light node to be added into the blockchain system and has the highest authority of the transaction platform, other participants are used as consensus nodes to be added into the blockchain system, and platform registration and corresponding authority activities are carried out according to the alliance chain standard.

Compared with the prior art, the invention has the advantages and positive effects that:

(1) the invention adopts the data encryption measure based on the attribute, can realize a one-to-many encryption mode, supports flexible access control strategies, reduces the encryption overhead and protects the business privacy information of enterprises participating in carbon transaction compared with the traditional encryption mode based on public key infrastructure.

(2) According to the invention, data storage and circulation are carried out on the basis of a unified data traceability model on the chain, and the traceability data can only be decrypted by the nodes with specific attribute sets after being encrypted by the attribute bases, so that the traceability credibility is improved, and the possibility of safety events such as data leakage and the like is reduced.

(3) The invention is based on the alliance chain, adopts the PBFT consensus mechanism, and improves the node access threshold, improves the system safety and reduces the transaction confirmation time compared with the block chain system based on the public chain.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

Fig. 1 is a schematic diagram of a block chain-based transaction platform according to the present invention.

Fig. 2 is a schematic diagram of a data encryption and tracing process of a transaction platform based on a blockchain according to the present invention.

Fig. 3 is a schematic diagram of data flow of a transaction platform based on a blockchain according to the present invention.

Fig. 4 is a schematic data storage diagram of a transaction platform based on a blockchain according to the present invention.

Detailed Description

The technical solution of the present invention is described in detail below, but the scope of the present invention is not limited to the embodiments.

As shown in fig. 1, the present invention provides a transaction platform based on a blockchain, which includes a basic capability layer, a blockchain layer, a service layer and an application layer, wherein the basic capability layer includes a carbon emission monitoring layer, a data transmission layer, an attribute-based encryption infrastructure and a database unit, and is used for providing basic support for each functional service of the transaction platform; the block chain layer comprises an interface sublayer, an interconnection sublayer and a contract sublayer and is used for building a system related to block chain service; the business layer comprises a safety management unit, a transaction management unit, a source tracing management unit and a data management unit and is used for realizing a specific business process; the application layer comprises a carbon resource holder, a carbon index seller, a carbon index acquirer and a government supervisor unit, and provides corresponding application for users in the transaction platform. The basic capability layer provides the collection, encryption and transmission functions before data chaining for the block chain layer; the block chain layer provides secondary development capability of the service to the service layer through an open software development kit; the service layer carries out secondary encapsulation on the service interface and provides user-friendly application for the application layer.

The infrastructure capability layer includes carbon emission monitoring, data transmission, attribute-based encryption infrastructure, and database units. The layer is used for providing basic data acquisition, data transmission, data encryption and data storage functions for various functional services of the transaction platform. The carbon emission monitoring unit monitors carbon emission of enterprises participating in transaction by using sensors, such as a methane sensor, a nitrous oxide sensor, a perfluorocarbon sensor and the like, and obtains real carbon emission data from a source; the data transmission unit transmits the collected carbon emission data to a trading platform safely and efficiently; the attribute-based encryption infrastructure unit comprises an authorization center and a set of attribute-based encryption algorithms, provides attribute-based encryption capability for uplink data, only stores summaries of complete data on the chain due to block chain performance limitations, and stores complete data local to an enterprise under the chain.

The block chain layer is divided into three sublayers, namely a contract sublayer, an interconnection sublayer and an interface sublayer. The contract sublayer provides storage and running environments related to intelligent contracts, the interconnection sublayer runs a consensus mechanism and maintains communication among nodes, and the interface sublayer is responsible for providing an open interface and a development tool for the service layer. The EVM in the contract sub-layer is based on a virtual machine of the Ethernet, the written intelligent contract is stored in a distributed storage unit, the intelligent contract comprises an initialization contract, an account book inquiry contract, a carbon index transaction contract and the like, after the intelligent contract is called through specific triggering, the intelligent contract can run in the EVM, and a transaction execution engine pushes the execution flow of the contract; the interconnection sub-layer comprises a set of PBFT (provider-bound document) consensus mechanism, which is different from the PoW consensus mechanism adopted by public chains such as bitcoin and Ether Fang, the transaction platform provided by the invention adopts an alliance chain mechanism, only the registered nodes can be added into a block chain network, so that a large amount of computational "miners" are not needed, the PBFT is utilized to realize consensus among the nodes, data interaction is carried out among the nodes in the preparation process and the consensus process through a decentralized P2P communication protocol, and final block establishment and synchronization are realized; the interface sub-layer comprises a PRC interface for calling between services in a distributed system, inquiring related information (such as block height, block, node connection and the like) of a block chain and sending transactions, an SDK enables upper-layer services to conveniently call various interfaces, the development of each service is quickly realized, and an interactive console realizes read-write access requests for developers to the data of the block chain link nodes, including inquiring the state of the block chain, managing the block chain nodes, deploying and calling contracts and the like.

The business layer comprises a safety management unit, a transaction management unit, a tracing management unit and a data management unit, and the business layer is used for packaging the bottom layer, realizing various specific business processes and deploying the business processes to a transaction platform. The security management unit mainly comprises identity authentication, user registration, user network access, user group access, access control, a black and white list mechanism and the like related to the alliance chain, wherein a user needs to perform identity authentication when joining the alliance chain, after passing the preliminary audit, the node registers uplink, the node is a free node, and becomes a consensus node or an observation node after the network access audit and the group access audit, and meanwhile, the platform also supports the access control on the node data, so that the identity security of the user in the platform is ensured, and the joining of malicious nodes is avoided; the transaction management unit comprises carbon index distribution, carbon index transaction, performance assessment, default punishment and the like, a government supervising party formulates the carbon index of each node in the first day of a transaction period of a protocol and distributes the carbon index to each node, the carbon index transaction party can issue a carbon index transaction order according to the self requirement at any time in the transaction period, if a proper buyer and seller exist, the transaction can be completed, the carbon indexes of the two parties are transferred automatically by an intelligent contract, and meanwhile, a platform corresponding to the transaction order is deducted, wherein a token of the platform is hooked with a legal currency, after one carbon transaction is completed, the two parties of the transaction are considered to realize one performance, the higher the transaction performance rate is, the higher the credit degree of the transaction party is represented, if any party of the transaction has default, the default party is punished, and the credit degree of the default party is reduced; the traceability management unit is closely related to the attribute-based encryption infrastructure of the basic capability layer, and comprises a model based on a unified traceability protocol, a corresponding traceability intelligent contract, privacy-sensitive transaction data, traceability information such as transaction data increase, modification, deletion and circulation and the like, the traceability information is converted into unified traceability model data, the unified traceability model data is uploaded to a chain after being encrypted by an attribute base, and traceability management is carried out by means of the intelligent contract; the data management unit is used for storing non-private data in the public in the face of the platform layer, so that all users can conveniently inquire the data, and the data comprises purchase and acquisition information of carbon indexes in a period of time, carbon index bargaining price, carbon index bargaining amount and the like.

The application layer provides corresponding applications for different types of users in the transaction platform, and provides a more user-friendly graphical interface upwards through the interface of the secondary encapsulation of the service layer, so that non-professional users can conveniently participate in carbon transaction. The users are divided into a carbon resource holder, a carbon index seller, a carbon index acquirer and a government supervisor. The carbon resource holder is a participant who has forest, solar energy, wind energy, hydropower, biomass power generation, methane power generation and the like and can generate carbon emission reduction amount items, is not influenced by carbon index distribution, calculates corresponding carbon indexes according to the resource holding amount, and adds the carbon indexes into the selling process of the carbon indexes; the carbon index seller and the carbon index buyer can be power industry enterprises, industrial industry enterprises, road traffic industry enterprises and the like, the enterprises are supervised by government departments and uniformly configure carbon indexes, when the carbon indexes are excessive or exceed the standard within a period of time, carbon transaction needs to be carried out in a transaction platform, and the three types of users are common nodes participating in the common recognition whole process in a block chain network, also called as whole nodes; the government monitoring party is used as an observation node, is also called as a light node to join the blockchain and is responsible for the service operation of the monitoring layer, has the highest authority of the transaction platform, and other participants are used as consensus nodes to join the blockchain system to perform platform registration and activities with corresponding authorities according to the alliance chain standard.

The invention discloses a transaction platform based on a block chain, which is realized by adopting an encryption mode based on attributes, in particular to an attribute-based encryption mode of a ciphertext strategy, wherein the encryption mode allows an encryptor to embed a data sharing mode in an encryption algorithm and encrypts data through an access structure defined by the attributes; the decryptor has a set describing the self attribute and a corresponding private key, and can decrypt when the private key meets the access structure, so that the method is a one-to-many encryption mode and is suitable for a distributed system.

With reference to fig. 2 and 3, the data encryption and tracing process of the present invention is described, and the system initialization runs in the authorization server of the attribute-based encryption infrastructure:

step one, generating a public key PK and a master key MK according to the following modes:

where i is a system security parameter.

In step two, the public key PK will be distributed to the data producer and the data visitor.

Step three, the data accessor sets the user attribute of the data accessorAnd sending the attribute private key to an authorization server, wherein the attribute private key is generated and operated in the authorization server of the attribute-based encryption infrastructure.

Step four, generating a user attribute private key SK according to the following mode:

data encryption is initiated by the data generator.

Step five, generating a ciphertext C according to the following mode:

wherein M is a clear text, and M is a clear text,an access control policy specified for a data producer.

Step six, referring to fig. 4, in the process of storing and circulating the encrypted data on the chain, the data, the activities, the execution entities and the second-level and third-level elements included in the elements need to be encapsulated into a json data format according to a unified traceability data model. Based on the national standard GB/T34945-2017, the existing traceability data model is formed by combining the characteristics of the carbon transaction platform and the encryption strategy, an execution entity operates data through activities, and each operation is written into the data model to leave traces. The execution entity writes the self type, the unique distribution ID and the encrypted user attribute set into the data model, and carries out digital signature on the data; the activities associated with the execution entities comprise activity types and time, space and condition parameters when the activities are carried out, and if a chained trigger relationship exists among the activities, the trigger conditions are written into the condition parameters; the activity calls or generates some part of data, the data itself generates derived data, the data on the chain has been encrypted by attribute base, and in the data model, only the data abstract of the ciphertext is stored in order to reduce the storage complexity.

Due to the particularity of the carbon transaction platform, the identity of the carbon index seller and the carbon index acquirer of the platform is easy to change, so that the user attribute set of the data visitor can be causedAnd at the moment, the original user attribute private key SK must be updated, so that malicious users are prevented from illegally accessing data by using the user attribute private key SK before updating.

Step seven, when the user attribute setAfter the change, a new access policy is generated,

where s is the policy updater identity signature,is a new access policy that is to be applied,referred to as a compound strategy.

And step eight, the data accessor sends the newly generated composite strategy to an authorization server.

And step nine, the authorization server authenticates the identity signature and revokes the validity of the old user attribute private key.

Step ten, the authorization server generates a new user attribute private key according to the flow of the step four and sends the new user attribute private key to the data visitor.

Step eleven, the encrypted data can be subjected to uplink storage, when an enterprise node or a supervision node needs to inquire specific transaction data information or perform specific transaction data tracing, a request can be sent to the blockchain network, intelligent contracts in the blockchain network do not perform identity verification and other work, and the ciphertext C is automatically returned to a data visitor.

Step twelve, the data visitor decrypts the data according to the following method:

if the user attribute private key SK meets the access control strategy set by the encryption partyThe ciphertext C can be decrypted to obtain the plaintext M, and if the plaintext M is not satisfied, the plaintext M cannot be decrypted.

As noted above, while the present invention has been shown and described with reference to certain preferred embodiments, it is not to be construed as limited thereto. Various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:账号的识别方法、装置、电子设备及计算机可读介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!