CN115271841A - Distributed power generation listing transaction method, server, system and storage medium - Google Patents

Distributed power generation listing transaction method, server, system and storage medium Download PDF

Info

Publication number
CN115271841A
CN115271841A CN202210520519.7A CN202210520519A CN115271841A CN 115271841 A CN115271841 A CN 115271841A CN 202210520519 A CN202210520519 A CN 202210520519A CN 115271841 A CN115271841 A CN 115271841A
Authority
CN
China
Prior art keywords
transaction
user
offer
account
frozen
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
CN202210520519.7A
Other languages
Chinese (zh)
Inventor
李飞
张旭东
王鸿玺
高波
史轮
吴一敌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
State Grid Corp of China SGCC
Marketing Service Center of State Grid Hebei Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Marketing Service Center of State Grid Hebei Electric Power 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 State Grid Corp of China SGCC, Marketing Service Center of State Grid Hebei Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN202210520519.7A priority Critical patent/CN115271841A/en
Publication of CN115271841A publication Critical patent/CN115271841A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0605Supply or demand aggregation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • 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
    • G06Q20/4014Identity check for transactions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0609Buyer or seller confidence or verification
    • 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
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Databases & Information Systems (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Marketing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Development Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • Human Resources & Organizations (AREA)
  • Primary Health Care (AREA)
  • Tourism & Hospitality (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to the technical field of distributed energy transaction, in particular to a distributed power generation listing transaction method, a server, a system and a storage medium. According to the embodiment of the invention, the offer and the transaction are initiated based on the verification of the user offer, so that the transaction security is more guaranteed, the user privacy can be protected, and the transaction contract and the user account are added into the blockchain after being encrypted, so that the modification of the transaction contract and the user account can be effectively prevented. The transaction information is disclosed to the registered user by adding the transaction information into the transaction listing sequence, so that the transaction is fairer and more fair.

Description

Distributed power generation listing transaction method, server, system and storage medium
Technical Field
The invention relates to the technical field of distributed energy transaction, in particular to a distributed power generation listing transaction method, a server, a system and a storage medium.
Background
The energy industry is a basic industry having great influence on the development and safety of the country, and particularly, the development of the power industry is more closely related to the national life and social development. With the deepening of the electric power system reform and the development of the industrialization of the distributed energy, the application of the distributed energy is increasingly wide. Compared with a traditional energy system taking fossil energy as a main energy source, the distributed energy mainly comprises natural gas, wind power, photovoltaic, tides and the like, can flexibly utilize energy according to the characteristics of the region, and has the advantages of cleanness, low carbon, safety, high efficiency and the like. The distributed power generation not only can realize the efficient utilization of renewable resources, but also can meet the power consumption requirements of users in real time, and solves the problems of difficult power supply in remote areas and the like. Therefore, the popularization of distributed power generation is of great significance.
Currently, the development of distributed generation branding transactions has encountered a number of obstacles. Firstly, the distributed generation listing transaction data is various and may relate to the privacy data of users, and the protection needs to be emphasized; secondly, distributed generation listing transaction has the problems of scattered layout, poor controllability and the like, management is difficult, and the problems of fairness and justness of transaction, safety certification of users and the like must be considered; finally, the traditional centralized power transaction has high maintenance cost, low processing efficiency and poor real-time performance, and is difficult to meet the high-frequency small-amount transaction request of the distributed power generation listing transaction. How to efficiently process the distributed power generation listing transaction becomes a current challenge.
Based on this, a distributed generation listing transaction method needs to be developed and designed.
Disclosure of Invention
The embodiment of the invention provides a distributed power generation listing transaction method, a server, a system and a storage medium, which are used for solving the problem of unsafe factors in distributed energy transaction in the prior art.
In a first aspect, an embodiment of the present invention provides a distributed generation listing transaction method, including:
obtaining an offer of a first user, wherein the offer characterizes a condition to reach a transaction;
when the offer meets a verification condition, adding the offer into a transaction listing sequence, wherein the transaction listing sequence comprises a plurality of offers;
in response to an offer of a second user, generating a transaction contract and deleting the offer from the transaction listing sequence when the second user meets a verification condition;
in response to the transaction completion request of the first user, completing transfer of an account between the first user and the second user when a transaction completion instruction of the second user is received;
and respectively encrypting the transaction contract and the transfer of the account between the first user and the second user to generate a hash value, and adding the hash value into the blockchain.
In one possible implementation manner, the first user and the second user are respectively registered as legal transaction users, and the registering step includes:
acquiring a fund account of a registered applicant, wherein the fund account has a fund transfer function and fund with preset conditions;
generating a block with encryption information and a hash value according to the registration information of the registered applicant and the fund account, and adding the block into a block chain;
the registration information is disclosed to all legal transaction users by a preset time limit;
and if no objection is received at the end of the predetermined period of time, generating a registered account number, a password and a secret key according to the registered information of the registered applicant.
In one possible implementation, the adding the offer to a transaction listing sequence when the offer meets a validation condition includes:
decrypting the offer according to the key of the first user to obtain a plaintext of the offer, wherein the plaintext comprises: registering an account number, a password, a transaction unit price, a transaction total amount and a transaction time period;
after the correctness of the registered account number is verified through the password, the available funds of the fund account are obtained according to the registered account number;
determining a maximum transaction amount according to the available funds and the default fund proportion;
determining an expected transaction amount according to the transaction unit price and the transaction total amount;
if the maximum transaction amount is larger than the predicted transaction amount, generating a frozen fund amount according to the default fund proportion and the predicted transaction amount;
freezing funds of the frozen fund amount in the available funds of the first user, generating a first frozen certificate and a first unfreezing application code, and adding the first frozen certificate and the blocks of the corresponding hash values into a block chain;
encrypting the first frozen certificate and the first unfreezing application code by using a secret key of the first user, and sending the encrypted first frozen certificate and the first unfreezing application code to the first user;
and adding the registered account number of the first user, the transaction unit price, the transaction total amount and the transaction time interval into the foremost end of a transaction queue, and disclosing all legal transaction users.
In one possible implementation, the generating a transaction contract and deleting the offer from the transaction listing sequence when the second user meets a validation condition in response to an offer of the second user includes:
confirming that the amount of funds available in the second user account is not less than the expected transaction amount;
encrypting the frozen fund amount and the dynamic code according to the secret key of the second user to generate a frozen notification ciphertext;
if a notification response from the second user and the code corresponding to the dynamic code are received within a preset period, freezing funds of the frozen amount from the available funds of the second user, generating a second frozen certificate and a second unfreezing application code, and adding the second frozen certificate and a corresponding hash value into a blockchain;
encrypting the second frozen certificate and the second unfreezing application code by using a secret key of the second user, and sending the encrypted second frozen certificate and the second unfreezing application code to the second user;
generating a block of a transaction contract and a hash value according to the registered account number of the first user, the registered account number of the second user, the transaction unit price, the transaction total amount and the transaction time interval, and adding the block into a block chain;
and deleting the registered account number of the first user, the transaction unit price, the transaction total amount and the transaction time interval from the transaction queue.
In a possible implementation manner, the completing the transfer of the account between the first user and the second user when receiving the transaction completion instruction of the second user in response to the transaction completion request of the first user comprises:
decrypting the transaction completion request according to the key of the first user, wherein the decrypted transaction completion request comprises: the system comprises an actual transaction amount, a first unfreezing application code and a first freezing certificate;
decrypting the transaction completion instruction according to the second user's key, wherein the decrypted transaction completion instruction comprises: the second frozen voucher and the second unfreezing application code;
verifying the correctness of the first unfreezing application code and the first frozen certificate in the decrypted transaction completion request according to the first unfreezing application code and the first frozen certificate in the block chain;
verifying the correctness of the second unfreezing application code and the second frozen certificate in the decrypted transaction completion request according to the second unfreezing application code and the second frozen certificate in the block chain;
if the first unfreezing application code, the first frozen voucher, the second unfreezing application code and the second frozen voucher are correct, unfreezing the account of the first user and the account of the second user according to the frozen fund amount;
and completing transfer between the account of the first user and the account of the second user according to the actual transaction amount.
In one possible implementation manner, the obtaining of funds of the registered fund account by the first user or the second user is an electricity selling user includes:
acquiring a network access notice, and generating a network access statement according to the network access notice, wherein the network access notice comprises a network access display time limit and a pricing mode, and the network access statement comprises a risk electricity selling offer which needs to be lifted after the display time period is finished;
generating a block with encryption information and a hash value by the network access declaration, and adding the block into a block chain;
according to the network access public deadline, the network access statement and the risk electricity selling offer are disclosed to all legal transaction users, and after the disclosure is finished, the risk electricity selling offer is lifted;
after the formula deadline is over, responding to the risk electricity selling offer, and performing risk electricity selling operation;
and after the risk electricity selling operation is finished, transferring the fund account of the electricity purchasing user to the fund account of the electricity selling user according to a pricing mode appointed in the network access need, transferring the risk electricity selling need and the fund account of the electricity purchasing user to the fund account of the electricity selling user according to the pricing mode appointed in the network access need to generate a block with encrypted information and a hash value, and adding the block into a block chain.
In a second aspect, an embodiment of the present invention provides a distributed energy transaction apparatus based on a blockchain technology, including:
an offer acquisition module to acquire an offer of a first user, wherein the offer characterizes a condition to reach a transaction;
the transaction listing module is used for adding the offers into a transaction listing sequence when the offers meet the verification condition, wherein the transaction listing sequence comprises a plurality of offers;
the contract generation module is used for responding to the offer of a second user, generating a transaction contract and deleting the offer from the transaction listing sequence when the second user meets the verification condition;
and (c) a second step of,
the account transfer module is used for responding to the transaction completion request of the first user and completing the transfer of the account between the first user and the second user when receiving a transaction completion instruction of the second user;
and the transaction contract and the transfer are encrypted respectively to generate a hash value and then are added into the blockchain, and the transfer records the quote of the transaction contract.
In a third aspect, the present invention provides a distributed generation listing transaction server, including a memory and a processor, where the memory stores a computer program operable on the processor, and the processor executes the computer program to implement the steps of the method according to the first aspect or any possible implementation manner of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a distributed power generation listing transaction system, including the distributed power generation listing transaction server according to the third aspect, and further including a distributed terminal, where the distributed terminal operates on the first user and the second user, and the distributed terminal is configured to generate a block with a hash value according to received data, and join the block into a block chain.
In a fifth aspect, the present invention provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the method according to the first aspect or any one of the possible implementation manners of the first aspect.
Compared with the prior art, the implementation mode of the invention has the following beneficial effects:
the embodiment of the invention discloses a distributed power generation listing transaction method, which comprises the steps of firstly obtaining an offer of a first user, adding the offer into a transaction listing sequence when the offer meets a verification condition, generating a transaction contract and deleting the offer from the transaction listing sequence when a second user meets the verification condition, and completing transfer of an account between the first user and the second user when a transaction completion instruction of the second user is received. According to the embodiment of the invention, the offer and the transaction are initiated based on the verification of the user offer, so that the transaction security is more guaranteed, the user privacy can be protected, and the transaction contract and the user account are added into the blockchain after being encrypted, so that the modification of the transaction contract and the user account can be effectively prevented. The transaction information is disclosed to the registered user by adding the transaction information into the transaction listing sequence, so that the transaction is fairer and more fair.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a flow chart of a distributed generation listing transaction method provided by an embodiment of the invention;
FIG. 2 is a functional block diagram of a distributed power generation listing transaction system provided by an embodiment of the invention;
fig. 3 is a functional block diagram of a distributed energy resource transaction apparatus based on a blockchain technology according to an embodiment of the invention;
fig. 4 is a functional block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following description is made with reference to the accompanying drawings.
The following is a detailed description of the embodiments of the present invention, which is implemented on the premise of the technical solution of the present invention, and a detailed implementation manner and a specific operation process are given, but the scope of the present invention is not limited to the following embodiments.
Fig. 1 is a flowchart of a distributed power generation listing transaction method according to an embodiment of the present invention.
As shown in fig. 1, it shows a flowchart of an implementation of a distributed generation listing transaction method provided by an embodiment of the present invention, which is detailed as follows:
in step 101, an offer of a first user is obtained, wherein the offer characterizes a condition for fulfilling a transaction.
In some embodiments, the first user and the second user are each registered as legitimate transaction users, and the registering step includes:
acquiring a fund account of a registered applicant, wherein the fund account has a fund transfer function and has funds with preset conditions;
generating a block with encryption information and a hash value according to the registration information of the registered applicant and the fund account, and adding the block into a block chain;
the registration information is published to all legal transaction users for a preset time limit;
and if no objection is received at the end of the predetermined term, generating a registration account number, a password and a secret key according to the registration information of the registered applicant.
In some embodiments, the obtaining funds from the registered funds account by the first user or the second user is a power-selling user includes:
acquiring a network access notice, and generating a network access statement according to the network access notice, wherein the network access notice comprises a network access display period and a pricing mode, and the network access statement comprises a risk electricity selling offer which needs to be lifted after the display period is finished;
generating a block with encryption information and a hash value by the network access declaration, and adding the block into a block chain;
according to the network access showing period, showing the network access statement and the risk electricity selling offer to all legal transaction users, and after showing is finished, lifting the risk electricity selling offer;
after the formula deadline is over, responding to the risk electricity selling offer, and performing risk electricity selling operation;
and after the risk electricity selling operation is finished, transferring the fund account of the electricity purchasing user to the fund account of the electricity selling user according to a pricing mode appointed in the network access need, transferring the risk electricity selling need and the fund account of the electricity purchasing user to the fund account of the electricity selling user according to the pricing mode appointed in the network access need to generate a block with encrypted information and a hash value, and adding the block into a block chain.
Illustratively, as shown in fig. 2, a distributed power generation listing transaction system is provided with a server 201 and a plurality of distributed terminals 202, wherein the distributed terminals 202 are used for storing block chains, and the server 201 is used for scheduling, encrypting and decrypting intermediate information generated in the transaction process.
The first user and the second user may be electricity selling users or electricity purchasing users, and the first user and the second user have corresponding settings, for example, when the first user is an electricity selling user, the second user is an electricity purchasing user, and when the first user is an electricity purchasing user, the second user is an electricity selling user. In some application scenarios, distributed terminal 202 is a terminal for a transaction for a first user and a second user.
The user who becomes the electricity selling user or the electricity purchasing user must have a fund account, and the account has certain transferable funds. And the electricity selling user or the electricity purchasing user submits registration information and fund accounts meeting the conditions to the server, and the registration information and the fund accounts are encrypted and then stored in the blockchain.
Then, the registration information is disclosed to the registered users for a certain period, for example, the period of the disclosure is 15 working days. If no feedback of the registered user is received at the end of the public service period, a registered account number, a password and a secret key are generated according to the registered information and the information is sent to the registered applicant.
One of the roles of the bulletin is to make it almost impossible to modify the blocks of the registered information and the fund account again by adding new information in the block chain so that the blocks are linked by other blocks, and the other is to inform and accept the supervision of the already registered user.
The key is used for guaranteeing the data transmission safety between the server and the distributed terminal, and the data can be decrypted only by the terminal party holding the key.
For the electricity selling user, before applying for registration, the fund of the fund account can obtain a fund by selling the electric energy generated by electricity generation to the registered user. I.e., a beneficial way, to obtain funds.
Before selling, drawing a network-accessing statement according to the network-accessing notice, wherein the network-accessing statement describes the price of selling electricity, the network-accessing statement also needs a period of formula in the registered user, and the transaction can be carried out after the period is over. The network entry announcements are also added to the blockchain in the form of blocks.
After the public notice is finished, if a registered user is willing to undertake the transaction, the fund of the registered user is transferred to an account of the electricity purchasing user according to the offer in the network access statement after the transaction is finished, and the account information of the electricity purchasing user is encrypted and added into the block chain.
In step 102, when the offer meets a verification condition, the offer is added to a transaction listing sequence, wherein the transaction listing sequence comprises a plurality of offers.
In some embodiments, step 102 comprises:
decrypting the offer according to the key of the first user to obtain a plaintext of the offer, wherein the plaintext comprises: registering an account number, a password, a transaction unit price, a transaction total amount and a transaction time period;
after the correctness of the registered account number is verified through the password, the available funds of the fund account are obtained according to the registered account number;
determining a maximum transaction amount according to the available funds and the default fund proportion;
determining an expected transaction amount according to the transaction unit price and the transaction total amount;
if the maximum transaction amount is larger than the predicted transaction amount, generating a frozen fund amount according to the default fund proportion and the predicted transaction amount;
freezing funds of the frozen fund amount in the available funds of the first user, generating a first frozen certificate and a first unfreezing application code, and adding the first frozen certificate and the blocks of the corresponding hash values into a block chain;
encrypting the first frozen certificate and the first unfreezing application code by using a secret key of the first user, and sending the encrypted first frozen certificate and the encrypted first unfreezing application code to the first user;
and adding the registered account number of the first user, the transaction unit price, the transaction total amount and the transaction time interval into the foremost end of a transaction queue, and disclosing all legal transaction users.
Illustratively, before a transaction is made, the user needs to add an offer to the transaction listing sequence in anticipation of other users being able to offer.
The user encrypts the offer by the secret key and transmits the encrypted offer to the server, the server decrypts the offer content according to the secret key of the user to obtain a plaintext of the offer, transaction unit price, transaction total amount and transaction time period are recorded in the plaintext, after the identity of the user is verified to be correct, available funds of a user account are inquired firstly, and then the maximum transaction amount supported by the available funds is determined according to the available funds and the default golden ratio.
Then, the expected transaction amount is determined according to the transaction unit price and the transaction total amount. If the predicted transaction amount does not exceed the maximum transaction amount, the available funds are frozen according to the predicted transaction amount.
After freezing, a freezing voucher and a freezing application code are generated and are sent to a user after being encrypted through a secret key, and the freezing voucher can be stored in a block chain. After the above operations are completed, the offer may be added to the transaction queue for posting to the registered user.
In step 103, in response to the offer of the second user, when the second user meets the verification condition, a transaction contract is generated and the offer is deleted from the transaction listing sequence.
In some embodiments, step 103 comprises:
confirming that the amount of funds available in the second user account is not less than the projected transaction amount;
encrypting the frozen fund amount and the dynamic code according to the secret key of the second user to generate a frozen notification ciphertext;
if a notification response from the second user and a code corresponding to the dynamic code are received within a preset period, freezing funds of the frozen amount in the funds available for the second user, generating a second freezing certificate and a second unfreezing application code, and adding the second freezing certificate and a corresponding hash value into a blockchain;
encrypting the second frozen certificate and the second unfreezing application code by using a secret key of the second user, and sending the encrypted second frozen certificate and the second unfreezing application code to the second user;
generating a block of a transaction contract and a hash value according to the registered account number of the first user, the registered account number of the second user, the transaction unit price, the transaction total amount and the transaction time interval, and adding the block into a block chain;
and deleting the registered account number of the first user, the transaction unit price, the transaction total amount and the transaction period from the transaction queue.
Illustratively, the second user is a user corresponding to the first user, after receiving the response of the second user, the identity of the second user is verified according to the previous process, the frozen amount of money of the second user is frozen according to the response of the frozen amount of money and the dynamic code, and when the freezing is finished, the unfreezing application code and the frozen certificate are generated and the certificate is sent to the second user.
Finally, the offer of the first user is removed from the transaction queue.
In step 104, in response to the transaction completion request of the first user, the transfer of the account between the first user and the second user is completed when the transaction completion instruction of the second user is received.
In some embodiments, step 104 comprises:
decrypting the transaction completion request according to the key of the first user, wherein the decrypted transaction completion request comprises: the system comprises an actual transaction amount, a first unfreezing application code and a first freezing certificate;
decrypting the transaction completion instruction according to the second user's key, wherein the decrypted transaction completion instruction comprises: the second frozen certificate and the second unfreezing application code;
verifying the correctness of the first unfreezing application code and the first frozen certificate in the decrypted transaction completion request according to the first unfreezing application code and the first frozen certificate in the block chain;
verifying the correctness of a second unfreezing application code and a second frozen certificate in the decrypted transaction completion request according to the second unfreezing application code and the second frozen certificate in the block chain;
if the first unfreezing application code, the first frozen certificate, the second unfreezing application code and the second frozen certificate are all correct, unfreezing the account of the first user and the account of the second user according to the frozen fund amount;
and completing transfer between the account of the first user and the account of the second user according to the actual transaction amount.
Illustratively, when the transaction is completed and a completion request of a first user is received, an inquiry of whether the transaction is completed or not is sent to a second user, when a completion instruction is received, the account of the first user and the account of the second user are unfrozen respectively according to the unfreezing application code, and after the unfreezing is completed, the transfer of funds between the two users is completed according to the actual transaction amount.
The distributed power generation listing transaction method implementation mode of the invention firstly obtains an offer of a first user, when the offer meets a verification condition, the offer is added into a transaction listing sequence, when a second user meets the verification condition, a transaction contract is generated and the offer is deleted from the transaction listing sequence, and when a transaction completion instruction of the second user is received, the transfer of an account between the first user and the second user is completed. According to the embodiment of the invention, the offer and the transaction are initiated based on the verification of the user offer, so that the transaction security is more guaranteed, the user privacy can be protected, and the transaction contract and the user account are added into the blockchain after being encrypted, so that the modification of the transaction contract and the user account can be effectively prevented. The transaction information is disclosed to the registered user by adding to the transaction listing sequence, so that the transaction is fairer and more fair.
It should be understood that the sequence numbers of the steps in the above embodiments do not mean the execution sequence, and the execution sequence of each process should be determined by the function and the inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
The following are apparatus embodiments of the invention, and for details not described in detail therein, reference may be made to the corresponding method embodiments described above.
Fig. 3 is a functional block diagram of a distributed energy resource transaction apparatus based on a blockchain technique according to an embodiment of the present invention, and referring to fig. 3, the distributed power generation listing transaction apparatus includes: an offer acquisition module 301, a deal listing module 302, a contract generation module 303, and an account transfer module 304.
An offer acquisition module 301 for acquiring an offer of a first user, wherein the offer characterizes a condition for reaching a transaction;
a deal listing module 302, configured to add the offer to a deal listing sequence when the offer meets a verification condition, where the deal listing sequence includes a plurality of offers;
a contract generating module 303, configured to generate a transaction contract and delete the offer from the transaction listing sequence when the second user meets a verification condition in response to an offer of the second user;
and the number of the first and second groups,
an account transfer module 304, configured to, in response to a transaction completion request of the first user, complete transfer of an account between the first user and the second user when a transaction completion instruction of the second user is received;
and respectively encrypting the transaction contract and the transfer to generate a hash value to be added into a block chain, wherein the transfer records the quote of the transaction contract.
Fig. 4 is a functional block diagram of a distributed power generation listing transaction server provided by an embodiment of the invention. As shown in fig. 4, the distributed generation listing transaction server 4 of this embodiment includes: a processor 400 and a memory 401, said memory 401 having stored therein a computer program 402 executable on said processor 400. The processor 400, when executing the computer program 402, implements the various distributed generation listing transaction methods and embodiments described above, such as steps 101-104 shown in fig. 1.
Illustratively, the computer program 402 may be partitioned into one or more modules/units, which are stored in the memory 401 and executed by the processor 400 to implement the present invention.
The distributed generation branding transaction server 4 can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The distributed generation listing transaction server 4 may include, but is not limited to, a processor 400, a memory 401. Those skilled in the art will appreciate that fig. 4 is merely an example of a distributed generation listing transaction server 4 and does not constitute a limitation of the distributed generation listing transaction server 4 and may include more or fewer components than shown, or some components in combination, or different components, e.g., the server may also include input output devices, network access devices, buses, etc.
The Processor 400 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 401 may be an internal storage unit of the distributed generation listing transaction server 4, such as a hard disk or a memory of the distributed generation listing transaction server 4. The memory 401 may also be an external storage device of the distributed generation and listing transaction server 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital Card (SD), a Flash Card (Flash Card), and the like, which are equipped on the distributed generation and listing transaction server 4. Further, the memory 401 may also include both an internal storage unit and an external storage device of the distributed generation listing transaction server 4. The memory 401 is used for storing the computer program and other programs and data required by the server. The memory 401 may also be used to temporarily store data that has been output or is to be output.
It should be clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional units and modules is only used for illustration, and in practical applications, the above function distribution may be performed by different functional units and modules as needed, that is, the internal structure of the apparatus may be divided into different functional units or modules to perform all or part of the above described functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the present application. For the specific working processes of the units and modules in the system, reference may be made to the corresponding processes in the foregoing method embodiments, which are not described herein again.
In the above embodiments, the description of each embodiment is focused on, and for parts that are not described or illustrated in detail in a certain embodiment, reference may be made to the description of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/server and method may be implemented in other ways. For example, the above-described apparatus/server implementation is merely illustrative, and for example, the division of the modules or units is only one logical division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the above embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of the embodiments of the distributed power generation listing transaction method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U.S. disk, removable hard disk, magnetic diskette, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signal, telecommunications signal, and software distribution medium, etc.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may be modified or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein.

Claims (10)

1. A distributed power generation listing transaction method is characterized by comprising the following steps:
obtaining an offer of a first user, wherein the offer characterizes a condition to reach a transaction;
when the offer meets a verification condition, adding the offer into a transaction listing sequence, wherein the transaction listing sequence comprises a plurality of offers;
in response to an offer of a second user, generating a transaction contract and deleting the offer from the transaction listing sequence when the second user meets a verification condition;
in response to the transaction completion request of the first user, completing transfer of an account between the first user and the second user when a transaction completion instruction of the second user is received;
and respectively encrypting the transaction contract and the transfer of the account between the first user and the second user to generate a hash value, and adding the hash value into the blockchain.
2. The distributed power generation listing transaction method of claim 1, wherein said first user and said second user are each registered as legitimate transaction users, said registering step comprising:
acquiring a fund account of a registered applicant, wherein the fund account has a fund transfer function and has funds with preset conditions;
generating a block with encryption information and a hash value according to the registration information of the registered applicant and the fund account, and adding the block into a block chain;
the registration information is published to all legal transaction users for a preset time limit;
and if no objection is received at the end of the predetermined period of time, generating a registered account number, a password and a secret key according to the registered information of the registered applicant.
3. The distributed power generation listing transaction method of claim 2, wherein said adding the offer into a listing sequence of transactions when the offer meets a validation condition comprises:
decrypting the offer according to the key of the first user to obtain a plaintext of the offer, wherein the plaintext comprises: registering an account number, a password, a transaction unit price, a transaction total amount and a transaction time period;
after the correctness of the registered account number is verified through the password, the available funds of the fund account are obtained according to the registered account number;
determining a maximum transaction amount according to the available funds and the default fund ratio;
determining an expected transaction amount according to the transaction unit price and the transaction total amount;
if the maximum transaction amount is larger than the predicted transaction amount, generating a frozen fund amount according to the default fund share and the predicted transaction amount;
freezing funds of the frozen fund amount in the available funds of the first user, generating a first frozen certificate and a first unfreezing application code, and adding the first frozen certificate and the blocks of the corresponding hash values into a block chain;
encrypting the first frozen certificate and the first unfreezing application code by using a secret key of the first user, and sending the encrypted first frozen certificate and the first unfreezing application code to the first user;
and adding the registered account number of the first user, the transaction unit price, the transaction total amount and the transaction time interval to the forefront end of a transaction queue, and disclosing all legal transaction users.
4. The distributed power generation listing transaction method of claim 3, wherein said generating a transaction contract and deleting said offer from said transaction listing sequence when said second user meets a validation condition in response to an offer of said second user comprises:
confirming that the amount of funds available in the second user account is not less than the projected transaction amount;
encrypting the frozen fund amount and the dynamic code according to the secret key of the second user to generate a frozen notification ciphertext;
if a notification response from the second user and the code corresponding to the dynamic code are received within a preset period, freezing funds of the frozen amount from the available funds of the second user, generating a second frozen certificate and a second unfreezing application code, and adding the second frozen certificate and a corresponding hash value into a blockchain;
encrypting the second frozen certificate and the second unfreezing application code by using a secret key of the second user, and sending the encrypted second frozen certificate and the second unfreezing application code to the second user;
generating a block of a transaction contract and a hash value according to the registered account number of the first user, the registered account number of the second user, the transaction unit price, the transaction total amount and the transaction time interval, and adding the block into a block chain;
and deleting the registered account number of the first user, the transaction unit price, the transaction total amount and the transaction time interval from the transaction queue.
5. The distributed power generation listing transaction method of claim 4, wherein said completing the transfer of the account between the first user and the second user upon receiving a transaction completion instruction of the second user in response to the transaction completion request of the first user comprises:
decrypting the transaction completion request according to the key of the first user, wherein the decrypted transaction completion request comprises: the system comprises an actual transaction amount, a first unfreezing application code and a first freezing certificate;
decrypting the transaction completion instruction according to the second user's key, wherein the decrypted transaction completion instruction comprises: the second frozen certificate and the second unfreezing application code;
verifying the correctness of the first unfreezing application code and the first frozen certificate in the decrypted transaction completion request according to the first unfreezing application code and the first frozen certificate in the block chain;
verifying the correctness of the second unfreezing application code and the second frozen certificate in the decrypted transaction completion request according to the second unfreezing application code and the second frozen certificate in the block chain;
if the first unfreezing application code, the first frozen certificate, the second unfreezing application code and the second frozen certificate are all correct, unfreezing the account of the first user and the account of the second user according to the frozen fund amount;
and completing transfer between the account of the first user and the account of the second user according to the actual transaction amount.
6. The distributed power generation listing transaction method of any one of claims 2-5, wherein the first user or the second user is a power selling user, and the obtaining funds of the registered funds account comprises:
acquiring a network access notice, and generating a network access statement according to the network access notice, wherein the network access notice comprises a network access display time limit and a pricing mode, and the network access statement comprises a risk electricity selling offer which needs to be lifted after the display time period is finished;
generating a block with encryption information and a hash value by the network access declaration, and adding the block into a block chain;
according to the network access showing period, showing the network access statement and the risk electricity selling offer to all legal transaction users, and after showing is finished, lifting the risk electricity selling offer;
after the formula deadline is over, responding to the risk electricity selling offer, and performing risk electricity selling operation;
and after the risk electricity selling operation is finished, transferring the fund account of the electricity purchasing user to the fund account of the electricity selling user according to the pricing mode agreed in the network access requisition, transferring the risk electricity selling requisition and the fund account of the electricity purchasing user to the fund account of the electricity selling user according to the pricing mode agreed in the network access requisition to generate a block with encrypted information and a hash value, and adding the block into a block chain.
7. A distributed electricity generation listing transaction device, comprising:
an offer acquisition module to acquire an offer of a first user, wherein the offer characterizes a condition to reach a transaction;
the transaction listing module is used for adding the offers into a transaction listing sequence when the offers meet the verification condition, wherein the transaction listing sequence comprises a plurality of offers;
the contract generation module is used for responding to the offer of a second user, generating a transaction contract and deleting the offer from the transaction listing sequence when the second user meets the verification condition;
and the number of the first and second groups,
the account transfer module is used for responding to the transaction completion request of the first user and completing the transfer of the account between the first user and the second user when receiving a transaction completion instruction of the second user;
and respectively encrypting the transaction contract and the transfer to generate a hash value to be added into a block chain, wherein the transfer records the quote of the transaction contract.
8. A distributed electricity generating branding transaction server comprising a memory and a processor, said memory having stored therein a computer program operable on said processor, wherein said processor when executing said computer program implements the steps of the method according to any of claims 1 to 6 above.
9. A distributed power generation listing transaction system, comprising the distributed power generation listing transaction server according to claim 8, further comprising a distributed terminal, the distributed terminal being operated by the first user and the second user, the distributed terminal being configured to generate a block of hash values from the received data and join the block chain.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN202210520519.7A 2022-05-12 2022-05-12 Distributed power generation listing transaction method, server, system and storage medium Pending CN115271841A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210520519.7A CN115271841A (en) 2022-05-12 2022-05-12 Distributed power generation listing transaction method, server, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210520519.7A CN115271841A (en) 2022-05-12 2022-05-12 Distributed power generation listing transaction method, server, system and storage medium

Publications (1)

Publication Number Publication Date
CN115271841A true CN115271841A (en) 2022-11-01

Family

ID=83759364

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210520519.7A Pending CN115271841A (en) 2022-05-12 2022-05-12 Distributed power generation listing transaction method, server, system and storage medium

Country Status (1)

Country Link
CN (1) CN115271841A (en)

Similar Documents

Publication Publication Date Title
CN112434343B (en) Virtual power plant safety scheduling and trading method based on dual block chain technology
CN110717832B (en) Clean energy trading method, system, device and storage medium based on block chain
CN110601816B (en) Lightweight node control method and device in block chain system
CN109636610B (en) Decentralized data transaction system and method
Jogunola et al. Demonstrating blockchain-enabled peer-to-peer energy trading and sharing
CN111179113A (en) Power demand response method based on block chain technology
CN111429134A (en) Data transaction method and device based on block chain
CN112200646A (en) Material contract fund payment approval management system and method
CN114358766A (en) Method, equipment and blockchain system for trading green electric certificates
CN111932250A (en) Method for realizing power grid information sharing based on block chain technology
CN113706312A (en) Photovoltaic electricity transaction method and device based on block chain
CN113626876B (en) Consensus method based on power grid block chain
CN111491024A (en) Block chain-based bank letter method, system, terminal and storage medium
CN113762961B (en) Trusted intelligent transaction method, system, computer equipment and terminal
CN113328854B (en) Service processing method and system based on block chain
CN114218591A (en) Digital asset management method capable of realizing anonymous transaction
Liu et al. Application of blockchain technology in electric vehicle charging piles based on electricity Internet of Things
Kilic Plug and Charge solutions with vehicle-to-grid communication
CN109272318B (en) Resource flow transaction method, device, equipment and medium applied to requester client
CN115271841A (en) Distributed power generation listing transaction method, server, system and storage medium
CN115941773A (en) Project transaction method, system, terminal device and medium based on cloud service sharing
CN113609528A (en) Data authorization circulation method and system based on digital pass
CN113344574A (en) Management method and storage medium for electric power transaction trusted data link
CN115225982A (en) Data transmission method and device of distributed energy transaction system
CN115994806B (en) Power transaction method, device and system based on blockchain and privacy calculation

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