CN114549149A - Smart grid energy transaction data processing method and device and computer equipment - Google Patents

Smart grid energy transaction data processing method and device and computer equipment Download PDF

Info

Publication number
CN114549149A
CN114549149A CN202210437296.8A CN202210437296A CN114549149A CN 114549149 A CN114549149 A CN 114549149A CN 202210437296 A CN202210437296 A CN 202210437296A CN 114549149 A CN114549149 A CN 114549149A
Authority
CN
China
Prior art keywords
energy
transaction
party
exchanged
resource
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
CN202210437296.8A
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.)
Southern Power Grid Digital Grid Research Institute Co Ltd
Original Assignee
Southern Power Grid Digital Grid Research Institute Co Ltd
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 Southern Power Grid Digital Grid Research Institute Co Ltd filed Critical Southern Power Grid Digital Grid Research Institute Co Ltd
Priority to CN202210437296.8A priority Critical patent/CN114549149A/en
Publication of CN114549149A publication Critical patent/CN114549149A/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/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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S50/00Market activities related to the operation of systems integrating technologies related to power network operation or related to communication or information technologies
    • Y04S50/10Energy trading, including energy flowing from end-user application to grid

Landscapes

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

Abstract

The application relates to a smart grid energy transaction data processing method and device and computer equipment. The method comprises the steps of responding to a cross-chain transaction request, and acquiring virtual resources to be exchanged; executing an energy payment resource exchange contract, and exchanging the virtual resource to be exchanged into the energy payment resource; and executing an energy trading contract according to the energy supply information and the energy demand information, performing bidding matching between energy trading parties, sending a successful bidding matching result to the successfully matched energy trading party, and updating the block chain account book. In addition, mutual trust of transaction data between an energy supply party and an energy demand party is realized based on the block chain, the safety of the data is ensured, and accurate and safe energy transaction data processing can be realized.

Description

Smart grid energy transaction data processing method and device and computer equipment
Technical Field
The application relates to the technical field of smart power grids, in particular to a smart power grid energy trading method and device and computer equipment.
Background
In the construction process of the smart grid, energy trading is of great importance. To promote energy ecological digitization, a unified digital service technology platform facing government, upstream and downstream of energy industry, users and other industry chain participants is needed to be constructed, so that energy and data are freely traded, and the whole ecological symbiosis, sharing, co-fusion and win-win are realized.
However, most of the existing smart grid energy trading schemes are based on a centralized architecture, so that the risk of single-point faults is high, and the safety problem of trading data is serious.
Disclosure of Invention
In view of the above, there is a need to provide a smart grid energy trading method, apparatus, computer device and computer readable storage medium capable of improving the security of trading data.
In a first aspect, the application provides a smart grid energy transaction data processing method, which is applied to an energy block chain, wherein an energy payment resource exchange contract and an energy transaction contract are deployed on the energy block chain. The method comprises the following steps:
responding to the cross-chain transaction request, and acquiring virtual resources to be exchanged of an energy transaction party, wherein the energy transaction party comprises an energy supply party and an energy demand party;
executing an energy payment resource exchange contract, and exchanging the virtual resource to be exchanged into the energy payment resource;
acquiring energy supply information issued by an energy supplier and energy demand information issued by an energy demand supplier;
executing an energy trading contract, performing bidding matching between energy trading parties according to energy supply information and energy demand information, and sending a successful bidding matching result to a successfully matched energy supply party and an energy demand party;
receiving the energy payment resources paid by the successfully matched energy demanders, and sending the energy payment resources to the successfully matched energy suppliers to obtain transaction results;
and updating the block chain account book according to the transaction result data.
In one embodiment, executing the energy payment resource exchange contract, exchanging the virtual resource to be exchanged for the energy payment resource comprises: carrying out fund verification on the virtual resource to be exchanged; if the fund verification passes, executing an energy payment resource exchange contract, and acquiring a random number hash value and a first locking time period sent by an energy transaction party, wherein the random number hash value is obtained by the energy transaction party generating a random number and performing hash calculation on the random number; in a first locking time period, inquiring whether the virtual resource to be exchanged of the energy transaction party is locked or not; if the virtual resource to be exchanged of the energy trading party is locked, intercepting a time period with preset duration from the first locking time period to obtain a second locking time period, and sending the second locking time period to the energy trading party; acquiring the energy payment resource to be converted corresponding to the virtual resource to be exchanged in the public account of the energy source block chain, and locking the energy payment resource to be converted in a second locking time period; inquiring whether the energy transaction party extracts the energy payment resource to be converted or not in a second locking time period; and if the energy transaction party extracts the virtual resource to be exchanged, extracting the virtual resource to be exchanged of the energy transaction party according to the hash value of the random number in the first locking time period.
In one embodiment, the energy payment resource to be converted is extracted according to the hash value of the random number, wherein the energy transaction party determines that the energy payment resource to be converted is in a locked state within the second locking time period.
In one embodiment, updating the blockchain ledger from the transaction result data comprises: performing hash according to the transaction result data and the storage address of the transaction result data to generate a transaction data fingerprint; and updating the block chain account book according to the transaction data fingerprint.
In one embodiment, before performing a hash according to the transaction result data and the storage address of the transaction result data and generating the transaction data fingerprint, the method further includes: storing the transaction result data into an interplanetary file system outside the energy transaction block chain; and recording the storage address of the transaction result data in the interplanetary file system.
In one embodiment, the energy consumers comprise mobile energy consumers; executing an energy trading contract, performing bidding matching between energy trading parties according to energy supply information and energy demand information, and sending a successful bidding matching result to the successfully matched energy supply party and energy demand party, wherein the successful bidding matching result comprises the following steps: acquiring the consumption type priority of a mobile energy demand party; and executing an energy trading contract, performing bidding matching among the energy trading parties according to the energy supply information, the energy demand information and the consumption type priority of the movable energy demand party, and sending the successful bidding matching result to the successfully matched energy supply party and the successfully matched movable energy demand party.
In a second aspect, the application further provides a smart grid energy transaction data processing device, which is applied to an energy block chain, and an energy payment resource exchange contract and an energy transaction contract are deployed on the energy block chain. The device includes:
the response module is used for responding the cross-chain transaction request and acquiring the virtual resources to be exchanged of the energy transaction party, wherein the energy transaction party comprises an energy supply party and an energy demand party;
the exchange module is used for executing the energy payment resource exchange contract and exchanging the virtual resource to be exchanged into the energy payment resource;
the acquisition module is used for acquiring energy supply information issued by an energy supply party and energy demand information issued by an energy demand party;
the matching module is used for executing an energy trading contract, performing bidding matching between energy trading parties according to the energy supply information and the energy demand information, and sending a successful bidding matching result to a successfully matched energy supply party and an energy demand party;
the transaction module is used for receiving the energy payment resources paid by the energy demander which is successfully matched, and sending the energy payment resources to the energy supplier which is successfully matched to obtain a transaction result;
and the updating module is used for updating the block chain account book according to the transaction result data.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
responding to the cross-chain transaction request, and acquiring virtual resources to be exchanged of an energy transaction party, wherein the energy transaction party comprises an energy supply party and an energy demand party;
executing an energy payment resource exchange contract, and exchanging the virtual resource to be exchanged into the energy payment resource;
acquiring energy supply information issued by an energy supplier and energy demand information issued by an energy demand supplier;
executing an energy trading contract, performing bidding matching between energy trading parties according to energy supply information and energy demand information, and sending a successful bidding matching result to a successfully matched energy supply party and an energy demand party;
receiving the energy payment resources paid by the successfully matched energy demanders, and sending the energy payment resources to the successfully matched energy suppliers to obtain transaction results;
and updating the block chain account book according to the transaction result data.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
responding to the cross-chain transaction request, and acquiring virtual resources to be exchanged of an energy transaction party, wherein the energy transaction party comprises an energy supply party and an energy demand party;
executing an energy payment resource exchange contract, and exchanging the virtual resource to be exchanged into the energy payment resource;
acquiring energy supply information issued by an energy supplier and energy demand information issued by an energy demand supplier;
executing an energy trading contract, performing bidding matching between energy trading parties according to energy supply information and energy demand information, and sending a successful bidding matching result to a successfully matched energy supply party and an energy demand party;
receiving the energy payment resources paid by the successfully matched energy demanders, and sending the energy payment resources to the successfully matched energy suppliers to obtain transaction results;
and updating the block chain account book according to the transaction result data.
The smart grid energy transaction data processing method, the smart grid energy transaction data processing device, the computer equipment and the storage medium are applied to an energy block chain, and an energy payment resource conversion contract and an energy transaction contract are deployed on the energy block chain; responding to the cross-chain transaction request, and acquiring virtual resources to be exchanged of an energy transaction party, wherein the energy transaction party comprises an energy supply party and an energy demand party; executing an energy payment resource exchange contract, and exchanging the virtual resource to be exchanged into the energy payment resource; acquiring energy supply information issued by an energy supplier and energy demand information issued by an energy demand supplier; executing an energy trading contract, performing bidding matching between energy trading parties according to energy supply information and energy demand information, and sending a successful bidding matching result to a successfully matched energy supply party and an energy demand party; receiving the energy payment resources paid by the successfully matched energy demanders, and sending the energy payment resources to the successfully matched energy suppliers to obtain transaction results; and updating the block chain account book according to the transaction result data. In addition, mutual trust of transaction data between an energy supply party and an energy demand party is realized based on the block chain, the safety of the data is ensured, and accurate and safe energy transaction data processing can be realized.
Drawings
Fig. 1 is a diagram of an application environment of a smart grid energy transaction data processing method in an embodiment;
FIG. 2 is a schematic flow chart illustrating a method for processing energy trading data of the smart grid in one embodiment;
FIG. 3 is a schematic flow chart illustrating the resource exchange step for energy payment in one embodiment;
FIG. 4 is a block diagram of an embodiment of a smart grid energy trading data processing apparatus;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The smart grid energy transaction data processing method provided by the embodiment of the application can be applied to the application environment shown in fig. 1. The energy supplier 102 and the energy demander 104 communicate with the energy blockchain 106 via a network, and the other blockchains 108 communicate with the energy blockchain 106 via a network. The energy source block chain 106 responds to cross-chain transaction requests sent by other block chains 108, and obtains virtual resources to be exchanged of energy source transaction parties, wherein the energy source transaction parties comprise an energy source supplier and an energy source demand supplier; executing an energy payment resource exchange contract, and exchanging the virtual resource to be exchanged into the energy payment resource; acquiring energy supply information issued by an energy supplier and energy demand information issued by an energy demand supplier; executing an energy trading contract, performing bidding matching between energy trading parties according to the energy supply information and the energy demand information, and sending a successful bidding matching result to the successfully matched energy supply party and energy demand party; receiving the energy payment resources paid by the successfully matched energy demanders, and sending the energy payment resources to the successfully matched energy suppliers to obtain transaction results; and updating the block chain account book according to the transaction result data. The energy supplier 102 and the energy demander 104 may be, but are not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart car-mounted devices, and the like. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, and the like. The energy source block chain 106 may be implemented by an independent server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a smart grid energy transaction data processing method is provided, which is described by taking the method as an example of being applied to the energy source block chain in fig. 1, and includes the following steps:
step 202, responding to the cross-chain transaction request, and acquiring the virtual resources to be exchanged of the energy transaction party.
The energy trading party comprises an energy supplier and an energy demand party. The cross-chain transaction request is generated by the energy transaction party of other block chains when the energy payment resource exchange contract is called on the other block chains and is sent to the energy source block chain. And the other block chains adopt a white list mechanism, the block chains with the energy block chains mutually authenticated are written into a white list, and energy payment resource exchange contracts are deployed on the block chains in the white list. The authenticated blockchains within the white list include, but are not limited to, BTC (Bitcoin), ETH (Ethereum), and EOS (shaddock coin).
The cross-chain transaction request carries the information of the virtual resources to be exchanged of the energy transaction party.
Specifically, the energy blockchain monitors and responds to a cross-chain transaction request, and the cross-chain transaction request is analyzed to obtain information of virtual resources to be exchanged of an energy transaction party.
And 204, executing the energy payment resource exchange contract, and exchanging the virtual resource to be exchanged into the energy payment resource.
The energy payment resource is a specified currency in the energy source block chain, and the energy payment resource can be a currently circulated bitcoin.
Specifically, the energy blockchain calls an energy payment resource exchange contract, and the virtual resource to be exchanged is exchanged into the energy payment resource, so that an energy transaction party can perform energy transaction in the energy blockchain.
Step 206, acquiring the energy supply information issued by the energy supplier and the energy demand information issued by the energy demand supplier.
Specifically, the energy block chain acquires energy supply information issued by an energy supplier and energy demand information issued by an energy demander.
The energy supplier comprises a renewable energy source and a micro intelligent power grid with energy storage functions (such as chemical energy storage, water pumping energy storage and the like) and a power distribution system operator, the micro intelligent power grid becomes the energy supplier when the renewable resources are abundant due to the volatility of the renewable energy source, the micro intelligent power grid becomes the energy demand party when the renewable resources are insufficient, the renewable energy source comprises non-fossil energy sources such as wind energy, solar energy, hydroenergy, biomass energy and geothermal energy, and is clean energy, the renewable energy source is green low-carbon energy, is an important component of a Chinese multi-wheel drive energy supply system, and has important significance for improving the energy structure, protecting the ecological environment, coping with climate change and realizing the sustainable development of economy and society. The energy demand side comprises a power distribution system operator, a micro intelligent power grid, movable charging equipment and the like, wherein the power distribution system operator is responsible for adjusting resources among units of the micro intelligent power grid and buying or selling power resources to the micro power grid. And the power distribution system operator and the micro intelligent power grid are interacted with the energy block chain through the intelligent electric meter.
And 208, executing an energy trading contract, performing bidding matching between energy trading parties according to the energy supply information and the energy demand information, and sending a successful bidding matching result to the successfully matched energy supply party and energy demand party.
Specifically, the energy block chain calls an energy trading contract, bid matching is carried out between energy trading parties according to energy supply information and energy demand information based on a Vickers auction method, and a successful bid matching result is sent to a successfully matched energy supply party and energy demand party.
And step 210, receiving the energy payment resources paid by the successfully matched energy demanders, and sending the energy payment resources to the successfully matched energy suppliers to obtain a transaction result.
Specifically, the energy block chain receives the energy payment resources paid by the successfully matched energy demander, sends the energy payment resources to the successfully matched energy supplier, and transmits the power resources corresponding to the energy payment resources from the energy supplier to the energy demander through the smart grid to obtain a transaction result.
And step 212, updating the block chain ledger according to the transaction result data.
Specifically, the energy blockchain updates a blockchain ledger according to the transaction result data.
The smart grid energy transaction data processing method is applied to an energy block chain, and an energy payment resource exchange contract and an energy transaction contract are deployed on the energy block chain; responding to the cross-chain transaction request, and acquiring virtual resources to be exchanged of an energy transaction party, wherein the energy transaction party comprises an energy supply party and an energy demand party; executing an energy payment resource exchange contract, and exchanging the virtual resource to be exchanged into the energy payment resource; acquiring energy supply information issued by an energy supplier and energy demand information issued by an energy demand supplier; executing an energy trading contract, performing bidding matching between energy trading parties according to energy supply information and energy demand information, and sending a successful bidding matching result to a successfully matched energy supply party and an energy demand party; receiving the energy payment resources paid by the successfully matched energy demanders, and sending the energy payment resources to the successfully matched energy suppliers to obtain transaction results; and updating the block chain account book according to the transaction result data. In addition, mutual trust of transaction data between an energy supply party and an energy demand party is realized based on the block chain, the safety of the data is ensured, and accurate and safe energy transaction data processing can be realized.
In an alternative embodiment, as shown in fig. 3, executing the energy payment resource exchange contract to exchange the virtual resource to be exchanged for the energy payment resource comprises:
and 302, performing fund verification on the virtual resource to be exchanged.
Specifically, the energy block chain performs fund verification on the virtual resource to be exchanged, and verifies whether the virtual resource to be exchanged meets the minimum unit of the energy payment resource.
And 304, if the fund verification passes, executing the energy payment resource conversion contract, and acquiring the hash value of the random number and the first locking time period sent by the energy transaction party.
The hash value of the random number is obtained by performing hash calculation on the random number generated by the energy transaction on the block chain where the energy transaction is located.
Specifically, if the virtual resource to be exchanged is larger than the minimum unit of the energy payment resource, the energy payment resource exchange contract is called and executed, and the hash value of the random number and the first locking time period sent by the energy transaction party are obtained.
Step 306, in the first locking time period, inquiring whether the virtual resource to be exchanged of the energy transaction party is locked.
Specifically, the energy block chain inquires whether the virtual resource to be exchanged of the energy transaction party is in a locked state or not in a first locking time period. And locking the virtual resource to be exchanged by using the random number hash value.
And 308, if the virtual resource to be exchanged of the energy transaction party is locked, intercepting a time period with preset duration from the first locking time period to obtain a second locking time period, and sending the second locking time period to the energy transaction party.
Specifically, if the virtual resource to be exchanged of the energy source trading party is locked within a first locking time period, a preset time period is intercepted from the first locking time period to obtain a second locking time period, and the second locking time period is sent to the energy source trading party.
Step 310, the energy payment resource to be converted corresponding to the virtual resource to be exchanged in the public account of the energy source block chain is obtained, and the energy payment resource to be converted is locked in the second locking time period.
Specifically, the energy payment resource to be converted corresponding to the virtual resource to be exchanged in the public account of the energy block chain is obtained, and the energy block chain locks the energy payment resource to be converted by using the random number hash value and the second locking time period.
And step 312, inquiring whether the energy transaction party extracts the energy payment resource to be converted or not in the second locking time period.
Specifically, the energy source block chain inquires whether the energy transaction party extracts the energy payment resource to be converted in the second locking time period.
In an optional embodiment, the energy payment resource to be converted is extracted by the energy transaction party according to the hash value of the random number after determining that the energy payment resource to be converted is in the locked state within the second locking time period.
And step 314, if the energy transaction party extracts the virtual resource to be exchanged, extracting the virtual resource to be exchanged of the energy transaction party according to the hash value of the random number in the first locking time period.
Specifically, if the energy block chain inquires that the virtual resource to be exchanged of the energy transaction party is extracted, the virtual resource to be exchanged of the energy transaction party is extracted according to the hash value of the random number in the first locking time period, and the exchange of the virtual resource to be exchanged and the energy payment resource is completed.
And explaining the complete exchange process by taking other block chains as an A chain, taking energy transaction users on other chains as a user A, taking an energy block chain as a B chain and taking a public account of the energy block chain as a user B.
(1) A secret random number S is generated by a given user a and a hash value h (S) of S is calculated and then sent to a user B.
(2) User a creates an asset locking contract on chain a and locks asset a on chain a using a pair random number hash h(s) and a set time lock T1.
(3) The user B judges whether to lock the asset B by inquiring the locking state of the asset a. If asset a is locked, user B will execute a hash lock contract on chain B to lock asset B by receiving the hash value H (S) and a time T2 less than T1.
(4) At time T2, user a determines whether to perform an asset retrieval operation by querying the locked status of asset B, and if asset B is locked, user a may use S to retrieve asset B from chain B. If the asset transfer is not performed beyond time T2, then user B is allowed to perform asset revocation and the transaction fails.
(5) And in the T1 moment, the user B acquires H (S) used by the user A for extracting the asset B from the chain B, and extracts the locked asset a from the chain A by means of the H (S). If the asset transfer is not performed beyond time T1, then user A is allowed to perform asset revocation and the transaction fails.
In the embodiment, the exchange process of the energy payment resources is subjected to multiple verification through the energy payment resource exchange contract, the asset exchange is performed by means of a Hash time locking mechanism, under the design of the Hash time locking mechanism, only two results of success or failure of the asset cross-link exchange exist in the cross-link asset exchange process, and no intermediate state exists, so that the atomicity in the cross-link asset exchange process is ensured, and the safety of the cross-link fund exchange is ensured.
In an alternative embodiment, updating the blockchain ledger in accordance with transaction result data comprises: performing hash according to the transaction result data and the storage address of the transaction result data to generate a transaction data fingerprint; and updating the block chain account book according to the transaction data fingerprint.
Specifically, the energy blockchain acquires a storage address of the transaction result on the interplanetary file system, performs hash calculation on the transaction result data and the storage address of the transaction result data, generates a transaction data fingerprint, and updates a blockchain ledger according to the transaction data fingerprint.
In this embodiment, the energy blockchain is designed with a data access mechanism based on an InterPlanetary File System (IPFS), and stores complete transaction data into the InterPlanetary File System, and only records transaction data fingerprints of the transaction data in an account book of the energy blockchain, thereby saving storage overhead on the chain and improving System throughput. Meanwhile, all entities participating in energy transaction communicate through a 5G network or other high-efficiency communication networks, and data transmission delay is further reduced.
When the transaction data need to be checked by the energy source block chain, the transaction file is read according to the storage address of the transaction result data, the transaction result data is automatically restored by the IPFS network, and the hash of the two files is compared to judge whether the transaction data is tampered, so that the security of the transaction data is further improved.
In an optional embodiment, before the hashing according to the transaction result data and the storage address of the transaction result data and generating the transaction data fingerprint, the method further includes: storing the transaction result data into an interplanetary file system outside the energy transaction block chain; and recording the storage address of the transaction result data in the interplanetary file system.
Specifically, the energy block chain stores the transaction result data into an interplanetary file system outside the energy transaction block chain; and recording the storage address of the transaction result data in the interplanetary file system.
In an optional embodiment, executing the energy trading contract, performing bid matching between the energy trading parties according to the energy supply information and the energy demand information, and sending a successful bid matching result to the successfully matched energy supplier and energy demand party comprises: acquiring the consumption type priority of a mobile energy demand party; and executing an energy trading contract, performing bidding matching among the energy trading parties according to the energy supply information, the energy demand information and the consumption type priority of the movable energy demand party, and sending the successful bidding matching result to the successfully matched energy supply party and the successfully matched movable energy demand party.
The energy demand party comprises a movable energy demand party, such as movable charging equipment such as a new energy electric car. The consumption type priority includes price priority, location priority, and the like.
Specifically, when the energy source demand side is a movable energy source demand side, the consumption type priority of the movable energy source demand side is obtained, when an energy source block chain executes an energy source trading contract, bidding matching is conducted among the energy source trading sides according to energy source supply information, energy source demand information and the consumption type priority of the movable energy source demand side, and a bidding matching success result is sent to the successfully matched energy source supply side and the successfully matched movable energy source demand side. And if the consumption type priority of the mobile energy demand party is position priority, performing bidding matching between the energy transaction parties according to the energy supply information and the energy demand information based on a position priority principle, and sending a successful bidding matching result to the successfully matched energy supply party and the successfully matched mobile energy demand party. The energy source block chain receives the energy payment resources paid by the successfully matched movable energy demanders, sends the energy payment resources to the successfully matched energy suppliers, and transmits the electric power resources corresponding to the energy payment resources from the energy suppliers to the movable energy demanders through the smart power grid to obtain a transaction result.
In the embodiment, the types of hungry requirements in the energy trading contract are flexibly set according to the mobile attributes of the energy demand party user, so that the flexibility of energy trading is improved.
In order to easily understand the technical solution provided by the embodiment of the present application, a complete smart grid energy transaction data processing process is used to briefly describe the smart grid energy transaction data processing method provided by the embodiment of the present application:
(1) and responding the cross-chain transaction request, and acquiring the virtual resources to be exchanged of the energy transaction party, wherein the energy transaction party comprises an energy supply party and an energy demand party.
(2) Carrying out fund verification on the virtual resource to be exchanged; if the fund verification passes, executing an energy payment resource exchange contract, and acquiring a random number hash value and a first locking time period sent by an energy transaction party, wherein the random number hash value is obtained by the energy transaction party generating a random number and performing hash calculation on the random number; in a first locking time period, inquiring whether the virtual resource to be exchanged of the energy transaction party is locked or not; if the virtual resource to be exchanged of the energy trading party is locked, intercepting a time period with preset duration from the first locking time period to obtain a second locking time period, and sending the second locking time period to the energy trading party; acquiring the energy payment resource to be converted corresponding to the virtual resource to be exchanged in the public account of the energy source block chain, and locking the energy payment resource to be converted in a second locking time period; inquiring whether the energy transaction party extracts the energy payment resource to be converted or not in a second locking time period; and if the energy transaction party extracts the virtual resource to be exchanged, extracting the virtual resource to be exchanged of the energy transaction party according to the hash value of the random number in the first locking time period.
(3) And acquiring energy supply information issued by an energy supplier and energy demand information issued by an energy demand supplier.
(4) And executing an energy trading contract, performing bidding matching between energy trading parties according to the energy supply information and the energy demand information, and sending a successful bidding matching result to the successfully matched energy supply party and energy demand party.
(5) And receiving the energy payment resources paid by the successfully matched energy demanders, and sending the energy payment resources to the successfully matched energy suppliers to obtain transaction results.
(6) Storing the transaction result data into an interplanetary file system outside the energy transaction block chain; and recording the storage address of the transaction result data in the interplanetary file system.
(7) Performing hash according to the transaction result data and the storage address of the transaction result data to generate a transaction data fingerprint; and updating the block chain account book according to the transaction data fingerprint.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the application also provides a smart grid energy transaction data processing device for realizing the smart grid energy transaction data processing method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the method, so specific limitations in one or more embodiments of the smart grid energy transaction data processing device provided below can be referred to the limitations on the smart grid energy transaction data processing method in the above, and details are not repeated herein.
In one embodiment, as shown in fig. 4, there is provided a smart grid energy transaction data processing apparatus applied to an energy block chain, the energy block chain deploying an energy payment resource exchange contract and an energy transaction contract, including: a response module 402, a redemption module 404, an acquisition module 406, a matching module 408, a transaction module 410, and an update module 412, wherein:
a response module 402, configured to respond to the cross-chain transaction request, and acquire the virtual resource to be exchanged of the energy transaction party, where the energy transaction party includes an energy supply party and an energy demand party.
And the exchange module 404 is configured to execute the energy payment resource exchange contract, and exchange the virtual resource to be exchanged into the energy payment resource.
The obtaining module 406 is configured to obtain the energy supply information issued by the energy supplier and the energy demand information issued by the energy demand supplier.
The matching module 408 is configured to execute an energy trading contract, perform bid matching between energy trading parties according to the energy supply information and the energy demand information, and send a successful bid matching result to a successfully matched energy supplier and energy demand party.
And the transaction module 410 is configured to receive the energy payment resource paid by the successfully matched energy demander, and send the energy payment resource to the successfully matched energy supplier to obtain a transaction result.
And the updating module 412 is configured to update the block chain ledger according to the transaction result data.
In an optional embodiment, the redemption module 404 is further configured to perform fund verification on the virtual resource to be redeemed; if the fund verification passes, executing an energy payment resource exchange contract, and acquiring a random number hash value and a first locking time period sent by an energy transaction party, wherein the random number hash value is obtained by the energy transaction party generating a random number and performing hash calculation on the random number; inquiring whether the virtual resource to be exchanged of the energy transaction party is locked or not in a first locking time period; if the virtual resource to be exchanged of the energy trading party is locked, intercepting a time period with preset duration from the first locking time period to obtain a second locking time period, and sending the second locking time period to the energy trading party; acquiring the energy payment resource to be converted corresponding to the virtual resource to be exchanged in the public account of the energy source block chain, and locking the energy payment resource to be converted in a second locking time period; inquiring whether the energy transaction party extracts the energy payment resource to be converted or not in a second locking time period; and if the energy transaction party extracts the virtual resource to be exchanged, extracting the virtual resource to be exchanged of the energy transaction party according to the hash value of the random number in the first locking time period.
In an optional embodiment, the energy payment resource to be converted is extracted by the energy transaction party according to the hash value of the random number after determining that the energy payment resource to be converted is in the locked state within the second locking time period.
In an optional embodiment, the updating module 412 is further configured to perform hashing according to the transaction result data and the storage address of the transaction result data, so as to generate a transaction data fingerprint; and updating the block chain account book according to the transaction data fingerprint.
In an alternative embodiment, the update module 412 is further configured to store the transaction result data in an interplanetary file system outside the energy transaction block chain; and recording the storage address of the transaction result data in the interplanetary file system.
In an alternative embodiment, the energy consumers include mobile energy consumers; the matching module 408 is used for acquiring the consumption type priority of the mobile energy demand party; and executing an energy trading contract, performing bidding matching among the energy trading parties according to the energy supply information, the energy demand information and the consumption type priority of the movable energy demand party, and sending the successful bidding matching result to the successfully matched energy supply party and the successfully matched movable energy demand party.
All or part of each module in the smart grid energy transaction data processing device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a chain of energy-sourcing blocks, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing a block chain account book. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to realize a smart grid energy transaction data processing method.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. The smart grid energy transaction data processing method is applied to an energy block chain, wherein the energy block chain is provided with an energy payment resource exchange contract and an energy transaction contract;
the smart grid energy transaction data processing method comprises the following steps:
responding to a cross-chain transaction request, and acquiring virtual resources to be exchanged of an energy transaction party, wherein the energy transaction party comprises an energy supply party and an energy demand party;
executing the energy payment resource exchange contract, and exchanging the virtual resource to be exchanged into an energy payment resource;
acquiring energy supply information issued by an energy supplier and energy demand information issued by an energy demand supplier;
executing the energy trading contract, performing bidding matching between energy trading parties according to the energy supply information and the energy demand information, and sending a successful bidding matching result to a successfully matched energy supply party and an energy demand party;
receiving the energy payment resources paid by the successfully matched energy demander, and sending the energy payment resources to the successfully matched energy supplier to obtain a transaction result;
and updating the block chain account book according to the transaction result data.
2. The method of claim 1, wherein the executing the energy payment resource exchange contract to exchange the virtual resource to be exchanged for an energy payment resource comprises:
performing fund verification on the virtual resource to be exchanged;
if the fund verification passes, executing the energy payment resource conversion contract, and acquiring a random number hash value and a first locking time period which are sent by the energy transaction party, wherein the random number hash value is obtained by the energy transaction party generating a random number and performing hash calculation on the random number;
inquiring whether the virtual resource to be exchanged of the energy transaction party is locked or not within the first locking time period;
if the virtual resource to be exchanged of the energy transaction party is locked, intercepting a time period with preset duration from the first locking time period to obtain a second locking time period, and sending the second locking time period to the energy transaction party;
acquiring the energy payment resource to be converted corresponding to the virtual resource to be exchanged in the public account of the energy source block chain, and locking the energy payment resource to be converted in a second locking time period;
inquiring whether the energy transaction party extracts the energy payment resource to be converted or not within the second locking time period;
if the energy transaction party extracts the virtual resource to be exchanged, extracting the virtual resource to be exchanged of the energy transaction party according to the hash value of the random number within the first locking time period.
3. The method according to claim 2, wherein the extracting of the to-be-converted energy payment resource is obtained by the energy transaction party according to the random number hash value after determining that the to-be-converted energy payment resource is in the locked state in the second locking time period.
4. The method of claim 1, wherein updating a blockchain ledger from transaction result data comprises:
performing hash according to the transaction result data and the storage address of the transaction result data to generate a transaction data fingerprint;
and updating a block chain account book according to the transaction data fingerprint.
5. The method of claim 4, wherein before the hashing according to the transaction result data and the storage address of the transaction result data to generate the transaction data fingerprint, further comprising:
storing the transaction result data into an interplanetary file system outside an energy transaction block chain;
and recording the storage address of the transaction result data in the interplanetary file system.
6. The method of claim 1, wherein the energy demander comprises a mobile energy demander;
the executing the energy trading contract, performing bidding matching between energy trading parties according to the energy supply information and the energy demand information, and sending a successful bidding matching result to the successfully matched energy supply party and energy demand party comprises the following steps:
acquiring the consumption type priority of the mobile energy demand party;
and executing the energy trading contract, performing bidding matching among the energy trading parties according to the energy supply information, the energy demand information and the consumption type priority of the movable energy demand party, and sending a successful bidding matching result to the successfully matched energy supply party and the successfully matched movable energy demand party.
7. The device is applied to an energy source block chain, wherein an energy source payment resource exchange contract and an energy source transaction contract are deployed in the energy source block chain;
the smart power grid energy transaction data processing device comprises:
the response module is used for responding to the cross-chain transaction request and acquiring the virtual resources to be exchanged of the energy transaction party, wherein the energy transaction party comprises an energy supply party and an energy demand party;
the exchange module is used for executing the energy payment resource exchange contract and exchanging the virtual resource to be exchanged into the energy payment resource;
the acquisition module is used for acquiring energy supply information issued by an energy supply party and energy demand information issued by an energy demand party;
the matching module is used for executing the energy trading contract, performing bidding matching between energy trading parties according to the energy supply information and the energy demand information, and sending a successful bidding matching result to a successfully matched energy supply party and an energy demand party;
the transaction module is used for receiving the energy payment resources paid by the successfully matched energy demander and sending the energy payment resources to the successfully matched energy supplier to obtain a transaction result;
and the updating module is used for updating the block chain account book according to the transaction result data.
8. The apparatus of claim 7, wherein the redemption module is further configured to:
performing fund verification on the virtual resource to be exchanged;
if the fund verification passes, executing the energy payment resource conversion contract, and acquiring a random number hash value and a first locking time period which are sent by the energy transaction party, wherein the random number hash value is obtained by the energy transaction party generating a random number and performing hash calculation on the random number;
inquiring whether the virtual resource to be exchanged of the energy transaction party is locked or not within the first locking time period;
if the virtual resource to be exchanged of the energy transaction party is locked, intercepting a time period with preset duration from the first locking time period to obtain a second locking time period, and sending the second locking time period to the energy transaction party;
acquiring the energy payment resource to be converted corresponding to the virtual resource to be exchanged in the public account of the energy source block chain, and locking the energy payment resource to be converted in a second locking time period;
inquiring whether the energy transaction party extracts the energy payment resource to be converted or not within the second locking time period;
if the energy transaction party extracts the virtual resource to be exchanged, extracting the virtual resource to be exchanged of the energy transaction party according to the hash value of the random number within the first locking time period.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202210437296.8A 2022-04-24 2022-04-24 Smart grid energy transaction data processing method and device and computer equipment Pending CN114549149A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210437296.8A CN114549149A (en) 2022-04-24 2022-04-24 Smart grid energy transaction data processing method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210437296.8A CN114549149A (en) 2022-04-24 2022-04-24 Smart grid energy transaction data processing method and device and computer equipment

Publications (1)

Publication Number Publication Date
CN114549149A true CN114549149A (en) 2022-05-27

Family

ID=81666927

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210437296.8A Pending CN114549149A (en) 2022-04-24 2022-04-24 Smart grid energy transaction data processing method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN114549149A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115273332A (en) * 2022-07-20 2022-11-01 湖南天河国云科技有限公司 Energy sharing method and system based on block chain

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111522826A (en) * 2020-04-10 2020-08-11 上海黄金交易所 Bidding transaction processing method and system based on block chain and related nodes
CN113987526A (en) * 2021-09-26 2022-01-28 海南火链科技有限公司 Resource exchange method, device and equipment based on block chain and readable storage medium
CN114140202A (en) * 2021-11-30 2022-03-04 四川大学 Block chain-based distributed electric energy bidding transaction service method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111522826A (en) * 2020-04-10 2020-08-11 上海黄金交易所 Bidding transaction processing method and system based on block chain and related nodes
CN113987526A (en) * 2021-09-26 2022-01-28 海南火链科技有限公司 Resource exchange method, device and equipment based on block chain and readable storage medium
CN114140202A (en) * 2021-11-30 2022-03-04 四川大学 Block chain-based distributed electric energy bidding transaction service method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘峰 等: "基于改进哈希时间锁的区块链跨链资产交互协议", 《计算机科学》 *
刘良 等: "《数据支撑下的区块链技术研究》", 31 December 2019 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115273332A (en) * 2022-07-20 2022-11-01 湖南天河国云科技有限公司 Energy sharing method and system based on block chain

Similar Documents

Publication Publication Date Title
US11057217B2 (en) Performing parallel execution of transactions in a distributed ledger system
CN109948371B (en) Method for issuing identity certificate for block chain node and related device
US20200327545A1 (en) Performing parallel execution of transactions in a distributed ledger system
CN113438084B (en) Green power source tracing method and system based on R-PBFT consensus algorithm and timestamp
US20100281095A1 (en) Mobile grid computing
CN112749969B (en) Data processing method and device, computer equipment and storage medium
Alizadeh et al. Efficient decentralized data storage based on public blockchain and IPFS
WO2022061878A1 (en) Blockchain transaction processing systems and methods
CN113568978A (en) Data sharing system and method based on double-chain technology in block chain
Hannon et al. Bitcoin payment-channels for resource limited IoT devices
CN114549149A (en) Smart grid energy transaction data processing method and device and computer equipment
Lian Blockchain‐Based Secure and Trusted Distributed International Trade Big Data Management System
CN112308700A (en) Method and device for processing enterprise credit investigation data, computer equipment and storage medium
Gu et al. A cloud storage resource transaction mechanism based on smart contract
CN114529376A (en) Energy exchange data processing method and device, computer equipment and storage medium
CN114528532A (en) Supply chain data evidence storing method and device, computer equipment and storage medium
CN113824703A (en) Energy system control method based on block chain and energy system
Kumari et al. Design model for energy trading on blockchain
CN114549092B (en) Energy demand data processing method and device, computer equipment and storage medium
CN116416027B (en) Micro-grid energy trading method and system
US20230325823A1 (en) Data storage method, non-transitory computer-readable recording medium storing data storage program, and information processing device
Chen et al. Incorporating blockchain and internet of thing: The context of renewable energy certificate on smart grid
Mitra et al. Centra: City-scale energy transaction application for the smart grid
Lv et al. UCDM: A User-Centric Data Model in Power Blockchain
WO2024066043A1 (en) Electronic letter-of-guarantee management method and apparatus based on double-layer blockchain

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

Application publication date: 20220527