Method, system, medium and equipment for emerging market subject to participate in power transaction

Through blockchain technology and C-LBFT consensus algorithm, the node selection and transaction confirmation process of the power trading system is optimized, and the problems of low efficiency, insufficient security and information asymmetry of the power trading system are solved, and efficient, stable and safe are achieved. Distributed power trading.

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

Patent Information

Application Number
CN202411184734.X
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 transaction processes, inefficient efficiency, high costs, information asymmetry, difficulty in sharing data, insufficient security, and difficult to meet the diversified needs of emerging market entities.

Method used

Using blockchain technology, by defining node reputation value indicators, designing round consensus mechanisms and network time protocols, combined with C-LBFT consensus algorithm, optimize master node selection, transaction confirmation and failure recovery, and realize time synchronization and health monitoring between nodes. , introduce incentive mechanisms and punishment mechanisms to improve system stability and security.

Benefits of technology

It improves transaction efficiency and system stability, reduces user delay, enhances data security and privacy protection, and ensures efficient execution of distributed power transactions and market transparency and fairness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205329A_ABST
    Figure CN119205329A_ABST
Patent Text Reader

Abstract

The invention provides a method, a system, a medium and equipment for an emerging market subject to participate in a power transaction, and the method comprises the steps: 1, defining a reputation value index of a node, which is used for evaluating the historical transaction behavior and the participation degree of each market subject, introducing an incentive mechanism and a punishment mechanism, and optimizing the selection process of a main node; 2, designing a round consensus mechanism, and optimizing a transaction confirmation process through view replacement and proposal priority management; after each round of consensus is completed, view replacement is automatically started, and reward and punishment are carried out according to reputation values of the nodes; and step 3, realizing time synchronization among the nodes through a network time protocol, and monitoring and processing fault nodes in real time through a node health check and fault recovery mechanism. According to the invention, the stability and participation enthusiasm of the transaction system are improved, and efficient transaction confirmation and data consistency are realized.
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 method, system, medium and equipment for emerging market entities to participate in power trading. Background Art

[0002] With the transformation of the global energy structure and the continuous reform of the power market, distributed power trading is becoming 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. Through its unique advantages, blockchain technology provides new technical support and implementation methods for distributed power trading, and becomes an important technical support for the future power market.

[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 traditional power trading 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 the existing power market, the information asymmetry problem between the two parties to the transaction is serious, affecting the fairness and efficiency of the market. In addition, there are many challenges in the management and sharing of transaction data, and 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 purpose of the present invention is to provide a method, system, medium and equipment for emerging market players to participate in electricity trading.

[0006] The method for emerging market entities to participate in power trading provided by the present invention includes:

[0007] Step 1: Define the reputation value index of the node to evaluate the historical transaction behavior and participation of each market player, and introduce incentive and penalty mechanisms to optimize the selection process of the master node;

[0008] Step 2: Design a round consensus mechanism to optimize the transaction confirmation process through view replacement and proposal priority management; automatically start view replacement after each round of consensus is completed, and reward or punish the node based on its reputation;

[0009] Step 3: Realize time synchronization between nodes through the Network Time Protocol, and monitor and handle faulty nodes in real time through node health check and fault recovery mechanism.

[0010] Preferably, the C-LBFT consensus algorithm is adopted, and the expression is:

[0011] Node weight calculation formula:

[0012]

[0013] Among them, W i represents the weight of node i, R i represents the reputation value of node i, T i represents the communication delay of node i;

[0014] Load balancing mechanism:

[0015]

[0016] Among them, L i represents the load of node i, N is the total number of nodes in the network, C j represents the computing power of node j, W j represents the weight of node j;

[0017] Congestion-aware load selection:

[0018]

[0019] Among them, P i represents the optimal load selected by node i, S is the set of candidate nodes, and D ij represents the distance between node i and node j, E j represents the congestion level of node j;

[0020] Voting weight in the consensus process:

[0021]

[0022] Among them, V i Represents the voting weight of node i in the consensus process.

[0023] Preferably, the reputation value T i The calculation formula is:

[0024]

[0025] Among them, α, β, γ, δ, ∈ are weight coefficients, satisfying α+β+γ+δ+∈=1; S i is the transaction success rate; R i is the response time; F i is the failure rate; C i G is the contribution; i is the greenness of the node;

[0026] The greenness of the node G i The calculation formula is:

[0027]

[0028] Among them, η, θ, κ are weight coefficients, satisfying η+θ+κ=1; E i is carbon emissions; U i is energy efficiency; R ei The proportion of renewable energy used;

[0029] The reputation value and the green environmental protection degree of the node are integrated to comprehensively evaluate the reputation of the node. The final node selection score N i for:

[0030] N i =λT i +μG i

[0031] Among them, λ and μ are fusion coefficients, satisfying λ+μ=1.

[0032] Preferably, the node health check includes: all nodes periodically send heartbeat signals to the central node or monitoring server to report their operating status; the monitoring server collects and records the status information of all nodes, including CPU usage, memory usage and network latency; if the node does not send a heartbeat signal within a predetermined time, or the status information is displayed as abnormal, the monitoring server will mark the node as abnormal;

[0033] The fault recovery mechanism includes: recording information about nodes marked as abnormal and notifying the administrator; isolating the abnormal nodes and attempting to restart services and reset the system to automatically recover the faulty nodes; if automatic recovery fails, notifying the administrator for manual intervention; and restoring the data of the abnormal nodes from backups or other nodes.

[0034] The system for emerging market entities to participate in power trading provided by the present invention includes:

[0035] Module M1: Define the reputation value index of the node to evaluate the historical transaction behavior and participation of each market player, and introduce incentive and penalty mechanisms to optimize the selection process of the master node;

[0036] Module M2: Design a round consensus mechanism to optimize the transaction confirmation process through view replacement and proposal priority management; automatically start view replacement after each round of consensus is completed, and reward or punish the node based on its reputation value;

[0037] Module M3: Realize time synchronization between nodes through the network time protocol, and monitor and handle faulty nodes in real time through node health check and fault recovery mechanism.

[0038] Preferably, the C-LBFT consensus algorithm is adopted, and the expression is:

[0039] Node weight calculation formula:

[0040]

[0041] Among them, W i represents the weight of node i, R i represents the reputation value of node i, T i represents the communication delay of node i;

[0042] Load balancing mechanism:

[0043]

[0044] Among them, L i represents the load of node i, N is the total number of nodes in the network, C j represents the computing power of node j, W j represents the weight of node j;

[0045] Congestion-aware load selection:

[0046]

[0047] Among them, P i represents the optimal load selected by node i, S is the set of candidate nodes, and D ij represents the distance between node i and node j, E j represents the congestion level of node j;

[0048] Voting weight in the consensus process:

[0049]

[0050] Among them, V i Represents the voting weight of node i in the consensus process.

[0051] Preferably, the reputation value T i The calculation formula is:

[0052]

[0053] Among them, α, β, γ, δ, ∈ are weight coefficients, satisfying α+β+γ+δ+∈=1; S i is the transaction success rate; R i is the response time; F i is the failure rate; C i G is the contribution; i is the greenness of the node;

[0054] The greenness of the node G i The calculation formula is:

[0055]

[0056] Among them, η, θ, κ are weight coefficients, satisfying η+θ+κ=1; E i is carbon emissions; U i is energy efficiency; R ei The proportion of renewable energy used;

[0057] The reputation value and the green environmental protection degree of the node are integrated to comprehensively evaluate the reputation of the node. The final node selection score N i for:

[0058] N i =λT i +μG i

[0059] Among them, λ and μ are fusion coefficients, satisfying λ+μ=1.

[0060] Preferably, the node health check includes: all nodes periodically send heartbeat signals to the central node or monitoring server to report their operating status; the monitoring server collects and records the status information of all nodes, including CPU usage, memory usage and network latency; if the node does not send a heartbeat signal within a predetermined time, or the status information is displayed as abnormal, the monitoring server will mark the node as abnormal;

[0061] The fault recovery mechanism includes: recording information about nodes marked as abnormal and notifying the administrator; isolating the abnormal nodes and attempting to restart services and reset the system to automatically recover the faulty nodes; if automatic recovery fails, notifying the administrator for manual intervention; and restoring the data of the abnormal nodes from backups or other nodes.

[0062] According to the computer-readable storage medium storing a computer program provided by the present invention, when the computer program is executed by a processor, the steps of the method for emerging market entities to participate in electricity trading are implemented.

[0063] The electronic device provided according to the present invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the method for emerging market entities to participate in electricity trading are implemented.

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

[0065] (1) Based on the existing Libra BFT algorithm and combined with the characteristics and requirements of distributed power trading, an improved C-LBFT consensus algorithm is proposed to improve consensus efficiency and system stability;

[0066] (2) By introducing the reputation value module and the incentive module, the master node selection process is dynamically adjusted, which reduces the time for selecting the master node, improves the security and reliability of the system, and ensures that each node can generate green electricity spontaneously;

[0067] (3) A pacemaker module was designed to coordinate the synchronization between the master node and the replica node through time synchronization, proposal control, and fault detection, thereby reducing user latency and improving user experience;

[0068] (4) The view replacement mechanism is automatically activated after each round of consensus is completed, and rewards and punishments are given according to the node reputation value to ensure the stability and security of the system in long-term operation;

[0069] (5) By introducing an improved voting mechanism and view replacement strategy, the throughput and low latency characteristics of the consensus algorithm are significantly improved, ensuring the efficient execution of distributed power trading. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0071] Figure 1 This is a flow chart of the consensus mechanism. DETAILED DESCRIPTION

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

[0073] Example 1

[0074] In response to the problems of low efficiency, low trust and insufficient data security in the process of electricity trading participated by emerging market players, this paper proposes an improved consensus mechanism C-LBFT. First, by introducing the reputation value module and incentive mechanism, the master node selection process is optimized, and the stability of the system and the enthusiasm for participation are improved. Secondly, a round consensus mechanism is designed, which realizes efficient transaction confirmation and data consistency through view replacement and proposal priority management. Finally, the pacemaker module ensures the stable operation of the consensus process and the security of transaction data through time synchronization and fault detection.

[0075] The C-LBFT algorithm is an improved Byzantine Fault Tolerance (BFT) consensus algorithm that is used in blockchain systems to solve network congestion, load balancing, and fault tolerance issues. The algorithm combines the traditional PBFT (Practical Byzantine Fault Tolerance) protocol and introduces congestion awareness and load balancing mechanisms based on it.

[0076] The specific formula is as follows:

[0077] 1. Node weight calculation formula:

[0078]

[0079] Among them, W i represents the weight of node i, R i represents the reputation value of node i, T i represents the communication delay of node i.

[0080] 2. Load balancing mechanism:

[0081]

[0082] Among them, L i represents the load of node i, N is the total number of nodes in the network, C j represents the computing power of node j, W j represents the weight of node j.

[0083] 3. Congestion-aware load selection:

[0084]

[0085] Among them, P i represents the optimal load selected by node i, S is the set of candidate nodes, and D ij represents the distance between node i and node j, E j represents the congestion level of node j.

[0086] 4. Voting weight in the consensus process:

[0087]

[0088] Among them, V i Represents the voting weight of node i in the consensus process.

[0089] The C-LBFT algorithm calculates node weights, loads, and node selection through the above formula, which improves the robustness and computational efficiency of the system, reduces storage costs, and improves the scalability of the system.

[0090] The technical solution adopted by the present invention comprises the following steps:

[0091] 1) Design the master node selection module. First, in order to meet the needs of emerging market players to participate in electricity trading, the node reputation index is defined to evaluate the historical trading behavior and participation of each market player. The calculation of the reputation value takes into account factors such as transaction success rate, response time, failure rate and contribution. At the same time, green and low-carbon computing is introduced into the reputation value module to improve the green environmental protection of the system; the incentive mechanism encourages emerging market players to actively participate in transactions and consensus processes through reward points or digital currency, and reduces the occurrence of malicious behavior through a penalty mechanism.

[0092] 1. Reputation value calculation formula

[0093] Trust Score,T i ) mainly consider the following factors:

[0094] Transaction success rate (S i ): The proportion of transactions successfully completed by the node.

[0095] Response time (R i ): Average time for a node to respond to a transaction request.

[0096] Failure rate (F i ): How often a node fails during a transaction.

[0097] Contribution (C i ): The contribution that a node makes to the system, such as data storage, computing resources, etc.

[0098] Green and Low Carbon Computing (G i ): The greenness of the node.

[0099] The formula for calculating the reputation value is:

[0100]

[0101] Among them, α, β, γ, δ, ∈ are weight coefficients, satisfying α+β+γ+δ+∈=1.

[0102] 2. Green and low-carbon calculation formula

[0103] Green and Low Carbon Computing (G i ) Consider the following factors:

[0104] Carbon emissions (E i ): Carbon emissions generated during node operation.

[0105] Energy efficiency (U i ): The efficiency of the node in using energy.

[0106] The proportion of renewable energy use (Rei ): The proportion of nodes using renewable energy.

[0107] The green and low-carbon calculation formula is:

[0108]

[0109] Among them, η, θ, and κ are weight coefficients, satisfying η+θ+κ=1.

[0110] 3. Integration of reputation value and green and low-carbon calculation

[0111] The reputation value and green low-carbon calculation results are integrated to comprehensively evaluate the reputation of the node. The final node selection score (Node Selection Score, N i )for:

[0112] N i =λT i +μG i

[0113] Among them, λ and μ are fusion coefficients, satisfying λ+μ=1.

[0114] 2) Design a round consensus mechanism. A round consensus mechanism is designed for complex power trading scenarios involving emerging market players. The transaction confirmation process is optimized through view replacement and proposal priority management. The view replacement mechanism is automatically started after each round of consensus is completed, and rewards and punishments are given according to the reputation value of the node to ensure that the selection of the new round of master nodes is more efficient and fair; proposal priority management ensures that important transactions are processed first, which improves the speed of transaction confirmation and system efficiency.

[0115] 3) Implement the pacemaker module. In order to ensure the system stability and data security of emerging market players in the process of electricity trading, the pacemaker module uses the Network Time Protocol (NTP) to synchronize the time between nodes and reduce the impact of time differences on the consensus process; through the node health check and fault recovery mechanism, it monitors and handles faulty nodes in the system in real time to ensure the stable operation of the transaction process and the security of data.

[0116] The steps to implement node health check are as follows:

[0117] 1. Regular heartbeat detection: All nodes regularly send heartbeat signals to the central node (or monitoring server) to report their operating status.

[0118] 2. Status monitoring: The monitoring server collects and records the status information of all nodes, including CPU usage, memory usage, network latency, etc.

[0119] 3. Anomaly detection: If a node does not send a heartbeat signal within the scheduled time, or the status information shows an abnormality (such as high CPU usage, memory leak, etc.), the monitoring server will mark the node as abnormal.

[0120] The steps to implement the fault recovery mechanism are as follows:

[0121] 1. Fault identification: When a node failure is detected through the health check module, the faulty node is immediately recorded and the system administrator is notified.

[0122] 2. Fault isolation: Isolate the faulty node from the system to prevent it from affecting other parts of the system.

[0123] 3. Fault recovery: Try to automatically recover the faulty node (such as restarting the service, resetting the system, etc.). If the automatic recovery fails, notify the administrator for manual intervention.

[0124] 4. Data recovery: Restore the data of the failed node from the backup or other nodes to ensure data consistency and integrity.

[0125] The above step 1) master node selection module, the specific steps are as follows:

[0126] a) Reputation value module design

[0127] First, the node transaction success rate is calculated, that is, the proportion of the number of transactions successfully completed by each node to the total number of transactions it participates in. For new entities (such as distributed energy suppliers and smart grid operators), nodes with high success rates perform stably in power transactions and have correspondingly higher reputation values.

[0128] Secondly, measure the response time, that is, measure the response speed of the node in the consensus process. In the power trading of new entities, nodes with fast response can improve the efficiency of transactions and consensus, and their reputation value will increase accordingly.

[0129] Thirdly, the node failure rate is calculated, and the frequency of node failure or abnormal behavior during the consensus process is recorded. Nodes with low failure rates show good stability and reliability, and have higher reputation values ​​in power trading.

[0130] Finally, the carbon emissions of the nodes are calculated to evaluate the greenness of the nodes participating in the consensus process. For new entities, nodes with high contribution play a positive role in the system, and their reputation value will be increased accordingly.

[0131] b) Incentive module

[0132] First, design a reward mechanism. After successfully completing the consensus task (green and low-carbon goals), the node can receive a certain amount of reward to encourage new entities to actively participate.

[0133] Second, the penalty mechanism will reduce the reputation of nodes if they engage in malicious behavior or inaction, and may even temporarily be banned from participating in the consensus process. This dynamic adjustment mechanism will encourage new subject nodes to be more rational and positive in the long run, thereby improving overall consensus efficiency and security.

[0134] Incentive Mechanism

[0135] In order to encourage emerging market players to actively participate in transactions and consensus processes, we have introduced a reward point or digital currency incentive mechanism. The specific reward and penalty mechanism is as follows:

[0136] Reward mechanism: Certain points or digital currency rewards will be given to nodes with high credibility and excellent green and low-carbon performance.

[0137] Penalty mechanism: For nodes with malicious behavior or low reputation, their points will be reduced or punished.

[0138] The specific formula is:

[0139] Bonus PointsR i :

[0140] R i =ρN i

[0141] Penalty Points P i :

[0142] P i =σ(1-N i )

[0143] Among them, ρ and σ are the reward and penalty coefficients.

[0144] Malicious behavior includes but is not limited to the following:

[0145] False transactions: Nodes submit false transaction information, affecting the authenticity and security of the system.

[0146] Deliberately delayed response: Nodes intentionally delay response time, affecting the real-time performance and efficiency of the system.

[0147] Data tampering: Nodes illegally tamper with data, affecting the integrity and reliability of the data.

[0148] Duplicate submission: The node repeatedly submits the same transaction request in an attempt to interfere with the consensus process.

[0149] Deliberate failure: Nodes intentionally create failures or deny services, causing disruption to the normal operation of the system.

[0150] Malicious attacks: Nodes participate in malicious attacks, such as denial of service attacks (DDoS), affecting the stability and security of the system.

[0151] The above step 2) designs a round consensus mechanism. The specific steps are as follows:

[0152] a) Initialization: System startup. Each node initializes its own state, including loading configuration files, setting initial reputation values, etc. For new entities (such as distributed energy suppliers and smart grid operators), ensure that they register and activate the function of participating in power transactions.

[0153] b) Master node selection: The node with the highest reputation is selected as the master node based on reputation and other factors. When new entities participate, their transaction success rate, response time, failure rate and contribution are considered. The master node selection results are broadcast to all nodes to ensure that new entities receive the information in time and are ready to participate.

[0154] c) Proposal stage: The master node collects transaction data and packages it into candidate blocks. New entities, such as distributed energy transaction data, need to be processed first. The proposal is broadcast to all replica nodes to ensure that new entities can verify and respond in time.

[0155] d) Voting phase: The replica node verifies the proposal, including checking the legitimacy of the transaction and the block structure. The new subject node needs to ensure that its data is accurate. A voting message is generated and sent back to the master node to ensure that the voting behavior of the new subject is recorded.

[0156] e) Commitment phase: After the master node receives enough voting messages, it generates a commit message and broadcasts it to all replica nodes. After receiving the commit message, the new subject records the proposal block in the local blockchain to complete the transaction confirmation. View change is triggered by conditions such as timeout, master node failure or consensus request. The performance of the new subject in power trading will affect the view change decision. The new master node is selected based on the latest reputation ranking, and the new subject with the highest reputation value will be given priority to become the new master node. After the new master node is selected, a notification is broadcast to all replica nodes, including the new master node information and the new consensus proposal. The new subject needs to respond to the new consensus round in a timely manner.

[0157] The above step 3) implements the pacemaker module, and the specific steps are as follows:

[0158] a) Time Synchronization

[0159] First, select a reliable time server to ensure the accuracy and stability of its time base and adapt to the needs of new entities (such as distributed energy systems).

[0160] Secondly, set the time synchronization frequency to ensure that the time difference between each node of the power transaction remains within an acceptable range and improve transaction accuracy.

[0161] Finally, time error detection is performed to monitor the time error of the node in real time. When the error exceeds the threshold, resynchronization is triggered to ensure the real-time and reliability of power trading.

[0162] b) Proposal Control

[0163] First, set proposal priorities based on the transaction urgency and importance of new entities to ensure timely confirmation of key energy transactions.

[0164] Secondly, the proposal queue is managed. The master node maintains a proposal queue, prioritizes the transaction needs of new entities, and processes high-priority proposals first.

[0165] Finally, proposal verification is carried out. Before proposing, the master node pre-verifies the proposal to ensure that it complies with the power trading consensus rules and system requirements, reduce invalid proposals, and improve transaction efficiency.

[0166] c) Fault detection

[0167] First, regularly conduct health checks on new main nodes, monitor their operating status and performance indicators, and issue alarms or take measures in a timely manner when abnormal situations are found.

[0168] Secondly, design a reasonable fault recovery mechanism, including automatic restart, node replacement and data recovery, to ensure that power transactions involving new entities can quickly resume normal operation when a fault occurs.

[0169] Finally, detect abnormal behavior and use technologies such as machine learning or rule engines to detect abnormal behavior of new subject nodes, such as malicious attacks or inaction, and take timely measures, such as reducing credibility or eliminating them from the consensus process.

[0170] Example 2

[0171] The present invention provides a system for emerging market entities to participate in power trading, comprising:

[0172] 1. Interaction between modules

[0173] The C-LBFT algorithm consists of multiple modules, which interact with each other through clear interfaces and message passing. The main modules include the master node selection module, the round consensus module, and the pacemaker module. The interaction process between modules is as follows:

[0174] Master node selection module: responsible for selecting the master node based on the node's reputation value and other factors, and notifying the round consensus module and pacemaker module of the selection results.

[0175] Round consensus module: After receiving the results of the master node selection, a round of consensus process begins, including proposal, voting, and submission. After the consensus is completed, the pacemaker module is notified to change the view.

[0176] Pacemaker module: responsible for time synchronization, proposal control, fault detection and other functions to ensure the smooth progress of the consensus process. After receiving the view change notification, update the master node information and start a new round of consensus.

[0177] 2. Algorithm Process

[0178] The specific process of the C-LBFT algorithm is as follows:

[0179] 1) Initialization: When the system starts, each node initializes its own status, including loading configuration files, setting initial reputation values, etc.

[0180] 2) Master node selection: Based on the node’s reputation and other factors, the node with the highest reputation is selected as the master node, and the selection result is broadcast to all nodes.

[0181] 3) Proposal stage: The master node collects transaction data, packages it into candidate blocks, and broadcasts the proposal to all replica nodes.

[0182] 4) Voting phase: The replica node verifies the proposal, generates a voting message, and sends the voting message back to the master node.

[0183] 5) Commit phase: After the master node receives enough voting messages, it generates a commit message and broadcasts it to all replica nodes. After receiving the commit message, the replica node records the proposal block in the local blockchain.

[0184] 6) View change: After consensus is completed, the pacemaker module triggers view change, selects a new master node based on the node's latest reputation value, and starts a new round of consensus.

[0185] 3. Key technical details

[0186] When implementing the C-LBFT algorithm, you need to pay attention to the following key technical details:

[0187] Design a reasonable reputation calculation formula to ensure that the reputation value can dynamically reflect the behavior and performance of the node. The reputation calculation should take into account factors such as transaction success rate, response time, failure rate and contribution.

[0188] Implement incentive and penalty mechanisms to encourage nodes to actively participate in the consensus process. The incentive mechanism includes rewarding digital currency or points, and the penalty mechanism includes deducting reputation points or temporarily prohibiting participation in consensus.

[0189] Use the Network Time Protocol (NTP) to ensure time synchronization between nodes. Time synchronization should set a reasonable synchronization frequency and error detection mechanism.

[0190] Design proposal priority and proposal queue management mechanisms to improve the approval rate and consensus efficiency of proposals. Pre-verification is required before proposals are made to ensure that the proposals comply with consensus rules and system requirements.

[0191] Implement node health check and fault recovery mechanisms to ensure that the system can quickly resume normal operation when a fault occurs. Abnormal behavior detection can use machine learning or rule engine technology to promptly detect and handle malicious nodes.

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

[0193] 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 method for emerging market players to participate in power trading, characterized in that: include: Step 1: Define the reputation value index of the node to evaluate the historical transaction behavior and participation of each market player, and introduce incentive and penalty mechanisms to optimize the selection process of the master node; Step 2: Design a round consensus mechanism to optimize the transaction confirmation process through view replacement and proposal priority management; automatically start view replacement after each round of consensus is completed, and reward or punish the node based on its reputation; Step 3: Realize time synchronization between nodes through the Network Time Protocol, and monitor and handle faulty nodes in real time through node health check and fault recovery mechanism.

2. The method for emerging market players to participate in power trading according to claim 1, characterized in that: Using the C-LBFT consensus algorithm, the expression is: Node weight calculation formula: Among them, W i represents the weight of node i, R i represents the reputation value of node i, T i represents the communication delay of node i; Load balancing mechanism: Among them, L i represents the load of node i, N is the total number of nodes in the network, C j represents the computing power of node j, W j represents the weight of node j; Congestion-aware load selection: Among them, P i represents the optimal load selected by node i, S is the set of candidate nodes, and D ij represents the distance between node i and node j, E j represents the congestion level of node j; Voting weight in the consensus process: Among them, V i Represents the voting weight of node i in the consensus process.

3. The method for emerging market players to participate in power trading according to claim 1, characterized in that: Reputation value T i The calculation formula is: Among them, α, β, γ, δ, ∈ are weight coefficients, satisfying α+β+γ+δ+∈=1; S i is the transaction success rate; R i is the response time; F i is the failure rate; C i G is the contribution; i is the greenness of the node; The greenness of the node G i The calculation formula is: Among them, η, θ, κ are weight coefficients, satisfying η+θ+κ=1; E i is carbon emissions; U i is energy efficiency; R ei The proportion of renewable energy used; The reputation value and the green environmental protection degree of the node are integrated to comprehensively evaluate the reputation of the node. The final node selection score N i for: N i =λT i +μG i Among them, λ and μ are fusion coefficients, satisfying λ+μ=1.

4. The method for emerging market players to participate in power trading according to claim 1, characterized in that: Node health check includes: all nodes regularly send heartbeat signals to the central node or monitoring server to report their operating status; the monitoring server collects and records the status information of all nodes, including CPU usage, memory usage and network latency; if the node does not send a heartbeat signal within the scheduled time, or the status information is abnormal, the monitoring server will mark the node as abnormal; The fault recovery mechanism includes: recording information about nodes marked as abnormal and notifying the administrator; isolating the abnormal nodes and attempting to restart services and reset the system to automatically recover the faulty nodes; if automatic recovery fails, notifying the administrator for manual intervention; and restoring the data of the abnormal nodes from backups or other nodes.

5. A system for emerging market players to participate in power trading, characterized in that: include: Module M1: Define the reputation value index of the node to evaluate the historical transaction behavior and participation of each market player, and introduce incentive and penalty mechanisms to optimize the selection process of the master node; Module M2: Design a round consensus mechanism to optimize the transaction confirmation process through view replacement and proposal priority management; automatically start view replacement after each round of consensus is completed, and reward or punish the node based on its reputation value; Module M3: Realize time synchronization between nodes through the network time protocol, and monitor and handle faulty nodes in real time through node health check and fault recovery mechanism.

6. The system for emerging market players to participate in power trading according to claim 5, characterized in that: Using the C-LBFT consensus algorithm, the expression is: Node weight calculation formula: Among them, W i represents the weight of node i, R i represents the reputation value of node i, T i represents the communication delay of node i; Load balancing mechanism: Among them, L i represents the load of node i, N is the total number of nodes in the network, C j represents the computing power of node j, W j represents the weight of node j; Congestion-aware load selection: Among them, P i represents the optimal load selected by node i, S is the set of candidate nodes, and D ij represents the distance between node i and node j, E j represents the congestion level of node j; Voting weight in the consensus process: Among them, V i Represents the voting weight of node i in the consensus process.

7. The system for emerging market players to participate in power trading according to claim 5, characterized in that: Reputation value T i The calculation formula is: Among them, α, β, γ, δ, ∈ are weight coefficients, satisfying α+β+γ+δ+∈=1; S i is the transaction success rate; R i is the response time; F i is the failure rate; C i G is the contribution; i is the greenness of the node; The greenness of the node G i The calculation formula is: Among them, η, θ, κ are weight coefficients, satisfying η+θ+κ=1; E i is carbon emissions; U i is energy efficiency; R ei The proportion of renewable energy used; The reputation value and the green environmental protection degree of the node are integrated to comprehensively evaluate the reputation of the node. The final node selection score N i for: N i =λT i +μG i Among them, λ and μ are fusion coefficients, satisfying λ+μ=1.

8. The system for emerging market players to participate in power trading according to claim 5, characterized in that: Node health check includes: all nodes regularly send heartbeat signals to the central node or monitoring server to report their operating status; the monitoring server collects and records the status information of all nodes, including CPU usage, memory usage and network latency; if the node does not send a heartbeat signal within the scheduled time, or the status information is abnormal, the monitoring server will mark the node as abnormal; The fault recovery mechanism includes: recording information about nodes marked as abnormal and notifying the administrator; isolating the abnormal nodes and attempting to restart services and reset the system to automatically recover the faulty nodes; if automatic recovery fails, notifying the administrator for manual intervention; and restoring the data of the abnormal nodes from backups or other nodes.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for emerging market entities to participate in electricity trading according to any one of claims 1 to 4 are implemented.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the computer program is executed by a processor, the steps of the method for emerging market entities to participate in electricity trading according to any one of claims 1 to 4 are implemented.

Citation Information

Cited By

  • Trusted agent mechanism in virtual power plant optimization regulation and control and reputation evaluation method thereof

    CN119922234A