Power grid scattered resource aggregation scheduling method and device based on block chain data, terminal equipment and storage medium
By using a scheduling weight and probability space mapping mechanism and random entropy generation, the problem of strong computing power nodes obtaining the right to package data for a long time in traditional blockchain consensus mechanisms is solved, thereby realizing global optimized scheduling and efficient utilization of resources in the power system.
Patent Information
- Application Number
- CN202511829371.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-02-24
AI Technical Summary
In traditional blockchain consensus mechanisms, nodes with strong computing power have long held the right to package data, leading to manipulation of decentralized resource scheduling decisions and making it impossible to achieve global optimization.
By using a scheduling weight and probability space mapping mechanism, combined with verifiable random functions and random entropy generation, we ensure that each blockchain node has the opportunity to acquire the right to package, thus avoiding the monopoly of the right to package.
It achieves globally optimized power system dispatch, ensuring that the dispatch needs of each node are taken into account, thereby improving the operating efficiency and economy of the power system.
Smart Images

Figure CN121566641A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system dispatching technology, and in particular to a method, apparatus, terminal equipment, and storage medium for decentralized power grid resource aggregation and dispatching based on blockchain data. Background Technology
[0002] In implementing power dispatch, the consensus mechanism and encryption algorithm of blockchain technology are often deeply integrated with the dispatch logic of the power system. Through the verification and collaboration of blockchain nodes, energy dispatch data is packaged, uploaded to the blockchain, and used for decision-making, thereby optimizing and improving the dispatch of distributed resources within the power system. Distributed resources refer to a collection of small-scale energy production, storage, and consumption units located in different regions of the power system and controlled by multiple entities. These include distributed photovoltaic power stations, small wind power facilities, user-side energy storage batteries, micro gas turbines, and adjustable loads (such as industrial refrigeration equipment and commercial building air conditioning systems). These resources are relatively small in scale, geographically dispersed, and have diversified ownership, but they possess certain energy production, storage, or load regulation capabilities and can participate in the power system's supply and demand balance and energy dispatch.
[0003] During the scheduling process, traditional technologies often employ the Proof-of-Work (PoW) consensus mechanism when using blockchain to verify and determine packaging nodes. This mechanism determines the packaging right based on the computing power competition among nodes. For example, a node's PoW computing power as a percentage of the total network computing power directly equates to its probability of obtaining packaging rights. This can lead to powerful nodes consistently holding packaging rights, creating a monopoly. Nodes with this monopoly may manipulate scheduling decisions for their own benefit, such as prioritizing their own energy resources while neglecting the optimal utilization of other distributed resources. This results in nodes with insufficient computing power, but deeply involved in power scheduling during the blockchain consensus process, being almost unable to obtain packaging rights in the PoW competition. Consequently, their scheduling needs are ignored, and traditional technologies cannot achieve globally optimized scheduling of the system. Summary of the Invention
[0004] This invention provides a method, apparatus, terminal device, and storage medium for decentralized power grid resource aggregation and scheduling based on blockchain data. By using a scheduling weight and probability space mapping mechanism, nodes with higher scheduling weights have a higher probability of success. Furthermore, by combining the generation of random entropy values, the monopoly of packaging rights is avoided, allowing each blockchain node to potentially acquire packaging rights. This enables the final scheduling decision to achieve globally optimized scheduling, effectively solving the problem in existing technologies where nodes with strong computing power consistently acquire packaging rights, leading to a monopoly of packaging rights and preventing the achievement of globally optimized scheduling of the system.
[0005] An embodiment of the present invention provides a method for decentralized resource aggregation and scheduling in power grids based on blockchain data, comprising: Acquire the blockchain corresponding to the power system and the current energy dispatch data; wherein, the blockchain includes: a number of blockchain nodes participating in the decentralized resource aggregation management of the power system; each blockchain node corresponds to a dispatch weight; the dispatch weight is generated based on a first weight value used to reflect the credibility of the blockchain node in energy dispatch execution and a second weight value used to reflect the blockchain node's ability to balance energy supply and demand in the power system; A random entropy value is generated based on a preset verifiable random function, the private key corresponding to the historical packaging node, and the blockchain hash value corresponding to the blockchain. A probability space corresponding to each blockchain node is generated based on the scheduling weight of each blockchain node; the probability space into which the random entropy value falls is taken as the target probability interval; the blockchain node corresponding to the target probability interval is taken as the current packaging node, so that the current packaging node packages the energy scheduling data. Based on the energy scheduling data packaged by the current packaging node, candidate blocks are generated; The candidate blocks are appended to the main chain of the blockchain to generate an updated blockchain; the distributed resources of the power system are then scheduled based on the updated blockchain.
[0006] Preferably, the step of generating a random entropy value based on a preset verifiable random function, the private key corresponding to the historical packaging node, and the blockchain hash value corresponding to the blockchain includes: The packaging node that last obtained the packaging right is used as the historical packaging node; The current amount of data in the blockchain is encrypted using a hash function to generate a corresponding blockchain hash value; wherein, the height is used to represent the current amount of data in the blockchain; The private key of the historical packaging node and the blockchain hash value are used as input parameters for a verifiable random function, and the output is the random entropy value corresponding to the verifiable random function.
[0007] Preferably, generating the probability space corresponding to each blockchain node based on the scheduling weight of each blockchain node includes: For each blockchain node, the probability of obtaining the packaging right is generated based on the scheduling weight corresponding to the blockchain node and the total scheduling weight corresponding to all blockchain nodes. The probability of each blockchain node obtaining the right to package is transformed into a continuous interval segment, generating the probability space of each blockchain node; where the starting boundary of each probability space is the sum of the probabilities of the preceding nodes.
[0008] Preferably, generating candidate blocks based on the energy scheduling data packaged by the currently packaged node includes: Based on the energy scheduling data packaged by the current packaging node, a block to be verified containing energy scheduling instructions is generated; The block to be verified is broadcast to the consensus node layer of the blockchain, so that each consensus node in the consensus node layer performs transaction compliance verification, time sequence verification, and parent hash reference integrity verification on the block to be verified, and generates a voting message based on the verification results; wherein, the voting message contains either approval for the block to be verified to be added to the chain or rejection for the block to be verified to be added to the chain. Count the voting messages of all consensus nodes to determine the target number of voting messages that support the inclusion of the block to be verified on the chain; If the number of target packets is determined to be greater than a preset threshold, the block to be inspected will be selected as a candidate block.
[0009] Preferably, appending the candidate block to the main chain of the blockchain to generate an updated blockchain includes: Broadcast the candidate block to the consensus node layer of the blockchain; For each consensus node in the consensus node layer, a hash signature is generated based on the current timestamp, the private key of the consensus node, and the node identifier of the consensus node. Aggregate the signatures of all consensus nodes to generate an aggregate signature; The aggregated signature is embedded in the header of the blockchain, and the candidate block is appended to the main chain of the blockchain to generate an updated blockchain.
[0010] Preferably, after generating candidate blocks, the method further includes: Based on the block size of the candidate block and the first positive incentive factor of the current packaging node, a first positive incentive value is generated for the current packaging node; wherein, the first positive incentive value is used to measure the packaging success rate of the packaging node; and the first positive incentive factor is used to characterize the incentive factor of the packaging success rate. Based on the response time of the current packaging node, the preset response time threshold, and the second positive incentive factor of the current packaging node, a second positive incentive value for the current packaging node is generated; wherein, the second positive incentive value is used to measure the response rate of the packaging node; and the second positive incentive factor is used to characterize the incentive factor of the response rate. A target positive incentive value is generated based on the first positive incentive value and the second positive incentive value; The weight value of the current packaging node is updated based on the target positive incentive value.
[0011] Preferably, the generation of the first weight value includes: Based on the blockchain node’s historical packet success rate, data reporting accuracy rate, and historical abnormal behavior records, a first credit score is generated to measure the reliability of the blockchain node’s behavior in the power dispatching system. Based on the energy dispatch execution efficiency, energy transaction fulfillment rate, node hardware resource data, and energy reserves of blockchain nodes, a second credit score is generated to measure the fulfillment capability of blockchain nodes in the power dispatch system. Based on the transaction compliance records and violation penalty records of blockchain nodes, a third credit score is generated to measure the power dispatch compliance of blockchain nodes in the power dispatch system. The first weight value is generated by weighting and summing the first credit score, the second credit score, and the third credit score.
[0012] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.
[0013] One embodiment of the present invention provides a power grid decentralized resource aggregation and scheduling device based on blockchain data, comprising: a data acquisition module, a random entropy value generation module, a packet node determination module, a candidate block generation module, and a decentralized resource scheduling module; The data acquisition module is used to acquire the blockchain corresponding to the power system and the current energy dispatch data; wherein, the blockchain includes: a number of blockchain nodes participating in the decentralized resource aggregation management of the power system; each blockchain node corresponds to a dispatch weight; the dispatch weight is generated based on a first weight value reflecting the credibility of the blockchain node in energy dispatch execution and a second weight value reflecting the ability of the blockchain node to balance energy supply and demand in the power system. The random entropy value generation module is used to generate random entropy values based on a preset verifiable random function, the private key corresponding to the historical packaging node, and the blockchain hash value corresponding to the blockchain. The packaging node determination module is used to generate a probability space corresponding to each blockchain node according to the scheduling weight of each blockchain node; take the probability space into which the random entropy value falls as the target probability interval; and take the blockchain node corresponding to the target probability interval as the current packaging node, so that the current packaging node packages the energy scheduling data. The candidate block generation module is used to generate candidate blocks based on the energy scheduling data packaged by the current packaging node. The decentralized resource scheduling module is used to append the candidate blocks to the main chain of the blockchain to generate an updated blockchain; and to schedule the decentralized resources of the power system according to the updated blockchain.
[0014] Based on the above method embodiments, the present invention provides corresponding terminal device embodiments.
[0015] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the power grid decentralized resource aggregation and scheduling method based on blockchain data described in the above-described embodiment of the invention.
[0016] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments.
[0017] Another embodiment of the present invention provides a storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the power grid decentralized resource aggregation and scheduling method based on blockchain data described in the above-described embodiment of the invention.
[0018] The following benefits can be obtained by implementing the present invention: This invention provides a method, apparatus, terminal device, and storage medium for decentralized resource aggregation and scheduling in power grids based on blockchain data. This invention assigns a scheduling weight to each blockchain node. This scheduling weight is generated based on a first weight value reflecting the credibility of the blockchain node during energy scheduling execution and a second weight value reflecting the blockchain node's ability to balance energy supply and demand in the power system. A probability space is generated for each blockchain node based on its scheduling weight, allowing nodes with higher scheduling weights to obtain a higher probability of being packaged. To prevent nodes with high scheduling weights from monopolizing the packaging qualification due to their high packaging probability, this invention also generates a random entropy value using a verifiable random function, historical packaging node private keys, and blockchain hash values. This ensures the randomness of subsequent selection of packaging nodes using the random entropy value. Therefore, this invention not only ensures that nodes with high scheduling weights have a reasonable probability of participating in packaging but also ensures that each blockchain node has the possibility of being selected as a packaging node through the generation of random entropy values, preventing nodes with high scheduling weights from having an absolute monopoly. Compared with existing technologies, this invention binds a node's packaging right to its scheduling weight in the power dispatching process during the blockchain consensus process, rather than hardware computing power. Through a weight and probability space mapping mechanism, nodes with higher scheduling weights have a higher probability of success. Furthermore, combined with the generation of random entropy values, human intervention can be avoided, making the selection of packaging nodes more random and preventing the monopoly of packaging rights. This ensures that every blockchain node has the potential to acquire packaging rights, thus taking into account the scheduling needs of all nodes and enabling the final scheduling decision to achieve globally optimized scheduling. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating a method for aggregating and scheduling distributed power grid resources based on blockchain data, provided in an embodiment of the present invention.
[0020] Figure 2 This is a schematic diagram of a blockchain verification method based on accountability consensus and BLS aggregated signature provided in an embodiment of the present invention.
[0021] Figure 3 This is a schematic diagram of a power grid decentralized resource aggregation and scheduling device based on blockchain data, provided in an embodiment of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] like Figure 1 As shown, to address the problem in existing technologies where nodes with high computing power consistently obtain the right to package data, leading to a monopoly on packaging rights and hindering global optimization scheduling of the system, an embodiment of this invention provides a power grid decentralized resource aggregation scheduling method based on blockchain data, comprising: Step a1: Obtain the blockchain corresponding to the power system and the current energy dispatch data; wherein, the blockchain includes: a number of blockchain nodes participating in the decentralized resource aggregation management of the power system; each blockchain node corresponds to a dispatch weight; the dispatch weight is generated based on a first weight value used to reflect the credibility of the blockchain node in energy dispatch execution and a second weight value used to reflect the ability of the blockchain node to balance energy supply and demand in the power system. In illustrative terms, the present invention can construct a corresponding blockchain network based on the connection relationship between wind power, photovoltaic, energy storage, and load terminals in the power system, as well as the data interaction in the scheduling scenario. In the structure of the blockchain, there are multiple blockchain nodes that can participate in the decentralized resource aggregation management of the power system.
[0024] Each blockchain node, by bridging energy dispatch data within the power system, enables the mapping between physical devices and the blockchain. Specifically, energy dispatch data can include supply and demand data, transaction instruction data, and grid topology data—data that allows for the dispatching or command control of equipment. Therefore, this invention, through blockchain nodes bridging and participating in the decentralized resource aggregation management of the power system, can achieve digital management of the power system's power generation, grid, load, and storage. Furthermore, by assigning dispatch weights to blockchain nodes, it avoids the monopoly between computing power and packaging rights found in traditional Proof-of-Work (PoW).
[0025] Step a2: Generate a random entropy value based on a preset verifiable random function, the private key corresponding to the historical packaging node, and the blockchain hash value corresponding to the blockchain; In illustrative terms, this invention uses VRF (Verifiable Random Function) to generate independently verifiable random numbers (i.e., random entropy values) based on the private keys corresponding to historical packaging nodes and the blockchain hash value corresponding to the blockchain, while ensuring the unpredictability and uncontrollability of randomness.
[0026] Step a3: Generate a probability space corresponding to each blockchain node based on the scheduling weight of each blockchain node; take the probability space into which the random entropy value falls as the target probability interval; take the blockchain node corresponding to the target probability interval as the current packaging node, so that the current packaging node can package the energy scheduling data. Indicatively, based on the scheduling weight of each blockchain node, the probability space corresponding to each blockchain node can be obtained, and the packetization probability of the node can be obtained. For example, if the scheduling weight of node A is 60% and the scheduling weight of node B is 40%, the continuous interval can be divided according to probability based on the interval [0,1]. For example, node A corresponds to [0,0.6] and node B corresponds to [0.6,1]. By selecting the blockchain node corresponding to the interval in which the random entropy value falls, the current packer can be selected, thus enabling a fair election of packers with weighted priority and randomness.
[0027] Since the entropy value generated by the VRF algorithm is unpredictable, although nodes with high scheduling weights have a higher probability, the random entropy value can ensure that nodes with low scheduling weights still have a chance to participate, so as to avoid high scheduling weight nodes monopolizing the packaging rights for a long time.
[0028] Step a4: Generate candidate blocks based on the energy scheduling data packaged by the current packaging node; As an illustration, the packaging node can integrate energy dispatch data, such as collecting data from distributed energy trading pools like wind power and photovoltaics, to generate candidate blocks containing energy dispatch instructions.
[0029] Step a5: Add the candidate blocks to the main chain of the blockchain to generate an updated blockchain; schedule the distributed resources of the power system according to the updated blockchain.
[0030] As an illustration, once a candidate block is added to the main chain, it can become a trusted record of power system scheduling in the updated blockchain. This allows for energy scheduling, such as green electricity trading settlement and load response control, to be performed based on the updated blockchain.
[0031] It is understandable that distributed resources are a core supporting force for the transformation of the power system towards cleaner and smarter operation. From the perspective of energy structure optimization, their large-scale integration can increase the proportion of renewable energy consumption, reduce dependence on traditional fossil fuels, and promote the low-carbon transformation of the energy system. From the perspective of system stability, distributed resources have rapid response capabilities and can provide flexible adjustment when the power grid experiences load fluctuations or voltage deviations, enhancing the power system's anti-interference capabilities and operational stability. From the perspective of economic efficiency, fully utilizing distributed resources can reduce investment dependence on large-scale centralized power generation facilities, reduce transmission losses through distributed energy supply, and create additional revenue for resource owners, stimulating the enthusiasm of social capital to participate in energy construction. From the perspective of dispatch flexibility, the diversified characteristics of distributed resources can meet the differentiated energy demands of different regions and time periods. This invention can achieve localized optimal allocation of power resources, improving the overall operational efficiency and economy of the power system. Furthermore, this invention can fully activate the value of distributed resources through optimized dispatch mechanisms, which is of great significance for achieving global optimization of the power system.
[0032] For step a1, in a preferred embodiment, the blockchain includes: a light node layer, a non-consensus node layer, and a consensus node layer. The light node layer is used to collect energy dispatch data from the power system; The non-consensus node layer is used to verify energy equipment data; the consensus node layer can be used to verify candidate blocks.
[0033] Specifically, this invention can deploy a layered network architecture based on the operating structure and data of the power system, namely: a consensus node layer, a non-consensus node layer, and a light node layer. Various extended structures for blockchain functionality can also be deployed simultaneously. Specifically, the light node layer in this embodiment includes facilities such as a micro data center for decentralized resource aggregation management and an energy IoT gateway. It can connect to edge devices such as wind power and photovoltaics, providing lightweight computing functions adapted to the characteristics of decentralized resources. It also possesses multi-source heterogeneous data caching and local coordination computing capabilities, thus bridging new energy equipment, energy storage, load terminals, and the blockchain network to achieve resource aggregation parameter processing through edge computing capabilities.
[0034] Indicatively, the light node layer is deployed on edge devices (such as micro data centers and IoT gateways) and directly connects to distributed energy terminals such as wind power, photovoltaics, and energy storage. It can collect real-time energy data (such as power generation and load demand), preprocess multi-source heterogeneous data through edge computing, reduce transmission latency, support regional energy self-balancing, and execute scheduling commands to control the connected energy devices.
[0035] Non-consensus node layer: Verifying the authenticity and completeness of energy equipment data (such as whether the power generation reported by photovoltaic power plants is consistent with the actual amount) can filter invalid / false data and reduce the burden on the consensus node layer.
[0036] Consensus node layer: It can perform final verification and consensus on candidate blocks (such as verifying transaction compliance and time sequence) to ensure the immutability of blockchain data.
[0037] After completing the deployment of the layered network architecture, the blockchain nodes participating in the decentralized resource aggregation management of the power system can be authenticated and approved for access, each blockchain node can be initialized, and a weight value can be assigned to each blockchain node.
[0038] In illustrative terms, this invention can perform strict identity verification on blockchain nodes participating in distributed resource aggregation (such as wind power aggregators, photovoltaic power plants, energy storage operators, etc.), for example, based on digital certificates, power business licenses, etc., to ensure the authenticity and traceability of the blockchain node's identity.
[0039] For access review, this invention can refer to the regulatory requirements of the power industry to exclude entities that have not passed security certification or have poor credit, thereby reducing the infiltration of malicious nodes into the blockchain from the source.
[0040] In a preferred embodiment, the scheduling weight value may include: a first weight value reflecting the credibility of the blockchain node in energy scheduling execution and a second weight value reflecting the blockchain node's ability to balance energy supply and demand in the power system; The generation of the first weight value includes: Based on the blockchain node’s historical packet success rate, data reporting accuracy rate, and historical abnormal behavior records, a first credit score is generated to measure the reliability of the blockchain node’s behavior in the power dispatching system. Based on the energy dispatch execution efficiency, energy transaction fulfillment rate, node hardware resource data, and energy reserves of blockchain nodes, a second credit score is generated to measure the fulfillment capability of blockchain nodes in the power dispatch system. Based on the transaction compliance records and violation penalty records of blockchain nodes, a third credit score is generated to measure the power dispatch compliance of blockchain nodes in the power dispatch system. The first weighted value is generated by weighting and summing the first, second, and third credit scores. For example, if the first credit score S1 = 0.732 (weight 0.3), the second credit score S2 = 0.632 (weight 0.5), and the third credit score S3 = 0.53 (weight 0.2), then the first weighted value W1 = 0.3 × 0.732 + 0.5 × 0.632 + 0.2 × 0.53 = 0.64.
[0041] Specifically, for the first credit score, the historical block generation success rate reflects the stability of the node in completing the block generation task, the data reporting accuracy rate refers to the authenticity and reliability of the energy data (such as power generation and load) provided by the blockchain node, and the historical abnormal behavior records, including whether the data has been tampered with or violated regulations, can directly affect the credibility.
[0042] For the second credit score, energy dispatch execution efficiency refers to the speed at which nodes respond to dispatch instructions, while energy transaction fulfillment rate refers to the ability to complete transactions on time and with quality in scenarios such as green electricity trading. Hardware resources and energy reserves refer to the capacity and response speed of energy storage power stations, which can directly affect the role of nodes in supply and demand balance.
[0043] For the third credit score, the transaction compliance record includes data on whether the electricity market rules (such as electricity pricing policies and grid connection standards) are followed, while the violation penalty record includes the severity of penalties for historical violations. The credit score can be increased or decreased by combining the transaction compliance record and the violation penalty record.
[0044] The second weight value, the ability of blockchain nodes to balance energy supply and demand in the power system, is often derived from the following data: the charging and discharging regulation capability of energy storage nodes, the demand response flexibility on the load side, and the prediction accuracy of distributed power sources (such as wind power and photovoltaics).
[0045] The second weighting value (supply and demand balancing capability) is illustrated in the diagram. Its core logic is to evaluate the ability of nodes to support the real-time supply and demand balancing of the power grid from three dimensions: "energy storage regulation, load response, and power source forecasting".
[0046] Energy storage charge and discharge regulation capability: Standardized calculation based on the maximum charge and discharge power of energy storage and the available SOC range; Load-side demand response flexibility: Look at the adjustable load ratio and response speed (the faster the response, the higher the score). Distributed power generation prediction accuracy: the reciprocal of the prediction error rate of the past 7 days (the smaller the error, the higher the score).
[0047] Therefore, the scores of the three dimensions can be weighted and summed to highlight the dynamic contribution of nodes in real-time scheduling.
[0048] For example: Node A has an energy storage score of 0.6 (weight 0.4), a load score of 0.2 (weight 0.3), and a power supply score of 0.1 (weight 0.3). Then the second weight value W2 = 0.4 × 0.6 + 0.3 × 0.2 + 0.3 × 0.1 = 0.33.
[0049] Therefore, in this embodiment of the invention, a weight value for each blockchain node can be obtained based on a first weight value reflecting the trustworthiness of the blockchain node during energy dispatch execution and a second weight value reflecting the blockchain node's ability to balance energy supply and demand in the power system. This weight value will serve as the core weight for subsequent packet selection; for example, nodes with high scores have a higher probability of being selected in a weighted roulette wheel algorithm. Furthermore, after the selection of packet nodes is completed, the weight values of the packet nodes can be updated and adjusted to prevent nodes from holding high weights for extended periods. Instead, different weight values can be continuously assigned to nodes based on their performance.
[0050] In a preferred embodiment, for steps a2 and a3, the present invention can implement a weighted roulette wheel algorithm and superimpose a VRF random lottery mechanism to select the current packaging node.
[0051] In illustrative terms, when implementing the random lottery mechanism of VRF, the step of generating a random entropy value based on a preset verifiable random function, the private key corresponding to the historical packet node, and the blockchain hash value corresponding to the blockchain includes: The packaging node that last obtained the packaging right is used as the historical packaging node; The height of the blockchain is encrypted using a hash function to generate a corresponding blockchain hash value; wherein, the height is used to represent the current amount of data in the blockchain; The private key of the historical packaging node and the blockchain hash value are used as input parameters for a verifiable random function, and the output is the random entropy value corresponding to the verifiable random function.
[0052] As an illustration, when performing the VRF algorithm to obtain the random entropy value, the private key of the packager selected in the previous round can be used as an input parameter.
[0053] Furthermore, when employing the random roulette wheel algorithm, obtaining the corresponding probability space based on the scheduling weight of each blockchain node includes: For each blockchain node, the probability of obtaining the packaging right can be generated based on the scheduling weight corresponding to the blockchain node and the total scheduling weight corresponding to all blockchain nodes. The probability of each blockchain node obtaining the right to package is transformed into a continuous interval segment, generating the probability space of each blockchain node; where the starting boundary of each probability space is the sum of the probabilities of the preceding nodes.
[0054] In a preferred embodiment, the formula for calculating the probability of a blockchain node obtaining the right to package data is as follows: ; in, It is the first The scheduling weight of each blockchain node It is the first The probability of a blockchain node being selected, i.e., the probability of obtaining the right to package a data block. This represents the total scheduling weight, where n is the total number of blockchain nodes.
[0055] Specifically, assuming a regional power system blockchain contains 3 nodes: Node A: a large photovoltaic power station, with a first weight value of 85 points and a weight factor of 0.7; and a second weight value of 10 points and a weight factor of 0.3; then the scheduling weight of node A = 0.7 × 85 + 0.3 × 10 = 62.5; Node B: Energy storage power station, first weight value 75 points, weight factor can be 0.7; second weight value 5 points, weight factor can be 0.3; then the scheduling weight of node B = 0.7×75 + 0.3×5 = 54; Node C: Commercial load aggregator, first weight value 80 points, weight factor can be 0.7; second weight value 3 points, weight factor can be 0.3; then the scheduling weight of node C = 0.7 × 80 + 0.3 × 3 = 56.9; Historical packaging node determination: The packaging node in the previous round was node B (assuming it was selected by random lottery in the previous round).
[0056] Based on node B's private key and the blockchain hash value with random entropy r = 0.65 (normalized to [0,1]), a zero-knowledge proof of π is obtained.
[0057] Total weight = 62.5 + 54 + 56.9 = 173.4; then, the probability calculation of the packing weight is as follows: Node A: 62.5 / 173.4 ≈ 0.36 (36% probability); Node B: 54 / 173.4 ≈ 0.31 (31% probability); Node C: 56.9 / 173.4 ≈ 0.33 (33% probability).
[0058] Probability space partitioning: Node A: [0, 0.36), Node B: [0.36, 0.67), Node C: [0.67, 1].
[0059] Since the entropy value r=0.65 falls within the interval [0.36, 0.67) of node B, node B is selected as the current packaging node.
[0060] Understandably, due to the weighted design of the first weight value (credibility) and the second weight value (supply and demand capacity), node A (high credit, high output) has a high probability of 36%, which aligns with the business logic of prioritizing the scheduling of high-quality nodes. However, since node C (load aggregator), although with a lower weight than A, still has a 33% probability of being elected, this ensures the participation of nodes with lower weights. Because the VRF algorithm ensures that r is unpredictable (only node B's private key can generate it), even if node A has the highest weight (36% probability), node B may still be selected if the VRF-generated r=0.65. This prevents high-weight nodes from being continuously elected. For example, if there are 10 consecutive rounds of drawing lots, node A may be elected 3-4 times, and nodes B / C may be elected 6-7 times, thus achieving fairness in a probabilistic sense.
[0061] Therefore, by converting the weight values of blockchain nodes into corresponding probability spaces and generating random entropy values, this embodiment of the invention can solve the problem that in the traditional Proof-of-Work (PoW) mechanism, some nodes that are deeply involved in power scheduling during the blockchain consensus process but lack computing power can hardly obtain the right to pack in the PoW competition, resulting in their scheduling needs being ignored and thus failing to achieve global optimization scheduling of the system.
[0062] In a preferred embodiment, a lottery mechanism using the VRF-enhanced algorithm is employed to generate a cryptographically constrained random entropy value by using the blockchain height of the current task number and the dedicated scheduling private key of the historical packaging node as input parameters. and zero-knowledge proof The random entropy value After normalization, it can be dynamically matched with the probability space of each blockchain node. If the value falls within the probability space of a certain node, it is authorized as the data packaging node for this time, thus obtaining the packaging right.
[0063] Furthermore, the lottery results and VRF proof. The energy trading smart contract can automatically disclose the results, and each node can instantly verify the validity of the election based on the pre-set scheduling public key matrix, ensuring that the energy scheduling rights allocation process is transparent, trustworthy, and in compliance with electricity market regulatory guidelines.
[0064] In a preferred embodiment, during the execution of dynamic energy dispatch, the selected packaging node can complete trusted operations across the entire business chain. First, it activates the time-series snapshot locking mechanism of the distributed energy trading pool, freezing the consumption application data within a specific time window to prevent time-series conflicts caused by new transactions during the generation of dispatch instructions. Then, it verifies the validity of the digital signature of each transaction based on asymmetric encryption, eliminating requests with invalid signatures or exceeding permission limits. Double-spending detection is performed using a UTXO model or account state tree to mark and isolate transactions with duplicate input sources or insufficient balances. For smart contract transactions, the contract logic is pre-executed in a lightweight sandbox environment to ensure no overflow, infinite loops, or other abnormal behaviors. The filtered legitimate transactions are sorted by priority, and a transaction set digest based on a modified Merkle tree is constructed. The root hash, block height, timestamp, and VRF extraction certificate together constitute the core metadata of the block header.
[0065] In a preferred embodiment, in the process of obtaining candidate regions, the present invention can first perform consensus node layer verification. If the verification is successful, it is marked as a candidate region. If the verification fails, the weight value of the current packaging node can be re-evaluated to reduce its weight value. Then, step a2 is repeated to reselect a new packaging node until the verification is successful and a candidate region is obtained.
[0066] Schematic illustration: The step of generating candidate blocks based on the energy scheduling data packaged by the currently packaged node includes: Based on the energy scheduling data packaged by the current packaging node, a block to be verified containing energy scheduling instructions is generated; The block to be verified is broadcast to the consensus node layer of the blockchain, so that each consensus node in the consensus node layer performs transaction compliance verification, time sequence verification, and parent hash reference integrity verification on the block to be verified, and generates a voting message based on the verification results; wherein, the voting message contains either approval for the block to be verified to be added to the chain or rejection for the block to be verified to be added to the chain. Count the voting messages of all consensus nodes to determine the target number of voting messages that support the inclusion of the block to be verified on the chain; If the number of target packets is determined to be greater than a preset threshold, the block to be inspected will be selected as a candidate block.
[0067] In a preferred embodiment, when the number of target messages is determined to be no greater than a preset threshold, a new packaging node is selected, and the voting messages of all consensus nodes are counted based on the block to be verified corresponding to the newly selected packaging node. This process continues until the number of messages containing voting messages that support the block to be verified being uploaded to the chain is greater than the preset threshold. Then, the block to be verified corresponding to the newly selected packaging node is taken as a candidate block.
[0068] Furthermore, after generating candidate blocks, the process also includes: Based on the block size of the candidate block and the first positive incentive factor of the current packaging node, a first positive incentive value is generated for the current packaging node; wherein, the first positive incentive value is used to measure the packaging success rate of the packaging node; and the first positive incentive factor is used to characterize the incentive factor of the packaging success rate. Based on the response time of the current packaging node, the preset response time threshold, and the second positive incentive factor of the current packaging node, a second positive incentive value for the current packaging node is generated; wherein, the second positive incentive value is used to measure the response rate of the packaging node; and the second positive incentive factor is used to characterize the incentive factor of the response rate. A target positive incentive value is generated based on the first positive incentive value and the second positive incentive value; wherein, the target positive incentive value is used to adjust the weight value of the blockchain node; The weight value of the current packaging node is updated based on the target positive incentive value.
[0069] As an illustration, in this embodiment of the invention, the block to be checked can be checked by each consensus node in the consensus node layer to achieve a distributed consensus voting mechanism.
[0070] Specifically, the block verification and consensus voting process of this invention is as follows: Step 1: Generation of the block to be verified: The current packaging node (such as node B randomly selected through VRF) collects energy dispatch data (such as photovoltaic power output plans and energy storage charging and discharging instructions), and encapsulates it into a block to be verified according to the block format, which includes: Block header: timestamp, parent hash, Merkle root (transaction data hash), etc.; Block body: Energy dispatch instructions (such as "Node A will generate 10MW of electricity from 14:00 to 15:00").
[0071] Step 2: Multi-dimensional verification of the consensus node layer: Transaction compliance verification: Verify whether dispatch instructions comply with electricity regulations (such as electricity pricing policies and the validity of green electricity certificates), for example: check whether the energy storage charging and discharging plan exceeds the capacity limit; verify whether the transaction price is within the market price limit range.
[0072] Time sequence verification: Ensure that the block timestamp is reasonable (e.g., the deviation from the power grid clock is ≤3 seconds) and avoid future blocks or expired instructions. For example, whether the instruction takes effect time is earlier than the block generation time; whether the transaction records are arranged in chronological order.
[0073] Parent hash reference integrity: Verify whether the parent hash of the current block is consistent with the latest block of the main chain to prevent fork attacks. For example, calculate the expected parent hash using SHA256 (parent block header) and compare it with the parent hash in the current block.
[0074] Step 3: Voting Mechanism and Threshold Determination Voting Generation: Each consensus node generates a voting message (for / reject) based on the verification results. For example, if node A passes all verifications, it generates a message to put the block to be verified on the chain; if the transaction price is illegal, it generates a message to reject the block to be verified from being put on the chain.
[0075] Threshold determination: Assuming the preset threshold is 2 / 3, if 8 out of 10 consensus nodes vote in favor, then the target message count is 8 > 6.67, and the block passes verification; otherwise, nodes are re-selected to package the block.
[0076] Step 4: Dynamic adjustment of weight values: Penalty for failing verification: If the block of the currently packaging node B is rejected, the system re-evaluates its weight value, such as reducing the behavioral reliability score in the first weight value to decrease the probability of the next lottery; then step a2 is re-executed (at this time, VRF generates a new random entropy value), a new packaging node (such as node C) is selected, and the verification process is repeated until the block passes.
[0077] Furthermore, this embodiment of the invention also discloses a positive incentive mechanism and weight update. The first incentive value can encourage the packaging node to process data efficiently, such as packaging multiple scheduling instructions in batches. The second positive incentive value can prompt the node to respond quickly to scheduling needs, such as adjusting the energy storage power in an emergency.
[0078] Therefore, this invention can implement a distributed consensus mechanism, ensuring that the data uploaded to the chain complies with power business rules and preventing malicious tampering (such as falsely reporting power generation) through triple verification of transaction compliance, timeliness, and parent hash integrity. Moreover, independent voting by nodes avoids single points of failure or human manipulation.
[0079] This invention also provides a negative feedback mechanism, which directly reduces the weight of a failed packaging process, thus creating a deterrent effect. For example, if node B fails three times in a row, its weight may drop from 75 to 60 points, and its probability of being selected may drop from 31% to 28%.
[0080] Furthermore, a positive feedback mechanism is provided: efficient packaging increases weight, incentivizing nodes to optimize performance (e.g., node C increases its weight from 80 to 82 by improving its response speed, and its probability of being selected increases from 33% to 34%).
[0081] In a preferred embodiment, after a candidate block passes verification, the system automatically initiates a 15-second hard time window scheduling instruction confirmation period to ensure that each work node completes the following action chain: Verify the parent hash of the power grid topology of the included block to ensure it is consistent with the latest state of the scheduling main chain; Verify the metering point code, power generation and consumption curve matching degree, and carbon footprint certificate for each green electricity transaction; The confirmation timestamp is within the electricity spot market trading cycle, and the VRF proof is verified by the power dispatch CA. Upon successful verification, a voting certificate containing the node dispatch digital signature is generated.
[0082] Voting data can be propagated via targeted flooding through the Power Data Communication Network (SPDnet). Each node maintains a dynamically updated trusted voting register, recording voting weights including node scheduling qualification certificates and consumption contribution ratings. A multi-dimensional filtering strategy is employed during statistics: only votes from nodes with valid power business licenses are counted; multiple voting actions by the same node trigger exponential decay penalties based on scheduling credit scores; and malicious signatures are immediately detected, triggering a physical network disconnection by linking the power monitoring system.
[0083] Therefore, the effective voting base can be calculated based on the number of consensus nodes currently online, and two key thresholds, namely the confirmation threshold and the rejection threshold, can be set. The calculation mechanism for the two thresholds is as follows: Confirming the calculation mechanism of the threshold: ; Mechanism for calculating the veto threshold: ; in, It is the number of affirmative votes received. That is the number of rejected votes received. It refers to the number of online nodes in the blockchain network. It is a constant, typically taken as the Byzantine fault tolerance threshold constant, i.e. .
[0084] When the confirmation threshold is reached, the network consensus confirms that the scheduling instructions contained in the block are legal and valid, and uses it as a new benchmark to continue energy scheduling (e.g., jump to step S5); when the rejection threshold is reached, the scheduling instructions are determined to pose a grid security risk, the scheduling rollback protocol is immediately triggered and the election process is restarted (return to step a2).
[0085] In a preferred embodiment, when the scheduling rollback protocol is triggered and the election process is restarted (returning to step a2), the present invention can perform the following positive incentive and negative penalty score changes on the behavior of each node in the current packaging process.
[0086] Positive incentives include: For a node that successfully packages a block, its score changes according to the following formula: ; in, It is the size of the newly generated block; It is a positive incentive weight related to the packaging rate.
[0087] For nodes that undergo rapid response verification, the formula for score variation is: in, It is the time threshold, i.e., the maximum allowable response time. It is the actual response time, which is the time difference between when a node receives a candidate block and when it completes the vote; It is a positive incentive weight for response time.
[0088] Negative penalties include: For nodes that vote maliciously, the formula for their score change is: ; in, The weight of fraud evidence is dynamically adjusted according to the type of fraud. Generally, the value for double-spending attacks is 1.5, and the value for format errors is 0.5.
[0089] For nodes that time out offline, the formula for their score change is: ; As an illustration, the adjusted score will be applied to the algorithm for randomizing the selection of packaging nodes in the next round.
[0090] In a preferred embodiment, when the current energy dispatch data is renewable energy consumption data, a special verification of renewable energy consumption can be performed, resulting in: The block to be verified is broadcast to the consensus node layer of the blockchain, so that each consensus node in the consensus node layer performs triple trusted verification on the block to be verified: at the transaction compliance level, verifying the signature of the issuing institution of the green electricity trading certificate chain and verifying the matching degree between the consumption amount and the renewable energy power generation curve; At the time sequence consistency level, the block timestamp must deviate from the power dispatch master station clock by ≤3 seconds and be strictly aligned with the power consumption plan execution window; At the level of power grid topology integrity, it verifies whether the transmission and transformation equipment codes referenced in the dispatch instructions are consistent with the power grid GIS ledger, ensuring the accuracy of the mapping between virtual assets and the physical power grid.
[0091] In a preferred embodiment, after candidate blocks are generated, the packaging node can initiate a hierarchical broadcast mechanism to push complete consumption execution data packets to qualified verification nodes (i.e., consensus nodes), supporting deep verification of grid security constraints; transmit scheduling summaries containing key parameters to ordinary energy nodes (NVPs) to meet basic regulatory requirements; lightweight metering nodes only receive timestamps and root hashes, adapting to rapid synchronization of edge devices. The broadcast process uses a dedicated power communication protocol for fragmented transmission, breaking down scheduling instructions into multiple message units conforming to the IEC 61850 standard. The receiver ensures data integrity through CRC verification, and triggers a fast retransmission mechanism based on the GOOSE protocol in abnormal situations, ensuring that scheduling instructions across regional power grids are covered within milliseconds. This process is accompanied by an anti-latency optimization algorithm throughout, dynamically monitoring the network topology status, prioritizing low-latency, high-bandwidth node relay paths, avoiding congested links, and ensuring sub-second broadcast efficiency even in cross-regional government private networks.
[0092] For step a5, in a preferred embodiment, appending the candidate block to the main chain of the blockchain to generate an updated blockchain includes: Broadcast the candidate block to the consensus node layer of the blockchain; For each consensus node in the consensus node layer, a hash signature is generated based on the current timestamp, the private key of the consensus node, and the node identifier of the consensus node. Aggregate the signatures of all consensus nodes to generate an aggregate signature; The aggregated signature is embedded in the header of the blockchain, and the candidate block is appended to the main chain of the blockchain to generate an updated blockchain.
[0093] As an illustration, the individual signature corresponding to each consensus node can be represented by the BLS12-381 curve for block hash signature, calculated as follows: ; in, It is the first BLS12-381 curve signatures of each node, It is a hash function. It is the first The private key of each node is generated by the BLS12-381 curve and cannot be made public; It is a hash function. It's the block header. It is the current time's timestamp. A node's unique network identifier.
[0094] Based on the BLS12-381 curve signatures of all consensus nodes, all signatures are aggregated and compressed, and the calculation formula is as follows: ; in, It is the generated aggregate signature. This represents the number of signatures.
[0095] Therefore, regardless of the number of nodes, the aggregated signature occupies only a fixed length (such as approximately 96 bytes for a BLS aggregated signature), which reduces the amount of data, saves blockchain storage resources, and thus improves scheduling efficiency.
[0096] As an illustration, when multiple consensus nodes (such as photovoltaic power plants, energy storage centers, and power grid dispatch centers) need to jointly confirm dispatch instructions, aggregated signatures ensure that the instructions are verified by multiple parties before being uploaded to the blockchain. For example, if a block contains an instruction for 5MW of energy storage charging, then the photovoltaic power plant consensus node needs to verify whether the power generation is sufficient, the power grid equipment consensus node needs to verify the line capacity, and the energy storage consensus node needs to verify whether the SOC allows charging. The above consensus nodes jointly sign the instruction, aggregate it, and upload it to the blockchain to ensure the feasibility of subsequent dispatch instructions.
[0097] In a preferred embodiment, the data flow path for power system scheduling according to the present invention is as follows: Uplink: Light nodes collect data from new energy equipment → non-consensus nodes preprocess the data → consensus nodes verify and upload the data to the blockchain; Downlink: Generate scheduling instructions → non-consensus nodes parse the instructions → drive light nodes to control edge devices to execute the scheduling instructions.
[0098] Specifically, the process of scheduling decentralized resources in a power system based on the updated blockchain, as described in this invention, can be as follows: The updated blockchain data includes the following: When the regional load is >80%, energy storage should be prioritized for discharge; Then the following scheduling plans can be generated: energy storage charging and discharging plan (e.g., energy storage power station B charges 5MW at 18:00); load response instructions (e.g., commercial user C reduces load by 10% during peak hours); green electricity trading execution (e.g., photovoltaic power station A transmits 2MWh of green electricity to user D).
[0099] The scheduling plan is converted into an executable format for the device, and the compliance of the instructions is verified (such as whether the energy storage charging and discharging power exceeds the limit). Then, the execution is controlled by a light node. The instructions can be sent to edge devices (such as energy storage PCS controllers and load switches) through an IoT gateway so that the device can execute the scheduling plan and upload the feedback result (such as "3MW charged") to the blockchain to complete the closed loop.
[0100] In a preferred embodiment, the traditional Proof-of-Work (PoW) mechanism constructs a secure game model through computational power competition. Its design logic is significantly incompatible with current low-malicious-node scenarios, resulting in a severe imbalance between security gains and cost investment, making it difficult to meet the deterministic requirements of new power systems. This invention proposes a blockchain verification method based on accountability-based consensus and BLS aggregated signatures, such as... Figure 2 As shown, the specific process is as follows: Step S1: System initialization. First, deploy a layered network architecture: construct a layered network architecture including a light node layer, a non-consensus node layer, and a consensus node layer. The light node layer is used to collect energy dispatch data from the power system, can connect to edge devices such as wind power and photovoltaics, and has multi-source heterogeneous data caching and local coordination computing capabilities; the non-consensus node layer is responsible for verifying energy device data; the consensus node layer verifies candidate blocks.
[0101] To ensure the legitimacy and security of blockchain nodes participating in the decentralized resource aggregation and management of the power system, identity authentication and access verification are conducted.
[0102] A responsibility-based scoring model is established, which assigns an initial credit score to each blockchain node based on multiple dimensions of indicators, including the node's credibility in energy dispatch execution (such as historical packet success rate, data reporting accuracy, and historical abnormal behavior records) and its ability to balance energy supply and demand in the power system (such as energy dispatch execution efficiency and energy transaction fulfillment rate).
[0103] Step S2: Packaging Node Selection and Candidate Block Generation: Based on the real-time online node status (such as whether the node is running normally, resource usage, etc.) and the responsibility system score, a weighted roulette wheel algorithm combined with a VRF (Verifiable Random Function) random lottery mechanism is used to randomly select a node as the packager for the current round. Specifically, the scheduling weight of each blockchain node (including a first weight value reflecting trustworthiness and a second weight value reflecting the ability to balance energy supply and demand) is first converted into a corresponding probability space, and then the packaging node is determined by combining the random entropy value generated by the VRF.
[0104] Packaging nodes collect transaction pool data (such as energy dispatch instructions, energy transaction information, etc.), generate blocks to be verified containing energy dispatch instructions based on the collected energy dispatch data, and then broadcast the blocks to be verified to the consensus node layer of the blockchain.
[0105] Step S3: Consensus Node Layer Verification: Perform Local Ledger Consistency Verification: After receiving the candidate block, the consensus node layer performs local ledger consistency verification in parallel. This involves checking the transaction compliance of the candidate block (whether the energy dispatch instructions comply with electricity market rules, electricity price policies, etc.), the timing (ensuring that the instruction timestamps are reasonable and conform to the business logic order), and the parent hash reference integrity (verifying that the current block is correctly associated with the main chain and preventing fork attacks).
[0106] Each verification node independently reports its verification results, and the number of accepting nodes is counted to see if it meets the preset threshold. If the number of target messages (the number of voting messages that approve the block to be verified being uploaded to the chain) is greater than the preset threshold, the candidate block passes verification; if it is not greater than the preset threshold, a new packaging node is selected, and steps S2-S3 are repeated until verification is passed.
[0107] Step S4: Aggregate Signature Generation: For the verified node group, collect its individual signatures based on the BLS (BLS12-381 curve) signature algorithm. Each consensus node generates an individual signature by signing the block hash using the BLS12-381 curve based on the current timestamp, its own private key, and the node identifier.
[0108] Using BLS aggregate signature technology, all individual signatures are aggregated and compressed into a single lightweight aggregate signature, which is then embedded in the header of the blockchain.
[0109] Step S5: Block Appendage and Dynamic Adjustment: The verified blocks are appended to the main chain of the blockchain to generate an updated blockchain. At the same time, all node ledgers are updated synchronously to ensure data consistency across all nodes.
[0110] The responsibility-based scoring system is dynamically adjusted based on the node behavior in this round (such as the success rate of packaging nodes, response time, and the accuracy of consensus node verification). For example, if a packaging node successfully packages data and responds quickly, its credit score can be appropriately increased; if a consensus node makes a verification error, its credit score can be decreased. By dynamically adjusting the scoring, the assignment weights for subsequent rounds are optimized, incentivizing nodes to actively and compliantly participate in power system dispatch.
[0111] like Figure 3 As shown, based on the above embodiments of various power grid decentralized resource aggregation and scheduling methods based on blockchain data, the present invention provides corresponding device embodiments; One embodiment of the present invention provides a power grid decentralized resource aggregation and scheduling device based on blockchain data, comprising: a data acquisition module, a random entropy value generation module, a packet node determination module, a candidate block generation module, and a decentralized resource scheduling module; The data acquisition module is used to acquire the blockchain corresponding to the power system and the current energy dispatch data; wherein, the blockchain includes: a number of blockchain nodes participating in the decentralized resource aggregation management of the power system; each blockchain node corresponds to a weight value; the weight value is used to quantify the qualification of the blockchain node to participate in power dispatch in the blockchain consensus process; The random entropy value generation module is used to generate random entropy values based on a preset verifiable random function, the private key corresponding to the historical packaging node, and the blockchain hash value corresponding to the blockchain. The packaging node determination module is used to convert the weight value of each blockchain node into a corresponding probability space; take the probability space into which the random entropy value falls as the target probability interval; and take the blockchain node corresponding to the target probability interval as the current packaging node, so that the current packaging node can package the energy scheduling data. The candidate block generation module is used to generate candidate blocks based on the energy scheduling data packaged by the current packaging node. The decentralized resource scheduling module is used to append the candidate blocks to the main chain of the blockchain to generate an updated blockchain; and to schedule the decentralized resources of the power system according to the updated blockchain.
[0112] It should be noted that the device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0113] Those skilled in the art will understand that, for convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0114] Based on the above embodiments of various distributed power grid resource aggregation and scheduling methods based on blockchain data, the present invention provides corresponding embodiments of terminal equipment.
[0115] One embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a power grid decentralized resource aggregation and scheduling method based on blockchain data as described in any embodiment of the present invention.
[0116] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0117] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0118] The memory can be used to store the computer program. The processor implements various functions of the terminal device by running or executing the computer program stored in the memory and calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device or other volatile solid-state storage device.
[0119] Based on the above embodiments of various blockchain-based distributed resource aggregation and scheduling methods for power grids, the present invention provides corresponding embodiments for storage media.
[0120] One embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute a power grid decentralized resource aggregation and scheduling method based on blockchain data, as described in any embodiment of the present invention.
[0121] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When executed by a processor, the computer program 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 file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, 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.
[0122] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for decentralized resource aggregation and scheduling in power grids based on blockchain data, characterized in that, include: Acquire the blockchain corresponding to the power system and the current energy dispatch data; wherein, the blockchain includes: a number of blockchain nodes participating in the decentralized resource aggregation management of the power system; each blockchain node corresponds to a dispatch weight; the dispatch weight is generated based on a first weight value used to reflect the credibility of the blockchain node in energy dispatch execution and a second weight value used to reflect the blockchain node's ability to balance energy supply and demand in the power system; A random entropy value is generated based on a preset verifiable random function, the private key corresponding to the historical packaging node, and the blockchain hash value corresponding to the blockchain. A probability space corresponding to each blockchain node is generated based on the scheduling weight of each blockchain node; the probability space into which the random entropy value falls is taken as the target probability interval; the blockchain node corresponding to the target probability interval is taken as the current packaging node, so that the current packaging node packages the energy scheduling data. Based on the energy scheduling data packaged by the current packaging node, candidate blocks are generated; The candidate blocks are appended to the main chain of the blockchain to generate an updated blockchain; the distributed resources of the power system are then scheduled based on the updated blockchain.
2. The method for decentralized power grid resource aggregation and scheduling based on blockchain data as described in claim 1, characterized in that, The step of generating a random entropy value based on a preset verifiable random function, the private key corresponding to the historical packaging node, and the blockchain hash value corresponding to the blockchain includes: The packaging node that last obtained the packaging right is used as the historical packaging node; The current amount of data in the blockchain is encrypted using a hash function to generate the corresponding blockchain hash value; The private key of the historical packaging node and the blockchain hash value are used as input parameters for a verifiable random function, and the output is the random entropy value corresponding to the verifiable random function.
3. The method for decentralized power grid resource aggregation and scheduling based on blockchain data as described in claim 2, characterized in that, The step of generating the probability space corresponding to each blockchain node based on the scheduling weight of each blockchain node includes: For each blockchain node, the probability of obtaining the packaging right is generated based on the scheduling weight corresponding to the blockchain node and the total scheduling weight corresponding to all blockchain nodes. The probability of each blockchain node obtaining the right to package is transformed into a continuous interval segment, generating the probability space of each blockchain node; where the starting boundary of each probability space is the sum of the probabilities of the preceding nodes.
4. The method for decentralized power grid resource aggregation and scheduling based on blockchain data as described in claim 3, characterized in that, The step of generating candidate blocks based on the energy scheduling data packaged by the currently packaged node includes: Based on the energy scheduling data packaged by the current packaging node, a block to be verified containing energy scheduling instructions is generated; The block to be verified is broadcast to the consensus node layer of the blockchain, so that each consensus node in the consensus node layer performs transaction compliance verification, time sequence verification, and parent hash reference integrity verification on the block to be verified, and generates a voting message based on the verification results; wherein, the voting message contains either approval for the block to be verified to be added to the chain or rejection for the block to be verified to be added to the chain. Count the voting messages of all consensus nodes to determine the target number of voting messages that support the inclusion of the block to be verified on the chain; If the number of target packets is determined to be greater than a preset threshold, the block to be inspected will be selected as a candidate block.
5. The method for decentralized power grid resource aggregation and scheduling based on blockchain data as described in claim 4, characterized in that, The step of appending the candidate blocks to the main chain of the blockchain to generate an updated blockchain includes: Broadcast the candidate block to the consensus node layer of the blockchain; For each consensus node in the consensus node layer, a hash signature is generated based on the current timestamp, the private key of the consensus node, and the node identifier of the consensus node. Aggregate the signatures of all consensus nodes to generate an aggregate signature; The aggregated signature is embedded in the header of the blockchain, and the candidate block is appended to the main chain of the blockchain to generate an updated blockchain.
6. The method for decentralized resource aggregation and scheduling in a power grid based on blockchain data as described in claim 5, characterized in that, After generating candidate blocks, the process also includes: Based on the block size of the candidate block and the first positive incentive factor of the current packaging node, a first positive incentive value is generated for the current packaging node; wherein, the first positive incentive value is used to measure the packaging success rate of the packaging node; and the first positive incentive factor is used to characterize the incentive factor of the packaging success rate. Based on the response time of the current packaging node, the preset response time threshold, and the second positive incentive factor of the current packaging node, a second positive incentive value for the current packaging node is generated; wherein, the second positive incentive value is used to measure the response rate of the packaging node; and the second positive incentive factor is used to characterize the incentive factor of the response rate. A target positive incentive value is generated based on the first positive incentive value and the second positive incentive value; The weight value of the current packaging node is updated based on the target positive incentive value.
7. The method for decentralized power grid resource aggregation and scheduling based on blockchain data as described in claim 6, characterized in that, The generation of the first weight value includes: Based on the blockchain node’s historical packet success rate, data reporting accuracy rate, and historical abnormal behavior records, a first credit score is generated to measure the reliability of the blockchain node’s behavior in the power dispatching system. Based on the energy dispatch execution efficiency, energy transaction fulfillment rate, node hardware resource data, and energy reserves of blockchain nodes, a second credit score is generated to measure the fulfillment capability of blockchain nodes in the power dispatch system. Based on the transaction compliance records and violation penalty records of blockchain nodes, a third credit score is generated to measure the power dispatch compliance of blockchain nodes in the power dispatch system. The first weight value is generated by weighting and summing the first credit score, the second credit score, and the third credit score.
8. A power grid decentralized resource aggregation and scheduling device based on blockchain data, characterized in that, include: The module includes a data acquisition module, a random entropy value generation module, a packaging node determination module, a candidate block generation module, and a distributed resource scheduling module. The data acquisition module is used to acquire the blockchain corresponding to the power system and the current energy dispatch data; wherein, the blockchain includes: a number of blockchain nodes participating in the decentralized resource aggregation management of the power system; each blockchain node corresponds to a dispatch weight; the dispatch weight is generated based on a first weight value reflecting the credibility of the blockchain node in energy dispatch execution and a second weight value reflecting the ability of the blockchain node to balance energy supply and demand in the power system. The random entropy value generation module is used to generate random entropy values based on a preset verifiable random function, the private key corresponding to the historical packaging node, and the blockchain hash value corresponding to the blockchain. The packaging node determination module is used to generate a probability space corresponding to each blockchain node according to the scheduling weight of each blockchain node; take the probability space into which the random entropy value falls as the target probability interval; and take the blockchain node corresponding to the target probability interval as the current packaging node, so that the current packaging node packages the energy scheduling data. The candidate block generation module is used to generate candidate blocks based on the energy scheduling data packaged by the current packaging node. The decentralized resource scheduling module is used to append the candidate blocks to the main chain of the blockchain to generate an updated blockchain; and to schedule the decentralized resources of the power system according to the updated blockchain.
9. A terminal device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements a distributed power grid resource aggregation and scheduling method based on blockchain data as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is running, it controls the device where the storage medium is located to execute a power grid decentralized resource aggregation and scheduling method based on blockchain data as described in any one of claims 1 to 7.
Citation Information
Cited By
Computer scientific data tamper-proofing processing method and system based on block chain
CN121919899A
Safety control method and system for load storage resources to participate in master station power control
CN122001032A