A power transaction method based on blockchain technology

By optimizing the power trading system using blockchain technology, the problem of data transmission delay in smart meters has been solved, enabling real-time and reliable power trading, improving system security and resource circulation flexibility, and supporting efficient power trading.

CN121213079BActive Publication Date: 2026-04-07SHENZHEN YIXUAN IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

The existing power trading system does not fully consider the physical distribution characteristics of smart meters, resulting in network congestion and data transmission delays. It cannot effectively avoid the risk of uploading during periods of high overlap, and traditional adjustment schemes cannot cope with extreme scenarios, which may cause new time overlaps and further exacerbate congestion.

Method used

A blockchain-based electricity trading method is adopted, which optimizes settlement delays by managing user identity and permissions, matching and arranging transactions, optimizing smart contracts and data transmission, and using neural network models to predict latency factors.

Benefits of technology

It enables timely uploading of smart meter data, reduces transmission failure rate, ensures the real-time and reliability of power transactions, enhances system security and anti-attack capabilities, supports cross-regional power resource circulation, and promotes efficient market-based power transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121213079B_ABST
    Figure CN121213079B_ABST
Patent Text Reader

Abstract

This invention specifically relates to a blockchain-based electricity trading method, encompassing the application of blockchain in the field of electricity trading technology, including: user identity and permission management; transaction matching and consolidation; smart contracts; and data transmission optimization. In this invention, a delay factor model is constructed based on spatial domain analysis, multi-dimensional risk quantification, and dynamic strategy adjustment to accurately address the data upload delay problem of smart meters. By focusing on physically adjacent meter groups through circular domains, and combining overlap and collision measurements to quantify congestion and failure risks, a neural network is used to predict delay evaluation coefficients, achieving precise optimization of upload time. This mechanism effectively disperses upload pressure during periods of high overlap, reduces data transmission failure rates, ensures timely on-chain uploading of electricity trading data, and avoids problems such as settlement delays and contract execution interruptions caused by data latency. This significantly improves the real-time performance and reliability of blockchain electricity trading, providing users with an efficient and stable trading experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of blockchain technology in electricity trading, and more particularly to an electricity trading method based on blockchain technology. Background Technology

[0002] In blockchain-based electricity trading scenarios, smart meters, as key data acquisition devices, are crucial for efficient transaction settlement and contract execution due to the timeliness of their data uploads. However, existing technologies have numerous shortcomings, making it difficult to meet the high-efficiency requirements of electricity trading:

[0003] Existing power trading systems do not fully consider the physical distribution characteristics of smart meters. Meters in the same area often share communication gateways or base stations, and the simultaneous uploading of data by a large number of meters can easily cause network congestion and transmission delays. Traditional fixed-period upload schemes are not optimized for the risk of concentrated uploads by geographically adjacent meter clusters and cannot effectively avoid congestion problems. At the same time, the assessment of data upload delay relies on a single indicator, such as only counting the number of devices uploading at the same time. This does not relate to the system's carrying capacity, cannot determine whether overlap exceeds the limit, does not analyze the actual failure risk during high overlap periods in conjunction with the transmission failure rate, and lacks deep learning of historical data, making it difficult to accurately predict the nonlinear relationship between overlap, failure rate, and actual delay.

[0004] To address the latency issue, existing solutions often rely on experience-based adjustments, such as fixed extensions of the upload cycle, which have significant shortcomings. On one hand, the fixed adjustment range cannot cope with extreme congestion scenarios and is prone to under- or over-adjustment; on the other hand, the adjustment direction is singular, with all meters adjusting in the same direction, which may cause new time overlaps and further exacerbate congestion.

[0005] Therefore, a blockchain-based electricity trading method is needed to address the aforementioned problems. Summary of the Invention

[0006] The purpose of this invention is to propose a power trading method based on blockchain technology in order to solve the above-mentioned problems.

[0007] To achieve the above objectives, the present invention adopts the following technical solution:

[0008] A method for electricity trading based on blockchain technology includes:

[0009] User identity and access control: Generate and authenticate user identities, and assign corresponding permissions based on user roles;

[0010] Transaction matching and matching: The submission and synchronization of transaction requests, the execution of transaction matching based on preset sorting and matching rules, and the storage of transaction information on the blockchain;

[0011] Smart contract: responsible for the creation, deployment, transaction execution and verification of smart contract, with default processing mechanism and integration with Internet of Things devices;

[0012] Data transmission optimization: based on the historical data transmission of smart meters, the corresponding delay factor is analyzed to predict the data upload delay of smart meters, so that the data transmission time of smart meters changes dynamically to optimize the settlement delay.

[0013] Preferably, the user identity and permission management specifically includes:

[0014] User identity generation and authentication adopts distributed cryptography technology, and multiple nodes cooperate to generate identity keys; user identity information is stored in cloud blockchain, supporting multiple authentication methods;

[0015] In the authentication process, multi-node identity verification is carried out based on smart contract, and distributed identity verification results are obtained through common verification of multiple nodes;

[0016] According to the different roles of users in the power trading system, the corresponding operation permissions are allocated.

[0017] Preferably, the transaction matching and matching specifically includes:

[0018] In the blockchain power trading ecosystem, each party relies on their respective blockchain accounts to log in to the corresponding node to submit transaction requests; pre-set matching rules, which mainly include sorting rules and matching rules;

[0019] The sorting rule focuses on the key parameters in the transaction request, such as price and power; when processing the sale request, the system defaults to sorting by price from high to low, which can preferentially display high-priced sale information, making it convenient for consumers to compare and select; for purchase requests, sort by price from low to high, which is convenient for producers to quickly lock in potential buyers with reasonable prices;

[0020] The matching rule is based on the sorting result, focusing on matching the buy and sell requests with similar prices and power.

[0021] Preferably, the smart contract specifically includes:

[0022] Before the formal start of power trading, the smart contract code is jointly formulated by all parties involved in the transaction according to the established trading rules and complex business requirements;

[0023] After the smart contract code is written, it is deployed on the blockchain network and becomes the core basis for subsequent transaction execution;

[0024] Once the transaction is successfully matched, the smart contract automatically triggers the execution process;

[0025] The smart contract has comprehensive and explicit default penalty clauses to deal with possible transaction risks;

[0026] The smart contract module is closely connected with the smart meter and other Internet of Things devices, realizing efficient interaction and deep application of real-time data.

[0027] Preferably, the data transmission optimization specifically includes:

[0028] The smart meter that needs to upload data is taken as the target smart meter, and a circle is drawn with the target smart meter as the center and a preset size as the radius, obtaining a circular field;

[0029] The number of all smart meters in the circular field, the data upload period of each smart meter, and the number of coincidences of the time points corresponding to the upload period of each smart meter within 24 hours are obtained, and the maximum number of coincidences of the time points corresponding to the upload period is extracted as the coincidence extreme value;

[0030] After presetting the maximum allowed value of the coincidence extreme value, the coincidence extreme value is divided by the maximum allowed value of the coincidence extreme value to obtain the coincidence degree;

[0031] When the time point corresponding to the coincidence extreme value is obtained, the number of data transmission failures of each smart meter is obtained, and the number of smart meter data transmission failures is divided by the number of smart meters corresponding to the coincidence extreme value to obtain the collision degree.

[0032] Preferably, the method further includes:

[0033] After the coincidence degree and the collision degree are normalized, the coincidence degree and the collision degree are respectively taken as input layer indicators and input into a neural network model, and a delay evaluation coefficient is output through a fully connected layer of the neural network model;

[0034] A maximum allowed delay evaluation coefficient is preset, and the delay evaluation coefficient is divided by the maximum allowed delay evaluation coefficient to obtain a delay factor.

[0035] Preferably, the method further includes:

[0036] After the coincidence degree, the collision degree, the delay evaluation coefficient, and the delay factor are respectively marked as k, v, u, and h, they are substituted into a function relationship:

[0037] ;

[0038] Wherein,

[0039] is a proportional coefficient;

[0040] is a comprehensive basic risk;

[0041] When h>1, the adjustment amount is further amplified by 1+(h-1); when h≤1, this part is 1, and only the basic adjustment is retained.

[0042] Passed again:

[0043] ;

[0044] Get the adjusted time point ;

[0045] in, This is the original time point; For direction coefficients, ;

[0046] in A random number between 0 and 1;

[0047] For small perturbations (such as ±1), ensure that the adjustment direction is randomly distributed.

[0048] Preferably, the data storage and management specifically includes:

[0049] By leveraging the distributed ledger characteristics of blockchain, massive amounts of data related to electricity trading are comprehensively and meticulously distributed and stored across numerous nodes in the blockchain network.

[0050] Encryption technology is used to ensure data security and user privacy.

[0051] At the same time, by leveraging cutting-edge technologies such as zero-knowledge proofs and homomorphic encryption, data verification and analysis can be achieved without disclosing sensitive user information;

[0052] It combines data uploaded in real time from edge computing nodes for fast, efficient processing and in-depth analysis.

[0053] Preferably, the consensus mechanism and network specifically include:

[0054] Based on the characteristics of electricity trading and actual needs, a suitable consensus algorithm is selected;

[0055] Implement refined classification and management of nodes in the blockchain network, mainly including master nodes, consensus nodes, and supervisory nodes;

[0056] The master node collects transaction data from various nodes in the network and packages this data according to certain rules to generate new blocks;

[0057] Consensus nodes focus on rigorously verifying the blocks generated by the master node, using multiple verification methods to ensure the authenticity and legitimacy of the block data.

[0058] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:

[0059] 1. This invention precisely addresses the data upload delay problem of smart meters by constructing a delay factor model that incorporates spatial domain analysis, multi-dimensional risk quantification, and dynamic strategy adjustment. It focuses on physically adjacent meter clusters within a circular domain, quantifies congestion and failure risks by combining overlap and collision metrics, and utilizes neural networks to predict delay evaluation coefficients, achieving precise optimization of upload time. This mechanism effectively distributes upload pressure during periods of high overlap, reduces data transmission failure rates, ensures timely on-chain uploading of electricity trading data, and avoids settlement delays and contract execution interruptions caused by data latency. This significantly improves the real-time performance and reliability of blockchain electricity trading, providing users with an efficient and stable trading experience.

[0060] 2. This invention safeguards user identity security through distributed cryptography and multi-factor authentication, while preventing unauthorized operations through dynamic permission management and real-time behavior monitoring. It employs distributed storage and multiple encryption technologies to protect data privacy, and maintains blockchain network stability through node classification management and a supervision mechanism. The cross-chain interoperability function, leveraging main-side chain anchoring and hash time-locked contracts, breaks down blockchain information silos and supports multi-regional power trading. These designs not only enhance system security and anti-attack capabilities but also increase the flexibility of cross-regional power resource circulation, helping to build an efficient and market-oriented power trading ecosystem and promoting the optimal allocation and sustainable utilization of power resources. Attached Figure Description

[0061] Further details, features, and advantages of this application are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0062] Figure 1 This is a structural diagram of the method of the present invention. Detailed Implementation

[0063] Several embodiments of this application will now be described in more detail with reference to the accompanying drawings to enable those skilled in the art to implement this application. This application may be embodied in many different forms and for various purposes and should not be limited to the embodiments set forth herein. These embodiments are provided to make this application thorough and complete, and to fully convey the scope of this application to those skilled in the art. The embodiments described do not limit this application.

[0064] Unless otherwise defined, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It will be further understood that terms such as those defined in commonly used dictionaries shall be interpreted as having a meaning consistent with their meaning in the relevant field and / or the context of this specification, and shall not be interpreted in an idealized or overly formal sense unless expressly defined herein.

[0065] Example 1

[0066] Its specific implementation method is combined with the appendix Figure 1 Please provide a detailed explanation.

[0067] Appendix Figure 1 The flowchart of a power trading method based on blockchain technology provided in this embodiment of the invention illustrates the complete steps from user identity and permission management to consensus mechanism and network.

[0068] In this embodiment, it includes:

[0069] User identity and access control: User identities are generated and authenticated through distributed cryptography technology, and corresponding permissions are assigned according to user roles. It has dynamic identity management and real-time identity monitoring functions to ensure system security and compliance.

[0070] Specifically, it includes:

[0071] User identity generation and authentication employ distributed cryptography technology, with multiple nodes collaboratively generating identity keys. User identity information, such as public keys and digital certificates, is stored on a cloud blockchain, greatly enhancing information security and reliability. To ensure the rigor of identity verification, the system supports multiple authentication methods, including not only conventional password authentication but also biometrics such as fingerprint recognition and facial recognition, as well as device binding authentication, which ensures the legitimacy of the login device by binding the user account to a specific device.

[0072] In the authentication process, CEP multi-node identity verification is carried out based on smart contracts to verify the current user's identity, the user's identity information stored on the blockchain, and the corresponding identity key. After joint verification by multiple nodes, a distributed identity verification result is obtained, which effectively prevents identity forgery and illegal login.

[0073] Based on the different roles users play in the power trading system, such as producers, consumers, grid operators, and regulatory agencies, the system accurately assigns corresponding operating permissions.

[0074] As the electricity supplier, the producer is given the authority to add and manage detailed information about the power generation equipment, including equipment model, power generation capacity, and operating status. At the same time, the producer can independently set electricity sales parameters, such as sales price, available electricity volume, and trading hours.

[0075] Consumers, as electricity demanders, can easily view various available electricity supply information in the market, including quotations from different producers, electricity sources, power quality, etc., and can submit electricity purchase requests according to their own needs, specifying the required amount of electricity, expected price, and time of use.

[0076] Regulatory agencies bear the heavy responsibility of maintaining market order and ensuring transaction compliance. Therefore, they have the authority to view all transaction data, including historical transaction records and real-time transaction dynamics. They can also monitor market behavior in all aspects and promptly detect and deal with illegal transaction behaviors.

[0077] It has a flexible dynamic identity management mechanism that can dynamically allocate interactive identity information to users based on their actual transaction behavior and complex and ever-changing market demand conditions; interactive identity information includes temporary identity information and long-term identity information.

[0078] In certain scenarios, such as participating in limited-time electricity promotions or short-term distributed energy project collaborations, the system will assign users temporary identities. These identities are only valid during the activity or project and are granted specific transaction permissions. The temporary identities automatically expire when the activity or project ends. Long-term identities, on the other hand, are closely linked to the user's core business role, remaining stable over a longer period and providing the user with continuous and stable basic transaction permissions.

[0079] It records in detail the user's login time, login device information, various operations performed, and operation time for each login;

[0080] By analyzing this data in real time, if abnormal operations are detected, such as multiple unauthorized login attempts within a short period or frequent execution of commands exceeding the user's authorized permissions, the system will immediately and automatically trigger security mechanisms. On one hand, it will quickly lock down the account involved to prevent further unauthorized operations; on the other hand, it will promptly send a warning message to the system administrator, who can then investigate and take further action based on the warning details, effectively preventing potential security risks.

[0081] Transaction matching and matching: Enables the submission and synchronization of transaction requests, performs transaction matching and execution based on preset sorting and matching rules, and stores transaction information on the blockchain to ensure efficient, accurate and traceable transactions;

[0082] Specifically, it includes:

[0083] In the blockchain power trading ecosystem, each party to the transaction relies on its own blockchain account to log in to the corresponding node to submit a transaction request;

[0084] For producers, submitting an electricity sale request through the first blockchain node includes the resource supply, i.e. the amount of electricity they can provide to the market, and the expected price, which is the unit price that the producer expects to receive for selling electricity.

[0085] Consumers submit electricity purchase requests via a second blockchain node, including the amount of resources they request (i.e., the amount of electricity they need) and the acceptable price (i.e., the maximum price they are willing to pay per unit of electricity). Each node uses a peer-to-peer transmission protocol to quickly and accurately synchronize these transaction requests to the blockchain node cluster within the platform system, while also sharing them with other relevant nodes, ensuring the timely and comprehensive dissemination of transaction information throughout the network.

[0086] The efficiency and accuracy of transaction matching and pairing depend on preset matching rules, which mainly include sorting rules and matching rules.

[0087] The sorting rules focus on key parameters in transaction requests, such as price and electricity. When processing sales requests, the system sorts them by price from high to low by default, which prioritizes displaying high-priced sales information and makes it easier for consumers to compare and filter. For purchase requests, they are sorted by price from low to high, which helps producers quickly identify potential buyers with reasonable prices.

[0088] The matching rules are based on the sorting results, focusing on matching buy and sell requests with similar prices and matching battery capacities.

[0089] For example, when a producer provides 1000 kWh of electricity with a desired price of 0.5 yuan / kWh, and a consumer needs 950 kWh of electricity with an acceptable price of 0.52 yuan / kWh, the system will consider these two transaction requests as a potential matching pair based on the matching rules, and further analyze the feasibility of the matching.

[0090] The blockchain node cluster, the first blockchain node, and the second blockchain node simultaneously undertake the task of transaction matching. They continuously monitor newly submitted transaction requests and efficiently match the continuous influx of first and second transaction requests according to preset matching rules, selecting multiple transaction request pairs. The entire matching process is processed in parallel on multiple nodes, which greatly improves the efficiency and speed of transaction matching, ensures that the power supply and demand information in the market can be matched in a timely and accurate manner, and promotes the smooth development of power trading.

[0091] The transaction storage module is based on blockchain ledger technology and uses distributed storage to properly store each transaction request pair. The stored content includes not only transaction status data, such as whether the buy and sell requests corresponding to the transaction request pair have been successfully matched, and whether the transaction has been completed after the match, but also transaction result data, such as the final transaction price, the actual amount of electricity traded, and detailed information of both parties to the transaction.

[0092] These detailed transaction information are stored on the blockchain, which has the characteristics of being immutable and traceable, providing solid and reliable data support for all parties involved in the transaction to query transaction records, verify transaction details, and resolve transaction disputes in the future.

[0093] Smart contracts: responsible for the creation, deployment, transaction execution and verification of smart contracts, with default handling mechanisms, and integrated with IoT devices to achieve automated and compliant execution of electricity transactions;

[0094] Specifically, it includes:

[0095] Before the official launch of electricity trading, smart contract code is jointly developed by all parties involved in the transaction, based on established trading rules and complex business needs.

[0096] The smart contract code specifies in detail and precisely all the key elements of the transaction, including but not limited to the pricing method, such as real-time market pricing, fixed-price agreement, or tiered pricing; the settlement time, specifying the exact time node for fund settlement after the transaction is completed, whether it is immediate settlement, T+1 settlement, or other agreed method; the power quality standards, specifying the requirements for quality indicators such as voltage stability, frequency deviation, and harmonic content of the traded power; and the rights and obligations of all parties in the transaction, such as the producer's responsibility to supply power on time and in accordance with quality, and the consumer's obligation to pay electricity bills on time.

[0097] Once the smart contract code is written, it is deployed to the blockchain network and becomes the core basis for subsequent transaction execution;

[0098] Once a transaction is successfully matched, the smart contract will automatically trigger the execution process.

[0099] During execution, the smart contract first rigorously verifies whether both parties meet the pre-defined conditions. For example, it checks if both parties have sufficient account balances; for consumers, their accounts must have enough funds to cover the cost of the purchased electricity; for producers, their accounts must be able to receive payment for the electricity sold. Simultaneously, it confirms whether the electricity supply and demand match the quantity, quality, and other requirements stipulated in the contract. If all conditions are met, the smart contract will automatically and accurately execute the transfer of electricity ownership according to a predetermined procedure, allocating the corresponding electricity from the producer's account to the consumer's account, and simultaneously completing the settlement of funds, transferring the purchase price from the consumer's account to the producer's account. The entire process requires no human intervention, is highly efficient, and accurate.

[0100] The smart contract is pre-set with comprehensive and clear penalty clauses for breach of contract to deal with potential transaction risks;

[0101] If one party fails to strictly fulfill its obligations under the contract—for example, a producer fails to supply electricity on time due to equipment failure, or a consumer intentionally defaults on electricity bill payments—the smart contract will immediately and automatically implement punitive measures. Common penalties include deducting the defaulting party's security deposit, which is usually paid by both parties before the transaction begins as a performance guarantee; or terminating the current transaction according to the contract to prevent further losses caused by the default. Simultaneously, the smart contract records the default information in detail on the blockchain. This record is immutable, transparent, and can be queried by other parties at any time. The default will directly affect the defaulting party's credit rating in the system, subjecting them to stricter scrutiny, higher transaction costs, or limited trading opportunities in subsequent transactions.

[0102] The smart contract module is closely connected to IoT devices such as smart meters, enabling efficient real-time data interaction and in-depth application.

[0103] Smart meters, as key devices for electricity data collection, can acquire real-time and accurate data on electricity production and consumption, such as real-time power generation by producers and instantaneous electricity consumption by consumers. This data is continuously transmitted to the smart contract module, becoming a crucial basis for smart contract execution. For example, based on the power generation recorded by the smart meter, the smart contract can accurately determine the amount of electricity that producers can sell, preventing overselling; based on electricity consumption data, it can accurately calculate the actual amount of electricity purchased by consumers, ensuring the accuracy of the transaction. Through deep integration with the Internet of Things (IoT), smart contracts achieve real-time synchronization between electricity trading and actual electricity production and consumption, greatly improving the authenticity, accuracy, and reliability of transactions.

[0104] Data transmission optimization: Based on the historical data transmission data of the area where the smart meter is located, the corresponding delay factor is analyzed to predict the data upload delay of the smart meter, so that the data transmission time of the smart meter can be dynamically changed to optimize the billing delay.

[0105] Specifically, it includes:

[0106] Take the smart meter that needs to upload data as the target smart meter, draw a circle with the target smart meter as the center and the preset size as the radius, and obtain a circular area;

[0107] By defining a circular area centered on the target meter, it is possible to focus on groups of meters that are physically close together (such as meters in the same community or building). These meters, because they share the same communication gateway or base station, are more prone to congestion when uploading data simultaneously.

[0108] Example: If the radius of the circle is set to 500 meters, it can cover a medium-sized community. Electricity meters in this area may share a single NB-IoT base station. By analyzing their overlap, the potential load pressure on the base station can be directly reflected.

[0109] Obtain the number of all smart meters within the central area, the data upload cycle of each smart meter, and the number of time points that overlap with the upload cycle of each smart meter within 24 hours. Extract the maximum number of time points that overlap with the upload cycle and record it as the overlap extreme value.

[0110] Extracting the extreme values ​​of overlap within a 24-hour period can identify the most congested peak times of the day. For example, if it is found that 80% of the electricity meters in a certain community are uploading data simultaneously at 8 pm, far exceeding the system capacity (maximum allowed overlap), the overlap rate k increases significantly at this time, indicating that the upload strategy for this period should be adjusted first.

[0111] After setting the maximum allowable value for overlapping extreme values, the overlapping extreme value is divided by the maximum allowable value to obtain the overlap degree; this quantifies the severity of clustering at specific time points and directly reflects the risk of network congestion.

[0112] When the time point corresponding to the overlapping extreme value is obtained, the number of data transmission failures corresponding to each smart meter is obtained, and the number of data transmission failures of smart meters is divided by the number of smart meters corresponding to the overlapping extreme value to obtain the collision degree; the transmission failure rate of high overlap period is quantified to reflect the actual transmission risk;

[0113] After normalizing the overlap and collision degrees, the overlap and collision degrees are used as input layer indicators into the neural network model, and the delay evaluation coefficient is output through the fully connected layer of the neural network model.

[0114] A maximum permissible delay evaluation coefficient is preset, and the delay evaluation coefficient is divided by the maximum permissible delay evaluation coefficient to obtain the delay factor;

[0115] Using overlap and collision as input layer metrics for neural networks can improve the prediction accuracy of delay evaluation coefficients; neural networks can learn the nonlinear relationship between overlap, collision and actual delay, thereby more accurately predicting delay risk.

[0116] Based on the delay factor calculated by overlap degree and collision degree, a dynamic strategy of "the higher the risk, the more aggressive the adjustment" can be realized.

[0117] By reducing data upload conflicts, the system ensures that smart meter data is uploaded to the blockchain in a timely manner, avoiding transaction settlement delays caused by missing or delayed data. For example, real-time transactions between electricity producers and consumers rely on accurate meter data; if upload delays occur, contract execution may be delayed.

[0118] Label the overlap degree, collision degree, delay evaluation coefficient, and delay factor as k, v, u, and h respectively, and then insert them into the function relationship:

[0119] ;

[0120] in,

[0121] , is a proportionality coefficient (which can be calibrated experimentally, unit: seconds / (dimensionless product)), used to convert dimensionless parameters into actual time adjustment amounts;

[0122] To comprehensively address basic risks (k and v are the direct causes of latency, u is its comprehensive manifestation, and the product of the three amplifies the adjustment needs of high-risk scenarios); the system integrates three types of issues: spatial overlap, transmission failure, and historical risks, allowing the adjustment amount to accurately match the actual risk (the higher the risk, the more adjustments are needed).

[0123] When h > 1 (delay exceeds the allowable range), the adjustment amount is further amplified by 1 + (h - 1) (the larger h is, the more it exceeds the allowable range, and the larger the adjustment magnitude); when h ≤ 1, this part is 1, and only the basic adjustment is retained;

[0124] To prevent excessive adjustments from causing new time conflicts (such as entering other highly overlapping areas after adjustment), it is necessary to... Set upper limit: ;

[0125] in The preset maximum allowable adjustment time (e.g., 30 seconds, set reasonably according to the smart meter data upload cycle);

[0126] The sign indicates the direction of adjustment (positive for delay, negative for advancement), which can be determined by a random sign function:

[0127] ;

[0128] Get the adjusted time point ;

[0129] in, This is the original time point; For direction coefficients, ;

[0130] in A random number between 0 and 1 (to avoid all meters being adjusted in the same direction, which could lead to new overlaps);

[0131] Randomize the adjustment direction (some meters delay, some advance) to avoid all meters adjusting in the same direction (e.g., all delaying by 5 seconds), which would cause the new time points to overlap.

[0132] No matter how high the risk, the adjustment amount cannot exceed [a certain limit]. This is to prevent excessive adjustments from causing new time conflicts (for example, if a meter with an original cycle of 1 hour is adjusted to 10 minutes, it may overlap with a meter with a different cycle).

[0133] For small perturbations (such as ±1), ensure that the adjustment direction is randomly distributed.

[0134] Electricity trading relies on smart meter data being uploaded to the blockchain (such as power generation and electricity consumption). If the data upload is delayed, it will lead to delays in transaction settlement (such as unclear electricity bills or inability to execute electricity contracts).

[0135] By dynamically adjusting the upload time, congestion and failures are reduced, ensuring that data is uploaded to the blockchain in a timely manner and supporting the real-time nature of blockchain transactions;

[0136] Blockchain nodes have limited processing capacity (similar to server bandwidth). Simultaneous uploading of data from a large number of electricity meters can lead to node congestion and even data loss. By distributing the upload time, the pressure on nodes can be reduced, ensuring the stable operation of the blockchain network.

[0137] Data storage and management: Run consensus algorithms that fit the system, classify, manage and maintain blockchain network nodes, ensure network communication and data synchronization between nodes, and support cross-chain interoperability to ensure stable system operation and business expansion;

[0138] Specifically, it includes:

[0139] By leveraging the distributed ledger characteristics of blockchain, massive amounts of data related to electricity trading are comprehensively and meticulously distributed and stored across numerous nodes in the blockchain network.

[0140] This data encompasses transaction records, including detailed information for each electricity transaction, such as transaction time, parties involved, transaction volume, and transaction price; user identity information, ensuring the authenticity and traceability of user identities; energy metering data, including electricity production and consumption data collected through devices such as smart meters; and smart contract code, ensuring the accuracy and auditability of contract execution. Each node maintains a complete copy of the ledger. This redundant storage method greatly enhances data reliability and availability. Even if some nodes fail, the overall data integrity of the system will not be affected, effectively avoiding the risk of data loss.

[0141] To ensure data security and user privacy, a variety of advanced encryption technologies are employed.

[0142] For ledger data and transaction data during transmission, pre-set encryption algorithms such as Paillier encryption, symmetric encryption, and asymmetric encryption are used to encrypt the data, transforming the original data into ciphertext, which can only be decrypted and read by authorized parties with the correct key.

[0143] Meanwhile, by leveraging cutting-edge technologies such as zero-knowledge proofs and homomorphic encryption, data verification and analysis can be achieved without disclosing sensitive user information. For example, when verifying transactions, zero-knowledge proofs allow the verifier to confirm the legality of the transaction without needing to know its specific details. This ensures transaction transparency while effectively protecting user privacy and preventing the illegal acquisition and misuse of user information.

[0144] An efficient data indexing mechanism has been built; when querying data, users can easily filter all transaction records within a specific time period based on the transaction time; quickly locate all transactions related to a specific user by identifying the two parties involved in the transaction; and directly obtain detailed information about a specific transaction using the transaction number.

[0145] The immutability of blockchain provides a solid guarantee for data query results, ensuring that the information obtained by users is true and reliable, and providing users with convenient and trustworthy data traceability services when conducting transaction review, financial accounting, market analysis and other tasks.

[0146] By combining edge computing nodes, data uploaded in real time from devices such as smart meters and weather sensors can be processed and analyzed quickly and efficiently. Smart meter data can be used to monitor electricity consumption in real time, promptly detect abnormal electricity consumption behaviors, such as sudden and significant fluctuations in electricity consumption or prolonged periods of abnormally high power consumption, and issue timely warnings to help users troubleshoot electrical equipment malfunctions or prevent electricity theft. Weather sensor data can be used to predict the power generation of renewable energy sources. For example, by analyzing meteorological data such as wind speed and sunlight intensity, the power generation of wind farms and solar power plants can be estimated in advance, providing a scientific and accurate reference for electricity trading matching and pricing, helping to optimize the allocation of power resources and improve the overall operating efficiency of the power system.

[0147] Consensus mechanisms and networks, specifically including:

[0148] Based on the unique characteristics and actual needs of the power trading system, a suitable consensus algorithm should be carefully selected. Common algorithms include PoW (Proof of Work), PoS (Proof of Stake), or PBFT (Practical Byzantine Fault Tolerance).

[0149] Different consensus algorithms have their own advantages and disadvantages. PoW reaches consensus by solving complex mathematical problems, which is highly secure but consumes a lot of computing resources. PoS determines the right to record transactions based on the stake held by the nodes, which is less energy-intensive and more efficient. PBFT can quickly reach consensus even if some nodes fail or engage in malicious behavior, ensuring the stability of the system and the rapid confirmation of transactions.

[0150] Implement refined classification and management of nodes in the blockchain network, mainly including master nodes, consensus nodes, and supervisory nodes;

[0151] The master node plays a core role in the system, responsible for collecting transaction data from various nodes in the network, packaging this data according to certain rules, generating new blocks, and providing basic data units for the continuous growth of the blockchain.

[0152] Consensus nodes focus on rigorously verifying the blocks generated by the master node. Through various verification methods, such as checking whether the transaction signature is valid, whether the transaction amount is logical, and whether the block structure is compliant, they ensure the authenticity and legality of the block data. At the same time, consensus nodes participate in the consensus voting process and jointly decide with other consensus nodes whether a new block can be added to the blockchain.

[0153] Supervisory nodes constantly monitor the behavior of nodes in the network and closely watch for any malicious attacks.

[0154] The monitoring node updates the credit value of each node in real time based on its actual performance. For nodes that perform well and strictly abide by the rules, their credit value is increased. For nodes that malfunction or violate the rules, corresponding punitive measures are taken, such as reducing their rights and interests, reducing their share of the system's revenue, or temporarily removing them from the network until they fix the problem and pass the review. Nodes that seriously violate the rules will be permanently removed in order to maintain the healthy and stable operation of the network.

[0155] Based on the point-to-point network protocol, high-speed and stable communication and data synchronization between nodes are achieved;

[0156] During the operation of the power trading system, once a new transaction request is generated, it is rapidly propagated to all nodes through the peer-to-peer network. Similarly, when the master node generates a new block, the block information can be disseminated throughout the network in a very short time. To ensure the efficiency and accuracy of data synchronization, the system adopts an optimized network topology, such as a hierarchical or distributed network architecture, rationally planning the connection relationships between nodes to reduce data transmission hops and latency. Simultaneously, advanced data transmission algorithms are used to rationally fragment, compress, and encrypt data for transmission, improving data transmission efficiency, reducing network bandwidth consumption, and ensuring that data on each node remains consistent in real time. This enables the entire power trading system to quickly respond to user transaction requests, improving overall system performance and user experience.

[0157] With the booming development of the electricity trading market and the increasing expansion of business, the need for interaction between different blockchain networks is becoming more and more frequent, such as transactions between different virtual power plants and cross-regional allocation of power resources.

[0158] To this end, this module provides cross-chain interoperability, primarily through main-sidechain anchoring technology and hash time-locked contracts. Main-sidechain anchoring technology allows for reliable connections between different blockchains, ensuring accurate data transmission and consistency by recording and verifying relevant transaction information on both the main chain and sidechains. Hash time-locked contracts provide security for cross-chain transactions, utilizing hash encryption and time-locking mechanisms to ensure transactions are completed only under specific conditions and time constraints, effectively preventing transaction fraud and data inconsistency. These cross-chain interoperability technologies break down information silos between blockchains, promoting the wider circulation and optimized allocation of electricity resources, and enhancing the vitality and efficiency of the entire electricity trading market.

[0159] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0160] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.

[0161] It should be noted that, in this document, the use of relational terms such as "first" and "second" is merely for distinguishing one entity or operation from another, and does not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0162] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

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

[0164] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

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

[0166] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0167] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0168] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.

Claims

1. A power trading method based on blockchain technology, characterized in that, include: User identity and access control: Generate and authenticate user identities, and assign corresponding permissions based on user roles; Transaction matching and matching: The submission and synchronization of transaction requests, the execution of transaction matching based on preset sorting and matching rules, and the storage of transaction information on the blockchain; Smart contracts: responsible for the creation, deployment, transaction execution and verification of smart contracts, with default handling mechanisms, and integrated with IoT devices; Data transmission optimization: Based on the historical data transmission data of smart meters, the corresponding latency factor is analyzed to predict the data upload latency of smart meters, thereby dynamically changing the data transmission time of smart meters to optimize billing latency. Specifically, this includes: Take the smart meter that needs to upload data as the target smart meter, draw a circle with the target smart meter as the center and the preset size as the radius, and obtain a circular area; Obtain the number of all smart meters within the central area, the data upload cycle of each smart meter, and the number of time points that overlap with the upload cycle of each smart meter within 24 hours. Extract the maximum number of time points that overlap with the upload cycle and record it as the overlap extreme value. After setting the maximum allowable value for the coincidence extrema, divide the coincidence extrema by the maximum allowable value to obtain the coincidence degree. When the time point corresponding to the coincidence extreme value is obtained, the number of data transmission failures corresponding to each smart meter is obtained, and the number of data transmission failures of smart meters is divided by the number of smart meters corresponding to the coincidence extreme value to obtain the collision degree. Also includes: After normalizing the overlap and collision degrees, the overlap and collision degrees are used as input layer indicators into the neural network model, and the delay evaluation coefficient is output through the fully connected layer of the neural network model. A maximum permissible delay evaluation coefficient is preset, and the delay evaluation coefficient is divided by the maximum permissible delay evaluation coefficient to obtain the delay factor; Label the overlap degree, collision degree, delay evaluation coefficient, and delay factor as k, v, u, and h respectively, and then insert them into the function relationship: ; in, This is the proportionality coefficient; To comprehensively assess basic risks; When h>1, the adjustment amount is amplified by 1+(h-1); when h≤1, this part is 1, and only the basic adjustment is retained. Passed again: ; Get the adjusted time point ; in, This is the original time point; For direction coefficients, ; in A random number between 0 and 1; For minor perturbations, ensure that the adjustment direction is randomly distributed.

2. The power trading method based on blockchain technology according to claim 1, characterized in that, User identity and access control, specifically including: User identity generation and authentication employs distributed cryptography, with multiple nodes collaboratively generating identity keys; user identity information is stored on a cloud blockchain, supporting multiple authentication methods. In the authentication process, multi-node identity verification is carried out based on smart contracts. After joint verification by multiple nodes, a distributed identity verification result is obtained. Users are assigned corresponding operating permissions based on their different roles in the power trading system.

3. The power trading method based on blockchain technology according to claim 1, characterized in that, Transaction matching and pairing specifically includes: In the blockchain power trading ecosystem, each party to the transaction relies on its own blockchain account to log in to the corresponding node to submit a transaction request; the matching rules are preset, which mainly include sorting rules and matching rules. The sorting rules focus on the key parameters of price and electricity in transaction requests. When processing sales requests, the system sorts them by price from high to low by default, which makes it easier for consumers to compare and filter. For purchase requests, they are sorted by price from low to high, which makes it easier for producers to quickly identify potential buyers with reasonable prices. The matching rules are based on the sorting results, focusing on matching buy and sell requests with similar prices and matching battery capacities.

4. The power trading method based on blockchain technology according to claim 1, characterized in that, Smart contracts, specifically including: Before the official launch of electricity trading, smart contract code is jointly developed by all parties involved in the transaction, based on established trading rules and complex business needs. Once the smart contract code is written, it is deployed to the blockchain network and becomes the core basis for subsequent transaction execution; Once a transaction is successfully matched, the smart contract will automatically trigger the execution process. Smart contracts are pre-set with comprehensive and clear penalty clauses for breach of contract to address potential transaction risks; The smart contract module is closely connected to the smart meter IoT device, enabling efficient real-time data interaction and in-depth application.

5. The power trading method based on blockchain technology according to claim 1, characterized in that, Data storage and management, specifically including: By leveraging the distributed ledger characteristics of blockchain, massive amounts of data related to electricity trading are comprehensively and meticulously distributed and stored across numerous nodes in the blockchain network. Encryption technology is used to ensure data security and user privacy. At the same time, by leveraging cutting-edge technologies such as zero-knowledge proofs and homomorphic encryption, data verification and analysis can be achieved without disclosing sensitive user information; It combines data uploaded in real time from edge computing nodes for fast, efficient processing and in-depth analysis.

6. The power trading method based on blockchain technology according to claim 1, characterized in that, Consensus mechanisms and networks, specifically including: Based on the characteristics of electricity trading and actual needs, a suitable consensus algorithm is selected; Implement refined classification and management of nodes in the blockchain network, mainly including master nodes, consensus nodes, and supervisory nodes; The master node collects transaction data from various nodes in the network and packages this data according to preset rules to generate new blocks; Consensus nodes focus on rigorously verifying the blocks generated by the master node, using multiple verification methods to ensure the authenticity and legitimacy of the block data.

Citation Information

Patent Citations

  • Point-to-point power transaction method and system based on supply and demand prediction in block chain environment

    CN115907984A

  • Distributed photovoltaic power generation point-to-point transaction method and system based on block chain

    CN116154760A