CN113205378A - Electric energy transaction system based on block chain - Google Patents

Electric energy transaction system based on block chain Download PDF

Info

Publication number
CN113205378A
CN113205378A CN202110398662.9A CN202110398662A CN113205378A CN 113205378 A CN113205378 A CN 113205378A CN 202110398662 A CN202110398662 A CN 202110398662A CN 113205378 A CN113205378 A CN 113205378A
Authority
CN
China
Prior art keywords
electricity
price
party
purchasing
selling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110398662.9A
Other languages
Chinese (zh)
Other versions
CN113205378B (en
Inventor
钱正浩
韩露
苏凯
伍江瑶
温柏坚
张金波
蔡徽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Power Grid Co Ltd
Southern Power Grid Digital Grid Research Institute Co Ltd
Original Assignee
Guangdong Power Grid Co Ltd
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 Guangdong Power Grid Co Ltd, Southern Power Grid Digital Grid Research Institute Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN202110398662.9A priority Critical patent/CN113205378B/en
Publication of CN113205378A publication Critical patent/CN113205378A/en
Application granted granted Critical
Publication of CN113205378B publication Critical patent/CN113205378B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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]
    • 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/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0206Price or cost determination based on market factors
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • 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

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Health & Medical Sciences (AREA)
  • Signal Processing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Public Health (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Game Theory and Decision Science (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Primary Health Care (AREA)
  • Tourism & Hospitality (AREA)
  • Technology Law (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to an electric energy transaction system based on a block chain. The system comprises a blockchain infrastructure and an intelligent power utilization storage; the block chain infrastructure is used for storing the acquired electricity purchasing information in a first array, storing the acquired electricity selling information in a second array, and sending the electricity purchasing information and the electricity selling information to the intelligent electricity utilization memory when detecting that the first array and the second array are not empty; the intelligent electricity consumption memory is used for determining an electric energy bargaining price according to the received electricity purchasing price and the received electricity selling price, determining an electric energy bargaining amount according to the received electricity purchasing price and the received electricity selling price, reducing the account amount of an electricity purchasing party and increasing the account amount of an electricity selling party according to the electric energy bargaining price, and increasing the account electric quantity of the electricity purchasing party and reducing the account electric quantity of the electricity selling party according to the electric energy bargaining amount. By adopting the system, the intervention of a third-party manager and a supervisor can be avoided, so that the electric energy transaction has high efficiency.

Description

Electric energy transaction system based on block chain
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a system and a method for trading electric energy based on blockchain.
Background
In the traditional energy transaction, a centralized supervision mode and a third party intervention mode are adopted, and a manager and a supervision party perform certain duties in the transaction process to realize the transaction between an energy seller and an energy buyer, wherein the typical transaction is the electric energy transaction.
However, as global economic development is slowed down and requirements for sustainable environmental development are stricter, the traditional business model and the profit model of energy enterprises gradually cannot meet the requirements of new digitalized and low-carbon economic patterns, energy revolution taking energy users as the leading factor is gradually raised, the types of transaction requests are increasingly complex and the quantity of the transaction requests is gradually increased, the energy transaction is still carried out by adopting the traditional centralized supervision and third-party intervention mode, and the pursuit of high efficiency and low cost of the users in the transaction process is difficult to meet.
Therefore, the current electric energy transaction technology has the problem that the high efficiency requirement is difficult to meet.
Disclosure of Invention
In view of the above, there is a need to provide an efficient electric energy transaction system, method, computer device and storage medium for solving the above technical problems.
A blockchain based electrical energy transaction system, the system comprising a blockchain infrastructure and an intelligent electricity usage storage;
the block chain infrastructure is used for storing the acquired electricity purchasing information in a first array, storing the acquired electricity selling information in a second array, and sending the electricity purchasing information and the electricity selling information to the intelligent electricity utilization memory when detecting that the first array and the second array are not empty; the electricity purchasing message comprises an electricity purchasing price and electricity purchasing quantity, and the electricity selling message comprises an electricity selling price and electricity selling quantity;
the intelligent electricity consumption memory is used for determining an electric energy bargaining price according to the received electricity purchasing price and the received electricity selling price and determining an electric energy bargaining amount according to the received electricity purchasing amount and the received electricity selling amount;
the intelligent electricity utilization memory is further used for reducing the amount of the account of the electricity purchasing party according to the electric energy bargaining price and increasing the electric quantity of the account of the electricity purchasing party according to the electric energy bargaining price so that the electricity purchasing party can settle accounts according to the amount of the account of the electricity purchasing party and the electric quantity of the account of the electricity purchasing party after purchasing the electric energy;
the intelligent electricity utilization memory is further used for increasing the amount of the account of the electricity seller according to the electric energy transaction price and reducing the electric quantity of the account of the electricity seller according to the electric energy transaction quantity so that the electricity seller can settle accounts according to the amount of the account of the electricity seller and the electric quantity of the account of the electricity seller after selling electric energy.
In one embodiment, the system further comprises a smart meter, wherein the smart meter is used for acquiring a smart meter identifier and a pseudonym of a user and sending a mapping relation between the smart meter identifier and the pseudonym to the smart electricity storage; the user comprises the electricity purchasing party and the electricity selling party;
the intelligent electricity utilization memory is further used for obtaining an intelligent electric meter identification, searching a pseudonym corresponding to the intelligent electric meter identification according to the mapping relation, determining a user corresponding to the pseudonym as a target user, and updating the account amount and the account electric quantity of the target user.
In one embodiment, the intelligent electric meters comprise a power purchasing party intelligent electric meter and a power selling party intelligent electric meter; the block chain infrastructure is also used for sending a notice to the electricity purchasing party intelligent electric meter and the electricity selling party intelligent electric meter;
the electricity purchasing party intelligent ammeter is also used for sending an electricity purchasing verification message to the intelligent electricity utilization memory when receiving the notification;
the intelligent electricity meter of the electricity seller is also used for sending an electricity selling verification message to the intelligent electricity utilization memory when receiving the notice;
and the intelligent electricity consumption memory is further used for judging that the verification is passed when the electricity purchasing verification message is matched with the electricity purchasing message and the electricity selling verification message is matched with the electricity selling message, obtaining the electric energy transaction price according to the average value of the electricity purchasing price and the electricity selling price, and obtaining the electric energy transaction amount according to the minimum value of the electricity purchasing amount and the electricity selling amount.
In one embodiment, the intelligent electricity utilization memory is further used for sending the electricity purchasing verification message to the electricity selling party intelligent electric meter and sending the electricity selling party verification message to the electricity purchasing party intelligent electric meter;
the electricity purchasing party intelligent ammeter is also used for verifying the received electricity selling party verification message, and if the verification is passed, returning an electricity purchasing party confirmation message to the intelligent electricity utilization memory;
the intelligent electricity meter of the electricity seller is also used for verifying the received electricity purchasing party verification message, and if the verification is passed, the intelligent electricity utilization memory returns an electricity selling party confirmation message;
and the intelligent electricity utilization memory is further used for reducing the amount of the account of the electricity purchasing party and increasing the amount of the account of the electricity selling party according to the electric energy transaction price and increasing the electric quantity of the account of the electricity purchasing party and reducing the electric quantity of the account of the electricity selling party according to the electric energy transaction quantity when the confirmation message of the electricity purchasing party and the confirmation message of the electricity selling party are received.
In one embodiment, the system further comprises a key generation center; the key generation center is used for generating public parameters and sending the public parameters to the block chain infrastructure;
and the block chain infrastructure is also used for generating an intelligent contract according to the received public parameters.
In one embodiment, the key generation center is further configured to generate a private key of the user according to the public parameter when an initialization request of the user is received, and send the private key to the smart meter of the user, so that the smart meter encrypts the electricity purchasing message and the electricity selling message according to the private key.
In one embodiment, the smart meter is further configured to obtain electricity prices, and generate an electricity price vector U according to the electricity pricesLAnd URAccording to the private key, the electricity price vector ULAnd URPerforming inner product function encryption to obtain encrypted data (E) of the electricity priceL(UL),ER(UR) And sending said encrypted data (E)L(UL),ER(UR) To the blockchain infrastructure; the electricity price includes the electricity purchase price and the electricity sale price.
In one embodiment, the first array comprises a large root heap array, the second array comprises a small root heap array, a root node in the large root heap array is an electricity purchasing message with the highest electricity price, and a root node in the small root heap array is an electricity selling message with the lowest electricity price; the blockchain infrastructure is further adapted to encrypt the received encrypted data (E)L(UL),ER(UR) Decrypting to obtain the electricity price, if the electricity price is the electricity purchasing price, storing the electricity purchasing message in the large root bank array according to the height of the electricity price, and if the electricity price is the electricity selling price, storing the electricity selling message in the small root bank array according to the height of the electricity price.
In one embodiment, the blockchain infrastructure is further configured to obtain a first electricity price M1Vector of electricity prices
Figure BDA0003017842330000031
And a second electricity price M2Vector of electricity prices
Figure BDA0003017842330000032
Computing
Figure BDA0003017842330000033
And
Figure BDA0003017842330000034
inner product of (2)
Figure BDA0003017842330000035
If it is
Figure BDA0003017842330000036
Then M is judged1≤M2If, if
Figure BDA0003017842330000037
Then M is judged1>M2
In one embodiment, the block chain infrastructure is further configured to obtain a root element value V of the large root heap array when detecting that neither the large root heap array nor the small root heap array is emptyBHAnd the root element value V of the small root heap arraySHIf V isBH≥VSHThen, it is judged as VBHCorresponding power purchasing party and VSHAnd the corresponding power selling party carries out electric energy transaction.
A blockchain-based electric energy transaction method, the method comprising:
storing the obtained electricity purchasing message in a first array, and storing the obtained electricity selling message in a second array; the electricity purchasing message comprises an electricity purchasing price and electricity purchasing quantity, and the electricity selling message comprises an electricity selling price and electricity selling quantity;
when the first array and the second array are not detected to be empty, the electricity purchasing message and the electricity selling message are sent to an intelligent electricity utilization memory, the intelligent electricity utilization memory determines an electric energy bargaining price according to the received electricity purchasing price and the received electricity selling price, determines an electric energy bargaining amount according to the received electricity purchasing price and the received electricity selling price, reduces the account amount of an electricity purchasing party and increases the account amount of an electricity selling party according to the electric energy bargaining price, and increases the account amount of the electricity purchasing party and reduces the account amount of the electricity selling party according to the electric energy bargaining amount.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
storing the obtained electricity purchasing message in a first array, and storing the obtained electricity selling message in a second array; the electricity purchasing message comprises an electricity purchasing price and electricity purchasing quantity, and the electricity selling message comprises an electricity selling price and electricity selling quantity;
when the first array and the second array are not detected to be empty, the electricity purchasing message and the electricity selling message are sent to an intelligent electricity utilization memory, the intelligent electricity utilization memory determines an electric energy bargaining price according to the received electricity purchasing price and the received electricity selling price, determines an electric energy bargaining amount according to the received electricity purchasing price and the received electricity selling price, reduces the account amount of an electricity purchasing party and increases the account amount of an electricity selling party according to the electric energy bargaining price, and increases the account amount of the electricity purchasing party and reduces the account amount of the electricity selling party according to the electric energy bargaining amount.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
storing the obtained electricity purchasing message in a first array, and storing the obtained electricity selling message in a second array; the electricity purchasing message comprises an electricity purchasing price and electricity purchasing quantity, and the electricity selling message comprises an electricity selling price and electricity selling quantity;
when the first array and the second array are not detected to be empty, the electricity purchasing message and the electricity selling message are sent to an intelligent electricity utilization memory, the intelligent electricity utilization memory determines an electric energy bargaining price according to the received electricity purchasing price and the received electricity selling price, determines an electric energy bargaining amount according to the received electricity purchasing price and the received electricity selling price, reduces the account amount of an electricity purchasing party and increases the account amount of an electricity selling party according to the electric energy bargaining price, and increases the account amount of the electricity purchasing party and reduces the account amount of the electricity selling party according to the electric energy bargaining amount.
The electric energy transaction system, the method, the computer equipment and the storage medium based on the block chain store the acquired electricity purchasing information in a first array through a block chain infrastructure, store the acquired electricity selling information in a second array, send the electricity purchasing information and the electricity selling information to the intelligent electricity using memory when detecting that the first array and the second array are not empty, determine the electric energy bargaining price according to the received electricity purchasing price and the received electricity selling price by the intelligent electricity using memory, determine the electric energy bargaining amount according to the received electricity purchasing amount and the received electricity selling amount, reduce the account amount of the electricity purchasing party and increase the account amount of the electricity selling party according to the electric energy bargaining price, increase the account amount of the electricity purchasing party and reduce the account amount of the electricity selling party according to the electric energy bargaining price, can directly interact the electricity purchasing party and the electricity selling party as peer nodes in the electric energy transaction process without the intervention of a third party manager and a monitoring party, the electric energy transaction is efficient.
Moreover, the electricity purchasing message and the electricity selling message are stored through the blockchain infrastructure, so that the electricity purchasing message and the electricity selling message can be prevented from being tampered, and the safety of electric energy transaction is improved.
Drawings
FIG. 1 is a block diagram of a blockchain-based power trading system in one embodiment;
FIG. 2 is a block diagram of a block chain-based power trading system according to another embodiment;
FIG. 3 is a flowchart illustrating the initialization steps of the power trading system in one embodiment;
FIG. 4 is a schematic flow chart illustrating a transaction application step of the electric energy transaction system according to an embodiment;
FIG. 5 is a schematic flow chart illustrating the transaction matching process of the electric energy transaction system in one embodiment;
FIG. 6 is a flow diagram illustrating the transaction settlement steps of the power transaction system in one embodiment;
FIG. 7 is a flow diagram illustrating a method for blockchain-based trading of electrical energy according to one embodiment;
FIG. 8 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.
In one embodiment, as shown in fig. 1, a blockchain based electrical energy trading system 100 is provided that may include a blockchain infrastructure 110 and an intelligent electrical storage 120.
The blockchain infrastructure 110 may be a device capable of implementing blockchain storage and computation functions, and may be implemented by an independent server or a server cluster composed of a plurality of servers.
The intelligent power storage 120 may be a device for allocating power for a user, and may be a storage equipped with an energy pool.
The block chain infrastructure 110 is configured to store the acquired electricity purchasing message in a first array, store the acquired electricity selling message in a second array, and send the electricity purchasing message and the electricity selling message to the intelligent electricity utilization memory 120 when detecting that neither the first array nor the second array is empty; the electricity purchasing message comprises an electricity purchasing price and electricity purchasing quantity, and the electricity selling message comprises an electricity selling price and electricity selling quantity;
the intelligent electricity consumption memory 120 is used for determining the electric energy bargaining price according to the received electricity purchasing price and electricity selling price and determining the electric energy bargaining quantity according to the received electricity purchasing quantity and electricity selling quantity;
the intelligent electricity utilization memory 120 is further configured to reduce the amount of the account of the electricity purchasing party according to the electric energy bargain price, and increase the amount of the account of the electricity purchasing party according to the electric energy bargain amount, so that the electricity purchasing party can settle the account according to the amount of the account of the electricity purchasing party and the amount of the account of the electricity purchasing party after purchasing the electric energy;
the intelligent power consumption memory 120 is further configured to increase the amount of the power seller account according to the electric energy bargain price, and decrease the electric quantity of the power seller account according to the electric energy bargain amount, so that the power seller can settle the account according to the amount of the power seller account and the electric quantity of the power seller account after selling electric energy.
The first array can be a large root heap array, and a root node in the large root heap array is an electricity purchasing message with the highest electricity price. The second array can be a small root heap array, and the root node in the small root heap array is the electricity selling message with the lowest electricity price.
The electricity purchasing amount may be an amount of electricity purchased by an electricity purchasing party (purchase power consumption). The selling electricity amount may be an amount of electricity sold by the selling party (selling electricity consumption amount).
In the specific implementation, the electric energy transaction is performed through the block chain-based electric energy transaction system, and the electric energy transaction system can comprise four stages, namely an initialization stage, a transaction application stage, a transaction matching stage and a transaction settlement stage.
In an initialization phase, the public parameter pk may be generated by the key generation center and sent to the blockchain infrastructure, and the private key sk may be generated based on the public parameter pk and sent to the smart meter associated with the user.
In the transaction application stage, when the user intends to buy or sell electricity, the smart meter may encrypt electricity price information (electricity purchase price PP or electricity sale price SP) by using the private key sk, and transmit the electricity information (electricity purchase price PA or electricity sale price SP) and the encrypted electricity price information to the blockchain infrastructure for storage. The block chain infrastructure can store electricity purchasing messages in the big root heap array BH according to the electricity price and store electricity selling messages in the small root heap array SH according to the electricity price.
In the transaction matching stage, transaction matching can be performed periodically, when it is detected that neither the big root pile array BH nor the small root pile array SH is empty, the transaction matching is judged to be successful, the block chain infrastructure can respectively send an electricity purchasing message and an electricity selling message to an electricity purchasing party by taking the electricity purchasing party corresponding to the electricity purchasing message in the big root pile array BH root element and the electricity selling party corresponding to the electricity selling message in the small root pile array SH root element as transaction objects, and the block chain infrastructure can also send the electricity purchasing message and the electricity selling message to the intelligent electricity utilization memory.
In the transaction settlement stage, the intelligent electricity utilization storage can verify the electricity purchasing party and the electricity selling party, if the verification is passed, the electric energy payment price UP (SP, PP) can be obtained according to the average value of the electricity price information, and the electric energy payment amount UA (SA, PA) can be obtained according to the smaller value of the electric quantity information. The electricity purchasing party and the electricity selling party can also mutually authenticate each other, if the authentication is passed, a confirmation message is sent to the intelligent electricity utilization memory, and the intelligent electricity utilization memory can update the total electricity quantity of the account of the electricity purchasing party to Actp=Actp+ UA, total amount updated to Cetp=CetpUP, while updating the total charge of the electricity seller account to Acts=ActsUA, Total update to Cets=Cets+ UP. The intelligent electricity utilization memory can send the total electric quantity and the total amount of money after the update to relevant intelligent ammeter and update the reading to supply the buyer and the electricity seller to trade and settle accounts according to the reading after the update, at this moment, the buyer can use the electric energy in the intelligent electricity utilization memory through the electric energy transmission facility.
Fig. 2 provides a block diagram of a block chain-based electric energy transaction system, and according to fig. 2, the block chain-based electric energy transaction system may be composed of entities such as a user, a smart meter, a block chain infrastructure, an intelligent electricity storage, an electric energy transmission facility, and a key generation center.
The user can be an object in the system, which is provided with the intelligent electric meter, and can initiatively initiate energy transaction through the intelligent electric meter. If the initiated transaction is an electricity purchasing transaction, the transaction is regarded as an electricity purchasing party. And if the initiated transaction is an electricity selling transaction, the transaction is regarded as an electricity selling party.
The smart meter can be a sealed tamper-proof device, and can always perform a task in good faith. In addition, the intelligent electric meter not only records the electric quantity, but also can be used as a client node of the block chain, has certain computing power and is responsible for initiating transactions for users.
The intelligent electricity utilization storage can be an energy pool provided with a bidirectional communication flow, and is connected with all intelligent electricity meters in the region. The intelligent electricity storage is simultaneously connected with an electric energy transmission facility to transmit electricity. And according to the intelligent electric meter, the intelligent electricity utilization memory is added into the block chain network, receives the matched transaction information and allocates electricity among users through the electric energy transmission facility according to the transaction.
The electric energy transmission facility can wait for the allocation of the intelligent power utilization storage and is responsible for transmitting the electric power resource between the intelligent power utilization storage and the user end.
The key generation center can be responsible for distributing keys to the smart electric meters of both trading parties and providing data encryption basic service for the energy trading system.
Wherein the blockchain infrastructure can provide point-to-point transaction service support. Through the interaction between the buyer and the seller and the intelligent contract, the transaction matching process of the encrypted data is automatically completed under the condition that the real identity of the user is not leaked and the privacy of the transaction data is protected.
Fig. 3 provides a schematic flow chart of the initialization steps of the electric energy transaction system, according to fig. 3, when the system is initialized, the key generation center runs the inner product function encryption scheme initialization algorithm, generates the public parameter pk and sends the public parameter pk to the block chain infrastructure, and the public parameter is completely public, so that anyone can obtain the information at any time. The blockchain infrastructure creates an intelligent contract from pk in preparation for a subsequent intelligent contract to operate on the encrypted data using the common parameter pk. Meanwhile, the secret key generation center waits for a user initialization request, generates a private key sk based on the public parameter pk for the user, and sends the private key sk to the smart electric meter associated with the user. The intelligent electric meter can encrypt the transaction information according to the private key sk, upload the intelligent contract and link and store the intelligent contract to the block chain infrastructure for matching the transaction.
The function encryption mechanism supports ciphertext-oriented operation. Inner product function encryption algorithms allow the inner product of plaintext to be computed by manipulating the ciphertext. For example: suppose there are two vectors
Figure BDA0003017842330000081
Order to
Figure BDA0003017842330000082
Representing the encrypted ciphertext. The decryption operation is represented in ciphertext
Figure BDA0003017842330000083
As input, output vector
Figure BDA0003017842330000084
Inner product of (D), is recorded as
Figure BDA0003017842330000085
The decryption operation can be performed by any third party without revealing the plaintext
Figure BDA0003017842330000086
Is performed to obtain the inner product result.
By bilinear pair property, assume a group element Q0E G, and row vector
Figure BDA0003017842330000087
Figure BDA0003017842330000088
Representing group vectors
Figure BDA0003017842330000089
Then bilinear pairs may be represented as follows, where
Figure BDA00030178423300000810
Figure BDA00030178423300000811
Figure BDA00030178423300000812
Figure BDA0003017842330000091
The specific algorithm may include:
(1)Setup(1λ) → (pk, sk): the algorithm takes a safety parameter lambda as input, and firstly selects two multiplication cyclic groups G and G with the order of prime number pTDefining bilinear transformation e, then randomly selecting generator g0,g1E.g. G. Next, the algorithm randomly selects a matrix B, where B is Z for all elementspWhile setting a companion matrix B of the matrix B*=det(B)·(B-1)TWhere det (B) denotes the determinant of the matrix B, (B)-1)TRepresents the inverse matrix B-1The transposing of (1). Finally, the algorithm outputs the common parameter pk ═ G (G, G)TP, e), the output private key sk ═ g0,g1,B,B*);
(2)
Figure BDA0003017842330000092
The algorithm uses the private key sk and the row vector
Figure BDA0003017842330000093
Selecting random element alpha epsilon Z for inputtingpOutput about
Figure BDA0003017842330000094
The left ciphertext of (a) is as follows:
Figure BDA0003017842330000095
(3)
Figure BDA0003017842330000096
the algorithm uses the private key sk and the row vector
Figure BDA0003017842330000097
Selecting a random element beta epsilon Z for inputpOutput about
Figure BDA0003017842330000098
The right ciphertext of (1) is as follows:
Figure BDA0003017842330000099
(4)
Figure BDA00030178423300000910
the algorithm uses the common parameter pk
Figure BDA00030178423300000911
Left ciphertext of
Figure BDA00030178423300000912
And to
Figure BDA00030178423300000913
Right ciphertext of
Figure BDA00030178423300000914
For input, the output decryption result is as follows:
D1=e(L1,R1),
D2=e(L2,R2),
if the element z is present, satisfy (D)1)z=D2Then the element z ═<x,y>。
The bilinear pair can be defined as two multiplication cyclic groups G and G with prime number pTLet G be a generator of G. A transform is said to be e if it satisfies the following properties: g → GTIs a bilinear transformation.
(1) Bilinear: for any a, b ∈ ZpHaving a value of e (g)a,gb)=e(g,g)ab
(2) Non-degradability: e (g, g) ≠ 1;
(3) calculability: for arbitrary Q0,Q1∈GTThere are efficient algorithms to calculate e (Q)0,Q1)。
Fig. 4 provides a schematic flow chart of the transaction application steps of the electric energy transaction system, according to fig. 4, when a user intends to purchase or sell electricity, a temporary pseudonym is randomly generated by the smart meter and is marked as sid, and a mapping relationship formed by the sid and the real id of the smart meter is sent to the smart electricity utilization storage to register the pseudonym for the session. Because the user only displays the temporary pseudonymous identity sid in the transaction process, the identity information is not leaked to other users except the intelligent power utilization storage, and the identity privacy of the user can be protected to the maximum extent. After the temporary pseudonym is registered, the intelligent ammeter calls the electricity price information (electricity purchase price PP or electricity sale price SP) to an encryption algorithm to encrypt data. Finally, the user packs and sends the sid, the encrypted data of the electricity price information, the electricity quantity information (the purchase electricity consumption PA or the sale electricity consumption SA) and the hash value c to the intelligent contract generated in the initialization stage. The hash value c is obtained by performing hash calculation on the sid, the electricity price information and the electricity quantity information. The called intelligent contract stores the packed message (sid, the encrypted data of the electricity price information, the electricity quantity information and the hash value c) in an array for waiting matching, and if the packed message is an electricity purchasing message, the message is stored in a large root heap array BH according to the electricity price. If the packaged message is a power selling message, the message is stored in the small root heap array SH according to the power price.
Wherein, the process that smart electric meter encrypted the price of electricity information can be: first, it is assumed that there exists an ascending array P in the system, which can be sent to the smart meter by the key distribution center during the initialization phase. For convenience, the array P may be temporarily set to { 1., 10}, while supporting the expression of values in the form of an array index (calculated starting from 1) such as: p1]=1,P[9]9, in the form of index (x), denotes a numerical index such as: index (3) ═ 3 and Index (10) ═ 10. Then, the intelligent electric meter selects a value z from the array P as the electricity price, and generates a vector U according to the electricity priceL,UR. Wherein U isLThe bits with middle array indices less than index (z) are all labeled 0 and the remaining bits are labeled 1. U shapeRThe bits in the middle array with index (z) are denoted as 1 and the remaining bits are denoted as 0. For example: when the electricity price is 6, UL=(0,0,0,0,0,1,1,1,1,1),UR(0, 0, 0, 0, 1, 0, 0, 0, 0). Finally, the smart meter executes LeftEncrypt (sk, U) with the sk generated by initializationL)→EL(UL) And rightEncrypt (sk, U)R)→ER(UR) The inner product function encryption algorithm obtains the final encrypted data (E)L(UL),ER(UR))。
Wherein, in the process of storing the packed message according to the price of electricity, the plug-in algorithm can be called to judge the price of electricity. First, the algorithm classifies the packaged message into a purchase electricity message and a sale electricity message according to categories. If the message is a power purchase message, the message is inserted into a large root heap array BH which is sorted according to the power price, and the root node in the array is the power purchase message with the highest power price. Since the electricity price information in the packet message is encrypted as the encrypted data, the encrypted data (E) is passedL(UL),ER(UR) Execute a decryption algorithm to compare the price of electricity for two packed messages to reorder the large root heap array BH. For example: suppose two electricity purchasing messages with electricity prices of 6 and 8 respectively, which are respectively marked as M1,M2. At this time, M1Is represented as a vector of electricity prices
Figure BDA0003017842330000101
Figure BDA0003017842330000111
M2Is represented as a vector of electricity prices
Figure BDA0003017842330000112
Figure BDA0003017842330000113
Thus, the inner product can be calculated
Figure BDA0003017842330000114
To compare electricity prices. If the calculation result is 1, M is represented1≤M2. If the result is 0, M is represented1>M2. But based on the inner product function encryption characteristics,
Figure BDA0003017842330000115
equivalent to decryption algorithm based on encrypted data
Figure BDA0003017842330000116
The output value of (1). In addition, the decryption algorithm does not restore the encrypted data to the electricity price data, only outputs the inner product value between the electricity prices, and protects the privacy of the electricity price data. Similarly, if the electricity selling message is the electricity selling message, the message is inserted into the small root heap array SH which is sorted according to the electricity price, and the root node in the array is the electricity selling message with the lowest electricity price. Similar to the storage of the purchase message, the sale message is also stored by encrypting data (E)L(UL),ER(UR) Execute a decryption algorithm to compare the price of electricity of the two packetized messages high and low to reorder the small stub array SH.
Fig. 5 provides a flow chart of the electric energy trading system trade matching steps, and according to fig. 5, the blockchain network carries out trade matching periodically. When neither the big root heap array BH nor the small root heap array SH is empty, the transaction match is successful. And then, the block chain node takes out the packaged message of the root elements in the two arrays and sends the packaged message to the message source intelligent electric meter. And simultaneously informing the user of the smart meter that the smart meter is selected as a transaction object. In addition, the intelligent power utilization storage also receives transaction package messages of the buyer and the seller.
The intelligent contract can execute a matching algorithm to select a proper electricity purchasing party and a proper electricity selling party to achieve a transaction. In the specific implementation, the matching algorithm checks the big root heap array BH and the small root heap array SH, and if any array is empty, the algorithm stops executing. Otherwise, the algorithm takes out the root element value V from the BH and SH arrays respectivelyBH,VSHAnd a decryption algorithm is executed to compare the two values. If VBH<VSHIndicating that all electricity purchase prices in the current system are lower than the minimum electricity sale price, and therefore the transaction matching fails and the algorithm is aborted. Otherwise, the algorithm will VBHAnd VSHSet as the object of the transaction, and set VBHAnd VSHAnd removing the arrays from the respective arrays, and reordering the arrays. The transaction is successfully matched, and the algorithm outputs VBHAnd VSHThe associated packed message.
Fig. 6 is a flow chart illustrating a transaction settlement step of the electric energy transaction system, according to fig. 6, after the user receives the selection notification, the user (electricity purchasing party and electricity selling party) sends a verification message such as sid, electricity price information (electricity purchasing price PP or electricity selling price SP), electricity quantity information (electricity purchasing price PA or electricity selling price SA), and the like to the smart electricity storage device. The intelligent electricity utilization memory can hash the electricity purchasing party verification message to obtain c ', and compares whether c in the packed message is equal to c' to verify the electricity purchasing party, and similarly, the intelligent electricity utilization memory can hash the electricity selling party verification message and compare the packed message to verify the electricity selling party. If the electricity purchase and the electricity sale are equal, the verification is passed, and the average value of the electricity price information is used as the final transaction price UP to average (SP, PP), and the smaller value of the electricity quantity information is used as the final transaction quantity UA to min (SA, PA).
And then, the intelligent power utilization storage exchanges user authentication information of the buyer and the seller for the authentication result of the other party, and the authentication mode is consistent with that of the intelligent power utilization storage. And if the verification is successful, the user sends a confirmation message to the intelligent electricity utilization memory. And after the intelligent electricity utilization memory receives the confirmation messages of the users of the two parties, the intelligent electricity utilization memory, the electricity purchasing party and the electricity selling party negotiate to reach a consistency. The intelligent power utilization storage locates the real identity of the sid user through the mapping relation of user identity registration in the transaction application stage, and updates the total electric quantity of the account of the power purchasing party to Actp=Actp+ UA, total amount updated to Cetp=Cetp-UP. Meanwhile, the total electric quantity of the account of the electricity seller is updated to Acts=ActsUA, Total update to Cets=Cets+ UP. And finally, the intelligent electricity utilization storage sends the updating message to the related intelligent electricity meter to update the reading, and at the moment, the electricity purchasing party can use the electric energy in the intelligent electricity utilization storage through the electric energy transmission facility.
The electric energy transaction system based on the block chain stores the acquired electricity purchasing information in a first array and stores the acquired electricity selling information in a second array through the block chain infrastructure, when detecting that the first array and the second array are not empty, sending an electricity purchasing message and an electricity selling message to the intelligent electricity utilization memory, determining the electric energy bargaining price according to the received electricity purchasing price and electricity selling price by the intelligent electricity utilization memory, determining the electric energy transaction amount according to the received electric energy purchasing amount and electric energy selling amount, reducing the account amount of the electricity purchasing party and increasing the account amount of the electricity selling party according to the electric energy transaction price, according to the electric energy trading volume, the electric quantity of the account of the electricity purchasing party is increased and the electric quantity of the account of the electricity selling party is reduced, so that in the electric energy trading process, the electricity purchasing party and the electricity selling party are used as peer nodes to directly interact without the intervention of a third-party manager and a supervisor, so that the electric energy transaction has high efficiency.
Moreover, the electricity purchasing message and the electricity selling message are stored through the blockchain infrastructure, so that the electricity purchasing message and the electricity selling message can be prevented from being tampered, and the safety of electric energy transaction is improved.
Further, since the blockchain is an open, distributed database, transactions can be conducted between anonymous participants without the intervention of a centralized administrator. The block chain embeds the trust information into each transaction source, thereby greatly improving the security and the cost efficiency of the transaction. The characteristics and advantages of the blockchain can help energy enterprises to innovatively solve energy trading problems and promote energy value chain remodeling on a credible basis.
Furthermore, a peer-to-peer network completely oriented to transaction is constructed between the electricity purchasing party and the electricity selling party, a peer-to-peer network energy transaction framework is constructed based on a block chain, automatic transaction matching is implemented by using the intelligent contract, the user can be used as a peer-to-peer node and can directly interact with the intelligent contract, the intervention effect of a manager and a supervisor in the transaction process is reduced, point-to-point connection between transaction users is realized, the fairness of transaction is enhanced, and the transaction efficiency can be further improved. Meanwhile, by constructing a privacy protection algorithm based on inner product function encryption, measures for protecting the identity privacy of the user and the safety of transaction data are provided, and the benefit of the user can be practically ensured not to be infringed.
The peer-to-peer network may be a network composed of a plurality of computers in a peer-to-peer status. In a peer-to-peer network environment, multiple computers connected to each other are in a peer-to-peer status, each computer has the same function, and there is no master-slave distinction, and one computer can be used as a server to set shared resources for other computers in the network, and can also be used as a workstation. The entire network generally does not rely on a dedicated centralized server, nor does it have dedicated workstations. Each computer in the network can both act as a requester of network services and provide resources, services and content in response to requests from other computers.
In one embodiment, the electric energy transaction system based on the blockchain further comprises a smart meter, wherein the smart meter is used for acquiring a smart meter identifier and a pseudonym of a user and sending a mapping relation between the smart meter identifier and the pseudonym to the smart electricity utilization memory; the users comprise electricity purchasing parties and electricity selling parties; the intelligent electricity utilization memory is further used for obtaining the intelligent electric meter identification, searching the pseudonym corresponding to the intelligent electric meter identification according to the mapping relation, determining the user corresponding to the pseudonym as the target user, and updating the account amount and the account electric quantity of the target user.
In the specific implementation, when a user intends to buy or sell electricity, a temporary pseudonym is randomly generated through the intelligent electric meter and is marked as sid, and a mapping relation formed by the sid and the real id of the intelligent electric meter is sent to the intelligent electricity utilization storage to register the pseudonym for the conversation. Because the user only displays the temporary pseudonymous identity sid in the transaction process, the identity information is not leaked to other users except the intelligent power utilization storage, and the identity privacy of the user is protected to the maximum extent. After the temporary pseudonym is registered, the intelligent ammeter calls the electricity price information (electricity purchase price PP or electricity sale price SP) to an encryption algorithm to encrypt data. Finally, the user packages and sends the sid, the encrypted data, the electricity quantity information (the electricity consumption for purchase PA or the electricity consumption for sale SA) and the hash value c to the intelligent contract generated in the initialization stage. The hash value c is obtained by performing hash calculation on the sid, the electricity price information and the electricity quantity information.
In the transaction settlement stage, after the intelligent electricity utilization memory receives the confirmation messages of the users of the two parties, the intelligent electric meter ids of the electricity purchasing party and the electricity selling party can be obtained, the pseudonyms corresponding to the intelligent electric meter ids are searched according to the mapping relation, the real identities of the electricity purchasing party and the electricity selling party are positioned according to the pseudonyms, and then the total electric quantity of the account of the electricity purchasing party can be updated to Actp=Actp+ UA, total amount updated to Cetp=Cetp-UP, updating total charge of electricity seller account to Acts=ActsUA, Total update to Cets=Cets+UP。
In the embodiment, the intelligent electric meter identification and the pseudonym of the user are obtained through the intelligent electric meter, the mapping relation between the intelligent electric meter identification and the pseudonym is sent to the intelligent electricity utilization storage, the intelligent electricity utilization storage obtains the intelligent electric meter identification, the pseudonym corresponding to the intelligent electric meter identification is searched according to the mapping relation, the user corresponding to the pseudonym is determined as the target user, the account amount and the account electric quantity of the target user are updated, the user can participate in a transaction process by using the pseudonym, the user identity privacy protection is achieved, the requirement on energy supply safety is met, and the problem that the user privacy is violated by chaining plaintext data in the current block chain energy transaction process is solved.
In one embodiment, the smart meters comprise a power purchasing party smart meter and a power selling party smart meter; the block chain infrastructure is also used for sending a notice to the intelligent ammeter of the electricity purchasing party and the intelligent ammeter of the electricity selling party; the electricity purchasing party intelligent ammeter is also used for sending an electricity purchasing verification message to the intelligent electricity utilization memory when receiving the notification; the intelligent electricity meter of the electricity seller is also used for sending an electricity selling verification message to the intelligent electricity utilization memory when receiving the notice; the intelligent electricity utilization memory is further used for judging that the verification is passed when the electricity purchasing verification message is matched with the electricity purchasing message and the electricity selling verification message is matched with the electricity selling message, obtaining the electric energy bargain price according to the average value of the electricity purchasing price and the electricity selling price, and obtaining the electric energy bargain amount according to the minimum value of the electricity purchasing price and the electricity selling price.
In the concrete implementation, after the matching of the transaction is completed and the electricity purchasing party and the electricity selling party are determined, the blockchain infrastructure can send a notice to the electricity purchasing party intelligent ammeter and the electricity selling party intelligent ammeter, after the electricity purchasing party intelligent ammeter receives the notice, the electricity purchasing party intelligent ammeter can send a verification message (electricity purchasing verification message) of sid, electricity purchasing price and electricity purchasing quantity to the intelligent electricity utilization memory, the intelligent electricity utilization memory hashes the electricity purchasing verification message to obtain c1 ', compares c1 ' with the sid, electricity purchasing price and electricity purchasing quantity packaging message c1, if c1 ' is equal to c1, the electricity purchasing verification message is judged to be matched with the electricity purchasing message, and similarly, after the electricity selling party intelligent ammeter receives the notice, the electricity selling party intelligent electricity utilization memory can send the verification message (electricity selling verification message) of sid, electricity selling price and electricity selling quantity to the intelligent electricity utilization memory, the intelligent electricity utilization memory hashes the electricity selling verification message to obtain c2 ', and compares c2 ' with sid, And comparing the electricity selling price and the packaged information c2 of the electricity selling quantity, if c 2' is equal to c2, judging that the electricity selling verification information is matched with the electricity selling message, and when the electricity purchasing verification information is matched with the electricity purchasing message and the electricity selling verification information is matched with the electricity selling message, judging that the verification is passed, wherein the average value of the electricity price information can be used as the final transaction price UP (SP, PP), and the smaller value of the electricity quantity information can be used as the final transaction quantity UA (SA, PA).
In this embodiment, a notification is sent to the electricity purchasing party smart meter and the electricity selling party smart meter through the blockchain infrastructure, when the electricity purchasing party smart meter and the electricity selling party smart meter receive the notification, the electricity purchasing verification message and the electricity selling verification message are sent to the smart electricity utilization memory respectively, when the smart electricity utilization memory detects that the electricity purchasing verification message is matched with the electricity purchasing message and the electricity selling verification message is matched with the electricity selling message, the smart electricity utilization memory judges that the verification is passed, obtains an electric energy bargaining price according to an average value of the electricity purchasing price and the electricity selling price, obtains an electric energy bargaining amount according to a minimum value of the electricity purchasing amount and the electricity selling amount, can verify both parties of a transaction before settlement of the electric energy transaction, and guarantees the safety of the transaction while the automatic transaction matching and the high efficiency of the electric energy transaction are guaranteed.
In one embodiment, the intelligent electricity utilization memory is further configured to send an electricity purchasing verification message to the electricity selling party intelligent electric meter and send an electricity selling party verification message to the electricity purchasing party intelligent electric meter; the intelligent electricity meter of the electricity purchasing party is also used for verifying the received electricity selling party verification message, and if the verification is passed, the intelligent electricity utilization memory is returned with an electricity purchasing party confirmation message; the intelligent electricity meter of the electricity seller is also used for verifying the received electricity purchasing party verification message, and if the verification is passed, the intelligent electricity utilization memory returns an electricity selling party confirmation message; the intelligent electricity utilization memory is also used for reducing the account amount of the electricity purchasing party and increasing the account amount of the electricity selling party according to the electric energy transaction price and increasing the account electric quantity of the electricity purchasing party and reducing the account electric quantity of the electricity selling party according to the electric energy transaction quantity when the confirmation message of the electricity purchasing party and the confirmation message of the electricity selling party are received.
In a specific implementation, the intelligent electricity utilization memory can also exchange user verification information of the buyer and the seller for a verification result of the opposite party, and the verification information of the electricity purchasing party can be sent to the intelligent electricity meter of the electricity selling party, and the verification information of the electricity selling party can be sent to the intelligent electricity meter of the electricity purchasing party. And the intelligent electricity meter of the electricity selling party and the intelligent electricity meter of the electricity purchasing party respectively verify the received messages, and if the verification is successful, a confirmation message is sent to the intelligent electricity utilization memory. And after the intelligent electricity utilization memory receives the confirmation messages of the users of the two parties, the intelligent electricity utilization memory, the electricity purchasing party and the electricity selling party negotiate to reach a consistency. The intelligent power utilization storage locates the real identity of the sid user through the mapping relation of user identity registration in the transaction application stage, and updates the total electric quantity of the account of the power purchasing party to Actp=Actp+ UA, total amount updated to Cetp=Cetp-UP. Meanwhile, the total electric quantity of the account of the electricity seller is updated to Acts=ActsUA, Total update to Cets=Cets+ UP. And finally, the intelligent electricity utilization storage sends the updating message to the related intelligent electricity meter to update the reading, and at the moment, the electricity purchasing party can use the electric energy in the intelligent electricity utilization storage through the electric energy transmission facility.
In the embodiment, the electricity purchasing verification message is sent to the electricity selling party intelligent ammeter through the intelligent electricity utilization memory, the electricity selling party verification message is sent to the electricity purchasing party intelligent ammeter, the electricity purchasing party intelligent ammeter verifies the received electricity selling party verification message, if the verification is passed, the electricity purchasing party confirmation message is returned to the intelligent electricity utilization memory, the electricity selling party intelligent ammeter verifies the received electricity purchasing party verification message, if the verification is passed, the electricity selling party confirmation message is returned to the intelligent electricity utilization memory, when the electricity purchasing party confirmation message and the electricity selling party confirmation message are received by the intelligent electricity utilization memory, the account amount of the electricity purchasing party is reduced and the account amount of the electricity selling party is increased according to the electric energy purchase price, the account electric quantity of the electricity purchasing party is increased and the account electric quantity of the electricity selling party is reduced according to the electric energy purchase price, after the intelligent electricity utilization memory verifies the transaction parties, the electricity purchasing party and the electricity selling party verify the opposite party respectively, the fairness of the transaction is enhanced, so that the electric energy transaction meets the requirement of the peer-to-peer network on the fairness of the transaction.
In one embodiment, the blockchain-based electric energy transaction system further comprises a key generation center; the key generation center is used for generating public parameters and sending the public parameters to the blockchain infrastructure; the block chain infrastructure is further configured to generate an intelligent contract according to the received public parameters.
In specific implementation, when a system is initialized, a key generation center runs an inner product function encryption scheme initialization algorithm, generates a public parameter pk and sends the public parameter pk to a block chain infrastructure, the public parameter is completely public, and anyone can acquire the information at any time. The blockchain infrastructure creates an intelligent contract from pk in preparation for a subsequent intelligent contract to operate on the encrypted data using the common parameter pk.
In this embodiment, a public parameter is generated by the key generation center, and the public parameter is sent to the blockchain infrastructure, and the blockchain infrastructure generates an intelligent contract according to the received public parameter, so that preparation can be made for subsequently implementing inner product function encryption based on the public parameter.
In an embodiment, the key generation center is further configured to generate a private key of the user according to the public parameter when an initialization request of the user is received, and send the private key to the smart meter of the user, so that the smart meter encrypts the electricity purchasing message and the electricity selling message according to the private key.
In the specific implementation, the key generation center waits for an initialization request of a user, generates a private key sk based on a public parameter pk for the user when receiving the initialization request of the user, and sends the private key sk to the smart electric meter associated with the user. The smart electric meter can use the private key sk to perform inner product function encryption on the electricity purchasing price or the electricity selling price, generate encrypted data to upload to the smart contract, and perform uplink storage on the block chain infrastructure.
In the embodiment, when the key generation center receives an initialization request of a user, the private key of the user is generated according to the public parameters, and the private key is sent to the smart electric meter of the user, so that the smart electric meter can encrypt electricity purchasing information and electricity selling information, and the safety of transaction data is ensured.
In one embodiment, the smart meter is further configured to obtain electricity prices, and generate an electricity price vector U according to the electricity pricesLAnd URAccording to the private key, the electricity price vector U is pairedLAnd URPerforming inner product function encryption to obtain encrypted data (E) of electricity priceL(UL),ER(UR) And sends the encrypted data (E)L(UL),ER(UR) To a blockchain infrastructure; the electricity prices include a purchase electricity price and a sale electricity price.
In the specific implementation, the encryption algorithm is executed by the intelligent electric meter, the electricity price information (electricity purchase price PP or electricity sale price SP) is input, and the encrypted data is output. The algorithm details are set forth below: first, it is assumed that there exists an ascending array P in the system, which can be sent to the smart meter by the key distribution center during the initialization phase. For convenience, the array P may be temporarily set to { 1., 10}, while supporting the expression of values in the form of an array index (calculated starting from 1) such as: p1]=1,P[9]9, in the form of index (x), denotes a numerical index such as: index (3) ═ 3 and Index (10) ═ 10. Then, the intelligent electric meter selects a value z from the array P as the electricity price, and generates a vector U according to the electricity priceL,UR. Wherein U isLThe bits with middle array indices less than index (z) are all labeled 0 and the remaining bits are labeled 1. U shapeRThe bits in the middle array with index (z) are denoted as 1 and the remaining bits are denoted as 0. For example: when the electricity price is 6, UL=(0,0,0,0,0,1,1,1,1,1),UR(0, 0, 0, 0, 1, 0, 0, 0, 0). Finally, the smart meter executes LeftEncrypt (sk, U) with the initialized generated private key skL)→EL(UL) And rightEncrypt (sk, U)R)→ER(UR) Inner product function encryption algorithm to obtain final encrypted data (E)L(UL),ER(UR)). Intelligent electric meter will (E)L(UL),ER(UR) To the blockchain infrastructure.
In this embodiment, obtain the price of electricity through smart electric meter, generate price of electricity vector U according to the price of electricityLAnd URAccording to the private key, the electricity price vector U is pairedLAnd URPerforming inner product function encryption to obtain encrypted data (E) of electricity priceL(UL),EL(UR) And sends the encrypted data (E)L(UL),ER(UR) To the blockchain infrastructure, the electricity price sent by the smart meter to the blockchain infrastructure can be encrypted, and the security of the transaction data is ensured.
In one embodiment, the first array comprises a large root heap array, the second array comprises a small root heap array, the root node in the large root heap array is the electricity purchasing message with the highest electricity price, and the root node in the small root heap array is the electricity selling message with the lowest electricity price; the above-mentioned blockchain infrastructure is also used for encrypting data (E) receivedL(UL),ER(UR) Decrypting to obtain the electricity price, if the electricity price is the electricity purchasing price, storing the electricity purchasing message in the large root bank array according to the height of the electricity price, and if the electricity price is the electricity selling price, storing the electricity selling message in the small root bank array according to the height of the electricity price.
The large root heap and the small root heap can be array objects, the value of each node of the large root heap is at most as large as the value of a parent node, so that the maximum value in the heap is in the root node, the value of each node of the small root heap is at most as small as the value of the parent node, and the minimum value in the heap is in the root node.
In the specific implementation, after the intelligent ammeter uploads the packaged message to the intelligent contract, the intelligent contract calls an insertion algorithm to store the message as required. First, the algorithm classifies the packaged message into a purchase electricity message and a sale electricity message according to categories. If the message is a power purchase message, the message is inserted into a large root heap array BH ordered according to the price of power, and the message is inserted into a large root heap array BHAnd the root node in the array is the electricity purchasing message with the highest electricity price. Since the electricity price information in the packet message is encrypted as the encrypted data, the encrypted data (E) is passedL(UL),ER(UR) Execute a decryption algorithm to compare the price of electricity for two packed messages to reorder the large root heap array BH. Similarly, if the message is a power selling message, the message is inserted into the small root heap array SH sorted according to the power price, and the root node in the array is the power selling message with the lowest power price. Similar to the storage of the purchase message, the sale message is also stored by encrypting data (E)L(UL),ER(UR) Execute a decryption algorithm to compare the price of electricity of the two packetized messages high and low to reorder the small stub array SH.
In this embodiment, the received encrypted data (E) is received via the blockchain infrastructureL(UL),ER(UR) The electricity price is obtained by decryption, if the electricity price is the electricity purchasing price, the electricity purchasing information is stored in the large root pile array according to the height of the electricity price, and if the electricity price is the electricity selling price, the electricity selling information is stored in the small root pile array according to the height of the electricity price, so that the subsequent matching of the transactions according to the large root pile array and the small root pile array can be facilitated, and the efficiency of the electric energy transaction is improved.
In one embodiment, the blockchain infrastructure is further configured to obtain a first electricity price M1Vector of electricity prices
Figure BDA0003017842330000181
And a second electricity price M2Vector of electricity prices
Figure BDA0003017842330000182
Computing
Figure BDA0003017842330000183
And
Figure BDA0003017842330000184
inner product of (2)
Figure BDA0003017842330000185
If it is
Figure BDA0003017842330000186
Then M is judged1≤M2If, if
Figure BDA0003017842330000187
Then M is judged1>M2
In a specific implementation, since the electricity price information in the packaging message is encrypted into encrypted data, the encrypted data (E) is requiredL(UL),ER(UR) Execute a decryption algorithm to compare the price of electricity for two packed messages to reorder the large stub array BH or the small stub array SH. For example: suppose two electricity purchasing messages with electricity prices of 6 and 8 respectively, which are respectively marked as M1,M2. At this time, M1Is represented as a vector of electricity prices
Figure BDA0003017842330000191
Figure BDA0003017842330000192
M2Is represented as a vector of electricity prices
Figure BDA0003017842330000193
Figure BDA0003017842330000194
Thus, the inner product can be calculated
Figure BDA0003017842330000195
To compare electricity prices. If the calculation result is 1, M is represented1≤M2. If the result is 0, M is represented1>M2. But based on the inner product function encryption characteristics,
Figure BDA0003017842330000196
equivalent to decryption algorithm based on encrypted data
Figure BDA0003017842330000197
The output value of (1). In addition, it decryptsThe algorithm does not recover the encrypted data into the electricity price data, only outputs the inner product value between the electricity prices, and protects the privacy of the electricity price data.
In the present embodiment, the first electricity price M is obtained1Vector of electricity prices
Figure BDA0003017842330000198
And a second electricity price M2Vector of electricity prices
Figure BDA0003017842330000199
Computing
Figure BDA00030178423300001910
And
Figure BDA00030178423300001911
inner product of (2)
Figure BDA00030178423300001912
If it is
Figure BDA00030178423300001913
Then M is judged1≤M2If, if
Figure BDA00030178423300001914
Then M is judged1>M2The electricity price can be compared by calculating the inner product, and the reordering efficiency of the large root heap array and the small root heap array is improved. Further, since the encrypted data is not restored to the electricity price data, but only the inner product value between the electricity prices is output, the privacy of the electricity price data can be protected.
In an embodiment, the above block chain infrastructure is further configured to obtain a root element value V of the large root heap array when it is detected that neither the large root heap array nor the small root heap array is emptyBHAnd the root element value V of the small root heap arraySHIf V isBH≥VSHThen, it is judged as VBHCorresponding power purchasing party and VSHAnd the corresponding power selling party carries out electric energy transaction.
In particular, the matching algorithm may be executed by an intelligent contract,the purpose is to select a proper electricity purchasing party and an electricity selling party to complete the transaction. The algorithm details are as follows: firstly, a large root heap array BH and a small root heap array SH are checked, and if any array is empty, the algorithm is stopped. Otherwise, the algorithm takes out the root element value V from the BH and SH arrays respectivelyBHAnd VSHAnd a decryption algorithm is executed to compare the two values. If VBH<VSHIndicating that all electricity purchase prices in the current system are lower than the minimum electricity sale price, and therefore the transaction matching fails and the algorithm is aborted. Otherwise, if VBH≥VSHAlgorithm will VBHAnd VSHSet as the object of the transaction, and set VBHAnd VSHAnd removing the arrays from the respective arrays, and reordering the arrays. The transaction is successfully matched, and the algorithm outputs VBHAnd VSHThe associated packed message.
In this embodiment, when it is detected that the large root heap array and the small root heap array are not empty, the block chain infrastructure acquires the root element value V of the large root heap arrayBHAnd the root element value V of the small root heap arraySHIf V isBH≥VSHThen, it is judged as VBHCorresponding power purchasing party and VSHThe corresponding power selling party carries out electric energy transaction, transaction matching can be carried out according to the large root heap array and the small root heap array, and the efficiency of electric energy transaction is improved.
In one embodiment, as shown in fig. 7, a block chain-based electric energy transaction method is provided, which is described by taking the block chain infrastructure in fig. 1 as an example, and includes the following steps:
step S710, storing the obtained electricity purchasing information in a first array, and storing the obtained electricity selling information in a second array; the electricity purchasing message comprises an electricity purchasing price and electricity purchasing quantity, and the electricity selling message comprises an electricity selling price and electricity selling quantity;
step S720, when the first array and the second array are not detected to be empty, the electricity purchasing message and the electricity selling message are sent to an intelligent electricity utilization memory, so that the intelligent electricity utilization memory can determine an electric energy bargaining price according to the received electricity purchasing price and the received electricity selling price, determine an electric energy bargaining amount according to the received electricity purchasing price and the received electricity selling price, reduce the account amount of an electricity purchasing party and increase the account amount of an electricity selling party according to the electric energy bargaining price, and increase the account electric quantity of the electricity purchasing party and reduce the account electric quantity of the electricity selling party according to the electric energy bargaining amount.
In a specific implementation, the block chain-based electric energy transaction method may include four stages, namely, an initialization stage, a transaction application stage, a transaction matching stage, and a transaction settlement stage.
In an initialization phase, the public parameter pk may be generated by the key generation center and sent to the blockchain infrastructure, and the private key sk may be generated based on the public parameter pk and sent to the smart meter associated with the user.
In the transaction application stage, when the user intends to buy or sell electricity, the smart meter may encrypt electricity price information (electricity purchase price PP or electricity sale price SP) by using the private key sk, and transmit the electricity information (electricity purchase price PA or electricity sale price SP) and the encrypted electricity price information to the blockchain infrastructure for storage. The block chain infrastructure can store electricity purchasing messages in the big root heap array BH according to the electricity price and store electricity selling messages in the small root heap array SH according to the electricity price.
In the transaction matching stage, transaction matching can be performed periodically, when it is detected that neither the big root pile array BH nor the small root pile array SH is empty, the transaction matching is judged to be successful, the block chain infrastructure can respectively send an electricity purchasing message and an electricity selling message to an electricity purchasing party by taking the electricity purchasing party corresponding to the electricity purchasing message in the big root pile array BH root element and the electricity selling party corresponding to the electricity selling message in the small root pile array SH root element as transaction objects, and the block chain infrastructure can also send the electricity purchasing message and the electricity selling message to the intelligent electricity utilization memory.
In the transaction settlement stage, the intelligent electricity utilization storage can verify the electricity purchasing party and the electricity selling party, if the verification is passed, the electric energy payment price UP (SP, PP) can be obtained according to the average value of the electricity price information, and the electric energy payment amount UA (SA, PA) can be obtained according to the smaller value of the electric quantity information. The electricity purchasing party and the electricity selling party can also mutually authenticate, and if the authentication is passed, a confirmation message is sent to the intelligent terminalThe intelligent electricity utilization memory can update the total electricity quantity of the account of the electricity purchasing party to Actp=Actp+ UA, total amount updated to Cetp=CetpUP, while updating the total charge of the electricity seller account to Acts=ActsUA, Total update to Cets=Cets+ UP. The intelligent electricity utilization memory can send the total electric quantity and the total amount of money after the update to relevant intelligent ammeter and update the reading to supply the buyer and the electricity seller to trade and settle accounts according to the reading after the update, at this moment, the buyer can use the electric energy in the intelligent electricity utilization memory through the electric energy transmission facility.
Since the processing procedure of the blockchain infrastructure has been described in detail in the foregoing embodiments, it is not described herein again.
The electric energy transaction method based on the block chain stores the acquired electricity purchasing information in a first array and stores the acquired electricity selling information in a second array through the block chain infrastructure, when detecting that the first array and the second array are not empty, sending an electricity purchasing message and an electricity selling message to the intelligent electricity utilization memory, determining the electric energy bargaining price according to the received electricity purchasing price and electricity selling price by the intelligent electricity utilization memory, determining the electric energy transaction amount according to the received electric energy purchasing amount and electric energy selling amount, reducing the account amount of the electricity purchasing party and increasing the account amount of the electricity selling party according to the electric energy transaction price, according to the electric energy trading volume, the electric quantity of the account of the electricity purchasing party is increased and the electric quantity of the account of the electricity selling party is reduced, so that in the electric energy trading process, the electricity purchasing party and the electricity selling party are used as peer nodes to directly interact without the intervention of a third-party manager and a supervisor, so that the electric energy transaction has high efficiency.
Moreover, the electricity purchasing message and the electricity selling message are stored through the blockchain infrastructure, so that the electricity purchasing message and the electricity selling message can be prevented from being tampered, and the safety of electric energy transaction is improved.
It should be understood that although the various steps in the flow charts of fig. 3-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order 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 some of the steps in fig. 3-7 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 8. 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 comprises a nonvolatile 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 electric energy transaction data. 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 implement a blockchain-based power trading method.
Those skilled in the art will appreciate that the architecture shown in fig. 8 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 provided, comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of a blockchain based power trading method as described above. Here, the steps of a blockchain-based electric energy transaction method may be steps in a blockchain-based electric energy transaction method according to the above embodiments.
In one embodiment, a computer readable storage medium is provided, storing a computer program which, when executed by a processor, causes the processor to perform the steps of a blockchain based power trading method as described above. Here, the steps of a blockchain-based electric energy transaction method may be steps in a blockchain-based electric energy transaction method according to the above embodiments.
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, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. 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 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 more specific and detailed, but not construed as limiting the scope of the invention. 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, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A blockchain-based electric energy transaction system is characterized in that the system comprises a blockchain infrastructure and an intelligent electric energy storage;
the block chain infrastructure is used for storing the acquired electricity purchasing information in a first array, storing the acquired electricity selling information in a second array, and sending the electricity purchasing information and the electricity selling information to the intelligent electricity utilization memory when detecting that the first array and the second array are not empty; the electricity purchasing message comprises an electricity purchasing price and electricity purchasing quantity, and the electricity selling message comprises an electricity selling price and electricity selling quantity;
the intelligent electricity consumption memory is used for determining an electric energy bargaining price according to the received electricity purchasing price and the received electricity selling price and determining an electric energy bargaining amount according to the received electricity purchasing amount and the received electricity selling amount;
the intelligent electricity utilization memory is further used for reducing the amount of the account of the electricity purchasing party according to the electric energy bargaining price and increasing the electric quantity of the account of the electricity purchasing party according to the electric energy bargaining price so that the electricity purchasing party can settle accounts according to the amount of the account of the electricity purchasing party and the electric quantity of the account of the electricity purchasing party after purchasing the electric energy;
the intelligent electricity utilization memory is further used for increasing the amount of the account of the electricity seller according to the electric energy transaction price and reducing the electric quantity of the account of the electricity seller according to the electric energy transaction quantity so that the electricity seller can settle accounts according to the amount of the account of the electricity seller and the electric quantity of the account of the electricity seller after selling electric energy.
2. The system of claim 1, further comprising a smart meter, wherein the smart meter is configured to obtain a smart meter identifier and a pseudonym of a user, and send a mapping relationship between the smart meter identifier and the pseudonym to the smart power storage; the user comprises the electricity purchasing party and the electricity selling party;
the intelligent electricity utilization memory is further used for obtaining an intelligent electric meter identification, searching a pseudonym corresponding to the intelligent electric meter identification according to the mapping relation, determining a user corresponding to the pseudonym as a target user, and updating the account amount and the account electric quantity of the target user.
3. The system of claim 2, wherein the smart meters comprise a power-purchasing smart meter and a power-selling smart meter; the block chain infrastructure is also used for sending a notice to the electricity purchasing party intelligent electric meter and the electricity selling party intelligent electric meter;
the electricity purchasing party intelligent ammeter is also used for sending an electricity purchasing verification message to the intelligent electricity utilization memory when receiving the notification;
the intelligent electricity meter of the electricity seller is also used for sending an electricity selling verification message to the intelligent electricity utilization memory when receiving the notice;
and the intelligent electricity consumption memory is further used for judging that the verification is passed when the electricity purchasing verification message is matched with the electricity purchasing message and the electricity selling verification message is matched with the electricity selling message, obtaining the electric energy transaction price according to the average value of the electricity purchasing price and the electricity selling price, and obtaining the electric energy transaction amount according to the minimum value of the electricity purchasing amount and the electricity selling amount.
4. The system of claim 3, wherein the smart electricity storage device is further configured to send the electricity purchase verification message to the electricity selling party smart meter and send the electricity selling party verification message to the electricity purchasing party smart meter;
the electricity purchasing party intelligent ammeter is also used for verifying the received electricity selling party verification message, and if the verification is passed, returning an electricity purchasing party confirmation message to the intelligent electricity utilization memory;
the intelligent electricity meter of the electricity seller is also used for verifying the received electricity purchasing party verification message, and if the verification is passed, the intelligent electricity utilization memory returns an electricity selling party confirmation message;
and the intelligent electricity utilization memory is further used for reducing the amount of the account of the electricity purchasing party and increasing the amount of the account of the electricity selling party according to the electric energy transaction price and increasing the electric quantity of the account of the electricity purchasing party and reducing the electric quantity of the account of the electricity selling party according to the electric energy transaction quantity when the confirmation message of the electricity purchasing party and the confirmation message of the electricity selling party are received.
5. The system of claim 1, further comprising a key generation center; the key generation center is used for generating public parameters and sending the public parameters to the block chain infrastructure;
and the block chain infrastructure is also used for generating an intelligent contract according to the received public parameters.
6. The system according to claim 5, wherein the key generation center is further configured to, when an initialization request of a user is received, generate a private key of the user according to the public parameters, and send the private key to the smart meter of the user, so that the smart meter encrypts the electricity purchase message and the electricity sale message according to the private key.
7. The system of claim 6, wherein the smart meter is further configured to obtain a price of electricity, and generate a price vector U based on the price of electricityLAnd URAccording to the private key, the electricity price vector ULAnd URPerforming inner product function encryption to obtain encrypted data (E) of the electricity priceL(UL),ER(UR) And sending said encrypted data (E)L(UL),ER(UR) To the blockchain infrastructure; the electricity price includes the electricity purchase price and the electricity sale price.
8. The system of claim 7, wherein the first array comprises a large root heap array and the second array comprises a small root heap array, and wherein root nodes in the large root heap arrayThe point is the electricity purchasing message with the highest electricity price, and the root node in the small root heap array is the electricity selling message with the lowest electricity price; the blockchain infrastructure is further adapted to encrypt the received encrypted data (E)L(UL),ER(UR) Decrypting to obtain the electricity price, if the electricity price is the electricity purchasing price, storing the electricity purchasing message in the large root bank array according to the height of the electricity price, and if the electricity price is the electricity selling price, storing the electricity selling message in the small root bank array according to the height of the electricity price.
9. The system of claim 8, wherein the blockchain infrastructure is further configured to obtain a first electricity price M1Vector of electricity prices
Figure FDA0003017842320000031
And a second electricity price M2Vector of electricity prices
Figure FDA0003017842320000032
Computing
Figure FDA0003017842320000033
And
Figure FDA0003017842320000034
inner product of (2)
Figure FDA0003017842320000035
If it is
Figure FDA0003017842320000036
Then M is judged1≤M2If, if
Figure FDA0003017842320000037
Then M is judged1>M2
10. The system of claim 8, wherein the system is a portable electronic deviceAnd the block chain infrastructure is also used for acquiring a root element value V of the large root heap array when detecting that the large root heap array and the small root heap array are not emptyBHAnd the root element value V of the small root heap arraySHIf V isBH≥VSHThen, it is judged as VBHCorresponding power purchasing party and VSHAnd the corresponding power selling party carries out electric energy transaction.
CN202110398662.9A 2021-04-13 2021-04-13 Block chain-based electric energy transaction system Active CN113205378B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110398662.9A CN113205378B (en) 2021-04-13 2021-04-13 Block chain-based electric energy transaction system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110398662.9A CN113205378B (en) 2021-04-13 2021-04-13 Block chain-based electric energy transaction system

Publications (2)

Publication Number Publication Date
CN113205378A true CN113205378A (en) 2021-08-03
CN113205378B CN113205378B (en) 2023-06-20

Family

ID=77026732

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110398662.9A Active CN113205378B (en) 2021-04-13 2021-04-13 Block chain-based electric energy transaction system

Country Status (1)

Country Link
CN (1) CN113205378B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113660270A (en) * 2021-08-17 2021-11-16 区块动力(广州)科技有限公司 Block chain transaction processing and authority management method thereof
CN114499882A (en) * 2022-01-27 2022-05-13 国网山西省电力公司营销服务中心 Intelligent electric meter information uploading method based on block chain

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108805710A (en) * 2018-05-28 2018-11-13 华北电力大学 A kind of distribution type electric energy method of commerce based on block chain intelligence contract technology
CN108961018A (en) * 2018-07-19 2018-12-07 华北电力大学(保定) Micro-capacitance sensor electricity market decentralization mechanism of exchange based on intelligent contract
CN109377411A (en) * 2018-10-29 2019-02-22 南方电网科学研究院有限责任公司 Block chain-based centralized matching transaction method and device for power market
CN109785131A (en) * 2018-12-21 2019-05-21 昆明理工大学 A kind of electricity transaction method based on block chain
CN109919761A (en) * 2019-01-16 2019-06-21 昆明理工大学 A kind of block platform chain and method of commerce carrying out intelligent micro-grid transaction
JP2019153275A (en) * 2018-03-02 2019-09-12 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Control method, controller, data structure and power transaction system
CN110400144A (en) * 2019-08-05 2019-11-01 国网电子商务有限公司 A kind of electricity transaction method and device based on block chain

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019153275A (en) * 2018-03-02 2019-09-12 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Control method, controller, data structure and power transaction system
CN108805710A (en) * 2018-05-28 2018-11-13 华北电力大学 A kind of distribution type electric energy method of commerce based on block chain intelligence contract technology
CN108961018A (en) * 2018-07-19 2018-12-07 华北电力大学(保定) Micro-capacitance sensor electricity market decentralization mechanism of exchange based on intelligent contract
CN109377411A (en) * 2018-10-29 2019-02-22 南方电网科学研究院有限责任公司 Block chain-based centralized matching transaction method and device for power market
CN109785131A (en) * 2018-12-21 2019-05-21 昆明理工大学 A kind of electricity transaction method based on block chain
CN109919761A (en) * 2019-01-16 2019-06-21 昆明理工大学 A kind of block platform chain and method of commerce carrying out intelligent micro-grid transaction
CN110400144A (en) * 2019-08-05 2019-11-01 国网电子商务有限公司 A kind of electricity transaction method and device based on block chain

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113660270A (en) * 2021-08-17 2021-11-16 区块动力(广州)科技有限公司 Block chain transaction processing and authority management method thereof
CN113660270B (en) * 2021-08-17 2024-02-06 区块动力(广州)科技有限公司 Blockchain transaction processing and authority management method thereof
CN114499882A (en) * 2022-01-27 2022-05-13 国网山西省电力公司营销服务中心 Intelligent electric meter information uploading method based on block chain
CN114499882B (en) * 2022-01-27 2024-05-10 国网山西省电力公司营销服务中心 Block chain-based intelligent ammeter information uploading method

Also Published As

Publication number Publication date
CN113205378B (en) 2023-06-20

Similar Documents

Publication Publication Date Title
US11842317B2 (en) Blockchain-based authentication and authorization
US20230023857A1 (en) Data processing method and apparatus, intelligent device, and storage medium
US11277268B2 (en) System and method for verifying verifiable claims
US11165576B2 (en) System and method for creating decentralized identifiers
US11171789B2 (en) System and method for implementing a resolver service for decentralized identifiers
US11095629B2 (en) Retrieving access data for blockchain networks using highly available trusted execution environments
Wei et al. Security and privacy for storage and computation in cloud computing
CN116561789B (en) Processing method and device of privacy data, electronic equipment and readable storage medium
Chen et al. A blockchain-based intelligent anti-switch package in tracing logistics system
CN109617699A (en) A kind of key generation method, block chain network service platform and storage medium
WO2020051710A1 (en) System and process for managing digitized security tokens
US12079867B2 (en) Electronic transaction system, transaction server, verification server, method of transaction, and program
Li et al. Toward decentralized fair data trading based on blockchain
CN113065934A (en) Auction method and system with verifiable privacy, computer equipment and application
CN113205378A (en) Electric energy transaction system based on block chain
Zhao et al. Fuzzy identity-based dynamic auditing of big data on cloud storage
US11538070B2 (en) Blockchain-based system and method for peer-to-peer online advertising auction
Li et al. PriExpress: Privacy-preserving express delivery with fine-grained attribute-based access control
Zhang et al. Toward Privacy‐Preserving Blockchain‐Based Electricity Auction for V2G Networks in the Smart Grid
JP7539170B2 (en) Method for providing oracle service of blockchain network using zero-knowledge proof and aggregator terminal using the same
Yuan Fair data transactions across private databases
Xu et al. Blockchain‐Based Trust Auction for Dynamic Virtual Machine Provisioning and Allocation in Clouds
CN112116414A (en) Auction type safe nearest neighbor target base source searching system and method supporting range verification
CN111125734A (en) Data processing method and system
Yu et al. A novel fair and verifiable data trading scheme

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant