Power resource allocation method, device, electronic device and medium based on blockchain

Through the blockchain network and smart contracts, control instructions are generated, and the problems of consistency and fixed prices during the power supply process are solved, and the dynamic allocation and market-oriented operation of power resources are realized.

CN113313336BActive Publication Date: 2024-12-20BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010125361.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-27
Publication Date
2024-12-20
Estimated Expiration
2040-02-27

AI Technical Summary

Technical Problem

In the prior art, it is difficult for enterprises, individuals and governments to reach an agreement on the actual grid-connected power during the power supply process, and the power price is fixed, it is not market-oriented and cannot be adjusted dynamically.

Method used

Adopt blockchain-based power resource allocation method, use nodes in the blockchain network to call power allocation smart contracts, match power consumption demand information and power sales demand information, generate power consumption and power sales control instructions, and dynamically adjust power prices. And billing is carried out by storing actual electricity consumption and electricity sales through smart meter links.

Benefits of technology

The supply and demand balance between electricity consumption and electricity sales has been achieved, the power price has been dynamically adjusted, the problem of fixed power price has been overcome, and the reasonable allocation of power resources and market operation efficiency has been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113313336B_ABST
    Figure CN113313336B_ABST
Patent Text Reader

Abstract

The present application discloses a blockchain-based power resource allocation method, device, electronic device and medium, and relates to the field of blockchain technology. When the method is executed by a node in a blockchain network, the specific implementation scheme is: calling the power allocation smart contract, matching the acquired power demand information of the power user and the power selling demand information of the power seller, and obtaining a matching result; responding to the power user's power query transaction request, generating the power user's power control instruction according to the matching result, which is used to control the power user's power consumption behavior; responding to the power selling query transaction request of the power seller, generating the power selling control instruction of the power seller according to the matching result, which is used to control the power selling behavior of the power seller. The embodiment of the present application can dynamically allocate power resources according to the power user's demand and the power seller's supply situation, improve the efficiency of power consumption and power supply, and can dynamically determine the power price according to the supply situation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a blockchain technology, and specifically to a blockchain-based power resource allocation method, device, electronic device and medium. Background Art

[0002] As the number of electricity-consuming devices continues to increase, virtual power plants are being vigorously established to encourage qualified enterprises and individuals to increase electricity supply through new energy power generation methods such as photovoltaics and wind power.

[0003] However, the following problems exist in the power supply process: enterprises, individuals and the government cannot reach a consensus on the actual amount of electricity connected to the grid; regardless of whether the power grid is in surplus or tight, electricity sellers must be charged a fixed price, rather than operating according to market-based behavior. Summary of the invention

[0004] The embodiments of the present application provide a blockchain-based power resource allocation method, device, electronic device and medium to achieve reasonable allocation of power resources.

[0005] The embodiment of the present application discloses a power resource allocation method based on blockchain, which is executed by a node in a blockchain network. The method includes:

[0006] Call the power dispatch smart contract to match the power demand information of the power user with the power sales demand information of the power seller to obtain a matching result;

[0007] In response to the power consumption query transaction request of the power user, generating a power consumption control instruction of the power user according to the matching result, so as to control the power consumption behavior of the power user;

[0008] In response to the power selling query transaction request of the power seller, a power selling control instruction of the power seller is generated according to the matching result, so as to control the power selling behavior of the power seller.

[0009] The above-mentioned embodiment has the following advantages or beneficial effects: by calling the smart contract to match the electricity demand information and the electricity sales demand information, and responding to the electricity user's query transaction request, the electricity consumption behavior is controlled according to the matching result, and responding to the electricity sales query transaction request of the electricity seller, the electricity sales behavior of the electricity seller is controlled according to the matching result, thereby overcoming the difficulty in reaching a consensus on the grid-connected power volume of each electricity seller and the problem of fixed electricity prices, and realizing the effect of reasonably allocating electricity resources according to the electricity demand of the electricity user and the electricity sales volume of the electricity seller, and dynamically adjusting the electricity price.

[0010] Furthermore, the electricity demand information includes expected electricity consumption and maximum electricity price; the electricity sales demand information includes expected electricity sales amount and minimum electricity sales price.

[0011] Accordingly, the above-mentioned embodiment has the following advantages or beneficial effects: by obtaining electricity demand information including expected electricity consumption and maximum electricity price, as well as electricity sales demand information including expected electricity sales amount and minimum electricity sales price, it is possible to dynamically match the electricity consumption demand of the electricity user and the electricity sales demand of the electricity seller, so as to achieve control of electricity consumption and power connection on the basis of supply and demand balance.

[0012] Further, generating an electricity consumption control instruction of the electricity user according to the matching result includes:

[0013] If the matching result is a successful match, generating an instruction for allowing the electricity user to use electricity;

[0014] If the matching result is a matching failure, generating a prohibition instruction for the electricity user;

[0015] Accordingly, generating a power selling control instruction of the power seller according to the matching result includes:

[0016] If the matching result is successful, generating an instruction for allowing the electricity seller to sell electricity;

[0017] If the matching result is a matching failure, a prohibition instruction for the electricity seller is generated.

[0018] Accordingly, the above embodiment has the following advantages or beneficial effects: by controlling the electricity consumption of the electricity user and controlling the grid-connected electricity sales of the electricity seller when the matching is successful, the electricity consumption and electricity sales are dynamically adjusted according to the supply and demand situation to achieve a balance between supply and demand and reasonable allocation of electricity.

[0019] Furthermore, if the matching result is a successful match, the method further includes:

[0020] Calling the power dispatch smart contract to determine the actual power selling price;

[0021] The charges are made according to the actual electricity selling price, the actual electricity consumption of the electricity user and the actual electricity sales of the electricity seller.

[0022] Accordingly, the above-mentioned embodiment has the following advantages or beneficial effects: the actual electricity selling price is determined by calling the power dispatch smart contract, and then the electricity charge is determined based on the actual electricity selling price, the actual electricity consumption of the electricity user and the actual electricity sales of the electricity seller, so that the actual electricity price can be dynamically determined according to the supply and demand situation to promote the rational operation of the market.

[0023] Furthermore, the method further comprises:

[0024] The actual power consumption of the power user is obtained through the smart meter of the power user, and the actual power consumption is stored on the chain as transaction data;

[0025] The actual electricity sales of the electricity seller is obtained through the smart meter of the electricity seller, and the actual electricity sales are stored on the chain as transaction data.

[0026] Accordingly, the above embodiment has the following advantages or beneficial effects: by storing the actual electricity consumption of the electricity user and the actual electricity sales of the electricity seller on the chain, the electricity bill can be accurately calculated based on the actual electricity consumption and the actual electricity sales, and other statistical work can be performed.

[0027] Furthermore, the method further comprises:

[0028] If it is detected that any power seller has no saleable electricity, the power allocation smart contract is called to clear the power sales demand information of the power seller to remove the power seller from the shelves.

[0029] Accordingly, the above embodiment has the following advantages or beneficial effects: by deleting the electricity sales demand information of the electricity seller who has no saleable electricity from the power dispatch smart contract, it is avoided that the electricity sales demand information with no saleable electricity is still matched, thereby reducing the matching and electricity sales efficiency.

[0030] Furthermore, the method further comprises:

[0031] If it is detected that any electricity user has been successfully matched and has not used electricity within the time limit, the power allocation smart contract is called to clear the electricity demand information of the electricity user to remove the electricity user from the shelves.

[0032] Accordingly, the above-mentioned embodiment has the following advantages or beneficial effects: by clearing the electricity demand information of the electricity users who have been successfully matched but have not used electricity within the time limit from the power allocation smart contract, the problem of still matching the electricity demand information of the electricity users who have been successfully matched but have not used electricity within the time limit, thereby reducing the matching efficiency, is avoided.

[0033] The embodiment of the present application also discloses a method for allocating electric power resources based on blockchain, which is executed by the electric power user, and the method includes:

[0034] Sending local electricity demand information to the blockchain network to instruct the blockchain network to call the power dispatch smart contract to match the electricity demand information with the electricity sales demand information of the electricity seller;

[0035] Send an electricity usage query transaction request to the blockchain network to instruct the blockchain network to generate electricity usage control instructions for the electricity user based on the matching results.

[0036] The above-mentioned embodiment has the following advantages or beneficial effects: by sending local electricity demand information to the blockchain network to instruct the blockchain network to call the power allocation smart contract, the electricity demand information and the electricity sales demand information are matched, and an electricity query transaction request is sent to the blockchain network so that the blockchain network controls electricity consumption according to the matching results, thereby overcoming the problem that the electricity price is fixed and it is difficult to meet the needs of electricity users and sellers, and realizing the effect of allocating electricity resources according to the electricity demand of electricity users and the electricity sales amount of electricity sellers, and dynamically adjusting the electricity price.

[0037] Furthermore, the electricity demand information includes expected electricity consumption and maximum electricity price; the electricity sales demand information includes expected electricity sales amount and minimum electricity sales price.

[0038] Accordingly, the above-mentioned embodiment has the following advantages or beneficial effects: by obtaining electricity demand information including expected electricity consumption and maximum electricity price, as well as electricity sales demand information including expected electricity sales amount and minimum electricity sales price, it is possible to dynamically match the electricity consumption demand of the electricity user and the electricity sales demand of the electricity seller, so as to achieve control of electricity consumption and power connection on the basis of supply and demand balance.

[0039] Furthermore, the method further comprises:

[0040] If the power consumption control instruction is an allowed power consumption control instruction, the actual power consumption is obtained through the local smart meter and the actual power consumption is sent to the blockchain network.

[0041] Accordingly, the above-mentioned embodiment has the following advantages or beneficial effects: by consuming electricity according to the electricity consumption control instructions of the blockchain network, it is possible to control the orderly electricity consumption of the electricity users while meeting the electricity prices of the electricity users.

[0042] Furthermore, before sending the electricity query transaction request to the blockchain network, it also includes:

[0043] Through the local smart meter, check whether the electricity user has available elements;

[0044] If yes, it triggers the sending operation of executing the electricity usage query transaction request;

[0045] Otherwise, disconnect from the grid.

[0046] Accordingly, the above embodiment has the following advantages or beneficial effects: by triggering the execution of the power query transaction request sending operation based on the existence of available elements on the power user side, power consumption is controlled when the power consumption meets the power consumption conditions.

[0047] The embodiment of the present application also discloses a method for allocating electric power resources based on blockchain, which is executed by the electricity seller and includes:

[0048] Sending local electricity sales demand information to the blockchain network to instruct the blockchain network to call the power dispatch smart contract to match the local electricity sales demand information with the electricity demand information of the electricity user;

[0049] Send a power sales query transaction request to the blockchain network to instruct the blockchain network to generate a power sales control instruction for the power seller based on the matching results.

[0050] The above-mentioned embodiment has the following advantages or beneficial effects: by sending local electricity sales demand information to the blockchain network to instruct the blockchain network to call the power allocation smart contract, the electricity demand information and the electricity sales demand information are matched, and a land query transaction request is sent to the blockchain network so that the blockchain network controls the power connection according to the matching results, thereby overcoming the problem of difficulty in reaching a consensus on the grid-connected power of each electricity seller, and realizing the effect of allocating power resources according to the power demand of the power user and the power sales amount of the power seller, and dynamically adjusting the power price.

[0051] Furthermore, the electricity demand information includes expected electricity consumption and maximum electricity price; the electricity sales demand information includes expected electricity sales amount and minimum electricity sales price.

[0052] Accordingly, the above-mentioned embodiment has the following advantages or beneficial effects: by obtaining electricity demand information including expected electricity consumption and maximum electricity price, as well as electricity sales demand information including expected electricity sales amount and minimum electricity sales price, it is possible to dynamically match the electricity consumption demand of the electricity user and the electricity sales demand of the electricity seller, so as to achieve control of electricity consumption and power connection on the basis of supply and demand balance.

[0053] Furthermore, the method further comprises:

[0054] If the power consumption control instruction is a control instruction allowing power sales, the power stored in the local energy storage device is connected to the grid through the local smart meter, and the actual power sales amount is sent to the blockchain network.

[0055] Accordingly, the above embodiment has the following advantages or beneficial effects: the grid-connected operation is performed through the flashlight control instruction, so that the grid-connected operation is performed when the stored electricity meets the electricity demand.

[0056] The embodiment of the present application also discloses a blockchain-based power resource allocation device, which is configured in a node in the blockchain network, and the device includes:

[0057] A matching result determination module is used to call the power dispatching smart contract to match the acquired power demand information of the power user with the power sales demand information of the power seller to obtain a matching result;

[0058] An electricity usage behavior control module, for responding to an electricity usage query transaction request from an electricity user, generating an electricity usage control instruction of the electricity user according to the matching result, for controlling the electricity usage behavior of the electricity user;

[0059] The power selling behavior control module is used to respond to the power selling query transaction request of the power seller and generate the power selling control instruction of the power seller according to the matching result, so as to control the power selling behavior of the power seller.

[0060] Furthermore, the electricity demand information includes expected electricity consumption and maximum electricity price; the electricity sales demand information includes expected electricity sales amount and minimum electricity sales price.

[0061] Furthermore, the power consumption behavior control module is specifically used to:

[0062] If the matching result is a successful match, generating an instruction for allowing the electricity user to use electricity;

[0063] If the matching result is a matching failure, generating a prohibition instruction for the electricity user;

[0064] Accordingly, the electricity selling behavior control module is specifically used to:

[0065] If the matching result is successful, generating an instruction for allowing the electricity seller to sell electricity;

[0066] If the matching result is a matching failure, a prohibition instruction for the electricity seller is generated.

[0067] Furthermore, if the matching result is a successful match, the device further includes:

[0068] An actual electricity selling price determination module, used to call the power dispatching smart contract to determine the actual electricity selling price;

[0069] The charging module is used to perform charging according to the actual electricity selling price, the actual electricity consumption of the electricity user and the actual electricity sales of the electricity seller.

[0070] Furthermore, the device also includes:

[0071] The actual power consumption acquisition module is used to obtain the actual power consumption of the power user through the smart meter of the power user, and store the actual power consumption as transaction data on the chain;

[0072] The actual electricity sales amount acquisition module is used to obtain the actual electricity sales amount of the electricity seller through the electricity seller's smart meter, and store the actual electricity sales amount on the chain as transaction data.

[0073] Furthermore, the device also includes:

[0074] The power sales demand information clearing module is used to call the power allocation smart contract to clear the power sales demand information of any power seller if it is detected that any power seller has no power available for sale, so as to remove the power seller from the shelves.

[0075] The electricity demand information clearing module is used to call the power allocation smart contract to clear the electricity demand information of any electricity user if it is detected that any electricity user has been successfully matched and has not used electricity within the time limit, so as to remove the electricity user from the shelves.

[0076] The embodiment of the present application also discloses a blockchain-based power resource allocation device, which is configured on the power user side, and the device includes:

[0077] An electricity demand information sending module is used to send local electricity demand information to the blockchain network to instruct the blockchain network to call the power dispatch smart contract to match the electricity demand information with the electricity sales demand information of the electricity seller;

[0078] The electricity consumption inquiry transaction request sending module is used to send an electricity consumption inquiry transaction request to the blockchain network to instruct the blockchain network to generate an electricity consumption control instruction for the electricity user based on the matching results.

[0079] Furthermore, the electricity demand information includes expected electricity consumption and maximum electricity price; the electricity sales demand information includes expected electricity sales amount and minimum electricity sales price.

[0080] Furthermore, the device also includes:

[0081] The actual power consumption acquisition module is used to obtain the actual power consumption through the local smart meter if the power consumption control instruction is an allowed power consumption control instruction, and send the actual power consumption to the blockchain network.

[0082] Furthermore, the device also includes:

[0083] A query module is used to query whether the electricity user has available elements through the local smart meter;

[0084] If yes, it triggers the sending operation of executing the electricity usage query transaction request;

[0085] Otherwise, disconnect from the grid.

[0086] The embodiment of the present application also discloses a power resource allocation device based on blockchain, which is configured at the power seller, and the device includes:

[0087] A power sales demand information sending module, used to send local power sales demand information to the blockchain network to instruct the blockchain network to call the power dispatch smart contract to match the local power sales demand information with the power demand information of the power user;

[0088] The power sales query transaction request sending module is used to send a power sales query transaction request to the blockchain network to instruct the blockchain network to generate a power sales control instruction for the power seller based on the matching results.

[0089] Furthermore, the electricity demand information includes expected electricity consumption and maximum electricity price; the electricity sales demand information includes expected electricity sales amount and minimum electricity sales price.

[0090] Furthermore, the device also includes:

[0091] The grid-connected operation execution module is used to execute the grid-connected operation on the electricity stored in the local energy storage device through the local smart meter if the electricity consumption control instruction is a control instruction allowing electricity sales, and send the actual electricity sales amount to the blockchain network.

[0092] The present application also discloses an electronic device, which includes:

[0093] at least one processor; and

[0094] a memory communicatively connected to the at least one processor; wherein,

[0095] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method executed by a node in the blockchain network as described in any one of the embodiments of the present application, or execute the method executed by the electricity user as described in any one of the embodiments of the present application, or execute the method executed by the electricity seller as described in any one of the embodiments of the present application.

[0096] The embodiments of the present application also disclose a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute a method executed by a node in a blockchain network as described in any one of the embodiments of the present application, or to execute a method executed by an electricity user as described in any one of the embodiments of the present application, or to execute a method executed by an electricity seller as described in any one of the embodiments of the present application.

[0097] Other effects of the above optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

[0099] Figure 1 It is a flowchart of a blockchain-based power resource allocation method performed by a node in a blockchain network according to an embodiment of the present application;

[0100] Figure 2It is a flowchart of another blockchain-based power resource allocation method performed by a node in a blockchain network according to an embodiment of the present application;

[0101] Figure 3 It is a specific overall structural diagram of another blockchain-based power resource allocation method executed by a node in a blockchain network according to an embodiment of the present application;

[0102] Figure 4 It is a flowchart of a blockchain-based power resource allocation method performed by an electricity user according to an embodiment of the present application;

[0103] Figure 5 It is a flowchart of a blockchain-based power resource allocation method performed by a power seller according to an embodiment of the present application;

[0104] Figure 6 It is a structural schematic diagram of a blockchain-based power resource allocation device configured in a node in a blockchain network according to an embodiment of the present application;

[0105] Figure 7 It is a structural schematic diagram of a blockchain-based power resource allocation device configured on an electricity user according to an embodiment of the present application;

[0106] Figure 8 This is a schematic diagram of the structure of a blockchain-based power resource allocation device configured on a power seller according to an embodiment of the present application.

[0107] Fig. 9 It is a block diagram of an electronic device used to implement the blockchain-based power resource allocation method of an embodiment of the present application. DETAILED DESCRIPTION

[0108] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0109] Before introducing the various embodiments of the present invention, the blockchain network system for executing the blockchain-based power resource allocation method, device, electronic device and medium of the embodiment of the present invention is described. The nodes participating in the blockchain network system of the embodiment of the present invention include: ordinary computing and storage nodes, power user nodes and power seller nodes. Among them, ordinary computing and storage nodes are usually node devices in the blockchain network, which can store blockchain data and participate in the blockchain transaction request interaction process. The power user node can be the power user's power-consuming equipment, such as electric lighting equipment, electrical equipment and charging equipment. The power seller node can provide power equipment.

[0110] It should be noted that in the blockchain system provided in the embodiment of the present invention, the user node may also include the user smart meter node and the seller smart meter node, and the smart meter is a device that the State Grid has the right to install. The user smart meter may be a smart metering device installed on the user's power equipment. The seller's smart meter node may be a smart metering device installed on the seller's power generation equipment. The user smart meter node and the seller smart meter node may be blockchain nodes or may not be blockchain nodes, but may interact with the blockchain node through the interface provided by the blockchain node and participate in the blockchain network. Optionally, the user smart meter node may be a lightweight node deployed on the user's power equipment, and the seller smart meter node may be a lightweight node deployed on the seller's power generation equipment (for example, a lightweight node communication software development kit (SDK) may be installed on the user's smart meter and the seller's smart meter). The lightweight node is similar to a full node and is deployed with blockchain deployment data, such as smart contracts, consensus mechanisms, etc. Therefore, it can participate in the transaction request interaction process of the blockchain, but does not store all block data. When a lightweight node needs to query transaction data in the blockchain, it can obtain it from other nodes in real time and verify it in a set manner. Lightweight nodes have low hardware configuration requirements for the devices they are deployed on. Lightweight nodes can be integrated at the operating system level to control the hardware in the terminal device, and can interact with upper-level application software to provide blockchain support for the functions of the application software.

[0111] Figure 1It is a flowchart of a blockchain-based power resource allocation method performed by a node in a blockchain network according to an embodiment of the present application. This embodiment can be applicable to the situation of allocating power resources. Typically, this embodiment can be applicable to the situation where the blockchain allocates power resources and regulates prices based on the power demand of the power user and the power sales demand of the power seller. The blockchain-based power resource allocation method disclosed in this implementation can be executed by an electronic device that carries a node in a blockchain network, and specifically can be executed by a blockchain-based power resource allocation device, which can be implemented by software and / or hardware and configured in an electronic device. See Figure 1 The power resource allocation method based on blockchain and executed by a node in a blockchain network provided in this embodiment includes:

[0112] S110. Call the power dispatch smart contract to match the acquired power demand information of the power user with the power sales demand information of the power seller to obtain a matching result.

[0113] Among them, the power dispatch smart contract can store the power demand information of the power user and the power sales demand information of the power seller. The power demand information includes but is not limited to: expected power consumption and maximum power price; the power sales demand information includes but is not limited to: expected power sales and minimum power sales price. Since the power user expects to use electricity when the power price is lower than or equal to the maximum power price, and the current electricity price may be higher than the power user's maximum power price, or the current available power cannot meet the power user's current expected power consumption, the power user can first send the power demand information to the smart contract for storage so that electricity can be used when the conditions are met. For example, when a car owner wants to charge his new energy vehicle but is not in a hurry, he can set a maximum power price, and only connect to the power grid for charging when there is a power seller with a price lower than or equal to the maximum power price in the current market. Similarly, the electricity seller hopes to sell electricity to the grid when the electricity price is higher than or equal to the minimum electricity price, while the current electricity price may be lower than the seller's minimum electricity price, or the seller's current saleable electricity volume cannot meet the electricity consumption of the user. Therefore, the electricity seller can first send the electricity demand information to the smart contract for storage so that it can sell electricity to the grid when the conditions are met.

[0114] In an embodiment of the present application, the power dispatching smart contract receives the power demand information sent by the power user and the power selling demand information sent by the power seller, and stores them. The power dispatching smart contract matches the stored power demand smart contract and the power selling smart contract, which can be: each time the power demand information or the power selling demand information is received, the received power demand information is matched with the stored power selling demand information, or the received power selling demand information is matched with the stored power demand information, or when the number of received power demand information and power selling demand information meets the preset number, then the matching is performed. The matching principle can be that when the highest power price in the power demand information of the power user is less than or equal to the lowest power selling price in the power selling demand information of the power seller, and / or, when the expected power consumption in the power demand information of the power user is less than or equal to the expected power selling amount in the power selling demand information of the power seller, then the power demand information is considered to match the power selling demand information. The smart contract obtains and stores the matching results, which may include two matching results: successful matching and failed matching between the electricity demand information and the electricity sales demand information.

[0115] S120. In response to the electricity usage query transaction request of the electricity user, generate an electricity usage control instruction of the electricity user according to the matching result, so as to control the electricity usage behavior of the electricity user.

[0116] Among them, the electricity query transaction request can be a request sent by the electricity user to the node in the blockchain network when the electricity user needs electricity. The electricity query transaction request can be generated by the electricity user's smart meter and sent to the node in the blockchain network. Exemplarily, the electricity user's smart meter can query whether there is an available token in the electricity user's blockchain account. If not, the power is cut off. If it exists, the electricity query transaction request is sent regularly to access the power dispatch smart contract regularly to determine whether there is electricity sales demand information that matches the electricity demand information of the electricity user, and obtain instructions on whether electricity can be used. The node in the blockchain network generates the electricity control instruction of the electricity user based on the matching result of the smart contract to control the control behavior of the electricity user.

[0117] In an embodiment of the present application, a power usage control instruction of the power user is generated according to the matching result, including: if the matching result is a successful match, generating a power usage permission instruction of the power user; if the matching result is a failed match, generating a power usage prohibition instruction of the power user.

[0118] Exemplarily, when the matching result is successful, it means that there is electricity sales demand information that matches the electricity demand information of the electricity user, the lowest electricity sales price in the successfully matched electricity sales demand information is lower than or equal to the highest electricity price of the electricity user, and / or the expected electricity sales amount in the electricity sales demand information is greater than or equal to the expected electricity consumption of the electricity user, and the electricity seller can meet the needs of the electricity user, so an electricity use permission instruction is generated for the electricity user to allow the electricity user to use electricity. If the matching result is a failure, it means that the electricity seller cannot meet the needs of the electricity user, so in order to avoid the situation where the electricity user fails to use electricity, the node in the blockchain network generates a prohibition of electricity use instruction to prohibit the electricity user from using electricity.

[0119] S130. In response to the power selling query transaction request of the power seller, generate a power selling control instruction of the power seller according to the matching result, so as to control the power selling behavior of the power seller.

[0120] Among them, the power sale query transaction request can be a request sent to the node in the blockchain network when the power seller stores sellable electric energy. The power sale query transaction request can be generated by the smart meter of the power seller and sent to the node in the blockchain network. Exemplarily, the smart meter of the power seller can periodically send a power sale query transaction request to the node in the blockchain network to obtain instructions on whether the electric energy stored in the energy storage device of the power seller needs to be merged into the power grid. The node in the blockchain network generates the power sale control instruction of the power seller based on the matching result of the smart contract to control the power sale behavior of the power seller.

[0121] In an embodiment of the present application, a power selling control instruction of the power seller is generated according to the matching result, including: if the matching result is a successful match, generating a power selling permission instruction of the power seller; if the matching result is a failed match, generating a power selling prohibition instruction of the power seller.

[0122] Exemplarily, when the matching result is successful, it means that there is electricity demand information that matches the electricity sales demand information of the electricity seller, and the highest electricity price in the successfully matched electricity demand information is higher than or equal to the lowest electricity sales price of the electricity seller, and / or the expected electricity consumption of the electricity user is less than or equal to the expected electricity sales of the electricity seller. Therefore, the electricity seller's permission to sell electricity and sell electricity on the grid is generated to allow the electricity seller to sell electricity on the grid. If the matching result is a failure, it means that there is no electricity user demand that matches the electricity seller's demand. Therefore, in order to avoid the situation where the grid-connected electricity cannot be used in time and cause waste of resources, the nodes in the blockchain network generate a prohibition of electricity sales instructions to prohibit the electricity seller from selling electricity on the grid.

[0123] In an embodiment of the present application, if the matching result is a successful match, the method also includes: calling the power allocation smart contract to determine the actual electricity selling price; and charging according to the actual electricity selling price, the actual electricity consumption of the electricity user and the actual electricity sales of the electricity seller.

[0124] Exemplarily, if the match is successful, it means that the lowest electricity selling price in the electricity selling demand information is lower than or equal to the highest electricity price of the electricity user, and / or the expected electricity selling amount in the electricity selling demand information is greater than or equal to the expected electricity consumption of the electricity user. Therefore, the nodes in the blockchain network can call the power dispatching smart contract to determine the actual electricity selling price based on the price of either party, and calculate the electricity fee of the electricity user based on the actual electricity selling price and the electricity consumption of the electricity user, and calculate the electricity selling fee of the electricity seller based on the actual electricity selling price and the electricity selling amount of the electricity seller.

[0125] It should be noted that in the embodiment of the present application, the above-mentioned execution steps are only used to illustrate one implementation method, and the execution steps of S110, S120 and S130 are not specifically limited. It can also be that when a node in the blockchain network receives a power query transaction request from the power user, in response to the power query transaction request from the power user, the power dispatch smart contract is called to match the acquired power demand information of the power user with the power sales demand information of the power seller to obtain a matching result, and the power control instruction of the power user is generated according to the matching result to control the power consumption behavior of the power user. When a node in the blockchain network receives a power sales query transaction request from the power seller, in response to the power sales query transaction request from the power seller, the power dispatch smart contract is called to match the acquired power sales demand information of the power seller with the power demand information of the power user to obtain a matching result, and the power sales control instruction of the power seller is generated according to the matching result. In addition, there is no specific limitation on the execution steps of S120 and S130. The power user sends a power query transaction request and the nodes in the blockchain network respond to the power query transaction request, and the power seller sends a power sales query transaction request and the nodes in the blockchain network respond to the power sales query transaction request, which can be executed asynchronously. Since there is redundancy in the power grid, it can generally meet the current power demand of the power user. Therefore, when S120 and S130 are not executed synchronously, the normal power consumption of the power user can still be guaranteed. Therefore, the power consumption of the power user can be controlled first, and then the power seller can be controlled to sell power on the grid, or the power seller can be controlled to sell power on the grid first, and then the power user can be controlled to use power.

[0126] The technical solution of the embodiment of the present application matches electricity demand information and electricity sales demand information by calling a smart contract, and responds to the electricity user's query transaction request to control the electricity consumption behavior according to the matching result, and responds to the electricity sales query transaction request of the electricity seller to control the electricity sales behavior of the electricity seller according to the matching result, thereby overcoming the difficulty in reaching a consensus on the grid-connected power volume of each electricity seller and the problem of fixed electricity prices, and realizing the effect of reasonably allocating electricity resources according to the electricity demand of the electricity user and the electricity sales volume of the electricity seller, and dynamically adjusting the electricity price.

[0127] Figure 2 This is a flowchart of another method for allocating electric power resources based on blockchain and executed by a node in a blockchain network according to an embodiment of the present application. This embodiment is an optional solution proposed on the basis of the above embodiment. Figure 2 , the power resource allocation method based on blockchain provided in this embodiment includes:

[0128] S210. Call the power dispatch smart contract to match the acquired power demand information of the power user with the power sales demand information of the power seller to obtain a matching result.

[0129] S220 . In response to the electricity usage query transaction request of the electricity user, generate an electricity usage control instruction of the electricity user according to the matching result, so as to control the electricity usage behavior of the electricity user.

[0130] S230. In response to the power selling query transaction request of the power seller, generate a power selling control instruction of the power seller according to the matching result, so as to control the power selling behavior of the power seller.

[0131] S240. Obtain the actual power consumption of the power user through the smart meter of the power user, and store the actual power consumption on the chain as transaction data.

[0132] For example, Figure 3 As shown, the smart meter of the electricity user can obtain the electric energy consumed by the electrical equipment, determine the actual electricity consumption of the electricity user, and store the actual electricity consumption as transaction data on the chain, so that the nodes in the blockchain network can calculate the electricity bill based on the actual electricity consumption, and perform operations such as statistical analysis of the total actual electricity consumption.

[0133] S250. Obtain the actual electricity sales amount of the electricity seller through the smart meter of the electricity seller, and store the actual electricity sales amount on the chain as transaction data.

[0134] For example, Figure 3As shown, the smart meter of the electricity seller can obtain the electricity sold by the power transmission equipment, determine the actual electricity sales amount of the electricity seller, and store the actual electricity sales amount on the chain as transaction data, so that the nodes in the blockchain network can calculate the electricity bill based on the actual electricity sales amount, and perform operations such as statistical analysis of the total actual electricity sales amount.

[0135] In the embodiment of the present application, there is no specific limitation on the execution steps of S240 and S250. S240 may be executed first, S250 may be executed first, or both may be executed at the same time.

[0136] like Figure 3 As shown in the figure, the power company obtains the bill of the electricity user and the legal currency of the electricity user by accessing the smart contract on the blockchain network. It obtains the revenue of the electricity seller by accessing the smart contract on the blockchain network and pays the legal currency to the electricity seller.

[0137] S260: If it is detected that any power seller has no saleable electricity, the power allocation smart contract is called to clear the power sales demand information of the power seller to remove the power seller from the shelves.

[0138] Exemplarily, for a power seller that does not have a saleable amount of electricity, the power sales demand information of the power seller is cleared from the power dispatch smart contract to avoid still matching the power sales demand information with the electricity demand information, thereby reducing the matching efficiency. Therefore, in an embodiment of the present application, if a node in the blockchain network detects that any power seller does not have a saleable amount of electricity, the power dispatch smart contract is called to clear the power sales demand information. The detection method may be that after generating the power seller's permission to sell electricity instruction, the power seller obtains the permission to sell electricity instruction through timed access, detects whether the power seller is connected to the grid to sell electricity, and stores the actual amount of electricity sold on the chain. If it is detected that the power seller is not connected to the grid to sell electricity, and the actual amount of electricity sold is stored on the chain, it is determined that the power seller does not have a saleable amount of electricity.

[0139] S270: If it is detected that any electricity user has been successfully matched and has not used electricity within the time limit, the power dispatching smart contract is called to clear the electricity demand information of the electricity user to remove the electricity user from the shelves.

[0140] Exemplarily, for the electricity user who has successfully matched but has not used electricity within the time limit, the electricity demand information of the electricity user is cleared from the power dispatch smart contract to avoid still matching the electricity demand information with the electricity sales demand information, thereby reducing the matching efficiency. Therefore, in an embodiment of the present application, if a node in the blockchain network detects that any electricity user has successfully matched with the electricity seller, but has not used electricity for more than a preset time, it is determined that the electricity user currently has no electricity demand, and therefore, the power dispatch smart contract is called to clear the electricity demand information. The detection method can be that after generating an instruction to allow electricity use, the user obtains the instruction to allow electricity use through timed access, detects whether the electricity user is using electricity, and stores the actual electricity consumption on the chain. If it is detected that the electricity user has no equipment consuming electricity within the preset time, or the actual electricity consumption is not stored on the chain, it is determined that the electricity user has timed out and has not used electricity.

[0141] It should be noted that in the embodiment of the present application, there is no specific limitation on the execution steps of S260 and S270. S260 may be executed first, S270 may be executed first, or both may be executed at the same time.

[0142] In the embodiment of the present application, by obtaining the actual power consumption and the actual power sales, the electricity fee is accurately calculated based on the actual power consumption and the actual power sales and the actual power sales price, or used for total actual power consumption or total actual power sales statistics. When it is detected that the power user has not used electricity for an extended period of time, the power user's power demand information is cleared from the power dispatch smart contract, and when the power seller has no power to sell, the power seller's power sales demand information is cleared from the power dispatch smart contract, thereby avoiding the problem of matching supply and demand for useless power sales demand information and useless power demand information, reducing matching efficiency and response speed, and increasing the burden on the processor.

[0143] Figure 4 It is a flowchart of a blockchain-based power resource allocation method performed by the power user according to an embodiment of the present application. This embodiment can be applicable to the situation of allocating power resources. Typically, this embodiment can be applicable to the situation where the blockchain allocates power resources and regulates prices based on the power user's power demand and the power seller's power sales demand. The blockchain-based power resource allocation method disclosed in this implementation can be executed by an electronic device that carries the power user's node, specifically by a blockchain-based power resource allocation device, which can be implemented by software and / or hardware and configured in an electronic device. For details not fully described in the embodiments of the present application, such as glossaries, etc., please refer to the above embodiments. See. Figure 4 The power resource allocation method based on blockchain provided by the power user in this embodiment includes:

[0144] S310. Send local electricity demand information to the blockchain network to instruct the blockchain network to call the power dispatch smart contract to match the electricity demand information with the electricity sales demand information of the electricity seller.

[0145] Among them, the power dispatch smart contract can store the power demand information of the power user and the power sales demand information of the power seller. The power demand information includes but is not limited to: expected power consumption and maximum power price; the power sales demand information includes but is not limited to: expected power sales and minimum power sales price. Since the power user expects to use electricity when the power price is lower than or equal to the maximum power price, and the current power price may be higher than the maximum power price of the power user, or the current available power cannot meet the current expected power consumption of the power user, the power user can first send the power demand information to the smart contract for storage, so as to use electricity when the conditions are met. Similarly, the power seller expects to sell electricity on the grid when the power price is higher than or equal to the minimum power price, and the current power price may be lower than the minimum power price of the power seller, or the current available power of the power seller cannot meet the power consumption of the power user, so the power seller can first send the power sales demand information to the smart contract for storage, so as to sell electricity on the grid when the conditions are met.

[0146] Exemplarily, the power user sends power demand information to the blockchain network so that the nodes in the blockchain network match the power demand information sent by the power user with the power sales demand information sent by the power seller. When there is a power seller that meets the power user's power demand, the power user is allowed to use electricity. The power user can send power demand information to the blockchain network when there is a current power demand, or send power demand information to the blockchain network in advance when there is no power demand at present but there is a power demand at some point in the future.

[0147] In an embodiment of the present application, the power dispatching smart contract receives the power demand information sent by the power user and the power selling demand information sent by the power seller, and stores them. The power dispatching smart contract matches the stored power demand smart contract and the power selling smart contract, which can be: each time the power demand information or the power selling demand information is received, the received power demand information is matched with the stored power selling demand information, or the received power selling demand information is matched with the stored power demand information, or when the number of received power demand information and power selling demand information meets the preset number, then the matching is performed. The matching principle can be that when the highest power price in the power demand information of the power user is less than or equal to the lowest power selling price in the power selling demand information of the power seller, and / or, when the expected power consumption in the power demand information of the power user is less than or equal to the expected power selling amount in the power selling demand information of the power seller, then the power demand information is considered to match the power selling demand information. The smart contract obtains and stores the matching results, which may include two matching results: successful matching and failed matching between the electricity demand information and the electricity sales demand information.

[0148] S320. Send an electricity usage query transaction request to the blockchain network to instruct the blockchain network to generate an electricity usage control instruction for the electricity user based on the matching results.

[0149] The power query transaction request may be a request sent by the power user to a node in the blockchain network when the power user needs to use electricity. The power query transaction request may be generated by the power user's smart meter and sent to the node in the blockchain network. The power user's smart meter may periodically send power query transaction requests to periodically access the power dispatch smart contract to determine whether there is power sales demand information that matches the power user's demand information and obtain instructions on whether electricity can be used. The node in the blockchain network generates the power user's power control instructions based on the matching results of the smart contract to control the power user's control behavior.

[0150] In an embodiment of the present application, the method further includes: if the power consumption control instruction is an allowed power consumption control instruction, obtaining the actual power consumption through a local smart meter, and sending the actual power consumption to the blockchain network.

[0151] For example, the smart meter of the electricity user can obtain the actual electric energy consumed by the electrical equipment, determine the actual electricity consumption of the electricity user, and store the actual electricity consumption as transaction data on the chain, so that the nodes in the blockchain network can calculate the electricity bill based on the actual electricity consumption, and perform operations such as statistical analysis of the total actual electricity consumption.

[0152] In an embodiment of the present application, before sending an electricity usage query transaction request to the blockchain network, it also includes: querying the electricity user through the local smart meter whether there are available elements; if so, triggering the execution of the electricity usage query transaction request sending operation; otherwise, disconnecting the grid connection.

[0153] The available element may be a token in the blockchain account of the electricity user. The electricity user uses the local smart meter to query whether there is an available token in the blockchain account of the electricity user. If not, the power is cut off. If so, a power query transaction request is sent to the node in the blockchain network to request power.

[0154] The embodiment of the present application sends local electricity demand information to the blockchain network to instruct the blockchain network to call the power allocation smart contract, match the electricity demand information and the electricity sales demand information, and send an electricity query transaction request to the blockchain network so that the blockchain network controls electricity consumption according to the matching results, thereby overcoming the problem that the electricity price is fixed and it is difficult to meet the needs of the electricity users and sellers, and achieving the effect of allocating electricity resources according to the electricity demand of the electricity users and the electricity sales amount of the electricity sellers, and dynamically adjusting the electricity price.

[0155] Figure 5 This is a flowchart of a blockchain-based power resource allocation method performed by a power seller according to an embodiment of the present application. This embodiment can be applicable to the situation of allocating power resources. Typically, this embodiment can be applicable to the situation where the blockchain allocates power resources and regulates prices based on the power demand of the power user and the power sales demand of the power seller. The blockchain-based power resource allocation method disclosed in this implementation can be executed by an electronic device that carries a power seller node, specifically by a blockchain-based power resource allocation device, which can be implemented by software and / or hardware and configured in an electronic device. See Figure 5 The blockchain-based power resource allocation method provided by the power seller in this embodiment includes:

[0156] S410. Send local electricity sales demand information to the blockchain network to instruct the blockchain network to call the power dispatch smart contract to match the local electricity sales demand information with the electricity user's electricity demand information.

[0157] Among them, the power dispatch smart contract can store the power demand information of the power user and the power sales demand information of the power seller. The power demand information includes but is not limited to: expected power consumption and maximum power price; the power sales demand information includes but is not limited to: expected power sales and minimum power sales price. Since the power user expects to use electricity when the power price is lower than or equal to the maximum power price, and the current power price may be higher than the maximum power price of the power user, or the current available power cannot meet the current expected power consumption of the power user, the power user can first send the power demand information to the smart contract for storage, so as to use electricity when the conditions are met. Similarly, the power seller expects to sell electricity on the grid when the power price is higher than or equal to the minimum power price, and the current power price may be lower than the minimum power price of the power seller, or the current available power of the power seller cannot meet the power consumption of the power user, so the power seller can first send the power sales demand information to the smart contract for storage, so as to sell electricity on the grid when the conditions are met.

[0158] Exemplarily, the power seller sends power demand information to the blockchain network so that the nodes in the blockchain network match the power demand information with the power demand information sent by the power user. When the power demand information of the power user matches the power seller's power demand information, the power seller is allowed to sell electricity in the grid. The power seller can send the power demand information to the blockchain network when there is currently saleable power stored, or when there is no saleable power currently but it can be stored in the future.

[0159] In an embodiment of the present application, the power dispatching smart contract receives the power demand information sent by the power user and the power selling demand information sent by the power seller, and stores them. The power dispatching smart contract matches the stored power demand smart contract and the power selling smart contract, which can be: each time the power demand information or the power selling demand information is received, the received power demand information is matched with the stored power selling demand information, or the received power selling demand information is matched with the stored power demand information, or when the number of received power demand information and power selling demand information meets the preset number, then the matching is performed. The matching principle can be that when the highest power price in the power demand information of the power user is less than or equal to the lowest power selling price in the power selling demand information of the power seller, and / or, when the expected power consumption in the power demand information of the power user is less than or equal to the expected power selling amount in the power selling demand information of the power seller, then the power demand information is considered to match the power selling demand information. The smart contract obtains and stores the matching results, which may include two matching results: successful matching and failed matching between the electricity demand information and the electricity sales demand information.

[0160] S420. Send a power sales query transaction request to the blockchain network to instruct the blockchain network to generate a power sales control instruction for the power seller based on the matching results.

[0161] The power query transaction request may be a request sent by the power user to a node in the blockchain network when the power user needs to use electricity. The power query transaction request may be generated by the power user's smart meter and sent to the node in the blockchain network. The power user's smart meter may periodically send power query transaction requests to periodically access the power dispatch smart contract to determine whether there is power sales demand information that matches the power user's demand information and obtain instructions on whether electricity can be used. The node in the blockchain network generates the power user's power control instructions based on the matching results of the smart contract to control the power user's control behavior.

[0162] In an embodiment of the present application, the method further includes: if the power consumption control instruction is a control instruction allowing power sales, then through the local smart meter, a grid-connected operation is performed on the power stored in the local energy storage device, and the actual power sales amount is sent to the blockchain network.

[0163] For example, the smart meter of the electricity seller can obtain the actual electricity sold by the power transmission equipment, determine the actual electricity sales amount of the electricity seller, and store the actual electricity sales amount as transaction data on the chain, so that the nodes in the blockchain network can calculate the electricity bill based on the actual electricity sales amount, and perform statistical analysis of the total actual electricity sales amount and other operations.

[0164] The embodiment of the present application sends local electricity sales demand information to the blockchain network to instruct the blockchain network to call the power allocation smart contract, match the electricity demand information and the electricity sales demand information, and send a land query transaction request to the blockchain network so that the blockchain network controls the power connection according to the matching result, thereby overcoming the problem of difficulty in reaching a consensus on the grid-connected power of each electricity seller, and achieving the effect of allocating power resources according to the power demand of the power user and the power sales amount of the power seller, and dynamically adjusting the power price.

[0165] Figure 6 Schematic diagram of the structure of a blockchain-based power resource allocation device configured in a node in a blockchain network according to an embodiment of the present application. Figure 6 , an embodiment of the present application discloses a blockchain-based power resource allocation device 500, which includes: a matching result determination module 501, a power consumption behavior control module 502 and a power sales behavior control module 503.

[0166] The matching result determination module 501 is used to call the power dispatching smart contract to match the acquired power demand information of the power user with the power sales demand information of the power seller to obtain a matching result;

[0167] The power consumption behavior control module 502 is used to respond to the power consumption query transaction request of the power user and generate the power consumption control instruction of the power user according to the matching result, so as to control the power consumption behavior of the power user;

[0168] The power selling behavior control module 503 is used to respond to the power selling query transaction request of the power seller and generate the power selling control instruction of the power seller according to the matching result, so as to control the power selling behavior of the power seller.

[0169] Furthermore, the electricity demand information includes expected electricity consumption and maximum electricity price; the electricity sales demand information includes expected electricity sales amount and minimum electricity sales price.

[0170] Furthermore, the power consumption behavior control module 502 is specifically used to:

[0171] If the matching result is a successful match, generating an instruction for allowing the electricity user to use electricity;

[0172] If the matching result is a matching failure, generating a prohibition instruction for the electricity user;

[0173] Accordingly, the electricity selling behavior control module 503 is specifically used to:

[0174] If the matching result is successful, generating an instruction for allowing the electricity seller to sell electricity;

[0175] If the matching result is a matching failure, a prohibition instruction for the electricity seller is generated.

[0176] Furthermore, if the matching result is a successful match, the device further includes:

[0177] An actual electricity selling price determination module, used to call the power dispatching smart contract to determine the actual electricity selling price;

[0178] The charging module is used to perform charging according to the actual electricity selling price, the actual electricity consumption of the electricity user and the actual electricity sales of the electricity seller.

[0179] Furthermore, the device also includes:

[0180] The actual power consumption acquisition module is used to obtain the actual power consumption of the power user through the smart meter of the power user, and store the actual power consumption as transaction data on the chain;

[0181] The actual electricity sales amount acquisition module is used to obtain the actual electricity sales amount of the electricity seller through the electricity seller's smart meter, and store the actual electricity sales amount on the chain as transaction data.

[0182] Furthermore, the device also includes:

[0183] The power sales demand information clearing module is used to call the power allocation smart contract to clear the power sales demand information of any power seller if it is detected that any power seller has no power available for sale, so as to remove the power seller from the shelves.

[0184] The electricity demand information clearing module is used to call the power allocation smart contract to clear the electricity demand information of any electricity user if it is detected that any electricity user has been successfully matched and has not used electricity within the time limit, so as to remove the electricity user from the shelves.

[0185] The blockchain-based power resource allocation device configured in a node in a blockchain network provided in an embodiment of the present application can execute the blockchain-based power resource allocation method provided in any embodiment of the present application and executed by a node in a blockchain network, and has functional modules and beneficial effects corresponding to the execution method.

[0186] Figure 7 Schematic diagram of the structure of a blockchain-based power resource allocation device configured on the power user according to an embodiment of the present application. Figure 7 , an embodiment of the present application discloses a blockchain-based power resource allocation device 600, which includes: a power demand information sending module 601 and a power query transaction request sending module 602.

[0187] The power demand information sending module 601 is used to send local power demand information to the blockchain network to instruct the blockchain network to call the power dispatch smart contract to match the power demand information with the power sales demand information of the power seller;

[0188] The electricity usage query transaction request sending module 602 is used to send an electricity usage query transaction request to the blockchain network to instruct the blockchain network to generate an electricity usage control instruction for the electricity user based on the matching results.

[0189] Furthermore, the electricity demand information includes expected electricity consumption and maximum electricity price; the electricity sales demand information includes expected electricity sales amount and minimum electricity sales price.

[0190] Furthermore, the device also includes:

[0191] The actual power consumption acquisition module is used to obtain the actual power consumption through the local smart meter if the power consumption control instruction is an allowed power consumption control instruction, and send the actual power consumption to the blockchain network.

[0192] Furthermore, the device also includes:

[0193] A query module is used to query whether the electricity user has available elements through the local smart meter;

[0194] If yes, it triggers the sending operation of executing the electricity usage query transaction request;

[0195] Otherwise, disconnect from the grid.

[0196] The blockchain-based power resource allocation device configured on the electricity user provided in the embodiments of the present application can execute the blockchain-based power resource allocation method provided in any embodiment of the present application and executed by the electricity user, and has the corresponding functional modules and beneficial effects of the execution method.

[0197] Figure 8 Schematic diagram of the structure of a blockchain-based power resource allocation device configured at a power seller according to an embodiment of the present application. Figure 8 , an embodiment of the present application discloses a blockchain-based power resource allocation device 700, which includes: a power sales demand information sending module 701 and a power sales query transaction request sending module 702.

[0198] The power sales demand information sending module 701 is used to send local power sales demand information to the blockchain network to instruct the blockchain network to call the power dispatch smart contract to match the local power sales demand information with the power demand information of the power user;

[0199] The power selling query transaction request sending module 702 is used to send a power selling query transaction request to the blockchain network to instruct the blockchain network to generate a power selling control instruction of the power seller according to the matching results.

[0200] Furthermore, the electricity demand information includes expected electricity consumption and maximum electricity price; the electricity sales demand information includes expected electricity sales amount and minimum electricity sales price.

[0201] Furthermore, the device also includes:

[0202] The grid-connected operation execution module is used to execute the grid-connected operation on the electricity stored in the local energy storage device through the local smart meter if the electricity consumption control instruction is a control instruction allowing electricity sales, and send the actual electricity sales amount to the blockchain network.

[0203] The blockchain-based power resource allocation device configured at the power seller provided in the embodiment of the present application can execute the blockchain-based power resource allocation method provided in any embodiment of the present application and executed by the power user, and has the corresponding functional modules and beneficial effects of the execution method.

[0204] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.

[0205] like Fig. 9 As shown, Fig. 9It is a block diagram of an electronic device for implementing the blockchain-based power resource allocation method of an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, electronic devices, blade electronic devices, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable electronic devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0206] like Fig. 9 As shown, the electronic device includes: one or more processors 801, a memory 802, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The electronic device can implement a method executed by a node in a blockchain network, or execute a method executed by an electricity user, or execute a method executed by an electricity seller. The various components are interconnected using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display electronic device coupled to an interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each electronic device provides some necessary operations (for example, as an electronic device array, a group of blade electronic devices, or a multi-processor system). Fig. 9 A processor 801 is taken as an example.

[0207] The memory 802 is a non-transitory computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to execute the blockchain-based power resource allocation method provided in the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to execute the blockchain-based power resource allocation method provided in the present application.

[0208] The memory 802 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the method for power resource allocation based on blockchain in the embodiment of the present application (for example, Figure 6 The matching result determination module 501, the power consumption behavior control module 502 and the power selling behavior control module 503 shown, or Figure 7The power demand information sending module 601 and the power query transaction request sending module 602 shown, or Figure 8 The power selling demand information sending module 701 and the power selling query transaction request sending module 702 are shown. The processor 801 executes various functional applications and data processing of the electronic device by running the non-transient software programs, instructions and modules stored in the memory 802, that is, the power resource allocation method based on blockchain in the above method embodiment is realized.

[0209] The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of an electronic device for power resource allocation based on blockchain, etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 802 may optionally include a memory remotely disposed relative to the processor 801, and these remote memories may be connected to the power resource allocation electronic device based on blockchain via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0210] The electronic device of the blockchain-based power resource allocation method may also include: an input device 803 and an output device 804. The processor 801, the memory 802, the input device 803 and the output device 804 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.

[0211] The input device 803 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device based on blockchain power resource allocation, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 804 may include display electronic devices, auxiliary lighting devices (e.g., LEDs) and tactile feedback devices (e.g., vibration motors), etc. The display electronic device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display electronic device may be a touch screen.

[0212] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0213] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, electronic device, and / or device (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0214] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0215] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data electronic device), or a computing system that includes middleware components (e.g., an application electronic device), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0216] The computer system may include a client and an electronic device. The client and the electronic device are generally remote from each other and usually interact through a communication network. The relationship between the client and the electronic device is generated by computer programs running on the corresponding computers and having a client-electronic device relationship with each other.

[0217] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0218] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A power resource allocation method based on blockchain, characterized in that: Executed by a node in a blockchain network, the method includes: Call the power dispatch smart contract to match the power demand information of the power user with the power sales demand information of the power seller to obtain a matching result; In response to the electricity consumption query transaction request of the electricity user, the electricity consumption control instruction of the electricity user is generated according to the matching result, which is used to control the electricity user's smart meter node in the blockchain to manage the electricity consumption behavior of the electricity user; if the matching result is a successful match, an instruction to allow electricity consumption of the electricity user is generated; if the matching result is a failed match, an instruction to prohibit electricity consumption of the electricity user is generated; In response to the electricity sales query transaction request of the electricity seller, the electricity sales control instruction of the electricity seller is generated according to the matching result, which is used to control the electricity seller's smart meter node in the blockchain to manage the electricity sales behavior of the electricity seller. If the matching result is a successful match, an instruction to allow electricity sales of the electricity seller is generated; if the matching result is a failed match, an instruction to prohibit electricity sales of the electricity seller is generated; The electricity consumption query transaction request is generated by the electricity user's smart meter node and sent to the blockchain network, and the electricity sales query transaction request is generated by the electricity seller's smart meter node and sent to the blockchain network; the electricity user's smart meter node is a lightweight node deployed on the electricity user's electricity equipment, and the electricity seller's smart meter node is a lightweight node deployed on the electricity seller's power generation equipment. The electricity user's smart meter node and the electricity seller's smart meter node are connected to the blockchain and participate in the blockchain network interaction process; the response to the electricity user's electricity consumption query transaction request and the response to the electricity seller's electricity sales query transaction request are executed asynchronously; The method further comprises: Obtaining the power usage permission instruction through the smart meter of the power user at a scheduled time, obtaining the actual power usage of the power user, detecting whether the power user is using power, and storing the actual power usage as transaction data on the chain; Obtaining the power selling permission instruction through the smart meter of the power seller through regular access, obtaining the actual power selling quantity of the power seller, detecting whether the power seller sells power in conjunction with the grid, and storing the actual power selling quantity on the chain as transaction data; If it is detected that any power seller has no sellable electricity, the power dispatch smart contract is called to clear the power sales demand information of the power seller to remove the power seller from the shelves; If it is detected that any electricity user has been successfully matched and has not used electricity within the time limit, the power allocation smart contract is called to clear the electricity demand information of the electricity user to remove the electricity user from the shelves.

2. The method according to claim 1, characterized in that The electricity demand information includes the expected electricity consumption and the maximum electricity price; the electricity sales demand information includes the expected electricity sales and the minimum electricity sales price.

3. The method according to claim 1, characterized in that If the matching result is a successful match, the method further includes: Calling the power dispatch smart contract to determine the actual power selling price; The charges are made according to the actual electricity selling price, the actual electricity consumption of the electricity user and the actual electricity sales of the electricity seller.

4. The power resource allocation method based on blockchain is characterized in that: The method is executed by the smart meter node of the electricity user and the smart meter node of the electricity seller in the blockchain, and includes: Sending local electricity demand information to the blockchain network through the electricity user's smart meter node to instruct the blockchain network to call the power dispatch smart contract to match the local electricity demand information with the electricity seller's electricity sales demand information; Sending an electricity usage query transaction request to the blockchain network through the electricity user's smart meter node to instruct the blockchain network to generate an electricity usage control instruction of the electricity user according to the matching result, which is used to control the electricity user's smart meter node in the blockchain to manage the electricity usage behavior of the electricity user; The power consumption control instruction is received through the smart meter node of the power user. If the power consumption control instruction is an allowable power consumption control instruction, the actual power consumption is obtained through the local smart meter, and the actual power consumption is sent to the blockchain network; Sending local electricity sales demand information to the blockchain network through the electricity seller's smart meter node to instruct the blockchain network to call the power dispatch smart contract to match the local electricity sales demand information with the electricity user's electricity demand information; Sending a power sales query transaction request to the blockchain network through the power seller's smart meter node to instruct the blockchain network to generate a power sales control instruction of the power seller according to the matching result, which is used to control the power seller's smart meter node in the blockchain to manage the power sales behavior of the power seller; The power selling control instruction is received through the smart meter node of the power seller. If the power consumption control instruction is a power selling control instruction, the power stored in the local energy storage device is connected to the grid through the local smart meter, and the actual power sales amount is sent to the blockchain network; The smart meter node of the power user is a lightweight node deployed on the power user's power equipment, and the smart meter node of the power seller is a lightweight node deployed on the power seller's power generation equipment. The smart meter node of the power user and the smart meter node of the power seller are connected to the blockchain and participate in the blockchain network interaction process; the blockchain network responds to the power user's power query transaction request and responds to the power seller's power sales query transaction request asynchronously. The method further comprises: Obtaining the power usage permission instruction through the smart meter node of the power user at regular intervals, obtaining the actual power usage of the power user, detecting whether the power user is using power, and storing the actual power usage as transaction data on the chain; The power seller's smart meter node is accessed regularly to obtain the power selling permission instruction, the actual power sales volume of the power seller is obtained, it is detected whether the power seller sells power in conjunction with the grid, and the actual power sales volume is stored on the chain as transaction data.

5. The method according to claim 4, characterized in that The electricity demand information includes the expected electricity consumption and the maximum electricity price; the electricity sales demand information includes the expected electricity sales and the minimum electricity sales price.

6. The method according to claim 4, characterized in that Before sending an electricity usage query transaction request to the blockchain network, it also includes: Through the local smart meter, check whether the electricity user has available elements; If yes, it triggers the sending operation of executing the electricity usage query transaction request; Otherwise, disconnect from the grid.

7. The power resource allocation device based on blockchain is characterized in that: Configured in a node in a blockchain network, the device includes: A matching result determination module is used to call the power dispatching smart contract to match the acquired power demand information of the power user with the power sales demand information of the power seller to obtain a matching result; An electricity usage behavior control module, which is used to respond to the electricity usage query transaction request of the electricity user, generate the electricity usage control instruction of the electricity user according to the matching result, and control the electricity user's smart meter node in the blockchain to manage the electricity usage behavior of the electricity user; if the matching result is a successful match, generate the electricity user's electricity usage permission instruction; if the matching result is a failed match, generate the electricity user's electricity usage prohibition instruction; A power selling behavior control module, used to respond to the power selling query transaction request of the power seller, generate the power selling control instruction of the power seller according to the matching result, and control the smart meter node of the power seller in the blockchain to manage the power selling behavior of the power seller, and if the matching result is a successful match, generate the power selling permission instruction of the power seller; if the matching result is a failed match, generate the power selling prohibition instruction of the power seller; The electricity consumption query transaction request is generated by the electricity user's smart meter node and sent to the blockchain network, and the electricity sales query transaction request is generated by the electricity seller's smart meter node and sent to the blockchain network; the electricity user's smart meter node is a lightweight node deployed on the electricity user's electricity equipment, and the electricity seller's smart meter node is a lightweight node deployed on the electricity seller's power generation equipment. The electricity user's smart meter node and the electricity seller's smart meter node are connected to the blockchain and participate in the blockchain network interaction process; the electricity consumption behavior control module and the electricity sales behavior control module operate asynchronously; The device also includes: The actual power consumption acquisition module obtains the power consumption permission instruction through the smart meter of the power user at a scheduled time, obtains the actual power consumption of the power user, detects whether the power user uses electricity, and stores the actual power consumption as transaction data on the chain; Obtaining the power selling permission instruction through the power seller's smart meter through regular access, obtaining the actual power selling quantity of the power seller, detecting whether the power user sells power in conjunction with the grid, and storing the actual power selling quantity on the chain as transaction data; A power sales demand information clearing module is used to call the power allocation smart contract to clear the power sales demand information of any power seller if it is detected that any power seller has no power available for sale, so as to remove the power seller from the shelves; The electricity demand information clearing module is used to call the power allocation smart contract to clear the electricity demand information of any electricity user if it is detected that any electricity user has been successfully matched and has not used electricity within the time limit, so as to remove the electricity user from the shelves.

8. The power resource allocation device based on blockchain is characterized by: The device is configured in the blockchain and is a smart meter node for the electricity user and the smart meter node for the electricity seller. The device includes: An electricity demand information sending module, used to send local electricity demand information to the blockchain network to instruct the blockchain network to call the power dispatch smart contract to match the local electricity demand information with the electricity sales demand information of the electricity seller; The electricity query transaction request sending module is used to send an electricity query transaction request to the blockchain network to instruct the blockchain network to generate an electricity consumption control instruction of the electricity user according to the matching result, which is used to control the electricity user's smart meter node in the blockchain to manage the electricity consumption behavior of the electricity user; if the electricity consumption control instruction is an allowable electricity consumption control instruction, the actual electricity consumption is obtained through the local smart meter, and the actual electricity consumption is sent to the blockchain network; A power sales demand information sending module, used to send local power sales demand information to the blockchain network to instruct the blockchain network to call the power dispatch smart contract to match the local power sales demand information with the power demand information of the power user; A power sales query transaction request sending module, used to send a power sales query transaction request to the blockchain network to instruct the blockchain network to generate a power sales control instruction of the power seller according to the matching result, which is used to control the smart meter node of the power seller in the blockchain to manage the power sales behavior of the power seller; A grid-connected operation execution module, configured to receive the power selling control instruction, and if the power consumption control instruction is a power selling permission control instruction, perform a grid-connected operation on the power stored in the local energy storage device through a local smart meter, and send the actual power selling amount to the blockchain network; The smart meter node of the power user is a lightweight node deployed on the power user's power equipment, and the smart meter node of the power seller is a lightweight node deployed on the power seller's power generation equipment. The smart meter node of the power user and the smart meter node of the power seller are connected to the blockchain and participate in the blockchain network interaction process; the blockchain network responds to the power user's power query transaction request and responds to the power seller's power sales query transaction request asynchronously. The power consumption acquisition module is used to access and obtain the power consumption permission instruction at a regular time, obtain the actual power consumption of the power user, detect whether the power user uses electricity, and store the actual power consumption as transaction data on the chain; The power sales amount acquisition module is used to periodically access and obtain the power sales permission instruction, obtain the actual power sales amount of the power seller, detect whether the power seller sells power in conjunction with the grid, and store the actual power sales amount on the chain as transaction data.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of claims 1-3, which is a method executed by a node in a blockchain network, or can execute any one of claims 4-6, which is a method executed by an electricity user or an electricity seller.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute any one of the methods in claims 1-3 executed by a node in a blockchain network, or to execute any one of the methods in claims 4-6 executed by an electricity user or seller.