Microgrid Green Electricity Tagging Traceability Method and Equipment

By employing blockchain and smart contract technologies in microgrids to record power generation and consumption data and transfer tokens, the challenges of green electricity labeling and traceability in large power grids have been solved, enabling accurate labeling and fair power generation of green electricity.

CN115310538BActive Publication Date: 2026-07-31STATE GRID SHANDONG ELECTRIC POWER COMPANY WEIFANG POWER SUPPLY +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID SHANDONG ELECTRIC POWER COMPANY WEIFANG POWER SUPPLY
Filing Date
2022-08-08
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies struggle to label and trace green electricity in power grid environments, especially given the complexity of large power grids and the difficulty in digital management.

Method used

Blockchain technology is used to record the power generation and consumption data of the microgrid, and smart contracts are used to match data and transfer tokens to achieve the marking and traceability of green electricity.

Benefits of technology

In a microgrid environment, precise labeling and traceability of green electricity have been achieved, ensuring fairness in power generation and consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115310538B_ABST
    Figure CN115310538B_ABST
Patent Text Reader

Abstract

This invention provides a method and device for green electricity tagging and traceability in microgrids. The method includes: obtaining power generation data of each power generator and power consumption data of each power consumer in the microgrid within a preset time period from a blockchain; then matching the power generation data and power consumption data using a first smart contract to obtain the energy ratio corresponding to the power consumption data of each power consumer; then using a second smart contract to retrieve a preset type of token from the green electricity token pool according to the power generation data of each power generator, and transferring it to the blockchain account of the corresponding power generator; finally, according to the power consumption data and energy ratio of each power consumer, transferring the corresponding number of tokens from the blockchain account of each power generator to the blockchain account of the corresponding power consumer. By tagging green electricity resources as a token, and then making the issuance of tokens correspond to power generation, and the transfer of tokens correspond to power consumption, the tagging and traceability of green electricity is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of power traceability technology, and in particular relates to a method and equipment for traceability of green electricity marking in microgrids. Background Technology

[0002] Labeling and tracing green electricity has always been a major challenge in the fields of power energy and environmental protection. This is because electricity is an intangible resource, unlike tangible resources that can be physically labeled. Intangible resources cannot be physically labeled.

[0003] Due to the complexity of the power grid, existing technologies struggle to digitally manage green electricity, such as labeling and tracing its origin. Summary of the Invention

[0004] In view of this, the present invention provides a method and device for tracing the source of green electricity in microgrids, aiming to solve the problem of unfair power generation among different power generators in the prior art.

[0005] A first aspect of this invention provides a method for tracing and marking green electricity in microgrids. The microgrid uses blockchain to record its power generation and consumption data. The method includes:

[0006] Retrieve power generation data of each power generator and power consumption data of each power consumer in the microgrid within a preset time period from the blockchain;

[0007] The first smart contract is used to match the power generation data of each power generator with the power consumption data of each power consumer to obtain the energy ratio corresponding to the power consumption data of each power consumer.

[0008] Using a second smart contract, based on the power generation data of each power generator, the system retrieves a preset number of tokens of the corresponding type from the green electricity token pool and transfers them to the blockchain account of the corresponding power generator. Based on the electricity consumption data and energy ratio of each electricity consumer, the system transfers the corresponding number of tokens from the blockchain account of each power generator to the blockchain account of the corresponding electricity consumer.

[0009] In some possible implementations, based on the power generation data of each power generator, a preset number of tokens of a specific type corresponding to the power generation data of each power generator are retrieved from the green electricity token pool and transferred to the corresponding power generator's blockchain account, including:

[0010] The token type for each power generator is determined based on its energy type.

[0011] The number of tokens to be transferred to each power generator is determined based on the power generation of each power generator.

[0012] Based on the token type of each power generator and the number of tokens to be transferred to each power generator, tokens are retrieved from the green electricity token pool and transferred to the corresponding power generator's blockchain account.

[0013] In some possible implementations, for each target electricity consumer, based on the consumer's electricity consumption data and energy ratio, a corresponding number of tokens are transferred from the blockchain account of each power generator to the blockchain account of the corresponding electricity consumer, including:

[0014] Based on the electricity consumption data and energy ratio of the target electricity user, determine the amount of electricity for each energy type in the target electricity user's electricity consumption data;

[0015] Based on the electricity consumption data of the target electricity user, determine the number of tokens for each token type corresponding to the target electricity user;

[0016] Based on the number of tokens for each token type corresponding to the target electricity consumer, transfer the tokens from the power generator's blockchain account for each token type to the target electricity consumer's blockchain account.

[0017] In some possible implementations, for each target power generator, based on the electricity consumption data and energy ratio of each power consumer, a corresponding number of tokens are transferred from the blockchain account of each power generator to the blockchain account of the corresponding power consumer, including:

[0018] Based on the electricity consumption data of each electricity consumer and the proportion of energy corresponding to the target power generator, determine the amount of energy consumed by the target power generator in each electricity consumer.

[0019] Based on the electricity consumption of the target power generator corresponding to each electricity consumer, the tokens in the target power generator's account are transferred to each electricity consumer's account.

[0020] In some possible implementations, a first smart contract is used to match the power generation data of each power generator with the power consumption data of each power consumer to obtain the energy ratio corresponding to the power consumption data of each power consumer, including:

[0021] Based on the principle of power balance, power generation data and power consumption data are matched, and the power generation ratio of each energy source is taken as the ratio of each energy source used by the power consumer.

[0022] In some possible implementations, microgrids also include energy storage.

[0023] The method also includes:

[0024] If the energy storage device is in a discharging state within the preset time period, then the energy storage device will be regarded as the power generation device.

[0025] If the energy storage device is in a charging state within the preset time period, then the energy storage device will be used as the power consumer.

[0026] In some possible implementations, when the energy storage provider acts as the power generator, the method further includes:

[0027] The power generation ratio of each energy source is determined based on the storage ratio of each energy source, the output power of the energy storage source, and the power generation ratio of the power generation source other than the energy storage source.

[0028] In some possible implementations, blockchain nodes include power generation nodes, power consumption nodes, and energy storage nodes;

[0029] Retrieve power generation data from each generator and power consumption data from each consumer within a preset time period in the microgrid from the blockchain, including:

[0030] According to the preset format, the power data of each blockchain node is uploaded to the blockchain for evidence storage; each type of node corresponds to a preset format; the preset time period is greater than or equal to the collection granularity for uploading to the blockchain for evidence storage.

[0031] In some possible implementations, the default format for the power generation node is: power generation identifier, power generation identifier, energy type, time point, and power generation amount.

[0032] In some possible implementations, the default format for the electricity user node is: electricity user identifier, electricity user identifier, time point, electricity consumption;

[0033] The default format for energy storage nodes is: energy storage charging identifier / energy storage discharging identifier, energy storage identifier, time point, charging amount / discharging amount.

[0034] The microgrid green electricity tagging and traceability method and device provided in this invention includes: obtaining power generation data of each power generator and power consumption data of each power consumer in the microgrid within a preset time period from a blockchain; then matching the power generation data of each power generator and the power consumption data of each power consumer using a first smart contract to obtain the energy ratio corresponding to the power consumption data of each power consumer; then using a second smart contract to retrieve a preset type of token quantity corresponding to the power generation data of each power generator from the green electricity token pool, and transferring it to the blockchain account of the corresponding power generator; finally, based on the power consumption data and energy ratio of each power consumer, transferring the corresponding number of tokens from the blockchain account of each power generator to the blockchain account of the corresponding power consumer. By tagging green electricity resources as a token, and then making the issuance of tokens correspond to power generation, and the transfer of tokens correspond to power consumption, the tagging and traceability of green electricity is realized. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 This is an application scenario diagram of the microgrid green electricity tagging and traceability method provided in the embodiments of the present invention;

[0037] Figure 2 This is a flowchart illustrating the implementation of the microgrid green electricity tagging and traceability method provided in this embodiment of the invention. Detailed Implementation

[0038] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.

[0039] Figure 1 This is an application scenario diagram of the microgrid green electricity tagging and traceability method provided in this embodiment of the invention. For example... Figure 1 As shown, the microgrid green electricity tagging and traceability method provided in this embodiment of the invention can be applied to, but is not limited to, this application scenario. In this embodiment of the invention, the microgrid system includes: a power generation system 11, a power consumption system 12, and electronic equipment 13.

[0040] The power generation system 11 is connected to the power consumption system 12 and is used to supply power to the power consumption system 12. The electronic device 13 is used to record the power data of the power generation system 11 and the power consumption system 12, and to perform power generation scheduling of the power generation system 11 to achieve fair power generation from various energy sources.

[0041] The power generation system 11 may include photovoltaic power generation, wind power generation, biogas power generation, etc., and is not limited here. The power consumption system 12 may include urban power consumption systems, factory power consumption systems, etc., and is not limited here. The electronic device 13 may be a terminal or a server. The terminal may be a computer, a handheld computer, or other computing device. The server may be an independent physical server, or a server cluster composed of multiple servers or a cloud server, and is not limited here.

[0042] Figure 2 This is a flowchart illustrating the implementation of the microgrid green electricity tagging and traceability method provided in this embodiment of the invention. For example... Figure 2 As shown, in some embodiments, the microgrid uses blockchain to record the microgrid's power generation and consumption data, and the microgrid green electricity tagging and traceability method is applied to... Figure 1 The electronic device 13 shown herein includes the method comprising:

[0043] S210 retrieves power generation data from each power generator and power consumption data from each power consumer in the microgrid within a preset time period from the blockchain.

[0044] Because electricity is an intangible resource, current methods for marking and tracing it only focus on balancing electricity consumption data, ultimately achieving data balance rather than true traceability. Especially in large-scale power grid environments, where power generation and consumption are complex, achieving true green electricity marking and traceability is virtually impossible under current technological conditions. However, by scaling down the power grid environment, such as in a microgrid, blockchain technology can enable more precise green electricity marking and traceability. The preset time period can be one minute, 30 seconds, etc., without specific limitations.

[0045] In this embodiment, each power generator and each power consumer participates in the blockchain as a node to store and verify electricity data in real time.

[0046] S220: The first smart contract is used to match the power generation data of each power generator with the power consumption data of each power consumer to obtain the energy ratio corresponding to the power consumption data of each power consumer.

[0047] In this embodiment, the energy ratio used by each electricity consumer is the same. For example, if the ratio of wind, solar, and biogas used by electricity consumer 1 is 3:2:1, then the ratio of wind, solar, and biogas used by electricity consumer 2 is also 3:2:1.

[0048] S230 utilizes a second smart contract to retrieve a preset number of tokens of a type corresponding to the power generation data of each power generator from the green electricity token pool, and transfers them to the blockchain account of the corresponding power generator; based on the power consumption data and energy ratio of each power consumer, it transfers the corresponding number of tokens from the blockchain account of each power generator to the blockchain account of the corresponding power consumer.

[0049] In this embodiment, power generation data of each power generator and power consumption data of each power consumer in a microgrid within a preset time period can be obtained from the blockchain. Then, a first smart contract is used to match the power generation data of each power generator and the power consumption data of each power consumer to obtain the energy ratio corresponding to the power consumption data of each power consumer. Next, a second smart contract is used to retrieve a preset number of tokens of a preset type corresponding to the power generation data of each power generator from the green electricity token pool and transfer them to the corresponding power generator's blockchain account. Finally, based on the power consumption data and energy ratio of each power consumer, the corresponding number of tokens in each power generator's blockchain account are transferred to the corresponding power consumer's blockchain account. By using green electricity resources as a token to mark them, and then making the issuance of tokens correspond to power generation and the transfer of tokens correspond to power consumption, the marking and traceability of green electricity are achieved.

[0050] This invention only considers the marking and traceability of green electricity in a microgrid environment, so the token only has one level of transfer, that is, from the power generator to the power consumer.

[0051] In some embodiments, S230 may include:

[0052] The token type for each power generator is determined based on its energy type.

[0053] The number of tokens to be transferred to each power generator is determined based on the power generation of each power generator.

[0054] Based on the token type of each power generator and the number of tokens to be transferred to each power generator, tokens are retrieved from the green electricity token pool and transferred to the corresponding power generator's blockchain account.

[0055] In this embodiment, the energy type of the power generator can include wind, solar, biogas, etc., and is not limited here. Correspondingly, the token type of the power generator can also include wind power token, solar power token, biogas token, etc., and is not limited here. For every preset amount of electricity generated by the power generator, one token is issued from the green electricity token pool to the power generator's account. The preset amount of electricity can be 100 kilowatt-hours, 1 kilowatt-hours, etc., and is not limited here.

[0056] In some embodiments, for each target electricity consumer, based on the electricity consumption data and energy ratio of each consumer, a corresponding number of tokens from each power generator's blockchain account are transferred to the corresponding electricity consumer's blockchain account, including:

[0057] Based on the electricity consumption data and energy ratio of the target electricity user, determine the amount of electricity for each energy type in the target electricity user's electricity consumption data;

[0058] Based on the electricity consumption data of the target electricity user, determine the number of tokens for each token type corresponding to the target electricity user;

[0059] Based on the number of tokens for each token type corresponding to the target electricity consumer, transfer the tokens from the power generator's blockchain account for each token type to the target electricity consumer's blockchain account.

[0060] In this embodiment, the token to be transferred can be calculated based on the electricity user as the subject.

[0061] For example, one kilowatt-hour corresponds to one Tokey. Electricity user 1 uses 120 kilowatt-hours of electricity, and the ratio of wind, solar, and biogas is 3:2:1.

[0062] The calculated electricity consumption for wind, solar, and biogas is 60 kWh, 40 kWh, and 20 kWh, respectively. The corresponding token quantities in the electricity consumer's account (Account 1) should be: 60 wind power tokens, 40 solar power tokens, and 20 biogas tokens. Then, Account 1 can transfer these tokens by obtaining 60 wind power tokens from the wind power generator's account, 40 solar power tokens from the solar power generator's account, and 20 biogas tokens from the biogas generator's account.

[0063] In some embodiments, for each target power generator, based on the electricity consumption data and energy ratio of each power consumer, a corresponding number of tokens from the blockchain account of each power generator are transferred to the blockchain account of the corresponding power consumer, including:

[0064] Based on the electricity consumption data of each electricity consumer and the proportion of energy corresponding to the target power generator, determine the amount of energy consumed by the target power generator in each electricity consumer.

[0065] Based on the electricity consumption of the target power generator corresponding to each electricity consumer, the tokens in the target power generator's account are transferred to each electricity consumer's account.

[0066] In this embodiment, the calculation can be performed on the tokens that need to be transferred, with the power generator as the main entity.

[0067] For example, the power generator is a wind power generator, one kilowatt-hour corresponds to one Tokey, power user 1 uses 120 kilowatt-hours, power user 2 uses 60 kilowatt-hours, and the ratio of wind, solar and biogas is 3:2:1.

[0068] It can be calculated that electricity user 1 uses 60 kWh of wind power and electricity user 2 uses 30 kWh of wind power. Accordingly, 60 wind power tokens in the wind power generator's account are transferred to electricity user 1 and 30 wind power tokens are transferred to electricity user 2.

[0069] By performing the above operations on each power generator, the token transfer process can be completed.

[0070] In some embodiments, S220 may include:

[0071] Based on the principle of power balance, power generation data and power consumption data are matched, and the power generation ratio of each energy source is taken as the ratio of each energy source used by the power consumer.

[0072] In this embodiment, power generation and consumption data are matched according to the principle of power balance. The source of power consumption data at a certain point in time is determined by the ratio of power generation data. For example, if the power generation ratio of wind, solar, and biogas is 3:2:1, then all power consumers will have a power source with the same proportion as the power generation ratio.

[0073] In some embodiments, the microgrid also includes an energy storage unit.

[0074] Correspondingly, the traceability method for green electricity labeling in microgrids also includes:

[0075] If the energy storage device is in a discharging state within the preset time period, then the energy storage device will be regarded as the power generation device.

[0076] If the energy storage device is in a charging state within the preset time period, then the energy storage device will be used as the power consumer.

[0077] In some embodiments, when the energy storage provider is used as the power generator, the microgrid green electricity tagging and traceability method further includes:

[0078] The power generation ratio of each energy source is determined based on the storage ratio of each energy source, the output power of the energy storage source, and the power generation ratio of the power generation source other than the energy storage source.

[0079] In this embodiment, since the energy stored by the energy storage device comes from various power generators and is a mixed type of energy, the power generation ratio needs to be recalculated when the energy storage device participates in power supply.

[0080] For example, if the original power generation ratio of each energy source is 3:2:1, generating a total of 600 kWh of electricity, and the energy storage ratio is 1:1:1, contributing to the power supply of 300 kWh, then the wind power generation is 600*3 / 6+300*1 / 3=400 kWh, the photovoltaic power generation is 300 kWh, and the biogas power generation is 200 kWh, then the power generation ratio of each energy source is 4:3:2.

[0081] In some embodiments, the nodes of the blockchain include power generation nodes, power consumption nodes, and energy storage nodes.

[0082] Accordingly, the power generation data of each power generator and the power consumption data of each power consumer in the microgrid within a preset time period are obtained from the blockchain, including:

[0083] According to the preset format, the power data of each blockchain node is uploaded to the blockchain for evidence storage; each type of node corresponds to a preset format; the preset time period is greater than or equal to the collection granularity for uploading to the blockchain for evidence storage.

[0084] In this embodiment, smart meters are installed at each power generator, power consumer, and energy storage provider to record and verify electricity data on the blockchain in real time. The granularity of green electricity labeling depends on the data collection granularity of the smart meters. For example, if the smart meters collect data once per minute, green electricity labeling can be achieved at the minute level.

[0085] In some embodiments, the preset format of the power generation node is: power generation identifier, power generation identifier, energy type, time point, and power generation amount;

[0086] The default format for the electricity user node is: electricity user identifier, electricity user identifier, time point, electricity consumption;

[0087] The default format for energy storage nodes is: energy storage charging identifier / energy storage discharging identifier, energy storage identifier, time point, charging amount / discharging amount.

[0088] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0089] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0090] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0091] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0092] In the embodiments provided by this invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0093] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0094] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0095] If an integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0096] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for tracing the source of green electricity in microgrids, characterized in that, The microgrid uses blockchain to record its power generation and power consumption data, and the method includes: Obtain from the blockchain the power generation data of each power generator and the power consumption data of each power consumer in the microgrid within a preset time period; The first smart contract is used to match the power generation data of each power generator with the power consumption data of each power consumer to obtain the energy ratio corresponding to the power consumption data of each power consumer. Using a second smart contract, based on the power generation data of each power generator, a number of tokens of a preset type corresponding to the power generation data of each power generator are retrieved from the green electricity token pool and transferred to the blockchain account of the corresponding power generator; based on the electricity consumption data of each electricity consumer and the energy ratio, a corresponding number of tokens from the blockchain account of each power generator are transferred to the blockchain account of the corresponding electricity consumer. The step of matching the power generation data of each power generator with the power consumption data of each power consumer using a first smart contract to obtain the energy ratio corresponding to the power consumption data of each power consumer includes: The power generation data and the power consumption data are matched according to the principle of power balance, and the power generation ratio of each energy source is taken as the ratio of each energy source used by the power consumer.

2. The microgrid green electricity tagging and traceability method according to claim 1, characterized in that, The step of retrieving a preset number of tokens of a specific type corresponding to the power generation data of each power generator from the green electricity token pool and transferring them to the corresponding power generator's blockchain account, based on the power generation data of each power generator, includes: The token type for each power generator is determined based on its energy type. The number of tokens to be transferred to each power generator is determined based on the power generation of each power generator. Based on the token type of each power generator and the number of tokens to be transferred to each power generator, tokens are retrieved from the green electricity token pool and transferred to the corresponding power generator's blockchain account.

3. The microgrid green electricity tagging and traceability method according to claim 2, characterized in that, For each target electricity consumer, the step of transferring a corresponding number of tokens from the blockchain accounts of each power generator to the blockchain accounts of the corresponding electricity consumer, based on the electricity consumption data of each consumer and the energy ratio, includes: Based on the electricity consumption data of the target electricity consumer and the energy ratio, determine the amount of electricity of each energy type in the electricity consumption data of the target electricity consumer; Based on the electricity consumption data of the target electricity user, determine the number of tokens for each token type corresponding to the target electricity user; Based on the number of tokens for each token type corresponding to the target electricity consumer, transfer the tokens in the blockchain account of the power generator corresponding to each token type to the blockchain account of the target electricity consumer.

4. The microgrid green electricity tagging and traceability method according to claim 2, characterized in that, For each target power generator, the step of transferring a corresponding number of tokens from the blockchain account of each power generator to the blockchain account of the corresponding power user, based on the power consumption data of each power user and the energy ratio, includes: Based on the electricity consumption data of each electricity consumer and the proportion of energy corresponding to the target power generator, determine the amount of energy consumed by the target power generator in each electricity consumer. Based on the electricity consumption of the target power generator corresponding to each electricity consumer, the tokens in the target power generator's account are transferred to each electricity consumer's account.

5. The microgrid green electricity tagging and traceability method according to claim 1, characterized in that, The microgrid also includes an energy storage unit; The method further includes: If the energy storage device is in a discharging state within a preset time period, then the energy storage device will be used as the power generation device. If the energy storage device is in a charging state within a preset time period, then the energy storage device will be used as the power user.

6. The microgrid green electricity tagging and traceability method according to claim 5, characterized in that, When the energy storage device is used as a power generator, the method further includes: The power generation ratio of each energy source is determined based on the storage ratio of each energy source in the energy storage device, the power output of the energy storage device, and the power generation ratio of the power generation devices other than the energy storage device.

7. The microgrid green electricity tagging and traceability method according to claim 5, characterized in that, The nodes of the blockchain include power generation nodes, power consumption nodes, and energy storage nodes. The step of obtaining power generation data of each power generator and power consumption data of each power consumer in the microgrid within a preset time period from the blockchain includes: According to a preset format, the power data of each blockchain node is uploaded to the blockchain for evidence storage; wherein, each type of node corresponds to a preset format; the preset time period is greater than or equal to the collection granularity of the evidence storage.

8. The microgrid green electricity tagging and traceability method according to claim 7, characterized in that, The preset format of the power generation node is: power generation identifier, power generation identifier, energy type, time point, and power generation amount.

9. The microgrid green electricity tagging and traceability method according to claim 7, characterized in that, The preset format of the electricity user node is: electricity user identifier, electricity user identifier, time point, electricity consumption; The preset format of the energy storage node is: energy storage charging identifier / energy storage discharging identifier, energy storage identifier, time point, charging amount / discharging amount.