CN116934344A - Micro-grid transaction method and system based on blockchain - Google Patents

Micro-grid transaction method and system based on blockchain Download PDF

Info

Publication number
CN116934344A
CN116934344A CN202311197565.9A CN202311197565A CN116934344A CN 116934344 A CN116934344 A CN 116934344A CN 202311197565 A CN202311197565 A CN 202311197565A CN 116934344 A CN116934344 A CN 116934344A
Authority
CN
China
Prior art keywords
transaction
user
qualified
micro
users
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.)
Granted
Application number
CN202311197565.9A
Other languages
Chinese (zh)
Other versions
CN116934344B (en
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.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN202311197565.9A priority Critical patent/CN116934344B/en
Publication of CN116934344A publication Critical patent/CN116934344A/en
Application granted granted Critical
Publication of CN116934344B publication Critical patent/CN116934344B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • 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/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • 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

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Finance (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Public Health (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Tourism & Hospitality (AREA)
  • Computer Security & Cryptography (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Water Supply & Treatment (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a micro-grid transaction method and system based on a blockchain, and belongs to the field of micro-grid transaction. According to the method, firstly, qualified users are screened out from users applying for micro-grid market trading according to preset micro-grid market admittance conditions. Then, the matching users are determined according to the time of the application transaction, the transaction quotation, the trust value and the benefit value of the qualified users. And then, generating a workflow network according to the admission condition, the behavior audit and the transaction information of the matched user. Finally, intelligent contracts are dynamically generated according to the workflow network, and broadcast and executed in the blockchain network, so that transaction settlement is realized. The method fully utilizes transparency, non-tamper property of the blockchain and automatic execution of the intelligent contract, and can improve efficiency and safety of micro-grid transaction.

Description

Micro-grid transaction method and system based on blockchain
Technical Field
The application relates to the field of micro-grid trading, in particular to a micro-grid trading method and system based on blockchain.
Background
A micro grid is a new type of power system that can be operated with connection or disconnection to a main grid. The advent of micro-grids has enabled power consumers to choose to purchase sources of power, creating a new power market. However, the operation of the micro-grid trading market needs to solve many problems, such as how to fairly and equitably perform trade matching, how to guarantee transparency and security of trade, etc.
Conventional microgrid trading methods typically rely on centralized market operators for trade matching and settlement, which presents some problems. First, a centralized market operator may risk misuse of market predominance, affecting fairness of transactions. Second, transparency and security of transaction information are difficult to be ensured, and there may be a risk that transaction data is tampered with or leaked. Finally, conventional transaction methods generally require manual transaction matching and settlement, which is inefficient.
The blockchain technology provides new possibility for solving the problems in micro-grid transaction by the characteristics of decentralization, high transparency, non-tampering, intelligent contract and the like. However, how to apply the blockchain technology to the micro-grid transaction, designing a fair, efficient and safe micro-grid transaction method is a current urgent problem to be solved.
Disclosure of Invention
The application provides a micro-grid transaction method and a micro-grid transaction system based on a blockchain, which are used for improving the efficiency and the safety of micro-grid transaction.
The micro-grid transaction method based on the blockchain comprises the following steps: screening qualified users from users applying for micro-grid market trading according to preset micro-grid market admittance conditions; determining a matched user according to the time of the qualified user applying for transaction, the transaction quotation, the trust value and the benefit value; generating a workflow network according to the admission condition, the behavior audit and the transaction information of the matched user; and dynamically generating an intelligent contract according to the workflow network, broadcasting and executing the intelligent contract in a blockchain network, and further realizing transaction settlement.
Still further, the screening qualified users from users applying for the market trade of the micro grid according to the preset market admittance conditions of the micro grid includes: verifying the identity information of the user applying for the micro-grid market transaction, and determining the qualified identity information user; checking the access voltage of the identity information qualified user, and confirming that the user meeting the voltage requirement of the micro-grid is satisfied; verifying the users meeting the voltage requirements of the micro-grid, and confirming the users with the installed intelligent electric meters; and confirming the installed intelligent ammeter user as a qualified user.
Further, the verifying the user meeting the voltage requirement of the micro-grid, and confirming the user with the smart meter installed, includes: and verifying the users meeting the voltage requirements of the micro-grid, judging whether the users meeting the voltage requirements of the micro-grid correspond to intelligent electric meters, and confirming the installed intelligent electric meter users, wherein the intelligent electric meters are connected with a blockchain client, and the blockchain client predicts the power generation and energy consumption data corresponding to the users meeting the voltage requirements of the micro-grid through the connected intelligent electric meters.
Further, the determining the matching user according to the time of the qualified user applying for the transaction, the transaction quotation, the comprehensive trust value and the benefit value comprises the following steps: determining a corresponding sequencing queue set according to the time of the qualified user applying for the transaction, the transaction quotation, the comprehensive trust value and the benefit value, wherein the sequencing queue set comprises a time sequencing queue, a price sequencing queue, a trust value sequencing queue and a benefit value sequencing queue; for each qualified user, calculating a ranking mean value corresponding to the qualified user based on the ranking queue set, wherein the ranking mean value is an average number of ranking results of the qualified user in the time ranking queue, the price ranking queue, the comprehensive trust value ranking queue and the benefit value ranking queue; and sorting the qualified users according to the sorting mean value, and determining matched users, wherein the qualified users with small sorting mean value are preferentially matched, and if the sorting mean values of the plurality of qualified users are the same, the qualified users with high benefit values are preferentially matched.
Further, the integrated trust value of the qualified user is calculated by the following formula:, wherein ,/>Is the integrated trust value of the ith said qualified user,/->Is the i-th transaction score trust value of said qualified user,>is a weight factor, ++>,/>,/>Is the trust value of the ith qualified user.
Further, the benefit value of the qualified user is calculated by the following formula:, wherein ,/>Benefit value for the ith said qualified user, < > and>for the i-th said trusted value of qualified user, -/->Is a risk factor>User power for the ith said qualified user, +.>Scoring the user behavior of the ith said qualified user,/-for>And (5) satisfaction degree of the ith qualified user.
Still further, the generating a workflow network according to the admission condition, the behavior audit and the transaction information of the matched user includes: and generating a corresponding workflow network according to the access conditions, behavior auditing and transaction information of the matched user, wherein the workflow network is stored and expressed in a PNML file form, and comprises a transaction publisher, a auction player, settlement after successful transaction and conditions for executing the transaction.
Further, the dynamically generating the intelligent contract according to the workflow network, broadcasting and executing the intelligent contract in the blockchain network, and further realizing transaction settlement, includes: dynamically generating corresponding access contracts, auditing contracts and transaction contracts based on a Hyperledger Fabric blockchain platform according to the corresponding workflow network, wherein the chain codes of the access contracts, auditing contracts and transaction contracts at least comprise main () functions, workflow functions and transition functions; broadcasting the generated admission contracts, auditing contracts and transaction contracts to all network nodes in the blockchain network; verifying the identity of the matched user by using the admission contract to generate a verification result, and analyzing the trust value and the benefit value of the matched user by using the auditing contract to generate an analysis result; and executing the transaction contract according to the verification result and the analysis result to finish transaction settlement.
Still further, the method further comprises: after transaction settlement is completed, acquiring a settlement contract of the matched user; and updating the trust value of the matched user according to the feedback of the matched user on the settlement contract and the score of the transaction.
The application provides a micro-grid transaction system based on a blockchain, which comprises the following steps: the screening unit is used for screening qualified users from users applying for micro-grid market trading according to preset micro-grid market admittance conditions; the determining unit is used for determining the matched user according to the time of the qualified user applying for the transaction, the transaction quotation, the trust value and the benefit value; the generating unit is used for generating a workflow network according to the admission condition, the behavior audit and the transaction information of the matched user; and the realization unit is used for dynamically generating intelligent contracts according to the workflow network, broadcasting and executing the intelligent contracts in the blockchain network, and further realizing transaction settlement.
The beneficial technical effects of the application are mainly embodied in the following aspects:
(1) When determining matching users, not only the time of applying for the transaction and the transaction quotation are considered, but also the trust value and benefit value of the users are considered. The method comprehensively considers a plurality of factors, can more accurately find the most suitable transaction matching, can ensure the fairness of the transaction, and avoids unfairness of the transaction caused by the advantage of a certain party.
(2) Through the blockchain technology, the automation of the transaction can be realized, and the transaction efficiency is greatly improved.
(3) The decentralization characteristic of the blockchain technology and the automatic execution characteristic of the intelligent contract can effectively prevent fraudulent conduct in the transaction process, and the transaction safety is improved.
(4) The method for dynamically generating the intelligent contracts enables the contracts to be more flexible and can adapt to various different transaction conditions.
Drawings
Fig. 1 is a flowchart of a micro-grid transaction method based on blockchain according to a first embodiment of the present application.
Fig. 2 is a schematic diagram of a micro-grid transaction system based on blockchain according to a second embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. The present application may be embodied in many other forms than those herein described, and those skilled in the art will readily appreciate that the present application may be similarly embodied without departing from the spirit or essential characteristics thereof, and therefore the present application is not limited to the specific embodiments disclosed below.
The first embodiment of the application provides a micro-grid transaction method based on a blockchain. Referring to fig. 1, a schematic diagram of a first embodiment of the present application is shown. A first embodiment of the present application is described in detail below with reference to fig. 1.
Step S101: and screening qualified users from users applying for micro-grid market trading according to preset micro-grid market admittance conditions.
In this embodiment, screening qualified users from users applying for market trading of the micro grid according to preset market admittance conditions of the micro grid may include:
verifying identity information of a user applying for micro-grid market transaction to obtain an identity information qualified user;
checking access voltage of the user with qualified identity information to confirm that the user meeting the voltage requirement of the micro-grid is met;
verifying the users meeting the voltage requirement of the micro-grid, and confirming that the users are provided with the intelligent electric meter;
and confirming the user of the installed intelligent electric meter as a qualified user.
For verification of the user meeting the voltage requirement of the micro-grid, confirming the user with the smart meter installed can comprise:
and verifying the user meeting the voltage requirement of the micro-grid, judging whether the user installs the intelligent electric meter, and confirming that the user of the intelligent electric meter is installed, wherein the intelligent electric meter is required to be connected with the blockchain client, and the blockchain client can predict the power generation and energy consumption data corresponding to the user meeting the voltage requirement of the micro-grid through the connected intelligent electric meter.
In the micro-grid trading method provided in this embodiment, a micro-grid market admission mechanism needs to be established. The implementation steps of this mechanism include the following:
first, the microgrid user needs to submit an application material to the microgrid market supervision authority. For example, the user needs to provide identification, power demand reports, installation certification for smart meters, etc. The supervision organization can verify the identity information of the user and also check whether the access voltage of the user meets the requirements of the micro-grid. For example, if the voltage requirement of the microgrid is 220V, then the access voltage of the user must also be 220V. In addition, the supervising mechanism verifies whether the user installs the smart meter. The intelligent ammeter needs to be connected with a blockchain client so as to monitor and record the power generation and utilization data of a user, predict the power generation and energy consumption of the user and realize information exchange with other nodes.
If the user passes the verification described above, the user may be admitted to the microgrid market. The regulatory agency records the user information and broadcasts the user information to the whole network. For example, a regulatory agency may issue a message on the blockchain network stating that the user has been authenticated and admitted to the marketplace. After all nodes in the whole network reach consensus, the supervision organization returns a digital certificate to the user, and the success of the user registration is marked. At this time, the trust value of the user is initialized, and the user must pay a certain amount of deposit to be deposited into the account when logging in the blockchain client for the first time, so as to formally enter the market. For example, the user may need to pay a 1000 yuan deposit. If the user fails the above-described authentication, the user's registration fails and such user cannot be admitted to the microgrid market.
When a user applies to exit the micro-grid market, the supervising mechanism examines the trade behavior of the user in the micro-grid market. For example, a supervising authority may check the transaction records of the user to see if there is an illegal activity, such as malicious manipulation of market prices, etc. If the user passes the audit, i.e., there is no transaction violation, the supervising entity will broadcast an exit notification over the network. When other nodes reach consensus, the supervision organization can immediately cancel the registration information and the digital certificate of the user, and the user can extract deposit in the account at the moment. For example, the user may extract a 1000-ary deposit previously paid. If the user fails the audit, i.e., there is a transaction violation, the supervising authority deducts the deposit from the user's account and prohibits the user from entering the marketplace.
Step S102: and determining the matched user according to the time of the qualified user applying for the transaction, the transaction quotation, the trust value and the benefit value.
The method specifically comprises the following steps:
determining a corresponding sorting queue set according to the time of the qualified user applying for the transaction, the transaction quotation, the comprehensive trust value and the benefit value, wherein the sorting queue set can comprise a time sorting queue, a price sorting queue, a trust value sorting queue and a benefit value sorting queue, for example, the qualified user ranks fifth in the time sorting queue, third in the price sorting queue, first in the trust value sorting queue and tenth in the benefit value sorting queue;
for each qualified user, calculating a sequencing mean value corresponding to the qualified user based on a sequencing queue set, wherein the sequencing mean value is the average number of sequencing results of the qualified user in a time sequencing queue, a price sequencing queue, a comprehensive trust value sequencing queue and a benefit value sequencing queue;
and sorting the qualified users according to the calculated average value, and determining the matched users, wherein the average value is small in priority matching, and if the average values of the plurality of qualified users are the same, sorting according to the benefit values of the qualified users, and the benefit values are high in priority matching.
In the micro-grid trading method, the corresponding sorting result can be determined according to the time of the qualified user applying for trading, the trading quotation, the comprehensive trust value and the benefit value. For example, if the time of the application transaction of qualified user A is earlier than that of qualified user B, then the position of qualified user A in the time-ordered queue is better than that of qualified user B, e.g., the position of qualified user A in the time-ordered queue is the second bit and the position of qualified user B in the time-ordered queue is the third bit. Similarly, the price ordering queue, the trust value ordering queue and the benefit value ordering queue can be determined according to the transaction quotation, the comprehensive trust value and the benefit value of the qualified user.
Then, a ranking mean corresponding to the qualified user may be calculated based on ranking results of the qualified user in the time ranking queue, the price ranking queue, the comprehensive trust value ranking queue, and the benefit value ranking queue. This ranking average is, for example, the average number of ranking results of the user in the time ranking queue, price ranking queue, integrated trust value ranking queue, and benefit value ranking queue. For example only, if the ranking results of qualified user a in the time ranking queue, price ranking queue, trust value ranking queue, and benefit value ranking queue are bits 1, 2, 3, and 4, respectively, then the ranking mean of qualified user a is (1+2+3+4)/4=2.5.
For another example, the ranking mean corresponding to the qualified users is a weighted average of ranking results of the qualified users in a time ranking queue, a price ranking queue, a comprehensive trust value ranking queue, and a benefit value ranking queue.
For example only, the ranking mean corresponding to a qualified user may be calculated based on the following formula:
wherein ,for the sorting mean value corresponding to the ith qualified user, < ->Ordering result in time ordering queue for ith qualified user, +.>Ordering result in price ordering queue for ith qualified user, +.>Ordering result in the comprehensive trust value ordering queue for the ith qualified user,/th qualified user>Is the ithRanking results of individual qualified users in benefit value ranking queue, < >>、/>Is->All are preset weights.
Finally, the users can be ranked according to the computed ranking mean to determine matching users. For example, if the ranked average of user a is less than the ranked average of user B, then user a will be preferentially matched. If the ranking means of the plurality of users are the same, the users are ranked according to their benefit values, and users with high benefit values are preferentially matched. Time and price queues are ordered from small to large, as earlier times and lower prices are generally considered to be more optimal. While the confidence value queue and benefit value queue are ordered from large to small, as higher confidence values and benefit values are generally considered to be more optimal. Thus, when calculating the ranking mean, a smaller ranking mean represents an earlier time, a lower price, a higher trust value, and a higher benefit value, which is generally considered a better transaction requirement. So in this case, the rank average is a small priority match.
The comprehensive trust value of the qualified user is calculated by the following formula:
in the above formula, the meaning of each parameter is as follows:
: the i-th qualified user's comprehensive trust value is obtained by considering the user's trust value and the user's transaction score trust value, and then by weightingThe factors are weighted and averaged. The integrated trust value is a more comprehensive trust level assessment that considers not only the user's basic trust value, but also the user's transaction behavior.
: the trust value of the i-th qualified user is an evaluation value obtained based on the past behavior, reputation and other factors of the user. This value is typically initialized upon registration of the user and updated upon transaction or other activity by the user based on their behavior.
: the i-th qualified user's transaction score trust value, which is an evaluation value derived based on the user's transaction behavior. For example, if a user appears to be very reliable in past transactions, his transaction score trust value may be high.
: this is the weighting factor, +.>,/>It determines the importance of each of the user's trust value and the user's transaction scoring trust value in calculating the integrated trust value. />The value of (2) is between 0 and 1, if +.>The closer the value of (2) is to 1, the greater the weight of the user's trust value in calculating the integrated trust value; on the contrary, if->The closer the value of (2) is to 0, the more trust in the user's transaction score isThe greater the weight in calculating the integrated trust value.
The benefit value of the qualified user is calculated by the following formula:
wherein ,the benefit value of the ith qualified user is obtained by considering the trust value, risk factor, user power, user behavior score and user satisfaction of the user and then by a specific calculation mode. The benefit value is a comprehensive evaluation index, which can help us understand the benefits that users may obtain in micro-grid transactions. />The trust value of the ith qualified user is an evaluation value obtained based on the past behavior, reputation and other factors of the user. This value is typically initialized upon registration of the user and updated upon transaction or other activity by the user based on their behavior. />As a risk factor, it reflects the degree of risk of conducting a transaction. The risk factors may be affected by a variety of factors, such as the market environment, the reputation of the user, etc. />The user power for the ith qualified user, which may be the amount of power that the user may provide or require during a particular time. />The i-th qualified user is scored for user behavior, which is an evaluation value derived based on the user's transaction behavior. For example, if a user appears to be very reliable in past transactions, his behavioral score may be high. />The satisfaction degree of the ith qualified user is reflected by the satisfaction degree of the user on the micro-grid transaction. Satisfaction may be affected by a variety of factors, such as efficiency of the transaction, fairness of the transaction, etc.
Step S103: and generating a workflow network according to the admission condition, the behavior audit and the transaction information of the matched user.
The method specifically comprises the following steps:
and generating a corresponding workflow network according to the access condition, behavior audit and transaction information of the matched user, wherein the workflow network is stored and expressed in a PNML file form, and comprises a transaction publisher and a auction player, and conditions for settlement and execution of the transaction after the transaction is successful.
In this process, a corresponding workflow network is first generated based on the admission conditions, behavioral audits, and transaction information of the matching users. The workflow net is a graphical representation that can help understand and track the overall process of a transaction. This workflow net is stored and expressed in the form of PNML (Petri Net Markup Language) files. PNML is an XML-based markup language designed to represent Petri nets, a mathematical model used to describe and analyze the behavior of a system.
In PNML files, different labels are used to represent different parts of the workflow network:
< place > tag: this tag represents the transaction publisher and the bidder. In a workflow network, a "place" may be considered a state or condition, such as "the user has submitted a transaction application" or "the user's offer has been accepted".
< transition > tag: this tag represents the settlement after the transaction is successful. In a workflow network, a "transition" may be considered an event or action, such as "the user paid a bid" or "the transaction was confirmed".
< arc > tag: this tag defines the conditions under which different transactions are performed. In a workflow network, an "arc" can be seen as a connection from a state (place) to an event (transition) or from an event to a state.
And then dynamically generating corresponding admission contracts, audit contracts and transaction contracts according to the workflow network. These contracts are intelligent contracts for the Hyperledger Fabric blockchain platform. Hyperledger Fabric is an open source blockchain platform that supports smart contracts, a computer program that can automatically execute and enforce contract terms.
In the smart contract of Hyperledger Fabric, there are typically several main parts:
main () function: this is the entry point for the smart contract, which defines the initialization and transaction processing logic for the smart contract.
Workflow function: this is an external function that can be invoked by the client. This function describes conditions for performing transitions (transitions), such as "if the user's offer is accepted, then payment is performed".
Transition function: this is an internal function that can only be called by workflow functions or other transition functions in the same chain code. This function encapsulates business logic within the transition, such as "deduct payment from user's account".
By the method, the intelligent contract can be dynamically generated and executed according to the access conditions, the behavior audit and the transaction information of the user, so that the transaction process of the micro-grid is realized.
Step S104: and dynamically generating intelligent contracts according to the workflow network, broadcasting and executing the intelligent contracts in the blockchain network, and further realizing transaction settlement.
The method specifically comprises the following steps:
dynamically generating corresponding admission contracts, auditing contracts and transaction contracts based on a Hyperledger Fabric blockchain platform according to a corresponding workflow network, wherein the main content of the chain code comprises main () functions, workflow functions and transition functions;
broadcasting the generated admission contracts, auditing contracts and transactions to all network nodes in a blockchain network;
verifying the identity of the matched user by using the admission contract to generate a verification result, and analyzing the trust value and the benefit value of the matched user by using the auditing contract to generate an analysis result;
and executing the transaction contract according to the verification result and the analysis result to finish transaction settlement.
After transaction settlement is completed, obtaining a settlement contract matched with the user;
and updating the trust value of the matched user according to the feedback of the matched user on the settlement contract and the grading of the transaction.
Firstly, corresponding admission contracts, auditing contracts and transaction contracts are dynamically generated according to a workflow network. These contracts are all intelligent contracts for the Hyperledger Fabric blockchain platform. Hyperledger Fabric is an open source blockchain platform that supports smart contracts, a computer program that can automatically execute and enforce contract terms.
Next, the generated smart contracts (including admission contracts, audit contracts, trade contracts) are broadcast in the blockchain network to the full network nodes. This means that all nodes will receive the smart contract and can execute it.
The identity of the matching user is then verified using the admission contract. This process may include checking the user's identification, such as a digital signature or public key. Meanwhile, the trust value and the benefit value of the user are analyzed by using the auditing contract. This process may include calculating trust and benefit values for the users and comparing whether they meet the criteria of the transaction.
And executing the transaction contract according to the verification and analysis results to finish transaction settlement. This process may include deducting a payment amount from the buyer's account and then transferring this amount to the seller's account.
After completion of the transaction settlement, a settlement contract matching the user is obtained. This contract may include details of the transaction, such as the amount of the transaction, the time, and the identity of both parties.
And finally, updating the trust value of the matched user according to the feedback of the matched user on the settlement contract and the grading of the transaction. This process may include calculating a new trust value and then updating this value into the user's account. Thus, the whole micro-grid transaction process is completed.
In the above embodiment, a micro-grid transaction method based on a blockchain is provided, and correspondingly, the application also provides a micro-grid transaction system based on the blockchain. Referring to fig. 2, a schematic diagram of an embodiment of a blockchain-based micro grid trading system according to the present application is shown. Since this embodiment, i.e. the second embodiment, is substantially similar to the method embodiment, the description is relatively simple, and reference should be made to the description of the method embodiment for relevant points. The device embodiments described below are merely illustrative.
A second embodiment of the present application provides a blockchain-based micro-grid trading system, comprising:
a screening unit 201, configured to screen qualified users from users applying for market trading of the micro grid according to preset market admittance conditions of the micro grid;
a determining unit 202, configured to determine a matching user according to the time of the qualified user applying for the transaction, the transaction quotation, the trust value and the benefit value;
a generating unit 203, configured to generate a workflow network according to the admission condition, the behavior audit and the transaction information of the matched user;
the implementation unit 204 is configured to dynamically generate an intelligent contract according to the workflow network, and broadcast and execute the intelligent contract in the blockchain network, thereby implementing transaction settlement.
While the application has been described in terms of preferred embodiments, it is not intended to be limiting, but rather, it will be apparent to those skilled in the art that various changes and modifications can be made herein without departing from the spirit and scope of the application as defined by the appended claims.

Claims (10)

1. A blockchain-based micro-grid trading method, comprising:
screening qualified users from users applying for micro-grid market trading according to preset micro-grid market admittance conditions;
determining a matched user according to the time of the qualified user applying for transaction, the transaction quotation, the trust value and the benefit value;
generating a workflow network according to the admission condition, the behavior audit and the transaction information of the matched user;
and dynamically generating an intelligent contract according to the workflow network, broadcasting and executing the intelligent contract in a blockchain network, and further realizing transaction settlement.
2. The blockchain-based micro-grid trading method according to claim 1, wherein the screening qualified users from users applying for micro-grid market trading according to preset micro-grid market admission conditions comprises:
verifying the identity information of the user applying for the micro-grid market transaction, and determining the qualified identity information user;
checking the access voltage of the identity information qualified user, and confirming that the user meeting the voltage requirement of the micro-grid is satisfied;
verifying the users meeting the voltage requirements of the micro-grid, and confirming the users with the installed intelligent electric meters;
and confirming the installed intelligent ammeter user as a qualified user.
3. The blockchain-based micro-grid trading method of claim 2, wherein the verifying the user meeting the micro-grid voltage requirement, confirming the installed smart meter user, comprises:
and verifying the users meeting the voltage requirements of the micro-grid, judging whether the users meeting the voltage requirements of the micro-grid correspond to intelligent electric meters, and confirming the installed intelligent electric meter users, wherein the intelligent electric meters are connected with a blockchain client, and the blockchain client predicts the power generation and energy consumption data corresponding to the users meeting the voltage requirements of the micro-grid through the connected intelligent electric meters.
4. The blockchain-based microgrid trading method according to claim 1, wherein said determining matching users based on time of application trading, trading offers, integrated trust values and benefit values of said qualified users comprises:
determining a corresponding sequencing queue set according to the time of the qualified user applying for the transaction, the transaction quotation, the comprehensive trust value and the benefit value, wherein the sequencing queue set comprises a time sequencing queue, a price sequencing queue, a trust value sequencing queue and a benefit value sequencing queue;
for each qualified user, calculating a ranking mean value corresponding to the qualified user based on the ranking queue set, wherein the ranking mean value is an average number of ranking results of the qualified user in the time ranking queue, the price ranking queue, the comprehensive trust value ranking queue and the benefit value ranking queue;
and sorting the qualified users according to the sorting mean value, and determining matched users, wherein the qualified users with small sorting mean value are preferentially matched, and if the sorting mean values of the plurality of qualified users are the same, the qualified users with high benefit values are preferentially matched.
5. The blockchain-based microgrid transaction method according to claim 4, wherein the integrated trust value of the qualified users is calculated by the following formula:
wherein ,is the integrated trust value of the ith said qualified user,/->Is the i-th transaction score trust value of said qualified user,>is a weight factor, ++>,/>,/>Is the trust value of the ith qualified user.
6. The blockchain-based microgrid transaction method according to claim 4, wherein the benefit value of the qualified users is calculated by the following formula:
wherein ,benefit value for the ith said qualified user, < > and>for the i-th said trusted value of qualified user, -/->Is a risk factor>User power for the ith said qualified user, +.>Scoring the user behavior of the ith said qualified user,/-for>And (5) satisfaction degree of the ith qualified user.
7. The blockchain-based microgrid transaction method according to claim 1, wherein said generating a workflow network according to the admission conditions, behavioral audits and transaction information of said matching users comprises:
and generating a corresponding workflow network according to the access conditions, behavior auditing and transaction information of the matched user, wherein the workflow network is stored and expressed in a PNML file form, and comprises a transaction publisher, a auction player, settlement after successful transaction and conditions for executing the transaction.
8. The blockchain-based micro grid transaction method of claim 7, wherein the dynamically generating the smart contract according to the workflow network and broadcasting and executing the smart contract in the blockchain network to further realize transaction settlement comprises:
dynamically generating corresponding access contracts, auditing contracts and transaction contracts based on a Hyperledger Fabric blockchain platform according to the corresponding workflow network, wherein the chain codes of the access contracts, auditing contracts and transaction contracts at least comprise main () functions, workflow functions and transition functions;
broadcasting the generated admission contracts, auditing contracts and transaction contracts to all network nodes in the blockchain network;
verifying the identity of the matched user by using the admission contract to generate a verification result, and analyzing the trust value and the benefit value of the matched user by using the auditing contract to generate an analysis result;
and executing the transaction contract according to the verification result and the analysis result to finish transaction settlement.
9. The blockchain-based microgrid transaction method of claim 8, further comprising:
after transaction settlement is completed, acquiring a settlement contract of the matched user;
and updating the trust value of the matched user according to the feedback of the matched user on the settlement contract and the score of the transaction.
10. A blockchain-based microgrid trading system applying the blockchain-based microgrid trading method of any of claims 1-9, comprising:
the screening unit is used for screening qualified users from users applying for micro-grid market trading according to preset micro-grid market admittance conditions;
the determining unit is used for determining the matched user according to the time of the qualified user applying for the transaction, the transaction quotation, the trust value and the benefit value;
the generating unit is used for generating a workflow network according to the admission condition, the behavior audit and the transaction information of the matched user;
and the realization unit is used for dynamically generating intelligent contracts according to the workflow network, broadcasting and executing the intelligent contracts in the blockchain network, and further realizing transaction settlement.
CN202311197565.9A 2023-09-18 2023-09-18 Micro-grid transaction method and system based on blockchain Active CN116934344B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311197565.9A CN116934344B (en) 2023-09-18 2023-09-18 Micro-grid transaction method and system based on blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311197565.9A CN116934344B (en) 2023-09-18 2023-09-18 Micro-grid transaction method and system based on blockchain

Publications (2)

Publication Number Publication Date
CN116934344A true CN116934344A (en) 2023-10-24
CN116934344B CN116934344B (en) 2024-01-05

Family

ID=88381131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311197565.9A Active CN116934344B (en) 2023-09-18 2023-09-18 Micro-grid transaction method and system based on blockchain

Country Status (1)

Country Link
CN (1) CN116934344B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050256818A1 (en) * 2004-04-30 2005-11-17 Xerox Corporation Workflow auto generation from user constraints and hierarchical dependence graphs for workflows
CN108416696A (en) * 2018-02-28 2018-08-17 国网江苏省电力有限公司淮安供电分公司 Region electric power free transaction method based on block chain technology
CN110288307A (en) * 2019-05-13 2019-09-27 西安电子科技大学 Intelligent contract co-development system and data processing method based on Fabric block chain
CN111932253A (en) * 2020-08-11 2020-11-13 华北电力大学(保定) Electric energy transaction method based on credit consensus mechanism
CN115829744A (en) * 2022-11-25 2023-03-21 西安电子科技大学广州研究院 Microgrid transaction method, storage medium, equipment and system based on block chain

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050256818A1 (en) * 2004-04-30 2005-11-17 Xerox Corporation Workflow auto generation from user constraints and hierarchical dependence graphs for workflows
CN108416696A (en) * 2018-02-28 2018-08-17 国网江苏省电力有限公司淮安供电分公司 Region electric power free transaction method based on block chain technology
CN110288307A (en) * 2019-05-13 2019-09-27 西安电子科技大学 Intelligent contract co-development system and data processing method based on Fabric block chain
CN111932253A (en) * 2020-08-11 2020-11-13 华北电力大学(保定) Electric energy transaction method based on credit consensus mechanism
CN115829744A (en) * 2022-11-25 2023-03-21 西安电子科技大学广州研究院 Microgrid transaction method, storage medium, equipment and system based on block chain

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
孙童: ""基于区块链技术的多微网共享储能能源交易研究"", 《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》, pages 042 - 2714 *
郭策;: "基于区块链技术的异构微电网交易系统设计", 电子世界, no. 05 *

Also Published As

Publication number Publication date
CN116934344B (en) 2024-01-05

Similar Documents

Publication Publication Date Title
Liu et al. Electric vehicle power trading mechanism based on blockchain and smart contract in V2G network
Kirli et al. Smart contracts in energy systems: A systematic review of fundamental approaches and implementations
Rozario et al. Auditing with Smart Contracts.
Dzobo et al. Proposed framework for blockchain technology in a decentralised energy network
CN116385164B (en) Block chain-based carbon asset transaction system and method
Lee et al. Stochastic project financing analysis system for construction
US20230134095A1 (en) Systems, devices and methods for tracking authenticated clean energy with blockchains
CN106920168A (en) Futures point valency exchange information processing method and device
Chen et al. Fair auctioning and trading framework for cloud virtual machines based on blockchain
Rastegar et al. Stochastic programming model for bidding price decision in construction projects
Acharya et al. False data injection attacks on data markets for electric vehicle charging stations
Solaiman et al. Model checking correctness properties of electronic contracts
Akcay An analytic network process based risk assessment model for PPP hydropower investments
Debe et al. Blockchain-based energy trading in electric vehicles using an auctioning and reputation scheme
CN114140250A (en) Block chain-based power transaction method and device, electronic equipment and medium
Zhao et al. Emission trading innovation mechanism based on blockchain
Chu et al. Building trust in online trade-in programs with a blockchain-enabled system
CN116934344B (en) Micro-grid transaction method and system based on blockchain
KR102309026B1 (en) Blockchain based Machine learning training model trading method without trust
Ionita et al. Quantitative, value-driven risk analysis of e-services
Gourisetti et al. Blockchain smart contracts for transactive energy systems
Wang A Dynamic CGE Model for Consumer Trust Mechanism within an E‐Commerce Market
JP2020107203A (en) Failure detection system
KR20160017629A (en) Predictive fraud screening
Watzl A framework for exchange-based trading of cloud computing commodities

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
GR01 Patent grant
GR01 Patent grant