Block chain-based power transaction method and system

文档序号:1954524 发布日期:2021-12-10 浏览:20次 中文

阅读说明:本技术 基于区块链的电力交易方法及系统 (Block chain-based power transaction method and system ) 是由 覃健荣 谭期文 梁盛盛 张希翔 秦丽娟 陈勇成 林喆 杨钧 韦宗慧 胡云旺 刘滔 于 2021-08-06 设计创作,主要内容包括:本发明提供一种基于区块链的电力交易方法及系统,其中系统包括:授权模块,对电力交易系统中的各申报主体进行授权管理;优先级排序模块,对售电方进行优先级排序,对购电方按照价格进行排序;撮合计算模块,按照撮合规则进行撮合计算并生成智能合约;解密模块,对申报数据进行解密;上链触发模块,满足上链触发条件时,触发数据上链。本发明基于区块链技术的智能合约不仅可以发挥智能合约在成本效率方面的优势,而且可以避免恶意行为对合约正常执行的干扰。将智能合约以数字化的形式写入区块链中,由区块链技术的特性保障存储、读取、执行整个过程透明可跟踪、不可攥改。(The invention provides a block chain-based electric power transaction method and system, wherein the system comprises the following steps: the authorization module is used for carrying out authorization management on each declaration subject in the electric power transaction system; the priority ranking module is used for performing priority ranking on the electricity selling parties and ranking the electricity purchasing parties according to prices; the matching calculation module is used for performing matching calculation according to the matching rule and generating an intelligent contract; the decryption module is used for decrypting the declaration data; and the cochain triggering module triggers data cochain when the cochain triggering condition is met. The intelligent contract based on the block chain technology not only can exert the advantages of the intelligent contract in the aspect of cost efficiency, but also can avoid the interference of malicious behaviors on the normal execution of the contract. The smart contract is written into the block chain in a digital form, and the characteristics of the block chain technology ensure that the whole processes of storage, reading and execution are transparent, traceable and not easy to modify.)

1. The block chain-based power transaction method is characterized by comprising the following steps of:

step 1, the transaction center issues transaction notices, and the transaction notices form a transaction sequence and are linked up;

step 2, the transaction center sets respective reporting constraints of the electricity purchasing party and the electricity selling party of the transaction sequence, and links the reporting constraints;

step 3, completing the declaration by the electricity purchasing party and the electricity selling party within the appointed declaration time, and chaining declaration data;

step 4, the transaction center sets a priority rule, and conducts priority sequencing and chain loading on the electricity sellers according to the priority rule;

step 5, the transaction center decrypts the declared price of electricity by using a specified private key;

and 6, the transaction center performs matching calculation to generate an intelligent contract and links the chain.

2. The blockchain-based power trading method of claim 1, wherein the trade bulletin includes trade time, trade size, party settings, and number of declaration sections.

3. The blockchain-based power trading method of claim 1, wherein the declared constraints include declared power amounts and declared power rates.

4. The blockchain-based power transaction method according to claim 1, wherein the priority rule is: firstly, sorting according to declared electricity prices, and when the declared electricity prices are consistent, giving priority to electricity selling parties of the low-coal-consumption unit; or when the electricity prices declared by the electricity sellers are consistent, the electricity sellers of the low-coal-consumption units share the same electricity prices, and the declaration time is prior.

5. The blockchain-based power transaction method according to claim 1, wherein the step 6 includes:

601, acquiring the transaction scale in the transaction notice information through the service order number;

step 602, acquiring matching parameter information and priority ranking of power sellers through the service order number;

step 603, acquiring decrypted declaration data through the service single number;

and step 604, performing matching calculation according to the matching rule, generating an intelligent contract and linking the chain, and linking the chain of the matching parameters.

6. The block chain-based power transaction method according to claim 5, wherein the matching rule is: and under the condition of meeting the established transaction scale, sequencing the declared prices of the electricity purchasing side from low to high and sequencing the declared prices of the electricity selling side from high to low, and generating an intelligent contract until the declared price of the electricity purchasing side minus the declared price of the electricity selling side is more than or equal to zero.

7. The blockchain-based power trading method according to claim 1, wherein the smart contract includes information including: events of the intelligent contract, intelligent contract addresses, constructors and executors.

8. Electric power transaction system based on block chain, its characterized in that, including authorization module, priority sequencing module, match calculation module, decryption module and cochain trigger module, wherein:

the authorization module is used for carrying out authorization management on each declaration subject in the electric power transaction system;

the priority ranking module is used for performing priority ranking on the electricity selling parties and ranking the electricity purchasing parties according to prices;

the matching calculation module is used for performing matching calculation according to the matching rule and generating an intelligent contract;

the decryption module is used for decrypting the declaration data;

and the cochain triggering module triggers data cochain when the cochain triggering condition is met.

9. The blockchain-based power transaction system of claim 8, wherein the uplink triggering condition includes:

(1) the transaction notice is linked up, and the triggering condition is when the notice is examined and approved for release;

(2) reporting constraint information uplink, such as: participants, declaration constraints and the like, and when the trigger condition is information storage;

(3) reporting data and identity information, chaining, and triggering when the triggering condition is that the power utilization enterprise reports the data;

(4) the priority sequencing data is linked up, and the triggering condition is that when the transaction center stores the sequencing of the power sellers;

(5) and linking the matching parameters, wherein the triggering condition is when the matching parameters are stored.

10. The blockchain-based power trading system of claim 8, wherein the prioritizing power sellers includes: firstly, sorting according to declared electricity prices, and when the declared electricity prices are consistent, giving priority to electricity selling parties of the low-coal-consumption unit; or when the electricity prices declared by the electricity sellers are consistent, the electricity sellers of the low-coal-consumption units share the same electricity prices, and the declaration time is prior.

Technical Field

The invention relates to the technical field of power transaction data management, in particular to a power transaction method and system based on a block chain.

Background

The conventional electric power trading system is essentially a commodity trading system taking electric power resources as trading objects. In the whole market structure, the system has a relationship chain of two dimensions. One is the traffic flow for market trading and the other is the power flow for power delivery. Bilateral trading is favored by the medium and long term market due to its contractual terms and flexibility in time and place of trading, but is inferior to bid trading in transparency. Meanwhile, the bidding trading has obvious advantages in trading speed and is suitable for markets with high time requirements. Different from exchange trading of common commodities, the electric quantity market, particularly the short-term electric quantity market, needs to consider system safety constraint in the pricing process. The data security of the electric power transaction mechanism is higher than that of other electric power mechanisms, and if data security problems occur, extremely serious consequences can be caused.

The current electric power transaction system is based on a traditional data warehouse system, the system adopts a J2EE three-layer framework, a relational database is used as a database, the system can meet the current centralized transaction mode, certain defects exist, and certain hidden dangers are brought to data safety. For example, the risk of exposure of external personnel to the electric power transaction data without authorization or improper authorization causes the transaction data to be leaked; internal personnel are not well known, and the electric power transaction data are improperly contacted and used, so that the risk caused by the leakage of the transaction data is caused; the power transaction institution reveals improper data security and public opinion risk, etc. caused by the external information. There is therefore a need for improvements in prior art power trading systems and trading methods.

Disclosure of Invention

The invention aims to provide a block chain-based electric power transaction method and system, which can solve the problem that the electric power transaction system in the prior art has data leakage risk.

The purpose of the invention is realized by the following technical scheme:

in a first aspect, the present invention provides a power transaction method based on a block chain, including the following steps:

step 1, the transaction center issues transaction notices, and the transaction notices form a transaction sequence and are linked up;

step 2, the transaction center sets respective reporting constraints of the electricity purchasing party and the electricity selling party of the transaction sequence, and links the reporting constraints;

step 3, completing the declaration by the electricity purchasing party and the electricity selling party within the appointed declaration time, and chaining declaration data;

step 4, the transaction center sets a priority rule, and conducts priority sequencing and chain loading on the electricity sellers according to the priority rule;

step 5, the transaction center decrypts the declared price of electricity by using a specified private key;

and 6, the transaction center performs matching calculation to generate an intelligent contract and links the chain.

Further, the transaction bulletin comprises transaction time, transaction scale, participant setting and number of declaration sections.

Further, the declaration constraint comprises declaration of electric quantity and declaration of price of electricity.

Further, the priority rule is: firstly, sorting according to declared electricity prices, and when the declared electricity prices are consistent, giving priority to electricity selling parties of the low-coal-consumption unit; or when the electricity prices declared by the electricity sellers are consistent, the electricity sellers of the low-coal-consumption units share the same electricity prices, and the declaration time is prior.

Further, the step 6 comprises:

601, acquiring the transaction scale in the transaction notice information through the service order number;

step 602, acquiring matching parameter information and priority ranking of power sellers through the service order number;

step 603, acquiring decrypted declaration data through the service single number;

and step 604, performing matching calculation according to the matching rule, generating an intelligent contract and linking the chain, and linking the chain of the matching parameters.

Further, the matching rule is as follows: and under the condition of meeting the established transaction scale, sequencing the declared prices of the electricity purchasing side from low to high and sequencing the declared prices of the electricity selling side from high to low, and generating an intelligent contract until the declared price of the electricity purchasing side minus the declared price of the electricity selling side is more than or equal to zero.

Further, the intelligent contract comprises the following information: events of the intelligent contract, intelligent contract addresses, constructors and executors.

In a second aspect, the present invention provides a block chain-based power transaction system, including an authorization module, a prioritization module, a match calculation module, a decryption module, and an uplink trigger module, where:

the authorization module is used for carrying out authorization management on each declaration subject in the electric power transaction system;

the priority ranking module is used for performing priority ranking on the electricity selling parties and ranking the electricity purchasing parties according to prices;

the matching calculation module is used for performing matching calculation according to the matching rule and generating an intelligent contract;

the decryption module is used for decrypting the declaration data;

and the cochain triggering module triggers data cochain when the cochain triggering condition is met.

Further, the uplink triggering conditions include:

(1) the transaction notice is linked up, and the triggering condition is when the notice is examined and approved for release;

(2) reporting constraint information uplink, such as: participants, declaration constraints and the like, and when the trigger condition is information storage;

(3) reporting data and identity information, chaining, and triggering when the triggering condition is that the power utilization enterprise reports the data;

(4) the priority sequencing data is linked up, and the triggering condition is that when the transaction center stores the sequencing of the power sellers;

(5) and linking the matching parameters, wherein the triggering condition is when the matching parameters are stored.

Further, the prioritizing the power sellers includes: firstly, sorting according to declared electricity prices, and when the declared electricity prices are consistent, giving priority to electricity selling parties of the low-coal-consumption unit; or when the electricity prices declared by the electricity sellers are consistent, the electricity sellers of the low-coal-consumption units share the same electricity prices, and the declaration time is prior.

According to the power trading method and system based on the block chain, disclosed by the invention, the intelligent contract based on the block chain technology not only can exert the advantages of the intelligent contract in the aspect of cost efficiency, but also can avoid the interference of malicious behaviors on the normal execution of the contract. The smart contract is written into the block chain in a digital form, and the characteristics of the block chain technology ensure that the whole processes of storage, reading and execution are transparent, traceable and not easy to modify.

Drawings

FIG. 1 is a block chain based power trading system of the present invention;

FIG. 2 is a flow chart illustrating a block chain based power transaction method according to the present invention;

fig. 3 is a schematic diagram of prioritizing power sellers.

Detailed Description

The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

The embodiments of the present disclosure are described below with specific examples, and other advantages and effects of the present disclosure will be readily apparent to those skilled in the art from the disclosure in the specification. It is to be understood that the described embodiments are merely illustrative of some, and not restrictive, of the embodiments of the disclosure. The disclosure may be embodied or carried out in various other specific embodiments, and various modifications and changes may be made in the details within the description without departing from the spirit of the disclosure. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.

The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The consensus mechanism is a mathematical algorithm for establishing trust and obtaining rights and interests among different nodes in the blockchain system. The block chain is formed by combining and arranging blocks in a chain form. The persistent storage of electronic records is called a block, and each block records useful information about the relevant transaction activities that occur as it is formed, and is created, sorted, and aggregated into a set in chronological order. The block chains are connected according to a time sequence, and if the next block cannot master the transaction information of the previous block, the next block cannot be generated. In other words, the generation of a new block depends on the entire transaction of the previous block, which may form a long data link from the first block to the current block if the block header contains the information compression value of the previous block. Thus, the data are packed into a huge database. Meanwhile, the unique cryptology mode and formula algorithm are used for ensuring the non-imitability of the anti-counterfeiting product. When each new transaction is made, all other nodes are updated, and all nodes have read-only rights to the public ledger.

The invention discloses a block chain-based electric power transaction method, which comprises the following steps:

step 1, the transaction center issues transaction notices, and the transaction notices form a transaction sequence and are linked.

The transaction notice comprises the time of the transaction, the transaction scale, the setting of the participant, the number of declaration sections and the like.

The uplink writes data to the block chain. The winding up includes manual winding up and automatic winding up, and the winding up in this application is only automatic winding up. And (4) linking the transaction notice, wherein the triggering condition is when the transaction notice is approved and issued.

And 2, the transaction center sets respective reporting constraints of the electricity purchasing party and the electricity selling party of the transaction sequence, and links the reporting constraints.

The reporting constraint comprises reporting electric quantity, reporting electrovalence and the like. The trigger condition for restricting the information uplink is when the information is saved.

And 3, reporting the electric quantity and the electricity price by the electricity purchasing party and the electricity selling party according to the convention in the transaction notice at the specified reporting time, and linking the reporting data.

A market main body can report a plurality of data segments at one time, and can report a plurality of times, and the last data is automatically invalidated after reporting. The market body declares the time and encrypts the declaration price of electricity through the public key.

The power utilization enterprise reports and reports the electric quantity and the electricity price from the page of the transaction system, and calls a chain-up program after sending the electric quantity and the electricity price to a back-end warehouse; before the chain is linked, the identity information of the market main body, the data chain and the service number 'JZJJ _ transaction serial number' of the service are carried before the data chain.

And 4, setting a priority rule by the transaction center, and carrying out priority sequencing and chain loading on the electricity sellers according to the priority rule.

The priority rules are that when the electricity prices declared by the electricity selling parties are consistent, the electricity selling parties of the low-coal-consumption unit take precedence, the declaration time takes precedence, and the like.

The triggering condition of the data uplink with the priority sequence is that the trading center stores the power plant sequence.

And 5, the transaction center decrypts the declared price of electricity by using the specified private key.

Writing a decrypted intelligent contract, chaining the intelligent contract through the block chain platform, wherein the calling authority of the intelligent contract is only available to the trading center. The functions are as follows:

acquiring a private key and declaration data through a service single number;

decrypting the declaration data through a private key;

chaining the declaration data and checking by an intelligent transaction center;

and 6, the transaction center performs matching calculation to generate an intelligent contract and links the chain.

Further, in a preferred embodiment of the present application, step 6 comprises:

601, acquiring the transaction scale in the transaction notice information through the service order number;

step 602, acquiring matching parameter information and priority ranking of power sellers through the service order number;

the matching parameters comprise: the transaction scale, the K coefficient (the proportion of the intermediate price in matching), the minimum unit of the matching electric quantity, the decimal number of the electric quantity of the matching result, the decimal number of the electric price of the matching result and the like.

Step 603, acquiring decrypted declaration data through the service single number;

and step 604, performing matching calculation according to the matching rule, generating an intelligent contract and linking the chain, and linking the chain of the matching parameters.

The intelligent contract includes information: event, contract address, construction function, execution function and other information of the intelligent contract.

Further, the matching rule is as follows: the trading center sorts the declared prices of the electricity purchasing side from low to high and the declared prices of the electricity selling side from high to low through a calculation mode of high-low matching under the condition that a set trading scale is met, and an intelligent contract is generated until the declared price of the electricity purchasing side minus the declared price of the electricity selling side is more than or equal to zero.

The triggering condition of the matching parameter uplink is when the matching parameter is stored.

The chain is divided into two steps, wherein in the first step, only the trading center can check all data blocks; and in the second step, the cochain is respectively packaged according to the successful bid condition of the power utilization enterprise, and the cochain block can only be seen by the identity of the market main body.

The intelligent contract decryption algorithm comprises the steps of firstly uploading an intelligent contract by using a transaction center account login block chain platform, then chaining a decryption password when a main system decrypts each time, finally triggering the decryption intelligent contract to click decryption in a demonstration system for the transaction center, automatically acquiring a decryption key and effective declaration data by the intelligent contract, decrypting the decryption key and the effective declaration data, and simultaneously storing decryption information as private information of the transaction center account.

When an intelligent contract of a privacy protection scheme is constructed, the privacy protection problem of trusted data is solved by utilizing a block chain: the important data of the electric power transaction are encrypted and then linked, any user or an electric enterprise on the link cannot access the related data under the condition that the user or the electric enterprise is not authorized, the privacy of the authorized user is guaranteed to the maximum extent, and the authorization process can be authorized simultaneously or independently during information release according to different application scenes.

The rights management functions referred to in this application shall include but are not limited to:

a) and (3) access control authority management: the business system calls a middleware interface to provide authority control management capability, and distributes app _ id (application unique identifier), app _ key (public key: equivalent to an account), app _ secret (private key: equivalent to a password) and the like for the application system; the calling of the middleware interface needs to sign and verify the data;

b) certificate management: importing, checking and downloading certificate information, wherein the certificate information comprises chain certificates, mechanism certificates and node certificates of corresponding nodes, and information such as certificate content, certificate validity period and certificate chain relation can be checked;

c) and (3) managing users and roles: the operation authority control and interface calling authority of the management tool can be divided into the following user roles:

1) the common operation role is as follows: browsing query authority with a middleware management platform, such as query of comprehensive information;

2) and (3) developing roles: can be distributed to business system developers and has the calling authority of a middleware interface, such as the calling of an intelligent contract;

3) common administrator roles: the system can be distributed to service system management personnel and has operation authority in the service system use range, such as node management, contract management and the like;

4) role of super manager: and all operation rights of the management platform are possessed, such as contract deployment, contract deletion and the like.

The invention relates to a block chain-based power transaction system, which comprises an authorization module, a priority sequencing module, a matching calculation module, a decryption module and an uplink triggering module, wherein:

and the authorization module is used for carrying out authorization management on each declaration subject in the electric power transaction system.

And the priority ranking module is used for performing priority ranking on the electricity selling parties and ranking the electricity purchasing parties according to prices.

Further, prioritizing the power sellers includes: firstly, sorting according to declared electricity prices, and when the declared electricity prices are consistent, giving priority to electricity selling parties of the low-coal-consumption unit; or when the electricity prices declared by the electricity sellers are consistent, the electricity sellers of the low-coal-consumption units share the same electricity prices, and the declaration time is prior.

And the matching calculation module is used for performing matching calculation according to the matching rule and generating an intelligent contract.

And the decryption module is used for decrypting the declaration data.

And the cochain triggering module triggers data cochain when the cochain triggering condition is met.

Uplink triggering conditions include, but are not limited to:

(1) the transaction notice is linked up, and the triggering condition is when the notice is examined and approved for release;

(2) reporting constraint information uplink, such as: participants, declaration constraints and the like, and when the trigger condition is information storage;

(3) reporting data and identity information, chaining, and triggering when the triggering condition is that the power utilization enterprise reports the data;

(4) the priority sequencing data is linked up, and the triggering condition is that when the transaction center stores the sequencing of the power sellers;

(5) and linking the matching parameters, wherein the triggering condition is when the matching parameters are stored.

In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; may be mechanically coupled, may be electrically coupled or may be in communication with each other; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.

The above description is for the purpose of illustrating embodiments of the invention and is not intended to limit the invention, and it will be apparent to those skilled in the art that any modification, equivalent replacement, or improvement made without departing from the spirit and principle of the invention shall fall within the protection scope of the invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种风电机组故障数据分类存储的方法及系统

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!