Power transaction method and system based on smart contract

Through smart contracts and blockchain technology, transaction complexity, inefficiency and security problems in the power trading system are solved, optimized allocation of power resources and transparency and credibility of transaction data are achieved, and diversified market entities are met. need.

CN119205328APending Publication Date: 2024-12-27ANHUI ELECTRIC POWER TRADING CENT CO LTD +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411184728.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing power trading system relies on centralized institutions for transaction confirmation and settlement, resulting in complex transactions, inefficient, high cost, and information asymmetry, data management and security problems, making it difficult to meet the needs of diversified market entities.

Method used

Using smart contract technology, through power transaction auction contracts, evidence storage contracts and traceability contracts, it realizes identity verification, dynamic bidding, transaction settlement, qualification review, data encryption and transaction traceability, and uses blockchain technology to record and verify transaction data to reduce intermediaries. Institutional, improve transaction transparency and security.

Benefits of technology

It improves the transparency, fairness and security of power transactions, reduces transaction costs, enhances market adaptability and trust, and realizes the optimized allocation of power resources and the credibility and immutability of transaction data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205328A_ABST
    Figure CN119205328A_ABST
Patent Text Reader

Abstract

The invention provides a power transaction method and system based on a smart contract, and the method comprises the steps: 1, constructing a power transaction auction contract, carrying out the identity verification of each participant, carrying out the electric quantity bidding through a dynamic bidding mechanism, allowing all parties to adjust the quotation according to the real-time market demands and supply and demand changes, and achieving the optimal configuration of power resources, the settlement process of the transaction is executed through the smart contract; step 2, constructing a power transaction evidence storage contract, performing qualification verification on all subjects participating in the transaction, encrypting transaction data by using an encryption algorithm, and allowing transaction parties and a supervision mechanism to query and verify transaction records in real time; and step 3, constructing a power transaction traceability contract, recording detailed information of each power transaction through an intelligent contract, allowing a user and a supervision mechanism to query different types of transaction data in real time, and performing traceability management on the whole power transaction process. According to the invention, the efficiency, security and credibility of power transaction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of distributed power trading, and in particular to a power trading method and system based on smart contracts. Background Art

[0002] With the transformation of the global energy structure and the continuous reform of the power market, distributed power trading has gradually become an important direction for the development of the power market. In recent years, with the popularization of renewable energy and the rapid development of energy Internet, the traditional power trading system is facing huge challenges and changes. Blockchain technology, as a decentralized, transparent and tamper-proof technology, is gradually being applied to the power market to solve many problems in the existing system and meet new needs.

[0003] At present, the participants in the power market are becoming increasingly diversified, including traditional power companies, distributed energy suppliers, users, third-party service providers, etc. The participation of these emerging market players has changed the pattern of traditional power trading and formed a more complex market structure. The widespread application of distributed energy has caused power production to shift from centralized to decentralized. Various small power generation equipment such as solar panels and wind turbines have emerged. These equipment can not only be self-sufficient, but also sell excess electricity to the power grid. In addition, the popularity of electric vehicles and the development of energy storage technology have also increased the complexity and diversity of the power market. Blockchain technology is widely believed to be able to solve many problems in the power market due to its decentralized characteristics. At present, the application of blockchain technology in the power market is mainly concentrated in power P2P transactions, transaction information sharing and distributed energy management. These applications attempt to use blockchain technology to improve transaction transparency, reduce intermediaries and improve transaction efficiency, so as to better adapt to diversified market needs.

[0004] However, the existing power trading system relies on centralized institutions for transaction confirmation and settlement, resulting in a complex, inefficient and costly transaction process. The existing system requires multiple intermediaries to confirm, transmit and settle transaction data, which not only increases transaction costs but also reduces transaction efficiency. Due to the existence of intermediaries, the transparency and credibility of transactions are also questioned. Transaction data needs to be transmitted and verified multiple times, which is prone to errors and delays, affecting the timeliness and accuracy of transactions. In addition, the information asymmetry problem between the two parties to the transaction is serious, affecting the fairness and efficiency of the market. There are also many challenges in the management and sharing of transaction data. It is difficult for traditional systems to achieve efficient data sharing and transparent management. Information transmission and data sharing in the power market rely on centralized institutions, which usually have data islands, making it difficult to achieve cross-system and cross-regional data sharing, affecting the overall efficiency and transparency of the market. The lack of effective trust and coordination mechanisms between emerging market entities such as distributed energy suppliers and users has affected the credibility and stability of transactions. Traditional systems are difficult to meet the needs of these diversified entities and lack flexibility and adaptability. Power trading involves a large amount of sensitive data. Traditional systems have large loopholes in data security and privacy protection, and are vulnerable to attacks and data leaks, threatening the security of transactions and the privacy of participants. With the continuous escalation of network attack methods, the security threats faced by traditional power trading systems are becoming increasingly severe, and new technical means are urgently needed to improve data security and privacy protection. Summary of the invention

[0005] In view of the defects in the prior art, the object of the present invention is to provide an electricity trading method and system based on smart contracts.

[0006] The power trading method based on smart contract provided by the present invention includes:

[0007] Step 1: Build an electricity trading auction contract, authenticate the identity of each participant, adopt a dynamic bidding mechanism to bid for electricity, allow all parties to adjust their bids according to real-time market demand and supply and demand changes, achieve optimal allocation of power resources, and execute the settlement process of the transaction through smart contracts;

[0008] Step 2: Construct a power transaction evidence contract to verify the qualifications of all parties involved in the transaction, encrypt the transaction data using encryption algorithms, and allow all parties to the transaction and regulators to query and verify transaction records in real time;

[0009] Step 3: Construct a power transaction traceability contract to record detailed information of each power transaction through smart contracts, allowing users and regulators to query different types of transaction data in real time and conduct traceability management of the entire power transaction process.

[0010] Preferably, the step 1 comprises:

[0011] Step 1.1: Digital identity authentication;

[0012] The blockchain technology verifies the identity information of each entity involved in the power transaction. For distributed energy suppliers and smart grid operators, an encryption algorithm is used to generate a unique digital identity, and identity verification is performed before the transaction. The identity data of each participant is recorded on the blockchain; based on historical transaction records and behavioral performance, their identities are dynamically updated and managed; a multi-factor authentication mechanism is integrated, including passwords, digital signatures and biometrics, to ensure the security of power transactions and the privacy of participants;

[0013] Step 1.2: Power bidding;

[0014] A dynamic bidding mechanism involving multiple parties is implemented through smart contracts, allowing power producers and consumers to adjust their bids according to real-time market demand, thereby achieving optimal allocation of power resources. All bidding information is recorded on the chain through blockchain technology; bidding rules are dynamically adjusted according to market conditions and power supply and demand conditions, and participants can view market bidding information in real time and make the best bidding decision; historical bidding data analysis is carried out to obtain market trends and optimize bidding strategies;

[0015] Step 1.3: Transaction settlement;

[0016] Settlement rules are preset in smart contracts, and the settlement process of transactions, including power delivery and fund settlement, is automatically executed through smart contracts. An automatic reconciliation function is integrated to update and synchronize transaction data in real time, and the settlement data is protected by encryption algorithms. A fund custody and clearing mechanism is designed to record and manage fund flows through blockchain technology. During the settlement process, all fund flows and settlement records are encrypted and stored on the blockchain for anyone to verify and track.

[0017] Preferably, the step 2 comprises:

[0018] Step 2.1: Qualification review;

[0019] Through blockchain technology, all entities involved in power transactions are qualified and verified, including their qualifications, historical transaction records, and credit status; the qualification information of participants is automatically updated and managed; smart contracts are used to automate the qualification review process, and all qualification review results are recorded on the blockchain; participants can view and verify their qualification information at any time;

[0020] Step 2.2: Encryption and decryption;

[0021] Before uploading transaction data to the blockchain, the transaction data is encrypted using an encryption algorithm, and only authorized users can decrypt and access the data; a multi-level encryption and decryption mechanism is integrated, including symmetric encryption and asymmetric encryption, and participants decrypt data using private keys;

[0022] Step 2.3: Query verification;

[0023] Allow participants and regulators to query and verify transaction records in real time; provide a query interface to retrieve and verify data according to different needs; encrypt and store the operation records of each query and verification on the blockchain for anyone to independently verify.

[0024] Preferably, the step 3 comprises:

[0025] Step 3.1: Transaction information creation;

[0026] The smart contract automatically records the detailed information of each power transaction, including all aspects of production, transmission and consumption, and stores them in encrypted form on the blockchain; the transaction data is updated and synchronized in real time; participants can view the transaction information at any time and understand the entire process of power transactions;

[0027] Step 3.2: Information type query;

[0028] Allow users and regulators to conduct real-time queries based on different types of transaction data, provide multiple query interfaces, and allow users to flexibly select query conditions to obtain the required transaction information; record every step of the query process on the blockchain;

[0029] Step 3.3: Change data status;

[0030] Automatically manage and update the status of transaction data, including power delivery and fund settlement, through smart contracts. Smart contracts automatically update data status according to preset conditions; monitor and adjust the status of transaction data in real time, and encrypt and store all data status change records on the blockchain for anyone to verify;

[0031] Step 3.4: Product traceability;

[0032] The whole process of electricity trading can be traced back and managed through blockchain technology, and detailed information of each link from electricity production, transmission to consumption can be recorded and encrypted and stored on the blockchain.

[0033] It provides a variety of traceability query interfaces, allowing users to query the source and flow of electricity in real time according to different needs and understand the entire life cycle of electricity.

[0034] Preferably, a real-time monitoring and fault handling mechanism is implemented, time synchronization between nodes is achieved through the network time protocol, the operating status of the system is monitored in real time through the monitoring mechanism, the health status of the nodes is detected, and abnormal nodes are automatically handled through the fault recovery mechanism to ensure the stable operation of the transaction process and the security of the data.

[0035] The power trading system based on smart contracts provided by the present invention includes:

[0036] Module M1: Construct an electricity trading auction contract, authenticate each participant, use a dynamic bidding mechanism to bid for electricity, allow all parties to adjust their bids based on real-time market demand and supply and demand changes, achieve optimal allocation of electricity resources, and execute the settlement process of transactions through smart contracts;

[0037] Module M2: Construct an electricity transaction evidence contract, verify the qualifications of all parties involved in the transaction, encrypt the transaction data using encryption algorithms, and allow all parties to the transaction and regulatory agencies to query and verify transaction records in real time;

[0038] Module M3: Construct a power transaction traceability contract, record the detailed information of each power transaction through a smart contract, allow users and regulators to query different types of transaction data in real time, and conduct traceability management of the entire power transaction process.

[0039] Preferably, the module M1 comprises:

[0040] Module M1.1: Digital identity authentication;

[0041] The blockchain technology verifies the identity information of each entity involved in the power transaction. For distributed energy suppliers and smart grid operators, an encryption algorithm is used to generate a unique digital identity, and identity verification is performed before the transaction. The identity data of each participant is recorded on the blockchain; based on historical transaction records and behavioral performance, their identities are dynamically updated and managed; a multi-factor authentication mechanism is integrated, including passwords, digital signatures and biometrics, to ensure the security of power transactions and the privacy of participants;

[0042] Module M1.2: Power bidding;

[0043] A dynamic bidding mechanism involving multiple parties is implemented through smart contracts, allowing power producers and consumers to adjust their bids according to real-time market demand, thereby achieving optimal allocation of power resources. All bidding information is recorded on the chain through blockchain technology; bidding rules are dynamically adjusted according to market conditions and power supply and demand conditions, and participants can view market bidding information in real time and make the best bidding decision; historical bidding data analysis is carried out to obtain market trends and optimize bidding strategies;

[0044] Module M1.3: Transaction settlement;

[0045] Settlement rules are preset in smart contracts, and the settlement process of transactions, including power delivery and fund settlement, is automatically executed through smart contracts. An automatic reconciliation function is integrated to update and synchronize transaction data in real time, and the settlement data is protected by encryption algorithms. A fund custody and clearing mechanism is designed to record and manage fund flows through blockchain technology. During the settlement process, all fund flows and settlement records are encrypted and stored on the blockchain for anyone to verify and track.

[0046] Preferably, the module M2 comprises:

[0047] Module M2.1: Qualification review;

[0048] Through blockchain technology, all entities involved in power transactions are qualified and verified, including their qualifications, historical transaction records, and credit status; the qualification information of participants is automatically updated and managed; smart contracts are used to automate the qualification review process, and all qualification review results are recorded on the blockchain; participants can view and verify their qualification information at any time;

[0049] Module M2.2: encryption and decryption;

[0050] Before uploading transaction data to the blockchain, the transaction data is encrypted using an encryption algorithm, and only authorized users can decrypt and access the data; a multi-level encryption and decryption mechanism is integrated, including symmetric encryption and asymmetric encryption, and participants decrypt data using private keys;

[0051] Module M2.3: Query verification;

[0052] Allow participants and regulators to query and verify transaction records in real time; provide a query interface to retrieve and verify data according to different needs; encrypt and store the operation records of each query and verification on the blockchain for anyone to independently verify.

[0053] Preferably, the module M3 comprises:

[0054] Module M3.1: Transaction information creation;

[0055] The smart contract automatically records the detailed information of each power transaction, including all aspects of production, transmission and consumption, and stores them in encrypted form on the blockchain; the transaction data is updated and synchronized in real time; participants can view the transaction information at any time and understand the entire process of power transactions;

[0056] Module M3.2: Information type query;

[0057] Allow users and regulators to conduct real-time queries based on different types of transaction data, provide multiple query interfaces, and users can flexibly select query conditions to obtain the required transaction information; record each module M in the query process on the blockchain;

[0058] Module M3.3: Change data status;

[0059] Automatically manage and update the status of transaction data, including power delivery and fund settlement, through smart contracts. Smart contracts automatically update data status according to preset conditions; monitor and adjust the status of transaction data in real time, and encrypt and store all data status change records on the blockchain for anyone to verify;

[0060] Module M3.4: Product traceability;

[0061] The whole process of electricity trading can be traced back and managed through blockchain technology, and detailed information of each link from electricity production, transmission to consumption can be recorded and encrypted and stored on the blockchain.

[0062] It provides a variety of traceability query interfaces, allowing users to query the source and flow of electricity in real time according to different needs and understand the entire life cycle of electricity.

[0063] Preferably, a real-time monitoring and fault handling mechanism is implemented, time synchronization between nodes is achieved through the network time protocol, the operating status of the system is monitored in real time through the monitoring mechanism, the health status of the nodes is detected, and abnormal nodes are automatically handled through the fault recovery mechanism to ensure the stable operation of the transaction process and the security of the data.

[0064] Compared with the prior art, the present invention has the following beneficial effects:

[0065] (1) The present invention designs an electricity trading auction contract based on smart contracts. The electricity bidding is realized through smart contracts to ensure the transparency and fairness of the transaction, while taking carbon emissions into consideration to ensure the greenness of energy.

[0066] (2) The present invention designs a power transaction evidence contract, including qualification review, encryption and decryption, digital signature and query verification functions, to ensure the security and non-tamperability of transaction data;

[0067] (3) The present invention designs an electricity transaction traceability contract, which includes transaction information creation, information type query, data status query, data status change and commodity traceability functions, to achieve full traceability and ensure the transparency and credibility of transaction information and carbon emissions. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0069] Figure 1 This is a flow chart of the power trading method based on smart contracts of the present invention. DETAILED DESCRIPTION

[0070] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0071] Example 1

[0072] In view of the problems of low efficiency, insufficient trust and insufficient data security encountered by emerging market players in the process of participating in power trading, the present invention proposes a power trading method based on smart contracts, which includes three main smart contracts: power trading auction contract, power trading evidence contract and power trading traceability contract. First, by designing the power trading auction contract, efficient allocation of power resources is achieved. Secondly, the power trading evidence contract records and verifies the details of each transaction through blockchain technology to ensure the authenticity and integrity of the data. Finally, the power trading traceability contract realizes the traceability of the entire power trading process through the immutability of blockchain. Through the comprehensive application of these smart contracts, the power market can achieve a more efficient, more reliable and more secure trading environment, promote the active participation of emerging market players and the healthy development of the market.

[0073] like Figure 1 , the technical solution adopted by the present invention comprises the following steps:

[0074] 1) Design an auction contract for power trading. The design of the auction contract for power trading includes several key functional modules to improve the efficiency and transparency of power trading. First, the digital identity authentication function ensures that the identities of all participants are verified and confirmed through encryption technology. Each participant must be authenticated through the digital identity authentication module to ensure the security and reliability of the transaction. Secondly, the electricity bidding function adopts a dynamic bidding mechanism, allowing all parties to adjust their bids according to real-time market demand and changes in supply and demand to achieve optimal allocation of power resources. The bidding process is automatically managed by smart contracts, which reduces human intervention and improves the accuracy and efficiency of transactions. Finally, the transaction settlement function automatically executes the settlement process of transactions through smart contracts, including power delivery, fund settlement, etc., to ensure the timeliness of transactions and the immutability of data, and improve the transparency of the market and the trust of participants.

[0075] 2) Design of a power transaction evidence contract. The design of the power transaction evidence contract includes several important functional modules to ensure the authenticity and security of transaction data. First, the qualification review function verifies the qualifications of all entities participating in the transaction to ensure that only qualified users can participate in the transaction, thereby improving the fairness and legality of the transaction. Secondly, the encryption and decryption function uses advanced encryption algorithms to encrypt transaction data to prevent data from being tampered with or leaked during transmission and storage, while ensuring the integrity and security of the data. Finally, the query and verification function allows all parties to the transaction and regulators to query and verify transaction records in real time, ensuring the transparency and immutability of data through blockchain technology, thereby improving the transparency of the market and the credibility of data.

[0076] 3) Design a power transaction traceability contract. The power transaction traceability contract design integrates a number of key functions to ensure the traceability and data transparency of the entire power transaction process. First, the transaction information creation function automatically records the detailed information of each power transaction through smart contracts, including all aspects of production, transmission and consumption, to ensure the integrity and transparency of the data. Secondly, the information type query function allows users and regulators to query different types of transaction data in real time, providing a flexible query interface to meet various needs. The data status change function automatically manages and updates the status of transaction data through smart contracts to ensure the real-time and accuracy of the data. Finally, the commodity traceability function realizes the traceability management of the entire power transaction process. Participants can trace the production, transmission and consumption process of electricity through the blockchain system to ensure the transparency and credibility of the transaction.

[0077] 4) Implement real-time monitoring and fault handling mechanism. In order to ensure the system stability of emerging market players in the process of electricity trading, a real-time monitoring and fault handling module is designed. The time synchronization between nodes is achieved through the Network Time Protocol (NTP) to ensure the timeliness and consistency of transaction data. The monitoring mechanism monitors the operating status of the system in real time, detects the health status of the nodes, and automatically handles abnormal nodes through the fault recovery mechanism to ensure the stable operation of the transaction process and the security of the data.

[0078] The above step 1) designs the power trading auction contract. The specific steps are as follows:

[0079] a) Digital identity authentication function

[0080] First, the digital identity authentication function verifies the identity information of each entity involved in power transactions through blockchain technology. For new entities such as distributed energy suppliers and smart grid operators, the system uses encryption algorithms to generate unique digital identities and authenticates them before transactions. The identity data of each participant is recorded on the blockchain to ensure that it cannot be tampered with and is transparent, which improves the security of transactions and the trust of participants.

[0081] Secondly, the system requires all entities to be verified through the identity authentication module before trading, ensuring that only authenticated entities can participate in trading. For new entities, the system will dynamically update and manage their identities based on their historical trading records and behavioral performance, especially for green electricity consumption, such as carbon emissions. Identity authentication not only increases the credibility of electricity trading, but also prevents identity fraud and illegal transactions.

[0082] Finally, the system integrates multi-factor authentication mechanisms such as passwords, digital signatures, and biometrics to further enhance the security of digital identities. Through multi-level authentication, the system can effectively prevent identity information leakage and unauthorized access, ensuring the security of power transactions and the privacy of participants.

[0083] b) Electricity bidding function

[0084] First, the electricity bidding function implements a dynamic bidding mechanism involving multiple parties through smart contracts. The system allows electricity producers and consumers to adjust their bids based on real-time market demand, thereby achieving optimal allocation of power resources. All bidding information is recorded on the chain through blockchain technology to ensure the transparency of the bidding process and the immutability of data.

[0085] Secondly, the system has designed an automated bidding module that can dynamically adjust bidding rules according to market conditions and power supply and demand. Participants can view market bidding information in real time and make the best bidding decision. The bidding module automatically matches the needs of buyers and sellers through smart contracts, improving the efficiency and success rate of transactions and reducing intermediate links.

[0086] Finally, the system also integrates the bidding history data analysis function to help new entities understand market trends and bidding strategies. By analyzing historical bidding data, participants can optimize their bidding strategies and improve their bidding success rate and market competitiveness.

[0087] c) Transaction settlement function

[0088] First, the transaction settlement function automatically executes the settlement process of transactions through smart contracts, including power delivery, fund settlement, etc. Smart contracts preset detailed settlement rules to ensure automatic settlement after the transaction is completed, reducing human intervention and settlement errors, and improving the accuracy and timeliness of transactions.

[0089] Secondly, the system integrates automatic reconciliation function, updates and synchronizes transaction data in real time, and ensures the consistency and accuracy of accounts. Settlement data is protected by encryption algorithm to prevent data tampering and leakage, thus safeguarding the interests of transaction participants.

[0090] Finally, the system has designed a fund custody and clearing mechanism, which records and manages fund flows through blockchain technology to ensure the security and transparency of transaction funds. During the settlement process, all fund flows and settlement records are encrypted and stored on the blockchain, which can be verified and tracked by anyone, improving market transparency and the trust of participants.

[0091] The above step 2) designs the power transaction evidence contract. The specific steps are as follows:

[0092] a) Qualification review function

[0093] First, the qualification review function verifies the qualifications of all entities participating in power transactions through blockchain technology to ensure their legality and compliance. The system will check the qualifications, historical transaction records and credit status of the entity, and only entities that pass the review can participate in the transaction. The qualification review module automatically updates and manages the qualification information of participants to ensure the fairness and legality of the transaction.

[0094] Second, the system uses smart contracts to automate the qualification review process, reducing human intervention and review errors. All qualification review results are recorded on the blockchain to ensure the transparency of the review process and the immutability of the data. Participants can view and verify their qualification information at any time, which improves the transparency and trust of transactions.

[0095] b) Encryption and decryption functions

[0096] First, the encryption and decryption function encrypts transaction data through advanced encryption algorithms to ensure that the data is not tampered with or leaked during transmission and storage. All transaction data will be encrypted before being uploaded to the blockchain, and only authorized users can decrypt and access the data, ensuring data security and privacy protection.

[0097] Second, the system integrates a multi-level encryption and decryption mechanism, including symmetric encryption and asymmetric encryption, providing high-intensity data protection. Participants can decrypt data through private keys to ensure that only legitimate users can access and use transaction data. The encryption and decryption function not only improves data security, but also prevents unauthorized access and data leakage.

[0098] c) Query verification function

[0099] First, the query and verification function allows participants and regulators to query and verify transaction records in real time, ensuring the transparency and credibility of data. The system provides a flexible query interface that can perform data retrieval and verification according to different needs, ensuring the real-time and consistency of transaction information.

[0100] Secondly, the system uses blockchain technology to ensure that all query and verification operations are tamper-proof. Each query and verification operation record will be encrypted and stored on the blockchain, and anyone can independently verify it, which improves market transparency and the trust of participants.

[0101] The above step 3) designs the power transaction traceability contract. The specific steps are as follows:

[0102] a) Transaction information creation function

[0103] First, the transaction information creation function automatically records the detailed information of each electricity transaction through smart contracts, including all aspects of production, transmission and consumption. The contract automatically generates transaction information and encrypts and stores it on the blockchain to ensure data integrity and transparency.

[0104] Second, the system integrates an automated transaction information management module that can update and synchronize transaction data in real time to ensure the accuracy and timeliness of transaction information. Participants can view transaction information at any time and understand the entire process of power trading, which improves the transparency of transactions and the trust of participants.

[0105] b) Information type query function

[0106] First, the information type query function allows users and regulators to conduct real-time queries based on different types of transaction data. The system provides a variety of query interfaces, and users can flexibly select query conditions to obtain the required transaction information.

[0107] Second, the system uses blockchain technology to ensure the authenticity and immutability of all query results. Every step in the query process will be recorded on the blockchain to ensure data transparency and the credibility of query results.

[0108] c) Function of changing data status

[0109] First, the data status change function automatically manages and updates the status of transaction data through smart contracts, including power delivery, fund settlement, etc., but excluding completed carbon emissions. The contract automatically updates the data status according to preset conditions to ensure the real-time and consistency of the data.

[0110] Second, the system integrates an automated data status management module that can monitor and adjust the status of transaction data in real time to ensure the smooth progress of the transaction process. All data status change records will be encrypted and stored on the blockchain, and anyone can verify them, which improves the transparency and security of data management.

[0111] d) Product traceability function

[0112] First, the product traceability function uses blockchain technology to achieve traceability management of the entire power transaction process, recording detailed information from power production, transmission to consumption. The contract automatically generates traceability information and encrypts and stores it on the blockchain to ensure data transparency and traceability.

[0113] Second, the system provides a variety of traceability query interfaces, allowing users to query the source and flow of electricity in real time according to different needs, ensuring the traceability of the entire electricity transaction. Through the commodity traceability function, participants can understand the entire life cycle of electricity, ensure the transparency and credibility of transactions, and enhance market trust and confidence of participants.

[0114] As one of the core components of blockchain technology, smart contracts have significant advantages and help solve existing technical problems. Smart contracts can automatically execute pre-set rules and conditions, realize transaction automation, reduce human errors and delays, and improve transaction efficiency and accuracy. Through smart contracts, all aspects of power trading (such as quotation, matching, and settlement) can be fully automated to ensure the immediacy and reliability of transactions. All smart contract terms and execution processes are open and transparent, and anyone can view and verify the contract content to ensure the fairness of the transaction process. The execution process of smart contracts is recorded on the blockchain, and the data cannot be tampered with, ensuring the credibility and transparency of the transaction. The trust between the two parties to the transaction is based on the automatic execution of smart contracts and the transparent records of blockchain, which greatly reduces the problem of information asymmetry. Through decentralized smart contracts, power transactions do not need to rely on centralized intermediaries for confirmation and settlement, which greatly reduces the intermediate links and related costs. The two parties to the transaction can directly conduct peer-to-peer transactions, reducing transaction costs and improving economic benefits. Smart contracts use encryption algorithms to ensure the confidentiality and integrity of transaction data during transmission and storage. The immutability and distributed storage method of blockchain technology further guarantee data security and privacy protection. The sensitive data of participants is effectively protected, reducing the risk of data leakage and attack. Smart contracts combined with blockchain technology achieve efficient data sharing and transparent management. All transaction data is recorded on the blockchain, and any participant can view and verify it at any time to ensure the authenticity and integrity of the data. This efficient data management mechanism promotes market transparency and fairness.

[0115] By applying smart contract technology, the electricity market will be able to achieve more efficient, transparent and secure development. Smart contracts not only improve transaction efficiency and data transparency, but also establish an effective trust and coordination mechanism between emerging market players, meet the needs of diversified markets, and promote innovation and change in the electricity market.

[0116] Example 2

[0117] The present invention provides an electric power trading system based on smart contracts, comprising:

[0118] 1. Interaction between modules

[0119] The design and implementation of smart contracts include multiple modules that interact through clear interfaces and message passing. The main modules include the power trading auction contract module, the power trading evidence contract module, and the power trading traceability contract module. The interaction process between modules is as follows:

[0120] 1) Power trading auction contract module:

[0121] First, the electricity provider publishes the auction information on the trading platform, including electricity volume, electricity price, auction time, etc.

[0122] Secondly, bidders submit bidding information within the specified time and bid through smart contracts.

[0123] Finally, the smart contract determines the winner based on the bidding rules and notifies the auction results.

[0124] 2) Power transaction evidence contract module:

[0125] First, examine whether the participating nodes in the transaction system are qualified to sign digitally to ensure their legitimacy.

[0126] Secondly, the transaction data is encrypted during the transaction process to ensure the security and non-tamperability of the data.

[0127] Again, a hash value is generated based on the transaction data and electronically signed by the market entities involved in the transaction.

[0128] Finally, verify whether the transaction information has been signed and ensure that all users who need to sign have completed the signature.

[0129] 3) Power transaction traceability contract module:

[0130] First, create transaction information. The system generates a unique hash string ID value based on the transaction information to ensure that the information cannot be tampered with.

[0131] Secondly, query the information type. Query the hash address of the participating entity according to the transaction type to obtain relevant transaction information.

[0132] Again, check the transaction status to understand the progress of the transaction.

[0133] In addition, data status is manually changed according to transaction progress and query requirements to ensure the accuracy and timeliness of information.

[0134] Finally, to trace the product, the system queries the transaction information based on the transaction hash string or ID value to achieve full traceability.

[0135] 2. Contract compilation and deployment

[0136] The compilation and deployment of smart contracts rely on Remix, an online integrated development environment officially provided by Ethereum. Its main programming language is Solidity. The specific steps are as follows:

[0137] 1) Write smart contract code:

[0138] According to the electricity trading process and functional requirements, Solidity is used to write smart contract codes, including modules such as electricity trading auction contracts, electricity trading evidence contracts, and electricity trading traceability contracts.

[0139] 2) Compile the code in Remix:

[0140] First, import the code and import the Solidity code file into the Remix editor.

[0141] Second, compile the code, select the appropriate compiler version to compile the code, and generate the contract bytecode.

[0142] 3) Deploy the compiled contract to the Ethereum network,

[0143] First, select the network. Select the target network in Remix, which can be the Ethereum mainnet, testnet, or local network.

[0144] Secondly, deploy the contract. Fill in the necessary deployment parameters and deploy the contract.

[0145] Finally, generate the contract address. After deployment is completed, the system generates the contract address as the basis for subsequent transaction operations.

[0146] 3. Contract operation process

[0147] After the contract is deployed, you can perform trading operations through the smart contract interface. First, select the deployed smart contract and call the contract interface to perform trading operations. Second, fill in the transaction parameters, submit the transaction request, and the system executes the transaction operation. Finally, after the transaction is completed, the system returns the transaction results, including transaction status, transaction records and other information.

[0148] Those skilled in the art know that, in addition to implementing the system, device and its various modules provided by the present invention in a purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, the system, device and its various modules provided by the present invention can be considered as a hardware component, and the modules included therein for implementing various programs can also be considered as structures within the hardware component; the modules for implementing various functions can also be considered as both software programs for implementing the method and structures within the hardware component.

[0149] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A power trading method based on smart contracts, characterized in that: include: Step 1: Build an electricity trading auction contract, authenticate the identity of each participant, adopt a dynamic bidding mechanism to bid for electricity, allow all parties to adjust their bids according to real-time market demand and supply and demand changes, achieve optimal allocation of power resources, and execute the settlement process of the transaction through smart contracts; Step 2: Construct a power transaction evidence contract to verify the qualifications of all parties involved in the transaction, encrypt the transaction data using encryption algorithms, and allow all parties to the transaction and regulators to query and verify transaction records in real time; Step 3: Construct a power transaction traceability contract to record detailed information of each power transaction through smart contracts, allowing users and regulators to query different types of transaction data in real time and conduct traceability management of the entire power transaction process.

2. The power trading method based on smart contract according to claim 1 is characterized in that: The step 1 comprises: Step 1.1: Digital identity authentication; The blockchain technology verifies the identity information of each entity involved in the power transaction. For distributed energy suppliers and smart grid operators, an encryption algorithm is used to generate a unique digital identity, and identity verification is performed before the transaction. The identity data of each participant is recorded on the blockchain; based on historical transaction records and behavioral performance, their identities are dynamically updated and managed; a multi-factor authentication mechanism is integrated, including passwords, digital signatures and biometrics, to ensure the security of power transactions and the privacy of participants; Step 1.2: Power bidding; A dynamic bidding mechanism involving multiple parties is implemented through smart contracts, allowing power producers and consumers to adjust their bids according to real-time market demand, thereby achieving optimal allocation of power resources. All bidding information is recorded on the chain through blockchain technology; bidding rules are dynamically adjusted according to market conditions and power supply and demand conditions, and participants can view market bidding information in real time and make the best bidding decision; historical bidding data analysis is carried out to obtain market trends and optimize bidding strategies; Step 1.3: Transaction settlement; Settlement rules are preset in smart contracts, and the settlement process of transactions, including power delivery and fund settlement, is automatically executed through smart contracts. An automatic reconciliation function is integrated to update and synchronize transaction data in real time, and the settlement data is protected by encryption algorithms. A fund custody and clearing mechanism is designed to record and manage fund flows through blockchain technology. During the settlement process, all fund flows and settlement records are encrypted and stored on the blockchain for anyone to verify and track.

3. The power trading method based on smart contract according to claim 1 is characterized in that: The step 2 comprises: Step 2.1: Qualification review; Through blockchain technology, all entities involved in power transactions are qualified and verified, including their qualifications, historical transaction records, and credit status; the qualification information of participants is automatically updated and managed; smart contracts are used to automate the qualification review process, and all qualification review results are recorded on the blockchain; participants can view and verify their qualification information at any time; Step 2.2: Encryption and decryption; Before uploading transaction data to the blockchain, the transaction data is encrypted using an encryption algorithm, and only authorized users can decrypt and access the data; a multi-level encryption and decryption mechanism is integrated, including symmetric encryption and asymmetric encryption, and participants decrypt data using private keys; Step 2.3: Query verification; Allow participants and regulators to query and verify transaction records in real time; provide a query interface to retrieve and verify data according to different needs; encrypt and store the operation records of each query and verification on the blockchain for anyone to independently verify.

4. The power trading method based on smart contract according to claim 1, characterized in that: The step 3 comprises: Step 3.1: Transaction information creation; The smart contract automatically records the detailed information of each power transaction, including all aspects of production, transmission and consumption, and stores them in encrypted form on the blockchain; the transaction data is updated and synchronized in real time; participants can view the transaction information at any time and understand the entire process of power transactions; Step 3.2: Information type query; Allow users and regulators to conduct real-time queries based on different types of transaction data, provide multiple query interfaces, and allow users to flexibly select query conditions to obtain the required transaction information; record every step of the query process on the blockchain; Step 3.3: Change data status; Automatically manage and update the status of transaction data, including power delivery and fund settlement, through smart contracts. Smart contracts automatically update data status according to preset conditions; monitor and adjust the status of transaction data in real time, and encrypt and store all data status change records on the blockchain for anyone to verify; Step 3.4: Product traceability; The whole process of electricity trading can be traced back and managed through blockchain technology, and detailed information of each link from electricity production, transmission to consumption can be recorded and encrypted and stored on the blockchain. It provides a variety of traceability query interfaces, allowing users to query the source and flow of electricity in real time according to different needs and understand the entire life cycle of electricity.

5. The power trading method based on smart contract according to claim 1 is characterized in that: Implement real-time monitoring and fault handling mechanisms, achieve time synchronization between nodes through the network time protocol, monitor the system's operating status in real time through the monitoring mechanism, detect the health of the nodes, and automatically handle abnormal nodes through the fault recovery mechanism to ensure the stable operation of the transaction process and the security of the data.

6. A power trading system based on smart contracts, characterized in that: include: Module M1: Construct an electricity trading auction contract, authenticate each participant, use a dynamic bidding mechanism to bid for electricity, allow all parties to adjust their bids based on real-time market demand and supply and demand changes, achieve optimal allocation of electricity resources, and execute the settlement process of transactions through smart contracts; Module M2: Construct an electricity transaction evidence contract, verify the qualifications of all parties involved in the transaction, encrypt the transaction data using encryption algorithms, and allow all parties to the transaction and regulatory agencies to query and verify transaction records in real time; Module M3: Construct a power transaction traceability contract, record the detailed information of each power transaction through a smart contract, allow users and regulators to query different types of transaction data in real time, and conduct traceability management of the entire power transaction process.

7. The smart contract-based power trading system according to claim 6, characterized in that: The module M1 comprises: Module M1.1: Digital identity authentication; The blockchain technology verifies the identity information of each entity involved in the power transaction. For distributed energy suppliers and smart grid operators, an encryption algorithm is used to generate a unique digital identity, and identity verification is performed before the transaction. The identity data of each participant is recorded on the blockchain; based on historical transaction records and behavioral performance, their identities are dynamically updated and managed; a multi-factor authentication mechanism is integrated, including passwords, digital signatures and biometrics, to ensure the security of power transactions and the privacy of participants; Module M1.2: Power bidding; A dynamic bidding mechanism involving multiple parties is implemented through smart contracts, allowing power producers and consumers to adjust their bids according to real-time market demand, thereby achieving optimal allocation of power resources. All bidding information is recorded on the chain through blockchain technology; bidding rules are dynamically adjusted according to market conditions and power supply and demand conditions, and participants can view market bidding information in real time and make the best bidding decision; historical bidding data analysis is carried out to obtain market trends and optimize bidding strategies; Module M1.3: Transaction settlement; Settlement rules are preset in smart contracts, and the settlement process of transactions, including power delivery and fund settlement, is automatically executed through smart contracts. An automatic reconciliation function is integrated to update and synchronize transaction data in real time, and the settlement data is protected by encryption algorithms. A fund custody and clearing mechanism is designed to record and manage fund flows through blockchain technology. During the settlement process, all fund flows and settlement records are encrypted and stored on the blockchain for anyone to verify and track.

8. The smart contract-based power trading system according to claim 6, characterized in that: The module M2 comprises: Module M2.1: Qualification review; Through blockchain technology, all entities involved in power transactions are qualified and verified, including their qualifications, historical transaction records, and credit status; the qualification information of participants is automatically updated and managed; smart contracts are used to automate the qualification review process, and all qualification review results are recorded on the blockchain; participants can view and verify their qualification information at any time; Module M2.2: encryption and decryption; Before uploading transaction data to the blockchain, the transaction data is encrypted using an encryption algorithm, and only authorized users can decrypt and access the data; a multi-level encryption and decryption mechanism is integrated, including symmetric encryption and asymmetric encryption, and participants decrypt data using private keys; Module M2.3: Query verification; Allow participants and regulators to query and verify transaction records in real time; provide a query interface to retrieve and verify data according to different needs; encrypt and store the operation records of each query and verification on the blockchain for anyone to independently verify.

9. The smart contract-based power trading system according to claim 6, characterized in that: The module M3 comprises: Module M3.1: Transaction information creation; The smart contract automatically records the detailed information of each power transaction, including all aspects of production, transmission and consumption, and stores them in encrypted form on the blockchain; the transaction data is updated and synchronized in real time; participants can view the transaction information at any time and understand the entire process of power transactions; Module M3.2: Information type query; Allow users and regulators to conduct real-time queries based on different types of transaction data, provide multiple query interfaces, and users can flexibly select query conditions to obtain the required transaction information; record each module M in the query process on the blockchain; Module M3.3: Change data status; Automatically manage and update the status of transaction data, including power delivery and fund settlement, through smart contracts. Smart contracts automatically update data status according to preset conditions; monitor and adjust the status of transaction data in real time, and encrypt and store all data status change records on the blockchain for anyone to verify; Module M3.4: Product traceability; The whole process of electricity trading can be traced back and managed through blockchain technology, and detailed information of each link from electricity production, transmission to consumption can be recorded and encrypted and stored on the blockchain. It provides a variety of traceability query interfaces, allowing users to query the source and flow of electricity in real time according to different needs and understand the entire life cycle of electricity.

10. The smart contract-based power trading system according to claim 6, characterized in that: Implement real-time monitoring and fault handling mechanisms, achieve time synchronization between nodes through the network time protocol, monitor the system's operating status in real time through the monitoring mechanism, detect the health of the nodes, and automatically handle abnormal nodes through the fault recovery mechanism to ensure the stable operation of the transaction process and the security of the data.

Citation Information

Cited By

  • Multi-source electricity market transaction and settlement management system and method based on artificial intelligence

    CN121304341A

  • An artificial intelligence-based multi-source power market transaction and settlement management system and method

    CN121304341B