Block chain-based power grid resource trusted transaction management method, terminal equipment and storage medium

By using blockchain technology to screen and bind distributed power grid resources, the credibility problem of resource transactions under the traditional centralized management model has been solved, enabling rapid and accurate resource matching and transaction credibility, and improving the transparency and responsiveness of the power market.

CN121563532APending Publication Date: 2026-02-24STATE GRID DIGITAL TECHNOLOGY HOLDING CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511829370.0
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

Technical Problem

Traditional centralized management models cannot effectively guarantee the credibility of distributed power grid resource transactions and cannot achieve fast and accurate resource matching.

Method used

A blockchain-based trusted transaction management method for power grid resources is adopted. By acquiring information such as resource type, reputation score, status, and transaction price, candidate resources are screened, and trusted transaction credentials are generated to ensure the trusted binding of resource identities and the trustworthiness of transactions.

Benefits of technology

It enables rapid and accurate resource matching, ensures the credibility of transactions, improves the transparency, accuracy and real-time nature of resource access and transactions, and enhances the rapid response capability of decentralized resources to the electricity market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121563532A_ABST
    Figure CN121563532A_ABST
Patent Text Reader

Abstract

The invention discloses a power grid resource trusted transaction management method based on a block chain, terminal equipment and a storage medium, and belongs to the field of power systems, the method comprises the following steps: screening matched candidate resources according to the resource type, reputation score, resource state and transaction quotation information of to-be-transacted resources; for each candidate resource, calculating a matching score of the candidate resource according to the reputation score, the resource state and the transaction quotation information; taking the candidate resource with the highest matching score as another resource to be transacted, and generating a corresponding transaction ID and a transaction timestamp; according to the transaction ID, the transaction timestamp, the transaction volume, the resource ID and the signature of the to-be-transacted resource, and the resource ID and the signature of the other to-be-transacted resource, generating a transaction credible certificate, and writing the transaction credible certificate into the block chain; and the two transaction parties perform transaction. By implementing the method and the device, the problems that a traditional centralized management mode cannot effectively guarantee the credibility of transactions and cannot realize rapid and accurate resource matching can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power systems, and in particular to a blockchain-based trusted transaction management method, terminal equipment, and storage medium for power grid resources. Background Technology

[0002] With the transformation of the global energy structure and the development of the energy internet, the application scale of distributed energy is rapidly expanding. Various small-capacity, decentralized resources, such as distributed photovoltaics, small-scale hydropower, energy storage systems, and demand-side response loads, are gradually showing a trend of large-scale and networked access. However, these distributed and decentralized resources are characterized by wide geographical distribution, small individual scale, and diverse resource types. Traditional centralized management models cannot effectively guarantee the credibility of transactions and cannot achieve rapid and accurate resource matching. Summary of the Invention

[0003] This invention provides a blockchain-based trusted transaction management method, terminal equipment, and storage medium for power grid resources, which can solve the problems that traditional centralized management models cannot effectively guarantee the trustworthiness of transactions and cannot achieve fast and accurate resource matching.

[0004] One embodiment of the present invention provides a blockchain-based trusted transaction management method for power grid resources, comprising: The system retrieves information on resource types, reputation scores, resource status, and transaction quotes for all resources in the blockchain. Resource types include power generation resources and load-side resources. The reputation score is calculated based on historical transaction success metrics, data reporting timeliness metrics, response command success rate, node stability metrics, and security compliance metrics. The resource status describes the remaining capacity available for trading or the demand in a transaction. Based on the resource type, reputation score, resource status, and transaction quote information, the first transaction resource that issued the transaction request is matched with the remaining resources in the blockchain to filter out all candidate resources; For each candidate resource, a matching score between the candidate resource and the first transaction resource is calculated based on the reputation score, resource status, and transaction quotation information. The candidate resource with the highest matching score is selected as the second transaction resource to be traded with the first transaction resource, and a corresponding transaction ID and transaction timestamp are generated. Obtain the first resource ID, first signature, and transaction volume of the first transaction resource; obtain the second signature of the second transaction ID of the second transaction resource. Based on the transaction ID, transaction timestamp, first resource ID, second resource ID, first signature, second signature, and transaction volume, a trusted transaction certificate is generated and written into the blockchain; Conduct transactions between the first and second trading resources.

[0005] Furthermore, the blockchain-based trusted transaction management method for power grid resources also includes: Obtain the digital signature, resource device identification information, public key, resource type, resource status, transaction quotation information, and reputation score of the resource to be registered; Determine whether the reputation score of the resource to be registered is not less than the preset reputation score threshold; if not, refuse the registration of the resource to be registered. If so, the validity of the digital signature is verified using the public key. If the validity verification of the digital signature passes, a resource ID for the resource to be registered is generated based on the resource device identification information, the public key, and the current timestamp. A new block is generated in the blockchain based on the resource ID, resource type, resource status, and transaction quotation information to complete the registration of the resource to be registered. If the validity verification of the digital signature fails, the registration of the resource to be registered is rejected.

[0006] Furthermore, based on the resource type, reputation score, resource status, and transaction quote information, the first transaction resource that issued the transaction request is matched with the remaining resources in the blockchain to filter out all candidate resources, including: For each candidate resource in the blockchain other than the first transaction resource, the candidate resource and the first transaction resource are matched for complementarity based on resource type, and matched for reputation based on reputation score; after the complementarity matching is successful, the candidate resource and the first transaction resource are matched for status based on resource status, and matched for price based on transaction price information; If the complementarity matching, reputation matching, status matching, and price matching are all successful, the candidate resource will be selected as the shortlisted resource.

[0007] Furthermore, the step of performing complementary matching between the candidate resources and the first transaction resources based on resource type includes: If the resource type of the first transaction resource is consistent with the resource type of the candidate resource, the complementarity match between the first transaction resource and the candidate resource is determined to be unsuccessful; otherwise, the complementarity match between the first transaction resource and the candidate resource is determined to be successful. The step of matching the candidate resources with the first transaction resources based on their reputation scores includes: If the reputation score of the candidate resource is not less than the preset matching reputation score threshold, the reputation matching between the first transaction resource and the candidate resource is successful; otherwise, the reputation matching between the first transaction resource and the candidate resource is unsuccessful. The step of matching the candidate resources with the first transaction resources based on their resource status includes: When the resource type of the first traded resource is a power generation side resource, the remaining capacity of the resource is determined according to the resource status of the first traded resource, and the resource trading demand is determined according to the resource status of the candidate resources. When the resource type of the first transaction resource is a load-side resource, the resource transaction demand is determined based on the resource status of the first transaction resource, and the remaining resource capacity is determined based on the resource status of the candidate resources. Calculate the transaction redundancy requirement based on the resource transaction demand. If the remaining capacity of the resource is not less than the transaction redundancy requirement, then the status matching between the first transaction resource and the candidate resource is successful; otherwise, the status matching between the first transaction resource and the candidate resource is unsuccessful. The transaction quotation information includes: the transaction quotation range and the transaction response time; The step of matching the candidate resource with the first transaction resource based on the transaction quotation information includes: If there is overlap in the price range of the first trading resource and the candidate resource, and the transaction response time of both the first trading resource and the candidate resource is not greater than the preset response time threshold, then the price matching between the first trading resource and the candidate resource is successful; otherwise, the price matching between the first trading resource and the candidate resource is unsuccessful.

[0008] Further, the step of calculating the matching score between the candidate resource and the first transaction resource based on the reputation score, resource status, and transaction quotation information includes: Calculate the state fit degree based on the resource status of the candidate resources and the first transaction resources; The transaction price is determined based on the transaction price information of the candidate resources and the first transaction resource; Calculate price competitiveness based on the transaction price; The matching score is calculated based on the reputation score, status fit, and price competitiveness. The formula for calculating the matching score is as follows: ; In the formula, The weighting coefficients represent the credit score; Weighting coefficients representing state fit; The weighting coefficient represents the price competitiveness.

[0009] Furthermore, the calculation process of the state fit degree includes: When the resource type of the first traded resource is a power generation side resource, the remaining capacity of the resource is determined according to the resource status of the first traded resource, and the resource trading demand is determined according to the resource status of the candidate resources. When the resource type of the first transaction resource is a load-side resource, the resource transaction demand is determined based on the resource status of the first transaction resource, and the remaining resource capacity is determined based on the resource status of the candidate resources. Calculate the state adaptability based on the remaining resource capacity and the resource transaction demand. The formula for calculating the state fit is: ; In the formula, Indicates state fit; Indicates the remaining capacity of the resource; This indicates the demand for resource transactions.

[0010] Further, calculating price competitiveness based on the transaction price includes: Calculate price competitiveness based on the transaction price and the preset average market price; The formula for calculating price competitiveness is as follows: .

[0011] Furthermore, the calculation process of the reputation score includes: Historical transaction success rate for resource acquisition, data reporting latency, number of historical abnormal behaviors, continuous online duration, and command response success rate; Calculate the historical transaction success rate of the resource based on the historical transaction success rate. Based on the data reporting delay, calculate the data reporting timeliness index for resources; Calculate the node stability index of the resource based on the continuous online duration; Calculate the security compliance indicators of the resources based on the number of historical abnormal behaviors; The reputation score is calculated based on the historical transaction success indicators, data reporting timeliness indicators, security compliance indicators, node stability indicators, and instruction response success rate. The formula for calculating the historical transaction success indicator is as follows: ; In the formula, Indicators representing historical successful trades; Indicates the historical success rate of transactions; The formula for calculating the timeliness index of data reporting is as follows: ; In the formula, This indicates the timeliness of data reporting; This indicates a delay in data reporting; The formula for calculating the node stability index is as follows: ; In the formula, Indicates node stability metrics; Indicates continuous online time; Indicates the maximum continuous online time; The formula for calculating the security compliance indicators is as follows: ; In the formula, Indicates safety compliance indicators; Indicates the number of historical abnormal behaviors; The formula for calculating the credit score is as follows: ; In the formula, The weighting coefficients representing historical trading success metrics; This represents the weighting coefficient for the timeliness of data reporting; The weighting coefficients representing safety compliance indicators; The weighting coefficients represent the node stability index. The weighting coefficient represents the success rate of command response.

[0012] 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 steps of the blockchain-based trusted transaction management method for power grid resources of the present invention.

[0013] Another embodiment of the present invention provides a computer-readable storage medium item, including: a stored computer program, which, when the computer program is running, controls the device where the computer-readable storage medium is located to perform the steps of the blockchain-based trusted transaction management method for power grid resources of the present invention.

[0014] The following benefits can be obtained by implementing the present invention: This invention provides a blockchain-based distributed and decentralized trusted resource transaction management system. Based on the resource type, reputation score, resource status, and transaction price information of the resource to be traded, all candidate resources that pass the matching test are selected. For each candidate resource, a matching score is calculated between the candidate resource and the first trading resource based on the reputation score, resource status, and transaction price information. The candidate resource with the highest matching score is selected as the second trading resource to be traded with the first trading resource, and a corresponding transaction ID and transaction timestamp are generated. A trusted transaction certificate is generated based on the transaction ID, transaction timestamp, first resource ID, second resource ID, first signature, second signature, and transaction volume, and the trusted transaction certificate is written to the blockchain. The transaction between the first and second trading resources is then conducted. This invention first selects candidate resources and then selects the candidate resource with the highest matching score as the resource to be traded, achieving fast and accurate resource matching. This invention generates a trusted transaction certificate based on the relevant information of the resources of both parties to the transaction, achieving trusted binding of resource identities and effectively ensuring the trustworthiness of the transaction. Attached Figure Description

[0015] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0016] Figure 1 This is a flowchart illustrating a blockchain-based trusted transaction management method for power grid resources, provided in one embodiment of the present invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0019] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0020] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0021] See Figure 1 To address the shortcomings of traditional centralized management models in effectively guaranteeing transaction credibility and achieving rapid and accurate resource matching, this invention provides a blockchain-based trusted transaction management method for power grid resources, comprising: S1. Obtain the resource type, reputation score, resource status, and transaction quotation information of all resources in the blockchain; wherein, the resource type includes: power generation side resources and load side resources; the reputation score is calculated from the resource's historical transaction success index, data reporting timeliness index, response command success rate, node stability index, and security compliance index; the resource status is used to describe the remaining capacity of the resource that can be used for trading or the demand in the transaction.

[0022] It should be noted that resources refer to distributed and decentralized resources within the power grid, such as distributed photovoltaic power, small-scale hydropower, energy storage systems, and demand-side response loads. The reputation score is used to assess the credibility of resources; the higher the score, the higher the credibility.

[0023] In a preferred embodiment, the blockchain-based trusted transaction management method for power grid resources further includes: Obtain the digital signature, resource device identification information, public key, resource type, resource status, transaction quotation information, and reputation score of the resource to be registered; Determine whether the reputation score of the resource to be registered is not less than the preset reputation score threshold; if not, refuse the registration of the resource to be registered. If so, the validity of the digital signature is verified using the public key. If the validity verification of the digital signature passes, a resource ID for the resource to be registered is generated based on the resource device identification information, the public key, and the current timestamp. A new block is generated in the blockchain based on the resource ID, resource type, resource status, and transaction quotation information to complete the registration of the resource to be registered. If the validity verification of the digital signature fails, the registration of the resource to be registered is rejected.

[0024] It should be noted that this embodiment uses asymmetric encryption technology to generate digital identities. When a resource node connects for the first time, the built-in security chip generates a public-private key pair using the Elliptic Curve Digital Subtraction Algorithm (ECDSA). The private key is stored in the Hardware Security Module (HSM), while the public key is publicly disclosed as the node's unique identifier.

[0025] In this embodiment, the present invention needs to collect in real time the digital signature, resource device identification information, public key, resource type, resource status, transaction quotation information, and reputation score of the resource to be registered. First, the credibility of the resource to be registered is determined based on the reputation score. Resources that reach the reputation score threshold are considered trustworthy resources, and registration of trustworthy resources is approved; registration of untrustworthy resources is rejected. Further, the validity of the digital signature is determined based on the public key. Resources with valid digital signatures are approved for continued registration, while registration of resources with invalid digital signatures is rejected. Resource registration refers to the generation of a block corresponding to the resource in the blockchain. This block records the resource ID, resource type, resource status, and transaction quotation information of the data.

[0026] This embodiment combines digital signature technology to establish a trusted identity for resources and complete on-chain registration, ensuring the authenticity of resource node identities and the immutability of data. S2, based on the resource type, reputation score, resource status, and transaction price information, the first transaction resource that issued the transaction request is matched with the remaining resources in the blockchain to filter out all candidate resources.

[0027] In step S2, resources that pass the matching are selected as candidate resources.

[0028] In a preferred embodiment, the step of matching the first transaction resource that issued the transaction request with the remaining resources in the blockchain based on the resource type, reputation score, resource status, and transaction quotation information, and filtering out all candidate resources, includes: For each candidate resource in the blockchain other than the first transaction resource, the candidate resource and the first transaction resource are matched for complementarity based on resource type, and matched for reputation based on reputation score; after the complementarity matching is successful, the candidate resource and the first transaction resource are matched for status based on resource status, and matched for price based on transaction price information; If the complementarity matching, reputation matching, status matching, and price matching are all successful, the candidate resource will be selected as the shortlisted resource.

[0029] In this embodiment, complementarity matching is performed between candidate resources and the first transaction resource based on resource type. Simultaneously, reputation matching is performed based on reputation score, status matching is performed based on status, and price matching is performed based on transaction price information. Notably, status matching and price matching can only be performed after complementarity matching is successful. Candidate resources that pass complementarity matching, reputation matching, status matching, and price matching are designated as candidate resources.

[0030] In another embodiment, dedicated matching logic was designed for typical scenarios: 1. Typical Scenario 1: Distributed power supply balancing on the user side.

[0031] Matching rules: Verify the real-time matching degree between photovoltaic output and local load (e.g., trading is allowed when photovoltaic power is ≥ 80% of load power).

[0032] 2. Typical Scenario 2: Peak scheduling of small hydropower.

[0033] Matching rules: Verify whether the real-time output of the hydropower station reaches the peak regulation capacity (e.g., peak output is allowed when the water level is ≥ the safety threshold).

[0034] 3. Typical Scenario 3: Interactive Response between Source and Load in the Park.

[0035] Matching rules: Verify whether the energy storage charging and discharging behavior is inversely adjusted to the park's load curve (e.g., energy storage discharges during peak load and charges during off-peak load).

[0036] In a preferred embodiment, the step of performing complementary matching between the candidate resources and the first transaction resources based on resource type includes: If the resource type of the first transaction resource is consistent with the resource type of the candidate resource, the complementarity match between the first transaction resource and the candidate resource is determined to be unsuccessful; otherwise, the complementarity match between the first transaction resource and the candidate resource is determined to be successful. The step of matching the candidate resources with the first transaction resources based on their reputation scores includes: If the reputation score of the candidate resource is not less than the preset matching reputation score threshold, the reputation matching between the first transaction resource and the candidate resource is successful; otherwise, the reputation matching between the first transaction resource and the candidate resource is unsuccessful. The step of matching the candidate resources with the first transaction resources based on their resource status includes: When the resource type of the first traded resource is a power generation side resource, the remaining capacity of the resource is determined according to the resource status of the first traded resource, and the resource trading demand is determined according to the resource status of the candidate resources. When the resource type of the first transaction resource is a load-side resource, the resource transaction demand is determined based on the resource status of the first transaction resource, and the remaining resource capacity is determined based on the resource status of the candidate resources. Calculate the transaction redundancy requirement based on the resource transaction demand. If the remaining capacity of the resource is not less than the transaction redundancy requirement, then the status matching between the first transaction resource and the candidate resource is successful; otherwise, the status matching between the first transaction resource and the candidate resource is unsuccessful. The transaction quotation information includes: the transaction quotation range and the transaction response time; The step of matching the candidate resource with the first transaction resource based on the transaction quotation information includes: If there is overlap in the price range of the first trading resource and the candidate resource, and the transaction response time of both the first trading resource and the candidate resource is not greater than the preset response time threshold, then the price matching between the first trading resource and the candidate resource is successful; otherwise, the price matching between the first trading resource and the candidate resource is unsuccessful.

[0037] In this embodiment, complementarity matching is used to verify whether the resource types of two resources are complementary, i.e., one is a power generation resource and the other is a load-side resource. Reputation matching is used to verify whether the reputation of the two resources reaches the required score threshold for matching; if both reach it, it proves that the two resources meet the credibility requirements. State matching is used to verify whether the remaining capacity of the resources meets the resource trading demand. This invention also sets a certain redundancy space, requiring the remaining capacity of the resources to be no less than the trading redundancy demand. Price matching is used to verify whether the quoted prices of the two resources meet the expectations of both parties, i.e., whether there is any overlap in their price ranges; it is also used to verify whether the transaction response time meets the response time limit requirements.

[0038] In one specific embodiment, the system incorporates smart contract templates adaptable to multiple scenarios, combining node reputation scores and real-time resource status to achieve efficient matching through automated algorithms. The following table shows the matching rule base:

[0039] In another embodiment, the formula for calculating the transaction redundancy requirement is: ; In the formula, It is usually set to 1.2.

[0040] S3. For each candidate resource, calculate the matching score between the candidate resource and the first transaction resource based on the reputation score, resource status, and transaction quotation information.

[0041] In a preferred embodiment, calculating the matching score between the candidate resource and the first transaction resource based on reputation score, resource status, and transaction quote information includes: Calculate the state fit degree based on the resource status of the candidate resources and the first transaction resources; The transaction price is determined based on the transaction price information of the candidate resources and the first transaction resource; Calculate price competitiveness based on the transaction price; The matching score is calculated based on the reputation score, status fit, and price competitiveness. The formula for calculating the matching score is as follows: ; In the formula, The weighting coefficients represent the credit score; Weighting coefficients representing state fit; The weighting coefficient represents the price competitiveness.

[0042] In this embodiment, a method for calculating the matching score is provided, wherein the matching score is a weighted sum of reputation score, state fit, and price competitiveness.

[0043] In a preferred embodiment, the calculation process of the state fit includes: When the resource type of the first traded resource is a power generation side resource, the remaining capacity of the resource is determined according to the resource status of the first traded resource, and the resource trading demand is determined according to the resource status of the candidate resources. When the resource type of the first transaction resource is a load-side resource, the resource transaction demand is determined based on the resource status of the first transaction resource, and the remaining resource capacity is determined based on the resource status of the candidate resources. Calculate the state adaptability based on the remaining resource capacity and the resource transaction demand. The formula for calculating the state fit is: ; In the formula, Indicates state fit; Indicates the remaining capacity of the resource; This indicates the demand for resource transactions.

[0044] In this embodiment, the state fit is determined based on the ratio of resource transaction demand to remaining resource capacity. The ratio is divided into three levels, with higher levels indicating higher fit. Within the middle level, a larger ratio indicates a higher fit.

[0045] In a preferred embodiment, calculating price competitiveness based on the transaction price includes: Calculate price competitiveness based on the transaction price and the preset average market price; The formula for calculating price competitiveness is as follows: .

[0046] In this embodiment, price competitiveness is calculated based on the average market price and the transaction price. The lower the transaction price, the higher the price competitiveness.

[0047] In a preferred embodiment, the calculation process of the reputation score includes: Historical transaction success rate for resource acquisition, data reporting latency, number of historical abnormal behaviors, continuous online duration, and command response success rate; Calculate the historical transaction success rate of the resource based on the historical transaction success rate. Based on the data reporting delay, calculate the data reporting timeliness index for resources; Calculate the node stability index of the resource based on the continuous online duration; Calculate the security compliance indicators of the resources based on the number of historical abnormal behaviors; The reputation score is calculated based on the historical transaction success indicators, data reporting timeliness indicators, security compliance indicators, node stability indicators, and instruction response success rate. The formula for calculating the historical transaction success indicator is as follows: ; In the formula, Indicators representing historical successful trades; Indicates the historical success rate of transactions; The formula for calculating the timeliness index of data reporting is as follows: ; In the formula, This indicates the timeliness of data reporting; This indicates a delay in data reporting; The formula for calculating the node stability index is as follows: ; In the formula, Indicates node stability metrics; Indicates continuous online time; Indicates the maximum continuous online time; The formula for calculating the security compliance indicators is as follows: ; In the formula, Indicates safety compliance indicators; Indicates the number of historical abnormal behaviors; The formula for calculating the credit score is as follows: ; In the formula, The weighting coefficients representing historical trading success metrics; This represents the weighting coefficient for the timeliness of data reporting; The weighting coefficients representing safety compliance indicators; The weighting coefficients represent the node stability index. The weighting coefficient represents the success rate of command response.

[0048] In this embodiment, a method for calculating the reputation score is provided. The reputation score is a weighted sum of historical transaction success indicators, data reporting timeliness indicators, security compliance indicators, node stability indicators, and instruction response success rate.

[0049] The specific scoring rules are as follows: In one embodiment, the present invention also provides a mechanism for adjusting node permissions in real time based on reputation scores to ensure network security. The specific process is as follows:

[0050] S4. Select the candidate resource with the highest matching score as the second transaction resource to be traded with the first transaction resource, and generate the corresponding transaction ID and transaction timestamp.

[0051] It should be noted that the transaction ID is a unique identifier for each transaction. The system assigns a unique transaction ID to each transaction when a transaction request is initiated. The transaction timestamp is the time when the transaction ID was generated.

[0052] S5. Obtain the first resource ID, first signature, and transaction volume of the first transaction resource, and obtain the second signature of the second transaction ID of the second transaction resource.

[0053] S6. Generate a trusted transaction certificate based on the transaction ID, transaction timestamp, first resource ID, second resource ID, first signature, second signature, and transaction volume, and write the trusted transaction certificate into the blockchain.

[0054] In one embodiment, the present invention further includes: confirming transaction requests through an on-chain consensus mechanism and automatically generating tamper-proof trusted credentials to ensure the immutability of transaction results and the security of fund transfers. Specific implementation details are as follows: 1. On-chain consensus mechanism confirms transaction requests: The system uses an improved consensus mechanism (such as PBFT, DPoS, or Raft) to perform distributed verification of transaction requests to ensure their legitimacy: after the transaction initiator submits a request, consensus nodes sequentially perform signature verification, permission verification, and double-spending detection. Once consensus is reached, the transaction is packaged into a block and appended to the blockchain. For example, high real-time scenarios (such as peak scheduling of small hydropower) use DPoS consensus, which elects proxy nodes through voting to quickly confirm transactions; while high-security scenarios (such as source-load interaction in industrial parks) rely on PBFT consensus, which ensures transaction consistency through multiple rounds of message passing, ultimately achieving high efficiency and immutability of transactions.

[0055] 2. Automatically generate tamper-proof trusted credentials: After the transaction is confirmed, the system automatically generates a trusted credential containing key information and writes it to the blockchain for storage.

[0056] Voucher contents: Certificate hash = Hash(Transaction ID + Transaction timestamp + First resource ID + Second resource ID + First signature + Second signature + Transaction volume).

[0057] In another embodiment, transaction compliance is ensured through multi-layered verification: 1. Identity and Access Verification: The blockchain node identity identifier (resource ID) is called to verify the legitimacy of the transaction initiator and to check whether it has the authority to participate in specific scenarios (such as small hydropower can only participate in peak transactions during peak hours).

[0058] 2. Data consistency verification: Verify real-time resource status data against transaction request parameters (such as whether the remaining energy storage capacity meets the transaction power requirements) to avoid over-generation or fraudulent transactions. For example, if an energy storage node declares a remaining capacity of 100kW, but the actual measured value is only 80kW, the system will refuse its participation in peak shaving transactions.

[0059] 3. Scenario-based compliance checks: The system verifies the rationality of transactions based on scenario rules. For example, in the interaction between energy sources and loads in a park, if an energy storage device actively charges instead of discharging during peak load periods, the system determines this as an anomaly and triggers an alarm.

[0060] Once a transaction is verified, the smart contract automatically generates tamper-proof, trustworthy credentials (such as transaction hashes and execution records) and triggers an on-chain settlement process to ensure that the transaction result is irreversible and traceable.

[0061] S7. Conduct a transaction between the first and second transaction resources.

[0062] In this embodiment, fund clearing is automatically executed based on smart contracts, supporting multiple settlement methods: ; On-chain settlement: Real-time transfer via virtual currency (such as points or stablecoins issued by the platform); Off-chain settlement: Connects with bank accounts or third-party payment systems, and triggers automatic payments by synchronizing on-chain data through oracles.

[0063] In another embodiment, the present invention also provides anomaly handling and security protection strategies, specifically including: 1. Abnormal behavior interception: Real-time monitoring of abnormal patterns in transaction requests (such as sudden power surges or frequent order cancellations) triggers smart contracts to automatically lock suspicious nodes and push them to regulatory nodes for review.

[0064] 2. Dispute Arbitration Mechanism: It supports multi-party signature verification (such as the two parties to the transaction plus the platform administrator) for on-chain arbitration of disputed transactions, ensuring the transparency and authority of dispute resolution.

[0065] 3. Dynamic blacklist management: Nodes that commit multiple violations will be permanently removed from the network to reduce systemic risks.

[0066] It should be noted that this invention provides a blockchain-based distributed and decentralized resource trusted transaction management system, which realizes trusted binding of resource identities, dynamic consensus among nodes, automatic matching and verification of the transaction process, and on-chain settlement and tamper-proof evidence storage throughout the entire process. The system effectively solves the problems of trust deficiency, high centralization risk, and slow transaction response in traditional distributed resource transactions, improves the transparency, accuracy, and real-time performance of resource access and transactions, significantly enhances the rapid response capability and market participation of decentralized resources to electricity market demands, and promotes the development of the power system towards decentralization and intelligence. It has good technological application prospects and practical value.

[0067] Based on the above-described method embodiments, another embodiment of the present invention provides a terminal device, which includes 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 blockchain-based trusted transaction management method for power grid resources according to any embodiment of the present invention.

[0068] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.

[0069] 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.

[0070] 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.

[0071] Based on the above-described method embodiments, another embodiment of the present invention provides a 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 blockchain-based trusted transaction management method for power grid resources as described in any of the above-described method embodiments of the present invention.

[0072] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in 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 the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0073] 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 blockchain-based trusted transaction management method for power grid resources, characterized in that, include: The system retrieves information on resource types, reputation scores, resource status, and transaction quotes for all resources in the blockchain. Resource types include power generation resources and load-side resources. The reputation score is calculated based on historical transaction success metrics, data reporting timeliness metrics, response command success rate, node stability metrics, and security compliance metrics. The resource status describes the remaining capacity available for trading or the demand in a transaction. Based on the resource type, reputation score, resource status, and transaction quote information, the first transaction resource that issued the transaction request is matched with the remaining resources in the blockchain to filter out all candidate resources; For each candidate resource, a matching score between the candidate resource and the first transaction resource is calculated based on the reputation score, resource status, and transaction quotation information. The candidate resource with the highest matching score is selected as the second transaction resource to be traded with the first transaction resource, and a corresponding transaction ID and transaction timestamp are generated. Obtain the first resource ID, first signature, and transaction volume of the first transaction resource; obtain the second signature of the second transaction ID of the second transaction resource. Based on the transaction ID, transaction timestamp, first resource ID, second resource ID, first signature, second signature, and transaction volume, a trusted transaction certificate is generated and written into the blockchain; Conduct transactions between the first and second trading resources.

2. The blockchain-based trusted transaction management method for power grid resources as described in claim 1, characterized in that, Also includes: Obtain the digital signature, resource device identification information, public key, resource type, resource status, transaction quotation information, and reputation score of the resource to be registered; Determine whether the reputation score of the resource to be registered is not less than the preset reputation score threshold; if not, refuse the registration of the resource to be registered. If so, the validity of the digital signature is verified using the public key. If the validity verification of the digital signature passes, a resource ID for the resource to be registered is generated based on the resource device identification information, the public key, and the current timestamp. A new block is generated in the blockchain based on the resource ID, resource type, resource status, and transaction quotation information to complete the registration of the resource to be registered. If the validity verification of the digital signature fails, the registration of the resource to be registered is rejected.

3. The blockchain-based trusted transaction management method for power grid resources as described in claim 1, characterized in that, The first transaction resource that issued the transaction request is matched with the remaining resources in the blockchain based on the resource type, reputation score, resource status, and transaction price information to filter out all candidate resources, including: For each candidate resource in the blockchain other than the first transaction resource, the candidate resource and the first transaction resource are matched for complementarity based on resource type, and matched for reputation based on reputation score; after the complementarity matching is successful, the candidate resource and the first transaction resource are matched for status based on resource status, and matched for price based on transaction price information; If the complementarity matching, reputation matching, status matching, and price matching are all successful, the candidate resource will be selected as the shortlisted resource.

4. The blockchain-based trusted transaction management method for power grid resources as described in claim 3, characterized in that, The step of performing complementary matching between the candidate resources and the first transaction resources based on resource type includes: If the resource type of the first transaction resource is consistent with the resource type of the candidate resource, the complementarity match between the first transaction resource and the candidate resource is determined to be unsuccessful; otherwise, the complementarity match between the first transaction resource and the candidate resource is determined to be successful. The step of matching the candidate resources with the first transaction resources based on their reputation scores includes: If the reputation score of the candidate resource is not less than the preset matching reputation score threshold, the reputation matching between the first transaction resource and the candidate resource is successful; otherwise, the reputation matching between the first transaction resource and the candidate resource is unsuccessful. The step of matching the candidate resources with the first transaction resources based on their resource status includes: When the resource type of the first traded resource is a power generation side resource, the remaining capacity of the resource is determined according to the resource status of the first traded resource, and the resource trading demand is determined according to the resource status of the candidate resources. When the resource type of the first transaction resource is a load-side resource, the resource transaction demand is determined based on the resource status of the first transaction resource, and the remaining resource capacity is determined based on the resource status of the candidate resources. Calculate the transaction redundancy requirement based on the resource transaction demand. If the remaining capacity of the resource is not less than the transaction redundancy requirement, then the status matching between the first transaction resource and the candidate resource is successful; otherwise, the status matching between the first transaction resource and the candidate resource is unsuccessful. The transaction quotation information includes: the transaction quotation range and the transaction response time; The step of matching the candidate resource with the first transaction resource based on the transaction quotation information includes: If there is overlap in the price range of the first trading resource and the candidate resource, and the transaction response time of both the first trading resource and the candidate resource is not greater than the preset response time threshold, then the price matching between the first trading resource and the candidate resource is successful; otherwise, the price matching between the first trading resource and the candidate resource is unsuccessful.

5. The blockchain-based trusted transaction management method for power grid resources as described in claim 1, characterized in that, The step of calculating the matching score between the candidate resource and the first transaction resource based on reputation score, resource status, and transaction price information includes: Calculate the state fit degree based on the resource status of the candidate resources and the first transaction resources; The transaction price is determined based on the transaction price information of the candidate resources and the first transaction resource; Calculate price competitiveness based on the transaction price; The matching score is calculated based on the reputation score, status fit, and price competitiveness. The formula for calculating the matching score is as follows: ; In the formula, The weighting coefficients represent the credit score; Weighting coefficients representing state fit; The weighting coefficient represents the price competitiveness.

6. The blockchain-based trusted transaction management method for power grid resources as described in claim 5, characterized in that, The calculation process of the state fit includes: When the resource type of the first traded resource is a power generation side resource, the remaining capacity of the resource is determined according to the resource status of the first traded resource, and the resource trading demand is determined according to the resource status of the candidate resources. When the resource type of the first transaction resource is a load-side resource, the resource transaction demand is determined based on the resource status of the first transaction resource, and the remaining resource capacity is determined based on the resource status of the candidate resources. Calculate the state adaptability based on the remaining resource capacity and the resource transaction demand. The formula for calculating the state fit is: ; In the formula, Indicates state fit; Indicates the remaining capacity of the resource; This indicates the demand for resource transactions.

7. The blockchain-based trusted transaction management method for power grid resources as described in claim 5, characterized in that, The step of calculating price competitiveness based on the transaction price includes: Calculate price competitiveness based on the transaction price and the preset average market price; The formula for calculating price competitiveness is as follows: 。 8. The blockchain-based trusted transaction management method for power grid resources as described in claim 1, characterized in that, The calculation process for the credit score includes: Historical transaction success rate for resource acquisition, data reporting latency, number of historical abnormal behaviors, continuous online duration, and command response success rate; Calculate the historical transaction success rate of the resource based on the historical transaction success rate. Based on the data reporting delay, calculate the data reporting timeliness index for resources; Calculate the node stability index of the resource based on the continuous online duration; Calculate the security compliance indicators of the resources based on the number of historical abnormal behaviors; The reputation score is calculated based on the historical transaction success indicators, data reporting timeliness indicators, security compliance indicators, node stability indicators, and instruction response success rate. The formula for calculating the historical transaction success indicator is as follows: ; In the formula, Indicators representing historical successful trades; Indicates the historical success rate of transactions; The formula for calculating the timeliness index of data reporting is as follows: ; In the formula, This indicates the timeliness of data reporting; This indicates a delay in data reporting; The formula for calculating the node stability index is as follows: ; In the formula, Indicates node stability metrics; Indicates continuous online time; Indicates the maximum continuous online time; The formula for calculating the security compliance indicators is as follows: ; In the formula, Indicates safety compliance indicators; Indicates the number of historical abnormal behaviors; The formula for calculating the credit score is as follows: ; In the formula, The weighting coefficients representing historical trading success metrics; This represents the weighting coefficient for the timeliness of data reporting; The weighting coefficients representing safety compliance indicators; The weighting coefficients represent the node stability index. The weighting coefficient represents the success rate of command response.

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. When the processor executes the computer program, it implements the blockchain-based trusted transaction management method for power grid resources as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, include: A stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the blockchain-based trusted transaction management method for power grid resources as described in any one of claims 1-8.