Fair energy transaction mode based on alliance chain
Technical Field
The invention belongs to the technical field of information security, and relates to a block chain transaction technology.
Background
At present, energy trading mostly adopts a centralized processing mode, trading entities and trading data are managed through a third-party authority, and the energy trading entities have to perform energy trading and entity registration at the authority. However, in the traditional energy transaction model, the central node undertakes a plurality of tasks such as user registration, user authentication, transaction matching, transaction verification and the like, and has a very serious single-point failure problem and a user privacy disclosure problem. In the existing industrial internet of things energy transaction, an attacker possibly bypasses a user identity authentication mechanism, disturbs an energy transaction center to collect transaction user data, and carries out privacy analysis on the acquired transaction data to extract user sensitive information. Therefore, in the existing research, the security and privacy of the industrial internet of things energy transaction are mostly taken as the research key point, and the transaction fairness in the industrial internet of things energy transaction is ignored.
Blockchains are a term used in the field of information technology, and are essentially a shared, transparent database. The method ensures the fairness, safety and reliability of the transaction through intelligent contracts, digital signatures and other modes.
(1) Intelligent contract: an intelligent contract is a protocol defined in a digital form, and unlike a traditional paper contract, the intelligent contract combines trigger conditions and execution of the contract into one atomic operation. The intelligent contracts are arranged on the blockchain, the contract contents are transparent and not falsifiable, and the transaction entity can safely transact in an untrusted environment.
(2) Digital signature: the digital signature serves as an authentication mechanism of the block chain and has two functions, namely, on one hand, the sender of the message is verified, and the source of the message is confirmed. Because of the uniqueness of the private key, the source of the signed message can be uniquely determined, and furthermore, the rest of the entities cannot perform signature falsification. On the other hand, the digital signature can verify the integrity of the message, and the integrity and the consistency of the message of the sender are ensured through the digital digest technology and the collision resistance of the hash function.
Disclosure of Invention
The invention aims to provide a new energy transaction mode, provides an efficient and fair transaction mode for energy transaction, adopts an intelligent contract and an active credit mechanism to protect the transaction process for improving the fairness of transaction, and adopts the following technical scheme for realizing the aim:
the method comprises the following steps: and (4) registering the entity. The entity is divided into three parts in the model, namely an energy transaction entity, a local energy aggregator and a certificate authority. All energy transaction entities and local energy aggregators need to be authorized at the certificate authority, and then parties can join the transaction system to conduct transactions.
Step two: and (6) transaction matching. After entering the transaction system, the energy transaction entity needs to publish its public key information and download the transaction data in the latest period of time within the LA management range to which the energy transaction entity belongs. When ETEs need to sell or buy energy, it needs to broadcast their own transaction needs and attach their own signature to the broadcast message. The broadcast message should contain the identity information of the transaction entity, the transaction requirements, the request time and its own signature. After receiving the transaction matching request sent by the energy transaction entity, the local energy aggregator needs to check the transaction qualification of the energy transaction entity, including the amount of energy and the amount of funds owned by the energy transaction entity. After the transaction qualification of the energy transaction entity is confirmed, the energy aggregator of the team is matched with the transaction entity to perform energy transaction.
Step three: energy trading. After the transaction is matched, the local energy aggregator transfers the whole transaction to the intelligent contract to be executed after recording the transaction information. The energy transaction parties need to pay 10% of the total amount of transaction amount as transaction deposit, if one party in the transaction wants to terminate the transaction after transaction matching is achieved or the transaction steps are not completed according to the appointed time, the own deposit needs to be paid to the other party as compensation, and the process is implemented by an intelligent contract. If the transaction is successfully completed, the amount of money locked in the account of the energy buyer is transferred to the account of the energy seller through the intelligent contract. If any accident happens, the transaction fails, the intelligent contract automatically starts a reward and punishment mechanism. If the transaction entity disagrees with the transaction process, the energy transaction entity can feed back the disagreement to the local energy aggregator, and the local energy aggregator arbitrates the disagreement.
Step four: and (6) transaction consensus. In the transaction mode, the consensus process is participated in by the local energy aggregator in the whole process and is unrelated to the common energy transaction entity. The local energy aggregator, as a trusted node for certificate authority authentication, will be responsible for the consensus process of the transaction and upload the transaction information package into the federation chain.
Drawings
FIG. 1 details the transaction entity structure of the transaction mode of the present invention.
FIG. 2 details the transaction model architecture of the transaction approach of the present invention.
Fig. 3 details the transaction flow architecture of the transaction approach of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
The invention provides a fair energy transaction mode based on a alliance chain, which comprises the following specific steps:
the method comprises the following steps: and (4) registering the entity.
Step 1.1: when an ETE (transaction entity) applies for joining a transaction system, the ETE needs to submit entity information of the ETE to a CA (certificate authentication center), and the CA issues a digital certificate to the ETE applying for verification after the qualification of the verification entity.
Step 1.2: the CA generates a private key of a transaction entity;
step 1.3: CA calculates the public key of transaction entity;
step 1.4: the CA sends the key to the transaction entity;
step two: and (4) transaction matching, after ETEs enter a transaction system, publishing own public key information in the LA management range of the ETEs and downloading transaction data in the latest period of time. The specific process is as follows:
step 2.1: when ETEs need to sell or buy energy, it needs to broadcast their own transaction needs and attach their own signature to the broadcast message. The broadcast message should include the ID of ETEs, Demand for transaction Demand, request Time and signature of the ETEs;
req={UID||Demand||Time||Signature}
step 2.2: the LA, upon receiving a transaction match request from the ets, needs to check the ETEs for transaction eligibility, including the amount of energy and the amount of funds the ETEs has. After confirming the transaction qualification of the ETEs, the LA can be matched with a transaction entity to perform energy transaction;
step 2.3: after the entity transaction matching is completed, LA records the buyer user's ID, the seller user's ID, the transaction TIME TIME, the transaction wallet WALLT and the amount of money QUA;
Con={UID1||UID2||TIME||WALLT1||WALLT2||QUA}
step three: in energy transaction, after an energy transaction entity enters a transaction system, public key information of the energy transaction entity needs to be published in the LA management range of the energy transaction entity, and transaction data of a recent period of time needs to be downloaded. When ETEs need to sell or buy energy, it needs to broadcast their own transaction needs and attach their own signature to the broadcast message. The broadcast message should contain the identity information of the transaction entity, the transaction requirements, the request time and its own signature. After receiving the transaction matching request sent by the energy transaction entity, the local energy aggregator needs to check the transaction qualification of the energy transaction entity, including the amount of energy and the amount of funds owned by the energy transaction entity. After the transaction qualification of the energy transaction entity is confirmed, the energy aggregator of the team is matched with the transaction entity to perform energy transaction.
Energy transaction intelligent contract algorithm:
step four: and (4) transaction consensus, wherein in the transaction mode, the consensus process is participated in by a local energy aggregator in the whole process and is unrelated to a common energy transaction entity. The local energy aggregator, as a trusted node for certificate authority authentication, will be responsible for the consensus process of the transaction and upload the transaction information package into the federation chain.