CN114140202A - Block chain-based distributed electric energy bidding transaction service method and system - Google Patents

Block chain-based distributed electric energy bidding transaction service method and system Download PDF

Info

Publication number
CN114140202A
CN114140202A CN202111449210.5A CN202111449210A CN114140202A CN 114140202 A CN114140202 A CN 114140202A CN 202111449210 A CN202111449210 A CN 202111449210A CN 114140202 A CN114140202 A CN 114140202A
Authority
CN
China
Prior art keywords
transaction
contract
user
electric energy
electricity
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
CN202111449210.5A
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.)
State Grid Sichuan Comprehensive Energy Services Co ltd
Sichuan University
Original Assignee
State Grid Sichuan Comprehensive Energy Services Co ltd
Sichuan University
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 State Grid Sichuan Comprehensive Energy Services Co ltd, Sichuan University filed Critical State Grid Sichuan Comprehensive Energy Services Co ltd
Priority to CN202111449210.5A priority Critical patent/CN114140202A/en
Publication of CN114140202A publication Critical patent/CN114140202A/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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0605Supply or demand aggregation
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/12Payment architectures specially adapted for electronic shopping systems
    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0611Request for offers or quotes
    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/08Auctions
    • 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Primary Health Care (AREA)
  • Tourism & Hospitality (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a distributed electric energy bidding transaction service method and system based on a block chain, and relates to the technical field of electric power markets. The method comprises the steps of building a distributed electric energy transaction platform; designing an intelligent contract deployed on a distributed electric energy transaction platform, wherein the intelligent contract comprises: a transaction initiation contract, a transaction bidding contract, a two-way matching contract, and a transaction settlement contract; acquiring user information, and preprocessing the user information by calling a transaction initialization contract; the electric energy transaction is carried out on the distributed electric energy transaction platform by the electricity purchasing user and the electricity selling user, and the electric energy transaction mode comprises the following steps: a one-way auction mode and a two-way matching mode; and after the transaction is successful, calling a transaction settlement contract to perform transaction settlement and token transfer to complete the transaction. The transaction method provided by the invention improves the safety of asset transaction, ensures the privacy of user identity information and transaction information, and solves the problems of fairness, transparency and the like of transaction.

Description

Block chain-based distributed electric energy bidding transaction service method and system
Technical Field
The invention relates to the technical field of power markets, in particular to a distributed electric energy bidding transaction service method and system based on a block chain.
Background
With the continuous development and application of new energy technology, the supply and demand boundary in the current power system is gradually fuzzy, and traditional users in a park can become users by configuring power generation equipment such as distributed photovoltaic equipment, so that the traditional one-way consumers are changed into two-way production/consumers (electricity purchasing/selling users). In the 'notice about developing distributed power generation market transaction test points', the national energy agency supports a 'self-generation and surplus electricity internet access' mode by a policy, allows a user and a power consumer to develop distributed transaction, and establishes the position of the user as a power selling main body in a distributed power transaction market.
The advent of users has created new business opportunities for distributed power transactions, as well as new challenges, which can present problems if still relying on the traditional centralized transaction model: the occurrence of a large number of production/consumers increases the number of main bodies participating in transaction in a distribution network, and transaction information is quantized. Meanwhile, the production/consumption is usually small in single order scale, but the quotation strategies have large difference, so that the traditional centralized trading mode has the problems of low operation efficiency, pending improvement of trading mechanism flexibility and the like; the transaction mode dominated by the centralized mechanism also has data security risk, and the privacy of the user is difficult to be guaranteed. Meanwhile, the problems of fairness and transparency of the transaction are also urgently needed to be solved. Therefore, the search for an efficient, safe and fair distributed transaction mode becomes a key appeal for the development of power transactions among users.
Disclosure of Invention
In order to overcome the above problems or partially solve the above problems, an object of the present invention is to provide a block chain-based distributed electric energy bidding transaction service method and system, which can provide multiple order transaction modes during transaction, establish a perfect transaction matching mechanism, and meet diversified transaction requirements of users.
The invention is realized by the following technical scheme:
in a first aspect, an embodiment of the present invention provides a block chain-based distributed electric energy bidding transaction service method, including the following steps: s101, building a distributed electric energy transaction platform; s102, designing an intelligent contract deployed on the distributed electric energy trading platform, wherein the intelligent contract comprises: a transaction initiation contract, a transaction bidding contract, a two-way matching contract, and a transaction settlement contract; s103, acquiring user information, and preprocessing the user information by calling the transaction initialization contract, wherein the users comprise electricity purchasing users and electricity selling users; s104, the electricity purchasing user and the electricity selling user carry out electric energy transaction on the distributed electric energy transaction platform, and the electric energy transaction mode comprises the following steps: a one-way auction mode and a two-way match mode, the one-way auction mode is realized by invoking the trade bidding contract, the two-way match mode is realized by invoking the trade bidding contract and the two-way match contract; and S105, after the transaction is successful, calling the transaction settlement contract to perform transaction settlement and token transfer, and completing the transaction.
Based on the first aspect, in some embodiments of the present invention, the building a distributed electric energy trading platform includes the following steps: generating a created block by using a Geth client, and initializing the created block to generate a private chain; running the private chain and acquiring the ID and the port number of the private chain; and the target users join the private chain by means of the ID and the port number of the private chain, so as to be connected with each other.
Based on the first aspect, in some embodiments of the present invention, the preprocessing the user information includes: initially setting and updating user information at the beginning of each round of distributed transaction time period: for the users who have participated in the distributed transaction, checking whether the users have the condition that the arrearage is not paid in the previous round of transaction; if the arrearage behavior exists, closing the transaction interface and the transaction authority of the user until the arrearage is completely cleared; and for a new user, adding the external account address of the user to the transaction initiation contract, and giving the user transaction authority.
Based on the first aspect, in some embodiments of the present invention, the one-way auction mode includes: and the electricity selling user reports an electricity selling order, the electricity selling order enters the bidding pool and is sorted according to the price for the electricity purchasing user to check at any time, the electricity purchasing user can respond to the satisfied electricity selling order according to own will, after the response is successful, the electricity purchasing user is regarded as a buyer and a seller to establish a matching relation according to the price quoted by the order in the bidding pool, and a transaction order contract is generated.
Based on the first aspect, in some embodiments of the present invention, the bidirectional matching mode includes: the electricity purchasing user and the electricity selling user respectively issue an electricity purchasing order and an electricity selling order, the platform carries out information matching based on the electricity purchasing order and the electricity selling order, if the matching is successful, a matching relation is established for the buyer and the seller, and a trade order contract is generated.
Based on the first aspect, in some embodiments of the present invention, the power purchase order or the power sale order is expressed as:
Order=[Pi Δt(r),Ti Δt,Wi Δt,Type,Pattern]
wherein, the delta t is the transaction time interval of the current round; pi Δt(r) quotes for users i, respectively; t isi ΔtReporting a timestamp for the order of the user i; wi ΔtReporting the transaction electric quantity for a user i; type is an order Type identifier; pattern is a transaction Pattern identifier.
Based on the first aspect, in some embodiments of the present invention, the transaction settlement and token transfer includes: calculating transaction commission fee generated in the current round of transaction and electricity purchasing expense of the electricity purchasing user/electricity selling income of the electricity selling user; and increasing and decreasing the balance of the token of the user account on the distributed electric energy transaction platform according to the corresponding exchange rate based on the calculation result.
Based on the first aspect, in some embodiments of the present invention, the transaction commission and the commission extraction ratio are calculated as follows:
Figure BDA0003384846150000021
wherein the content of the first and second substances,
Figure BDA0003384846150000022
is the total transaction commission that the PSP should receive; χ represents a certain sub-cooperative population comprised of a fraction of members of the total cooperative population t; x!PSPRepresenting all possible sub-cooperation group sets which do not contain the platform service provider; | τ |, | χ | represents the number of members contained in the cooperative population;
Figure BDA0003384846150000031
representing the total profit of the overall cooperative group;
Figure BDA0003384846150000032
the cooperative yield of the sub-cooperative group χ is expressed, and in the present invention, the cooperative group yield not including the platform facilitator is regarded as 0, that is, the cooperative group yield
Figure BDA0003384846150000033
Representing the cooperative income after the platform service provider joins x;
Figure BDA0003384846150000034
a proportion is drawn for the transaction commission.
In a second aspect, an embodiment of the present invention provides a block chain-based distributed electric energy bidding transaction service system, including: the platform building module is used for building a distributed electric energy transaction platform; a contract design module, configured to design an intelligent contract deployed on the distributed electric energy trading platform, where the intelligent contract includes: a transaction initiation contract, a transaction bidding contract, a two-way matching contract, and a transaction settlement contract; the user information preprocessing module is used for acquiring user information and preprocessing the user information by calling the transaction initialization contract, wherein the user comprises an electricity purchasing user and an electricity selling user; the transaction module is used for carrying out electric energy transaction, and the electric energy transaction mode comprises the following steps: the system comprises a unidirectional auction mode and a bidirectional matching mode, wherein the unidirectional auction mode is realized by calling the transaction bidding contract, and the bidirectional matching mode is realized by calling a bidirectional matching contract; and the settlement module is used for calling the transaction settlement contract to perform transaction settlement and token transfer to complete the transaction.
In a third aspect, an embodiment of the present invention provides an electronic device, including: at least one processor, at least one memory, and a data bus; wherein, the processor and the memory complete mutual communication through the data bus; the memory stores program instructions executable by the processor, which invokes the program instructions to perform the one or more programs or methods.
Compared with the prior art, the invention at least has the following advantages and beneficial effects:
the invention provides a distributed electric energy bidding transaction service method, which designs a service architecture and a transaction flow of a distributed electric power transaction mode and defines the rights and obligations of all parties participating in a main body at different time periods. Under the coordination of a platform administrator, redundant electric quantity of electricity selling/purchasing users in a garden in each period is matched with energy utilization requirements on a distributed electric energy transaction platform, the matching mode comprises a one-way auction mode and a two-way matching mode, the users can select by themselves, the fairness of the transaction is guaranteed, the users can be matched with the two purchasing parties more quickly through big data matching, the users can form an order more quickly, and the transaction is more efficient. In addition, the electric energy trading platform is a private chain trading platform, so that the privacy is better and the safety is higher.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and that for those skilled in the art, other related drawings can be obtained from these drawings without inventive effort. In the drawings:
FIG. 1 is a flow chart illustrating steps of an embodiment of a block chain-based distributed electric energy bidding transaction service method according to the present invention;
fig. 2 is a schematic diagram of an overall architecture of a distributed electric energy bidding transaction service method based on a block chain according to the present invention;
FIG. 3 is a schematic diagram of an intelligent contract deployment interface according to an embodiment of the invention;
FIG. 4 is a schematic diagram of a token creation interface according to one embodiment of the invention;
FIG. 5 is a schematic diagram of a token transfer interface according to one embodiment of the invention;
FIG. 6 is a block diagram of transaction commission charge results according to an embodiment of the present invention;
FIG. 7 is a schematic diagram illustrating the balance before and after a user participates in a distributed transaction according to an embodiment of the present invention;
fig. 8 is a block diagram illustrating a distributed electric energy bidding transaction service system according to the present invention;
fig. 9 is a block diagram of an electronic device.
Icon: 1-a processor; 2-a memory; 3-a data bus; 100-a platform building module; 200-contract design module; 300-a user information preprocessing module; 400-a transaction module; 500-settlement module.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to examples and accompanying drawings, and the exemplary embodiments and descriptions thereof are only used for explaining the present invention and are not meant to limit the present invention.
Example 1
Referring to fig. 1 and 2, in an embodiment of the present invention, a block chain-based distributed electric energy bidding transaction service method is provided,
s101, building a distributed electric energy transaction platform;
the specific process is as follows:
1) the establishment of the distributed electric energy (private chain) transaction platform comprises the following steps:
a. firstly, generating a created block by using a Geth client, and initializing the created block to generate a private chain; the method comprises the steps of selecting a consensus mechanism, setting ore excavation difficulty, establishing a platform service provider account, setting account amount and the like;
b. running the private chain through a starting command, and acquiring a private chain ID and a port number;
c. the other user nodes can join the private chain by inputting the ID and the port number of the target private chain, so as to be connected with each other.
2) The consensus mechanism of this embodiment is designed as follows: when creating the created block file, the common identification mechanism mode is set as an Authority certification mode (Proof of Authority, PoA). In the consensus mechanism, the generation time of each block can be set in advance, and the generation time does not need to be set by consuming a large amount of calculation power and competing for the accounting right when the block validity is verified. Therefore, the platform service provider can give a trust signature to user nodes which are intentionally involved in the joint accounting, and block consensus authentication is carried out by the nodes with the trust signatures and the platform service provider in turn, wherein each node can authenticate only one block at a time. When the malicious accounting behaviors occur, the authentication signature of the node can be cancelled by voting of other nodes, so that mutual supervision of the accounting behaviors is carried out.
Compared with the traditional workload certification mechanism (PoW), the PoA consensus mechanism selected in the embodiment does not need to consume a large amount of computing power to contend for the accounting right when block consensus is performed, and accounting nodes with trust signatures account in turn, so that the consensus efficiency is improved, a large amount of computing resources are saved, and the distributed transaction cost is reduced. Meanwhile, by means of common billing of the platform service provider and the trust node, the decentralized idea can be effectively embodied, the problem of system fairness caused by the centralized billing mode is avoided, and the distributed electric energy transaction architecture is better suitable for electricity purchasing/electricity selling users.
S102, designing an intelligent contract deployed on the distributed electric energy trading platform, wherein the intelligent contract comprises: a transaction initiation contract, a transaction bidding contract, a two-way matching contract, and a transaction settlement contract;
in the present embodiment, in addition to the above-mentioned transaction initiation contract, transaction bidding contract, bidirectional matching contract and transaction settlement contract, the present embodiment further includes a token issuing contract, and the specific arrangements of these intelligent contracts are:
(1) token issuance contract (_ TokenDemo): the contract is created and invoked by a platform facilitator for issuing tokens (tokens) for distributed power transactions. When the contract is invoked, the platform facilitator will set the Token's name, issue total, and exchange rate with renminbi. After Token is issued, the platform service provider owns Token in corresponding quantity. When the balance of the user node on the chain is insufficient, certain Token needs to be exchanged at the service provider according to the corresponding exchange rate by RMB, so that a series of transfer operations in subsequent transactions are realized. The mode is similar to a form of 'recharging a deposit card', so that a user does not need to exchange actual funds with a Token with a platform service provider in each round of transaction settlement, the transaction efficiency is improved, and the characteristics of mass, small amount and high frequency of distributed transactions are conformed.
(2) Transaction initiation contract (_ Initial): the platform service provider calls the contract to check and update the user node information at the beginning period of each round of transaction. The facilitator will first check whether all user nodes have completed the previous round of transaction settlement, and will temporarily freeze the user's transaction interface if the user has a debt action in the previous round of transaction resulting in a failure of the token transfer. In the round of transaction, the user cannot call the related contract to participate in the distributed transaction because the user fails to pass the qualification examination until the arrearage amount is completely cleared. If a new user node is added into the trading platform through qualification examination, the service provider writes the external account address of the user into a contract and opens a trading interface for the contract so as to participate in subsequent distributed trading.
(3) Trade Bidding contract (_ Bidding): the user node can call the contract to issue the electric energy transaction requirement of the user node to the distributed transaction platform in the transaction reporting stage. The reported transaction information is a structure body, and the structure body comprises the following information: the order reporting mode comprises a user account address (addr), a purchase/sale electricity price (price), an order reporting time stamp (time), a purchase/sale electricity quantity (amount), an order reporting mode (pattern) and the like. After an order in a one-way auction mode (pattern 0) is selected to be issued, entering a bidding pool, and waiting for responses of other users; after an order in a bidirectional matching mode (pattern 1) is selected to be issued, the order enters an electricity purchasing/selling matching queue to wait for matching of an intelligent contract. At the same time, each user calls the contract and transfers a deposit (bond) to the contract address, which will be returned to the user node account during the transaction settlement period. If the user has a transaction violation in the process, the deposit is frozen in the intelligent contract, so that the behaviors of node malicious quotation and market disturbance are avoided.
(4) Two-way Matching contract (_ Matching): the contract can only be invoked by the platform service provider. And aiming at the orders with the two-way matching mode, sequencing according to the priority of price and reporting time stamp to generate an electricity purchasing/electricity selling order matching queue, and sequentially matching two orders positioned at the forefront of the electricity purchasing/electricity selling queue. And when the transaction electric quantity of the two matched orders is not equal, taking the smaller value of the two orders as the transaction electric quantity, and continuously keeping the party which cannot be completely matched in the matching queue to be matched with the next user until the transaction order in the queue of one party is empty. Finally, the electric quantity which is not successfully matched is regarded as direct trading with the network operator. Thereby resulting in trade order contracts for the current round of time.
(5) Transaction Settlement contract (_ Settlement): the contract can only be invoked by the platform service provider. In the transaction settlement period, the platform service provider calls the contract to calculate the transaction commission charge which should be collected in the round of transaction, and combines the distributed electric energy transaction charge and the commission charge of the user to increase and decrease the token balance of the user account according to the corresponding exchange rate. And finally, refunding the user who does not have default to the deposit paid by the user, and storing the settlement and transfer result in the block chain for subsequent reference and tracing of all nodes.
In addition to the main functional contracts, a series of auxiliary contracts are deployed on the trading platform, such as contracts for users to query bid pool orders (Checkpool), trade record query contracts (Checkbill), withdrawal contracts (Killorder), and the like, so that a series of diversified demands of the users are met.
In this embodiment, the designed intelligent contract is deployed on an ethernet private chain platform, the deployment situation is shown in fig. 3, in which a light-color module is a main function contract for a node with authority to call in a specific time period to realize a main transaction function; the deep color module is an auxiliary contract and can be called by all nodes at any time, and a series of personalized requirements of users are met. The platform facilitator then invokes the _ TokenDemo function to create a token, which in this embodiment is set to PowerMoney for the token name, and the exchange rate with rmb is set to 100: the token issuance is described in fig. 4. The transfer information of the platform facilitator for the user to recharge the money is shown in fig. 5.
S103, acquiring user information, and preprocessing the user information by calling the transaction initialization contract, wherein the users comprise electricity purchasing users and electricity selling users;
the step is a user information preprocessing stage, and specifically comprises the following steps: when each round of distributed transaction period begins, the platform service provider carries out initialization setting and updating of various user information: for the user who participates in the distributed transaction, the platform service provider checks whether the user has the behavior that the arrearage is not cleared in the previous round of transaction, if yes, the platform service provider closes the transaction interface and the transaction authority of the user until the arrearage is completely cleared; for a newly registered user, the platform service provider adds the external account address of the user to the transaction initiation contract and gives the user transaction rights.
S104, the electricity purchasing user and the electricity selling user carry out electric energy transaction on the distributed electric energy transaction platform, and the electric energy transaction mode comprises the following steps: a one-way auction mode and a two-way match mode, the one-way auction mode is realized by invoking the trade bidding contract, the two-way match mode is realized by invoking the trade bidding contract and the two-way match contract;
the step is a transaction and order reporting (generating) stage, and the electricity purchasing/selling user has two order reporting forms at the stage: a one-way auction mode or a two-way matching mode. The user can freely report the trading order by selecting one of two modes according to own will, participate in the distributed electric energy trading, and finally reach a trading order contract.
For this stage, the following model can be built:
the users in the distributed electric energy trading platform are all electricity purchasing/selling users, namely the users can report electricity purchasing orders through trading bidding contracts when the electricity is short, and the users can report electricity selling orders when the electricity is left. At this stage, if an order in the one-way auction mode (pattern 0) is selected to be issued, the order enters a bidding pool and waits for the responses of other users; after an order in a bidirectional matching mode (pattern 1) is selected to be issued, the order enters an electricity purchasing/selling matching queue to wait for matching of an intelligent contract. Assuming that the users purchasing/selling electricity all adopt rational quotation, the quotation of each user should be in the interval [ p ]WS,pWB]In which p isWSDirect grid-connected electricity selling price, p, for the userWBThe price of electricity purchased for the user from the grid. Bidding contract for electricity purchasing/selling user through tradeThe reported order information is essentially a structural body, which comprises the following elements: purchase/sale of electricity price, order reporting timestamp, purchase/sale of electricity quantity and the like. Can be expressed by the following formula:
Order=[Pi Δt(r),Ti Δt,Wi Δt,Type,Pattern]
wherein, the delta t is the transaction time interval of the current round; pi Δt(r) quotes for users i, respectively; t isi ΔtReporting a timestamp for the order of the user i; wi ΔtReporting the transaction electric quantity for a user i; the Type is an order Type identifier, when the Type is 1, the order is an electricity purchasing order, and when the Type is 0, the order is an electricity selling order; the Pattern is a transaction Pattern identifier, when the Pattern is 0, the user selects a one-way auction Pattern, and when the Pattern is 1, the user selects a two-way matching Pattern.
Two modes of transaction:
in the one-way auction mode, orders reported by electricity purchasing/selling users enter a bidding pool and are sorted according to prices. Other users can check the electricity selling order with the lowest price and the electricity purchasing order with the highest price in the bidding pool at any time and respond according to own wishes. After the response is successful, the buyer and the seller are regarded as to establish a matching relation according to the price quoted by the orders in the bidding pool, and a trade order contract is generated.
In the bidirectional matching mode, both the buyer and the seller have quoted prices, a power purchasing/selling matching queue is formed according to the sequence of 'power purchasing/selling quotation and time stamp reporting', two orders positioned at the forefront of the power purchasing/selling matching queue are sequentially matched to generate a trading order contract, and the contract power price is the average price of the buyer and the seller and can be represented by the following formula:
Figure BDA0003384846150000071
wherein the content of the first and second substances,
Figure BDA0003384846150000072
contract electricity prices for a trade order contract formed for users i and j.
In the bidirectional matching mode, one user can be matched with a plurality of users, and the electric quantity which is not successfully matched because the total electric quantity reported by the electricity purchasing/selling group is unbalanced is regarded as being directly matched with the network operator according to the grid-connected price pWSOr selling price p of electricityWBAnd (6) trading.
And S105, after the transaction is successful, calling the transaction settlement contract to perform transaction settlement and token transfer, and completing the transaction.
In this embodiment, the final settlement amount of each user includes two parts, one part is the distributed electric energy transaction fee (i.e. electricity purchase expenditure/electricity sale income), and the other part is the transaction commission fee drawn by the platform service provider.
The platform service provider calculates transaction commission fee to be extracted in the round of transaction, and the calculation method is based on a Charpril value theory: assuming that there are m user nodes in the distributed transaction Platform, a total cooperation group formed by the user and a Platform Service Provider (PSP) is t ═ PSP,1,2,. m }. The transaction commission that the platform facilitator should receive in the current round of transaction and the extraction ratio for each user can be expressed by the following formula:
Figure BDA0003384846150000081
wherein the content of the first and second substances,
Figure BDA0003384846150000082
is the total transaction commission that the PSP should receive; χ represents a certain sub-cooperative population comprised of a fraction of members of the total cooperative population t; x!PSPRepresenting all possible sub-cooperative population sets not containing PSPs; | τ |, | χ | represents the number of members contained in the cooperative population;
Figure BDA0003384846150000083
representing the total profit of the overall cooperative group;
Figure BDA0003384846150000084
cooperative yield representing sub-cooperative group χIn the present invention, the cooperative group revenue without platform facilitator is considered as zero, i.e.
Figure BDA0003384846150000085
Representing the cooperative income after the platform service provider joins x;
Figure BDA0003384846150000086
a proportion is drawn for the transaction commission.
In the above formula, the calculation of the cooperative profit for each type of cooperative group may be as follows:
a. first, the relative benefits obtained by each user through the distributed transaction are defined: compared with direct distribution network transaction, the energy purchasing unit price of the electricity purchasing users participating in the distributed transaction is lower, and one energy purchasing cost can be saved; the electricity selling price of the electricity selling user is higher than that of the direct grid connection, and higher benefits can be obtained. Therefore, the portion of the difference is defined as the relative profit gained by the user participating in the distributed transaction, and can be expressed by the following formula:
Figure BDA0003384846150000087
wherein, the first step and the second step are respectively a relative profit calculation formula of the electricity selling/purchasing user i;
Figure BDA0003384846150000088
and
Figure BDA0003384846150000089
the distributed electric energy transaction fees of the users are respectively the sum of the income/expense of each order form of the users in the current round of transaction;
Figure BDA00033848461500000810
and
Figure BDA00033848461500000811
respectively the selling electricity quantity/purchasing electricity quantity of the user i.
b. The total profit of the whole cooperation group is defined as the sum of the initial relative profits of each user, and can be expressed by the following formula:
Figure BDA00033848461500000812
since the relative profit generated by the electric quantity of the user directly trading with the power grid is zero, the cooperative profit of the cooperative group depends on the electric quantity of the trading between the users, and the formula can be rewritten as follows:
Figure BDA0003384846150000091
wherein the content of the first and second substances,
Figure BDA0003384846150000092
the amount of power in the Gamma to conduct transactions between users.
c. The cooperative gain of the sub-cooperative group can be expressed by the following formula:
Figure BDA0003384846150000093
wherein the content of the first and second substances,
Figure BDA0003384846150000094
is the amount of power in the sub-cooperative population χ that is traded between users.
(2) The final settlement amount of the user can be expressed by the following formula:
Figure BDA0003384846150000095
wherein, the first and the second are final settlement formulas of electricity selling/electricity purchasing users respectively;
Figure BDA0003384846150000096
the final settlement amount for user i.
The beneficial effect of adopting the further scheme is as follows: a plurality of order reporting modes are provided for the user in the transaction order reporting period, a perfect transaction matching mechanism is established, and diversified transaction requirements of the user are met. Meanwhile, the roles of the platform service providers are introduced to supervise the admission, the exit, the transaction process and the like of participants of the transaction platform, so that the nodes participating in the distributed transaction are all legal nodes passing qualification examination, and the possibility that the market is disturbed by malicious nodes is effectively reduced. Secondly, the platform service provider collects certain transaction commission fees based on the Shapley value method and the marginal contribution of the platform service provider, so that the recovery of the operation cost of the platform service provider and additional profit are realized, and the reasonable distribution of distributed transaction benefits is achieved.
Example 2
In the present embodiment, it is assumed that the user is directly connected to the electricity selling price pWS0.42 (yuan/kWh), the price p of the electricity purchased by the user from the gridWB1.18 (yuan/kWh). The transaction information reported by each user node 1 according to the transaction requirement is shown in the following table, wherein the transaction electric quantity>When 0, the order is regarded as a power selling order, otherwise, the order is a power purchasing order.
Figure BDA0003384846150000097
Figure BDA0003384846150000101
Each user node can establish a matching relation with the orders in the bidding pool according to the self response willingness. Meanwhile, the platform service provider calls a bidirectional Matching contract (Matching) to establish a Matching relation for the order with the bidirectional Matching mode according to the priority of 'buying/selling electricity quoted price and reporting timestamp' to form a final trading order contract, and electricity quantity which is not successfully matched is regarded as direct trading with the network operator W, and the following table is referred to.
Figure BDA0003384846150000102
In this embodiment, based on the calculation formula given in embodiment 1, the charging condition of the commission charge calculated by the platform facilitator using the sharley method is shown in fig. 6, and the final transaction settlement condition of each user and platform facilitator is shown in the following table.
Figure BDA0003384846150000103
In this embodiment, the profit conditions and the profit growth rate before and after each user participates in the distributed transaction are shown in fig. 7, where "before participation" means that the transaction electric quantity of all users is regarded as directly trading with the network operator.
As can be seen from fig. 7, the profit increasing rates of all the users who buy and sell electricity after participating in the distributed transaction are all greater than zero, which indicates that the electricity purchasing user saves an energy consumption cost after participating in the distributed transaction, and the electricity selling user obtains higher profits. Meanwhile, as can be seen from the figure, although the user a gives the lowest electricity selling price, the final profit improvement rate is higher, because although the electricity selling price of the user a is the lowest, the user a is positioned at the forefront of the electricity selling matching queue according to the priority of the electricity purchasing/selling price and reporting timestamp, so as to match with the user with the highest electricity purchasing price, thereby obtaining the transaction electricity price which is not too low. Therefore, in the two-way matching mode, the low price quoted by the user does not mean that the final transaction price and the profit growth rate are low, and is also related to the sequence of the user in the matching queue. This encourages users to increase their own enthusiasm for participating in distributed transactions, and strives for higher revenue through aggressive bidding.
Example 3
As shown in fig. 8, in some embodiments of the present invention, a block chain-based distributed electric energy bidding transaction service system is provided, where the platform building module 100 is configured to build a distributed electric energy transaction platform; a contract design module 200, configured to design an intelligent contract deployed on the distributed electric energy trading platform, where the intelligent contract includes: a transaction initiation contract, a transaction bidding contract, a two-way matching contract, and a transaction settlement contract; the user information preprocessing module 300 is configured to obtain user information, and preprocess the user information by invoking the transaction initiation contract, where the user includes a power purchase user and a power sale user; a transaction module 400, configured to perform an electric energy transaction, where the electric energy transaction includes: the system comprises a unidirectional auction mode and a bidirectional matching mode, wherein the unidirectional auction mode is realized by calling the trading auction contract, and the bidirectional matching mode is realized by calling a bidirectional matching contract; and a settlement module 500 for calling the transaction settlement contract to perform transaction settlement and token transfer to complete the transaction.
The system provided by the embodiment of the invention can be used for executing the method described in the above embodiment, and the specific method steps are shown in embodiment 1. And will not be described in detail herein.
Example 4
An embodiment of the present invention provides an electronic device, including: at least one processor 1, at least one memory 2 and a data bus 3;
wherein, the processor 1 and the memory 2 complete the communication with each other through the data bus 3; the memory 2 stores program instructions executable by the processor 1, and the processor 1 calls the program instructions to execute the method in the embodiment, for example, to execute: s101, building a distributed electric energy transaction platform; s102, designing an intelligent contract deployed on the distributed electric energy trading platform, wherein the intelligent contract comprises: a transaction initiation contract, a transaction bidding contract, a two-way matching contract, and a transaction settlement contract; s103, acquiring user information, and preprocessing the user information by calling the transaction initialization contract, wherein the users comprise electricity purchasing users and electricity selling users; s104, the electricity purchasing user and the electricity selling user carry out electric energy transaction on the distributed electric energy transaction platform, and the electric energy transaction mode comprises the following steps: the system comprises a unidirectional auction mode and a bidirectional matching mode, wherein the unidirectional auction mode is realized by calling the transaction bidding contract, and the bidirectional matching mode is realized by calling the transaction bidding contract and the bidirectional matching contract; and S105, after the transaction is successful, calling the transaction settlement contract to perform transaction settlement and token transfer, and completing the transaction.
Fig. 9 is a schematic structural block diagram of an electronic device according to an embodiment of the present application. The electronic device comprises a memory 2, a processor 1 and a data bus 3, the memory 2, the processor 1 and the data bus 3 being electrically connected to each other, directly or indirectly, to enable transmission or interaction of data. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The memory 2 can be used for storing software programs and modules, such as program instructions/modules corresponding to the electronic device provided in the embodiments of the present application, and the processor 1 executes the software programs and modules stored in the memory 2, thereby executing various functional applications and data processing. The data bus 3 can be used for signaling or data communication with other node devices.
The above embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, it should be understood that the above embodiments are merely exemplary embodiments of the present invention and are not intended to limit the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A distributed electric energy bidding trading service method based on a block chain is characterized by comprising the following steps:
building a distributed electric energy transaction platform;
designing a smart contract deployed at the distributed electrical energy trading platform, the smart contract comprising: a transaction initiation contract, a transaction bidding contract, a two-way matching contract, and a transaction settlement contract;
acquiring user information, and preprocessing the user information by calling the transaction initialization contract, wherein the users comprise electricity purchasing users and electricity selling users;
the electricity purchasing user and the electricity selling user perform electric energy transaction on the distributed electric energy transaction platform, and the electric energy transaction mode comprises the following steps: a unidirectional auction mode implemented by invoking the trade bidding contract and a bidirectional matching mode implemented by invoking the trade bidding contract;
and after the transaction is successful, calling the transaction settlement contract to perform transaction settlement and token transfer to complete the transaction.
2. The distributed electric energy bidding transaction service method according to claim 1, wherein,
the method for building the distributed electric energy transaction platform comprises the following steps:
generating a created block by using a Geth client, and initializing the created block to generate a private chain;
running the private chain and acquiring the ID and the port number of the private chain;
and the target users join the private chain by means of the ID and the port number of the private chain, so as to be connected with each other.
3. The block chain-based distributed electric energy bidding transaction service method according to claim 1, wherein the preprocessing of the user information comprises: initially setting and updating user information at the beginning of each round of distributed transaction time period:
for the users who have participated in the distributed transaction, checking whether the users have the condition that the arrearage is not paid in the previous round of transaction; if the arrearage behavior exists, closing the transaction interface and the transaction authority of the user until the arrearage is completely cleared;
and for a new user, adding the external account address of the user to the transaction initiation contract and giving the user transaction authority.
4. The block chain-based distributed electric energy bidding transaction service method according to claim 1, wherein the one-way auction mode comprises: the electricity selling users report electricity selling orders, the electricity selling orders enter the bidding pool and are sorted according to prices for the electricity purchasing users to check at any time, the electricity purchasing users can respond to satisfactory electricity selling orders according to own wishes, after the response is successful, the electricity purchasing users are regarded as buyers and sellers to establish a matching relation according to the price quoted by orders in the bidding pool, and a transaction order contract is generated.
5. The block chain-based distributed electric energy bidding transaction service method according to claim 1, wherein the bidirectional matching mode comprises: the electricity purchasing user and the electricity selling user respectively issue an electricity purchasing order and an electricity selling order, the platform carries out information matching based on the electricity purchasing order and the electricity selling order, if the matching is successful, a matching relation is established for the buyer and the seller, and a trade order contract is generated.
6. The block chain-based distributed electric energy bidding transaction service method according to claim 5, wherein the electricity purchase order or electricity sale order is expressed as:
Order=[Pi Δt(r),Ti Δt,Wi Δt,Type,Pattern]
wherein, the delta t is the transaction time interval of the current round; pi Δt(r) quotes for users i, respectively; t isi ΔtReporting a timestamp for the order of the user i; wi ΔtReporting the transaction electric quantity for a user i; type is an order Type identifier; pattern is a transaction Pattern identifier.
7. The block chain-based distributed electric energy bidding transaction service method according to claim 1, wherein the transaction settlement and token transfer comprises:
calculating transaction commission fee generated in the current round of transaction and electricity purchasing expense of the electricity purchasing user/electricity selling income of the electricity selling user; and increasing and decreasing the balance of the token of the user account on the distributed electric energy transaction platform according to the corresponding exchange rate based on the calculation result.
8. The block chain-based distributed electric energy bidding transaction service method according to claim 7, wherein the transaction commission and the extraction proportion of the commission charge are calculated according to the following formula:
Figure FDA0003384846140000021
wherein the content of the first and second substances,
Figure FDA0003384846140000022
is the total transaction commission that the PSP should receive; χ represents a certain sub-cooperative population comprised of a fraction of members of the total cooperative population t; x!PSPRepresenting all possible sub-cooperation group sets which do not contain the platform service provider; | τ |, | χ | represents the number of members contained in the cooperative population;
Figure FDA0003384846140000023
representing the total profit of the overall cooperative group;
Figure FDA0003384846140000024
the cooperative yield of the sub-cooperative group χ is expressed, and in the present invention, the cooperative group yield not including the platform facilitator is regarded as 0, that is, the cooperative group yield
Figure FDA0003384846140000025
Representing the cooperative income after the platform service provider joins x;
Figure FDA0003384846140000026
a proportion is drawn for the transaction commission.
9. A distributed electric energy bidding trading service system based on a block chain is characterized by comprising:
the platform building module is used for building a distributed electric energy transaction platform;
a contract design module for designing an intelligent contract deployed on the distributed electric energy trading platform, the intelligent contract comprising: a transaction initiation contract, a transaction bidding contract, a two-way matching contract, and a transaction settlement contract;
the user information preprocessing module is used for acquiring user information and preprocessing the user information by calling the transaction initialization contract, wherein the user comprises an electricity purchasing user and an electricity selling user;
the transaction module is used for carrying out electric energy transaction, and the electric energy transaction mode comprises the following steps: the system comprises a unidirectional auction mode and a bidirectional matching mode, wherein the unidirectional auction mode is realized by calling the trading auction contract, and the bidirectional matching mode is realized by calling a bidirectional matching contract;
and the settlement module is used for calling the transaction settlement contract to perform transaction settlement and token transfer to complete the transaction.
10. An electronic device, comprising: at least one processor, at least one memory, and a data bus;
the processor and the memory complete mutual communication through the data bus; the memory stores program instructions executable by the processor, the processor calling the program instructions to perform the method of any of claims 1 to 8.
CN202111449210.5A 2021-11-30 2021-11-30 Block chain-based distributed electric energy bidding transaction service method and system Pending CN114140202A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111449210.5A CN114140202A (en) 2021-11-30 2021-11-30 Block chain-based distributed electric energy bidding transaction service method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111449210.5A CN114140202A (en) 2021-11-30 2021-11-30 Block chain-based distributed electric energy bidding transaction service method and system

Publications (1)

Publication Number Publication Date
CN114140202A true CN114140202A (en) 2022-03-04

Family

ID=80386550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111449210.5A Pending CN114140202A (en) 2021-11-30 2021-11-30 Block chain-based distributed electric energy bidding transaction service method and system

Country Status (1)

Country Link
CN (1) CN114140202A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114529376A (en) * 2022-04-21 2022-05-24 南方电网数字电网研究院有限公司 Energy exchange data processing method and device, computer equipment and storage medium
CN114549149A (en) * 2022-04-24 2022-05-27 南方电网数字电网研究院有限公司 Smart grid energy transaction data processing method and device and computer equipment
CN115292419A (en) * 2022-10-09 2022-11-04 深圳市明源云科技有限公司 Data processing method, device and equipment based on poH consensus and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114529376A (en) * 2022-04-21 2022-05-24 南方电网数字电网研究院有限公司 Energy exchange data processing method and device, computer equipment and storage medium
CN114549149A (en) * 2022-04-24 2022-05-27 南方电网数字电网研究院有限公司 Smart grid energy transaction data processing method and device and computer equipment
CN115292419A (en) * 2022-10-09 2022-11-04 深圳市明源云科技有限公司 Data processing method, device and equipment based on poH consensus and storage medium

Similar Documents

Publication Publication Date Title
CN111563786B (en) Virtual power plant regulation and control platform based on block chain and operation method
Liu et al. Electric vehicle power trading mechanism based on blockchain and smart contract in V2G network
Doan et al. Peer-to-peer energy trading in smart grid through blockchain: A double auction-based game theoretic approach
Hahn et al. Smart contract-based campus demonstration of decentralized transactive energy auctions
CN114140202A (en) Block chain-based distributed electric energy bidding transaction service method and system
Wang et al. Design of integrated energy market cloud service platform based on blockchain smart contract
US20030041002A1 (en) Method and system for conducting an auction for electricity markets
Moniruzzaman et al. Blockchain and cooperative game theory for peer-to-peer energy trading in smart grids
CN108335202B (en) Distributed energy transaction system based on block chain
Gunarathna et al. Reviewing global peer-to-peer distributed renewable energy trading projects
KR101957797B1 (en) Method for virtual electric power trading between microgrids based on bidding way and agent apparatus for the same
CN113393227A (en) Decentralized frequency modulation auxiliary transaction method based on multi-block chain
CN109919761A (en) A kind of block platform chain and method of commerce carrying out intelligent micro-grid transaction
CN112365119A (en) Distributed database support-based distributed transaction model for electric energy of power distribution network
CN114358929A (en) Distributed energy centralized transaction method and system based on block chain
CN113643131A (en) Microgrid distributed energy trading method and system based on block chain
CN113793140A (en) Pre-consumption method, system, storage medium and supervision platform based on digital currency
Chen et al. Fair auctioning and trading framework for cloud virtual machines based on blockchain
Debe et al. Blockchain-based energy trading in electric vehicles using an auctioning and reputation scheme
Karandikar et al. RenewLedger: Renewable energy management powered by Hyperledger Fabric
CN115409567A (en) Method for constructing non-cooperative game model based on intelligent power grid block chain
CN117541002A (en) Shared stored energy control method, device and readable storage medium considering multiple hybrid games
CN114881639A (en) Multi-stage prepayment transaction method, system and storage medium based on block chain
Umar et al. Peer-to-peer decentralized community energy management system using blockchain technology
CN113362178A (en) Calculation method and device for guiding power distribution network to charge users participating in P2P transaction

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220304

RJ01 Rejection of invention patent application after publication