Micro-grid power transaction method and terminal

By collecting and sorting transaction quotes in the blockchain, and using transaction truth discovery algorithms and reputation values ​​to identify transaction users, the risks of manipulation and default in electricity trading are resolved, thus achieving the security and reliability of electricity trading.

CN116562979BActive Publication Date: 2026-07-31福建福链科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
福建福链科技有限公司
Filing Date
2023-05-17
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing technologies, blockchain technology poses the possibility of users colluding to manipulate the electricity market and fails to effectively address the risk of default in private transactions between users, resulting in insufficient security and reliability of electricity transactions.

Method used

By collecting and sorting the transaction quotes from participants in the blockchain, and using a transaction truth discovery algorithm to determine the truth value of the transaction, and combining this with reputation scores to identify the users for this round of transactions, electricity transactions are conducted.

Benefits of technology

This improves the security and reliability of electricity trading, ensures users offer reasonable prices and act in good faith, and maintains the stable operation of the electricity trading market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116562979B_ABST
    Figure CN116562979B_ABST
Patent Text Reader

Abstract

This invention discloses a microgrid power trading method and terminal. It collects trading quotations from participants in a blockchain and sorts them. Based on the sorted quotations, a truth value discovery algorithm is used to determine the truth value of the current trading cycle. Based on the truth value and the sorted quotations, the trading users for this cycle are identified from the participants. Power trading for these users is then conducted based on their reputation scores. By using the truth value discovery algorithm to determine the truth value for each transaction and conducting power trading based on the truth value and reputation score, it ensures that users make reasonable bids in the power market, maintaining the stable operation of the power trading market. To obtain higher-quality transactions, users must make reasonable bids based on the marginal generation cost and the true valuation of power value, and participate in each transaction honestly and trustworthyly, thereby effectively improving the security and reliability of power trading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power trading technology, and in particular to a microgrid power trading method and terminal. Background Technology

[0002] Currently, my country has become the world's largest electricity user country. Since the beginning of the 21st century, clean energy, represented by photovoltaic power generation and wind power generation, has developed rapidly, and my country's clean energy power generation has been increasing day by day. my country has opened up the electricity sales market, encouraged distributed power generators to participate in energy market competition, and promoted the consumption of clean energy electricity.

[0003] In the distributed energy market, electricity trading involves numerous independent decision-makers, including independent power suppliers, energy storage operators, and energy agents. Users in the distributed energy market have complete independent control over their electricity, determining their participation based on their own power generation and consumption load. Furthermore, user power generation and consumption are characterized by their unpredictability and randomness, necessitating more agile and responsive clean energy consumption strategies to meet the demands of frequent, low-volume electricity trading in the new market. Microgrids, as a crucial component of the power system's transmission network, present urgent challenges in addressing the quality management of electricity trading within microgrids and distribution networks containing microgrids.

[0004] A blockchain is a chain of blocks. Each block stores specific information, and these blocks are linked together in chronological order of their creation. This chain is stored on all servers, and as long as one server in the entire system is operational, the entire blockchain is secure. These servers are called nodes in the blockchain system, and they provide storage space and computing power for the entire system. To modify information in the blockchain, the consent of more than half of the nodes must be obtained, and the information in all nodes must be modified. Since these nodes are usually controlled by different entities, tampering with information in the blockchain is extremely difficult. Compared to traditional networks, blockchain has two core characteristics: data is difficult to tamper with, and it is decentralized. Based on these two characteristics, the information recorded by the blockchain is more authentic and reliable, helping to solve the problem of mutual distrust. As a representative technology of distributed transactions, blockchain, when applied to microgrid power trading, can meet the needs of reliable information, data sharing, privacy protection, and billing traceability among trading entities in microgrid power trading.

[0005] However, in existing technologies, the application of blockchain technology to electricity trading still carries the risk of collusion among users to manipulate the electricity market and inflate prices during the electricity trading phase. Furthermore, it fails to consider the risk of breach of contract in such unregulated, volatile, and dubious private transactions between users. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide a microgrid power trading method and terminal that can effectively improve the security and reliability of power trading.

[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0008] A microgrid power trading method includes the following steps:

[0009] Collect transaction quotes from transaction participants in the blockchain, sort the transaction quotes, and obtain sorted transaction quotes;

[0010] Based on the sorted transaction quotes, a transaction truth discovery algorithm is used to determine the transaction truth value for the current transaction cycle;

[0011] The users for this round of transactions are determined from the transaction participants based on the true value of the transaction and the sorted transaction quotes;

[0012] Obtain the reputation value of the user in this round of transactions, and conduct electricity transactions for the user in this round of transactions based on the reputation value.

[0013] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows:

[0014] A microgrid power trading terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:

[0015] Collect transaction quotes from transaction participants in the blockchain, sort the transaction quotes, and obtain sorted transaction quotes;

[0016] Based on the sorted transaction quotes, a transaction truth discovery algorithm is used to determine the transaction truth value for the current transaction cycle;

[0017] The users for this round of transactions are determined from the transaction participants based on the true value of the transaction and the sorted transaction quotes;

[0018] Obtain the reputation value of the user in this round of transactions, and conduct electricity transactions for the user in this round of transactions based on the reputation value.

[0019] The beneficial effects of this invention are as follows: It collects transaction quotes from participants in the blockchain and sorts them. Based on the sorted quotes, a transaction truth discovery algorithm is used to determine the transaction truth value for the current transaction cycle. Based on the transaction truth value and the sorted quotes, the users for this round of transactions are identified from the participants. Electricity transactions for these users are conducted based on their reputation scores. By using the transaction truth discovery algorithm to determine the transaction truth value for each transaction and conducting electricity transactions based on transaction truth value and reputation scores, it ensures that users make reasonable quotes in the electricity market, maintaining the stable operation of the electricity trading market. If users want to obtain higher-quality transactions, they need to make reasonable quotes based on the marginal generation cost and the true valuation of electricity value and participate in each transaction honestly and in good faith, thereby effectively improving the security and reliability of electricity transactions. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating the steps of a microgrid power trading method according to an embodiment of the present invention.

[0021] Figure 2 This is a schematic diagram of the structure of a microgrid power trading terminal according to an embodiment of the present invention. Detailed Implementation

[0022] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.

[0023] Please refer to Figure 1 This invention provides a microgrid power trading method, including the following steps:

[0024] Collect transaction quotes from transaction participants in the blockchain, sort the transaction quotes, and obtain sorted transaction quotes;

[0025] Based on the sorted transaction quotes, a transaction truth discovery algorithm is used to determine the transaction truth value for the current transaction cycle;

[0026] The users for this round of transactions are determined from the transaction participants based on the true value of the transaction and the sorted transaction quotes;

[0027] Obtain the reputation value of the user in this round of transactions, and conduct electricity transactions for the user in this round of transactions based on the reputation value.

[0028] As can be seen from the above description, the beneficial effects of this invention are as follows: It collects transaction quotes from participants in the blockchain and sorts them. Based on the sorted quotes, it uses a transaction truth discovery algorithm to determine the transaction truth value for the current transaction cycle. Based on the transaction truth value and the sorted quotes, it identifies the users for this round of transactions from the participants. It then conducts electricity transactions for these users based on their reputation values. By using the transaction truth discovery algorithm to determine the transaction truth value for each transaction and conducting electricity transactions based on the transaction truth value and reputation value, it ensures that users make reasonable quotes in the electricity market, maintaining the stable operation of the electricity trading market. If users want to obtain higher-quality transactions, they need to make reasonable quotes based on the marginal generation cost and the true valuation of electricity value, and participate in each transaction honestly and trustworthyly, thereby effectively improving the security and reliability of electricity transactions.

[0029] Furthermore, the step of determining the transaction truth value for the current trading cycle using a transaction truth value discovery algorithm based on the sorted transaction quotes includes:

[0030] Obtain the transaction truth value from the previous iteration, and calculate the transaction rationality of the transaction participants based on the sorted transaction quotes and the transaction truth value from the previous iteration;

[0031] Calculate the latest true value of the transaction based on the sorted transaction quotes and the transaction rationality;

[0032] Determine whether the latest transaction truth value is equal to the transaction truth value of the previous iteration, or whether the difference between the latest transaction truth value and the transaction truth value of the previous iteration is less than a preset threshold. If yes, then the latest transaction truth value is determined as the transaction truth value of the current transaction cycle. If no, then the latest transaction truth value is used as the transaction truth value of the previous iteration, and return to the step of calculating the transaction rationality of the transaction participants based on the sorted transaction quotes and the transaction truth value of the previous iteration.

[0033] As described above, the transaction rationality of the participants is first calculated based on the sorted transaction quotes and the transaction truth value of the previous iteration. The transaction rationality indicates the reasonableness of the quotes submitted by the participants. Then, the latest transaction truth value is calculated based on the sorted transaction quotes and the transaction rationality. An iterative mechanism is used to update the transaction rationality and transaction truth value to ensure that the transaction truth value of each transaction is reasonable and reliable.

[0034] Furthermore, the step of calculating the transaction rationality of the transaction participants based on the sorted transaction quotes and the transaction truth values ​​from the previous iteration includes:

[0035]

[0036]

[0037] In the formula, w t i N represents the reasonableness of the transaction by transaction participant i. i q represents the total number of participants in the transaction. t i Q represents the sorted transaction quote for transaction participant i. t Let d(q) represent the truth value of the transaction in the previous iteration. t i Q t () represents the difference between the transaction quote and the true value of the transaction in the previous iteration;

[0038] The step of calculating the latest transaction truth value based on the sorted transaction quotes and the transaction rationality includes:

[0039]

[0040] In the formula, Q t′ This indicates the true value of the latest transaction.

[0041] As described above, if the difference between a participant's offer and the true value of the transaction from the previous iteration is small, the participant will obtain a higher transaction rationality, which ensures the accuracy and reliability of the final calculated true value of the transaction.

[0042] Furthermore, the participants in the transaction include electricity purchasers and electricity sellers;

[0043] The sorted transaction quotes include sorted buyer transaction quotes and sorted seller transaction quotes;

[0044] The users in this round of transactions include the electricity purchasers and the electricity sellers in this round of transactions;

[0045] The step of determining the users for this round of trading from the trading participants based on the true value of the transaction and the sorted transaction quotes includes:

[0046] Determine whether there exists a target power purchaser's transaction price that is greater than or equal to the true transaction value among the sorted power purchaser's transaction prices, and a target power seller's transaction price corresponding to the target power purchaser's transaction price that is less than or equal to the true transaction value. If such a case exists, then the power purchaser corresponding to the target power purchaser's transaction price and the power purchaser corresponding to the power purchaser's transaction price preceding the target power purchaser's transaction price are determined as the power purchaser in this round of transactions. Similarly, the power seller corresponding to the target power seller's transaction price and the power seller corresponding to the power seller's transaction price preceding the target power seller's transaction price are determined as the power seller in this round of transactions.

[0047] As described above, determining the participants in this round of transactions based on the ranked bids of electricity buyers and sellers, as well as the true value of the transactions, is more fair and reasonable. It also helps to match suitable buyers and sellers, facilitating the smooth completion of electricity transactions.

[0048] Furthermore, the electricity trading for the users in this round of transactions based on the reputation value includes:

[0049] The electricity purchasers in this round of transactions are sorted from highest to lowest according to their credit scores, resulting in the sorted list of electricity purchasers in this round of transactions.

[0050] The electricity sellers in this round of transactions are sorted from highest to lowest according to their credit scores, resulting in the sorted list of electricity sellers in this round of transactions.

[0051] Electricity transactions are conducted one-to-one between the electricity purchasers and electricity sellers in this round of transactions, according to the aforementioned ranking.

[0052] As described above, the electricity buyers and sellers in this round of transactions are sorted according to their credit scores, and then matched one by one to ensure that both parties can be matched with trading partners of equal credit, thus ensuring the smooth completion of the electricity transaction.

[0053] Furthermore, it also includes:

[0054] According to the preset update time, obtain the total number of transactions of the transaction participants on the previous day, the transaction volume of each transaction, the maximum transaction volume among all transaction participants, the average transaction volume of all transaction participants, and the average number of transactions of all transaction participants;

[0055] The reputation value of the transaction participant is updated based on the total number of transactions, the transaction volume of each transaction, the maximum transaction volume, the average transaction volume, and the average number of transactions.

[0056] As described above, updating the credit values ​​of trading participants based on the total number of transactions, the transaction volume of each transaction, the maximum transaction volume, the average transaction volume, and the average number of transactions at a preset update time can promptly update the credit values ​​of trading participants, so that each transaction can be based on the latest credit values, thereby improving the effectiveness of electricity trading.

[0057] Furthermore, updating the reputation value of the transaction participant based on the total number of transactions, the transaction volume of each transaction, the maximum transaction volume, the average transaction volume, and the average number of transactions includes:

[0058]

[0059] In the formula, i credit This represents the reputation value of the transaction participants, m represents the total number of transactions, and e represents the total number of transactions. max e represents the maximum transaction volume. t e represents the transaction volume of the t-th transaction. a d represents the average transaction volume, v represents the average number of transactions, and v represents the preset adjustment factor.

[0060] As described above, the reputation value of transaction participants is updated based on the total number of transactions, the transaction volume of each transaction, the maximum transaction volume, the average transaction volume, and the average number of transactions. The reputation value reflects the quality and activity of user transactions in the microgrid blockchain transaction network. Timely updates to the reputation value are beneficial to maintaining the normal operation of the transaction network and incentivizing users within the platform to actively fulfill their obligations and complete transactions.

[0061] Furthermore, the step of conducting electricity transactions for the current trading user based on the reputation value includes:

[0062] The penalty factor is determined based on the true value of the transaction and the ranked transaction quotes of the users in this round of transactions.

[0063] If the penalty factor is greater than a preset penalty threshold, the user of the current round of trading with the ranked transaction quotes corresponding to the penalty factor is identified as the penalty target, and the reputation value of the penalty target is reduced according to the penalty factor and the preset adjustment factor. If not, the user of the current round of trading with the ranked transaction quotes corresponding to the penalty factor is identified as the reward target, and the reputation value of the reward target is increased according to the penalty factor and the preset adjustment factor.

[0064] As described above, after a transaction is completed, a penalty factor is determined based on the true value of the transaction and the ranked transaction quotes of the users in this round. Rewards and penalties are then applied to the users in this round based on the penalty factor. This can further prevent malicious participants from making arbitrary quotes and disrupting the market, and ensure that honest and trustworthy participants do not miss out on fair transactions, thereby effectively improving the security of electricity trading.

[0065] Furthermore, the process of collecting transaction quotes from transaction participants in the blockchain includes:

[0066] The CA (Certificate Authority) is used to receive registration requests and electricity qualification certificates from transaction participants.

[0067] The CA (Certificate Authority) will review the transaction participants based on the registration request and the electricity qualification certificate.

[0068] Once the review is approved, the user data of the transaction participants will be stored in the blockchain.

[0069] As described above, only participants who have passed the review of the CA institution can participate in subsequent electricity transactions, thus initially screening out some malicious or unqualified users.

[0070] Please refer to Figure 2 Another embodiment of the present invention provides a microgrid power trading terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps in the above-described microgrid power trading method.

[0071] The microgrid power trading method and terminal described above are applicable to power trading scenarios in microgrids and distribution networks containing microgrids.

[0072] Example 1

[0073] Please refer to Figure 1 This embodiment of a microgrid power trading method includes the following steps:

[0074] S1. Use a CA institution to receive registration requests and electricity qualification certificates from transaction participants;

[0075] The parties involved in the transaction include the electricity purchaser and the electricity seller;

[0076] S2. The CA institution reviews the transaction participants based on the registration request and the electricity qualification certificate;

[0077] S3. After the review is approved, the user data of the transaction participants will be stored in the blockchain.

[0078] S4. Collect transaction quotes from transaction participants in the blockchain, and sort the transaction quotes to obtain sorted transaction quotes, specifically including:

[0079] The sorted transaction quotes include sorted electricity purchaser transaction quotes and sorted electricity seller transaction quotes;

[0080] S41. Collect transaction quotes from transaction participants in the blockchain;

[0081] In one optional implementation, before the start of each round of trading, the power purchaser forecasts the power load for the next trading cycle, obtains the power load forecast result, and submits the power purchaser's trading quotation to the terminal of the present invention based on the power load forecast result; the power seller forecasts the power generation load for the next trading cycle, obtains the power generation load forecast result, and submits the power seller's trading quotation to the terminal of the present invention based on the power generation load forecast result.

[0082] In one alternative implementation, after collecting transaction quotes from transaction participants in the blockchain, invalid information in the transaction quotes is also removed to improve the efficiency of subsequent data processing.

[0083] S42. Transaction quotes from the electricity purchaser. Sort the electricity purchaser's bids in descending order to obtain the sorted bids. m represents the number of electricity purchasers.

[0084] S43, Transaction quotes from the electricity seller. Sort the electricity prices in ascending order to obtain the sorted transaction quotes from the electricity sellers. n represents the number of electricity sellers.

[0085] The higher the bid from the electricity buyer and the lower the bid from the electricity seller, the more popular the bid becomes in the market. Therefore, the electricity buyer with the highest bid and the electricity seller with the lowest bid rank at the top. It should be noted that the electricity buyer with the highest bid does not mean that they will not be penalized. A higher bid may deviate from the final transaction value. This invention aims to encourage both parties in the electricity transaction to bid according to their own costs, which is closer to the final transaction value.

[0086] S5. Based on the sorted transaction quotes, a transaction truth-finding algorithm is used to determine the transaction truth value for the current transaction cycle, specifically including:

[0087] S51. Obtain the transaction truth value from the previous iteration, and calculate the transaction rationality of the transaction participants based on the sorted transaction quotes and the transaction truth value from the previous iteration. Specifically:

[0088]

[0089]

[0090] In the formula, w t i N represents the reasonableness of the transaction by transaction participant i. i q represents the total number of participants in the transaction, including both electricity buyers and sellers. t i Q represents the sorted transaction quote for transaction participant i. t Let d(q) represent the truth value of the transaction in the previous iteration. t i Q t ) represents the difference between the transaction quote and the true value of the transaction in the previous iteration.

[0091] The reason for setting the transaction rationality according to the above formula is that the transaction rationality represents the reasonableness of the transaction quote. The d() function represents the distance between the transaction quote and the true value of the transaction, that is, the degree of difference. Therefore, the summation of the differences of all user transaction quotes and the division by the user transaction quote will result in a smaller difference if the user transaction quote is more reasonable, that is, a smaller denominator and a greater rationality. Taking the logarithm will not change the nature and correlation of the values, but it will reduce the scale of the variables and make the data more stable.

[0092] S52. Calculate the latest transaction truth value based on the sorted transaction quotes and the transaction reasonableness. Specifically:

[0093]

[0094] In the formula, Q t′ This indicates the true value of the latest transaction.

[0095] S53. Determine whether the latest transaction truth value is equal to the transaction truth value of the previous iteration, or whether the difference between the latest transaction truth value and the transaction truth value of the previous iteration is less than a preset threshold. If yes, execute S531; if no, execute S532, so that the transaction truth value converges after iterative update.

[0096] S531. The latest transaction truth value is determined as the transaction truth value for this transaction cycle.

[0097] S532. Use the latest transaction truth value as the transaction truth value of the previous iteration, and return to execute S51.

[0098] S6. Determine the users for this round of transactions from the transaction participants based on the transaction truth value and the sorted transaction quotes, specifically including:

[0099] The users in this round of transactions include the electricity purchasers and the electricity sellers in this round of transactions;

[0100] S61. Determine whether there exists a target power purchaser's transaction price that is greater than or equal to the true transaction value among the sorted power purchaser's transaction prices, and the target power seller's transaction price corresponding to the target power purchaser's transaction price is less than or equal to the true transaction value. If so, determine the power purchaser corresponding to the target power purchaser's transaction price and the power purchaser corresponding to the power purchaser's transaction price before the target power purchaser's transaction price as the power purchaser in this round of transactions, and determine the power seller corresponding to the target power seller's transaction price and the power seller corresponding to the power seller's transaction price before the target power seller's transaction price as the power seller in this round of transactions.

[0101] Wherein, the target electricity seller's transaction price corresponding to the target electricity purchaser's transaction price refers to the electricity seller's transaction price that is in the same order as the target electricity purchaser's transaction price in the sorting;

[0102] Assume there exists an i-th sorted electricity purchaser's transaction bid. The transaction price is greater than or equal to the true value of the transaction, and is the transaction price quoted by the i-th sorted electricity seller. If the value is less than or equal to the true value of the transaction, then the electricity buyers corresponding to the first i electricity buyer transaction quotations in the sorted electricity buyer transaction quotations will be determined as the electricity buyers in this round of transactions, and the electricity sellers corresponding to the first i electricity seller transaction quotations in the sorted electricity seller transaction quotations will be determined as the electricity sellers in this round of transactions.

[0103] S7. Obtain the credit score of the user in this round of transactions, and conduct electricity transactions for the user in this round of transactions based on the credit score, specifically including:

[0104] S71. Obtain the reputation value of the user in this round of transactions;

[0105] S72. Sort the electricity purchasers in this round of transactions in descending order of their credit scores to obtain the sorted electricity purchasers in this round of transactions.

[0106] S73. Sort the electricity sellers in this round of transactions in descending order of their credit scores to obtain the sorted electricity sellers in this round of transactions.

[0107] S74. Electricity transactions are conducted one-to-one with the electricity purchasers and electricity sellers in the current round of transactions according to the sorted order.

[0108] Specifically, the ordered buyers and sellers of electricity in this round of trading are matched one by one in sequence to obtain the matching results. The buyers and sellers of electricity in this round of trading are notified of the matching results, and the buyers and sellers of electricity in this round of trading use the true value of the transaction as the clearing price for electricity trading.

[0109] In one optional implementation, the electricity purchaser and the electricity seller in this round of trading use the true value of the transaction as the clearing price for electricity trading, specifically:

[0110] (1) The electricity purchaser in this round of transaction generates a smart contract based on the electricity load forecast result, sends the smart contract to the electricity seller in this round of transaction, and pays a transaction deposit to the terminal at the same time;

[0111] (2) After signing the smart contract, the electricity seller in this round of transactions pays the transaction deposit to the terminal and uses the transaction true value as the clearing price to generate the required electricity purchase cost corresponding to the electricity load forecast result. At the same time, the required electricity purchase cost is sent to the smart contract account.

[0112] (3) The terminal broadcasts the transaction information and bilateral transaction results of this round in the blockchain, and stores the transaction information, the bilateral transaction results and the smart contract together in the blockchain;

[0113] (4) The electricity seller in this round of transaction performs the power transmission behavior according to the smart contract. After the power transmission is completed, the smart contract platform automatically executes the transaction result according to the data uploaded by the smart meter.

[0114] (5) The electricity seller and the electricity buyer in this round of transaction shall confirm the transaction result respectively. If there is no objection, the transaction shall end. If the electricity seller or the electricity buyer in this round of transaction has any objection, they may file an appeal with the CA institution.

[0115] (6) The CA institution processes the objection, and after the processing is completed, it feeds back the processing result to the terminal, and the terminal updates the transaction result according to the processing result.

[0116] S8. Determine the penalty factor based on the true value of the transaction and the ranked transaction quotes of the users in this round of transactions. Specifically:

[0117]

[0118] In the formula, Φ i This represents the penalty factor.

[0119] S9. Determine whether the penalty factor is greater than the preset penalty threshold. If yes, execute S91; otherwise, execute S92.

[0120] S91. The users of the current round of transactions whose transaction quotes are sorted according to the penalty factor are identified as the penalty targets, and the reputation value of the penalty targets is reduced according to the penalty factor and the preset adjustment factor.

[0121] In one optional implementation, the preset adjustment factor is 100;

[0122] Specifically, the reputation value of the penalized object is reduced based on the product of the penalty factor and the preset adjustment factor.

[0123] S92. The users of the current round of transactions whose transaction quotes are sorted according to the penalty factor are identified as reward recipients, and the reputation value of the reward recipients is increased according to the penalty factor and the preset adjustment factor.

[0124] Specifically, the reputation value of the reward recipient is increased based on the product of the penalty factor and the preset adjustment factor.

[0125] Assuming the preset penalty threshold is 0.08, the true value of the transaction is 0.457 yuan / (km·h), and the transaction price of a certain user in this round of transactions is 0.35 yuan / (km·h), the corresponding penalty factor Φ can be calculated. i =|0.457-0.35|=0.107. Since 0.107>0.08, the user will be penalized, and their reputation score will decrease by v×Φ. i =100 × 0.107 = 10.7 points. Similarly, assuming another user's transaction price in this round is 0.432 yuan / (km·h), then the corresponding penalty factor Φ i =0.457 - 0.432 = 0.027. Since 0.027 < 0.08, the user will receive a reward, and the user's reputation score will increase by v × Φ. i =100 × 0.027 = 2.7 points. Therefore, users who arbitrarily raise their bids during the bidding phase will be subject to a high reputation penalty, while honest and trustworthy users who bid in accordance with regulations will receive a small reputation reward. This effectively prevents bid deviations and maintains the stable and orderly operation of the microgrid trading platform.

[0126] In one alternative implementation, it further includes:

[0127] S10. Obtain the total number of transactions of the transaction participants on the previous day, the transaction volume of each transaction, the maximum transaction volume among all transaction participants, the average transaction volume of all transaction participants, and the average number of transactions among all transaction participants according to the preset update time.

[0128] In this alternative implementation, the preset update time is early morning every day.

[0129] S11. Update the reputation value of the transaction participant based on the total number of transactions, the transaction volume of each transaction, the maximum transaction volume, the average transaction volume, and the average number of transactions, specifically including:

[0130]

[0131] In the formula, i credit This represents the reputation value of the transaction participants, m represents the total number of transactions, and e represents the total number of transactions. max e represents the maximum transaction volume. t e represents the transaction volume of the t-th transaction. a d represents the average transaction volume, v represents the average number of transactions, and v represents the preset adjustment factor.

[0132] The reputation score is calculated based on the user's transaction volume in each transaction cycle. The more active the user is in a given transaction cycle, the higher the reputation score will be. The closer the user's transaction volume is to the maximum transaction volume in each cycle, the higher the reputation score will be. The larger the sum, the more... After dividing by the average number of transactions, The larger the value, the higher the transaction volume of the user in this round of transactions, indicating that the user has a high level of activity.

[0133] S10-S11 can be executed synchronously with S1-S9.

[0134] Example 2

[0135] Please refer to Figure 2 This embodiment of a microgrid power trading terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps in the microgrid power trading method of Embodiment 1.

[0136] In summary, the microgrid power trading method and terminal provided by this invention collects transaction quotations from trading participants in the blockchain, sorts the quotations, and uses a transaction truth discovery algorithm to determine the transaction truth value for the current trading cycle based on the sorted quotations. Based on the transaction truth value and the sorted quotations, the trading users for this round are identified from the trading participants. Power transactions for these users are then conducted based on their acquired reputation values. By using the transaction truth discovery algorithm to determine the transaction truth value for each transaction and conducting power trading based on transaction truth value and reputation value, this method ensures that users can make reasonable bids in the power market, thus maintaining power balance. For the trading market to operate stably, users who want to obtain higher-quality transactions need to make reasonable bids based on the true valuation of marginal generation costs and electricity value, and participate in each transaction honestly and in good faith. This effectively improves the security and reliability of electricity trading. At the same time, the reputation value of trading participants is updated based on the total number of transactions, the transaction volume of each transaction, the maximum transaction volume, the average transaction volume, and the average number of transactions. The reputation value reflects the quality and activity of user transactions in the microgrid blockchain trading network. Timely updates to the reputation value help maintain the normal operation of the trading network and incentivize users within the platform to actively fulfill their obligations and complete transactions.

[0137] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for microgrid power trading, the method comprising: Including the following steps: Collect transaction quotes from transaction participants in the blockchain, sort the transaction quotes, and obtain sorted transaction quotes; Based on the sorted transaction quotes, a transaction truth discovery algorithm is used to determine the transaction truth value for the current transaction cycle; The users for this round of transactions are determined from the transaction participants based on the true value of the transaction and the sorted transaction quotes; Obtain the credit score of the user in this round of transactions, and conduct electricity transactions for the user in this round of transactions based on the credit score; The process of determining the truth value of the current trading cycle using a truth-finding algorithm based on the sorted trading quotes includes: Obtain the transaction truth value from the previous iteration, and calculate the transaction rationality of the transaction participants based on the sorted transaction quotes and the transaction truth value from the previous iteration; Calculate the latest true value of the transaction based on the sorted transaction quotes and the transaction rationality; Determine whether the latest transaction truth value is equal to the transaction truth value of the previous iteration, or whether the difference between the latest transaction truth value and the transaction truth value of the previous iteration is less than a preset threshold. If yes, then the latest transaction truth value is determined as the transaction truth value of the current transaction cycle. If no, then the latest transaction truth value is used as the transaction truth value of the previous iteration, and return to the step of calculating the transaction rationality of the transaction participants based on the sorted transaction quotes and the transaction truth value of the previous iteration. The step of calculating the transaction rationality of the transaction participants based on the sorted transaction quotes and the transaction truth values ​​of the previous iteration includes: ; ; In the formula, w t i N represents the reasonableness of the transaction by transaction participant i. t q represents the total number of participants in the transaction. t i Q represents the sorted transaction quote for transaction participant i. t Let d(q) represent the truth value of the transaction in the previous iteration. t i Q t This represents the difference between the transaction quote and the true value of the transaction in the previous iteration; The step of calculating the latest transaction truth value based on the sorted transaction quotes and the transaction rationality includes: ; In the formula, Q t′ represents the latest transaction true value.

2. The microgrid power transaction method of claim 1, wherein, The parties involved in the transaction include electricity purchasers and electricity sellers; The sorted transaction quotes include sorted buyer transaction quotes and sorted seller transaction quotes; The users in this round of transactions include the electricity purchasers and the electricity sellers in this round of transactions; The step of determining the users for this round of trading from the trading participants based on the true value of the transaction and the sorted transaction quotes includes: Determine whether there exists a target power purchaser's transaction price that is greater than or equal to the true transaction value among the sorted power purchaser's transaction prices, and a target power seller's transaction price corresponding to the target power purchaser's transaction price that is less than or equal to the true transaction value. If such a case exists, then the power purchaser corresponding to the target power purchaser's transaction price and the power purchaser corresponding to the power purchaser's transaction price preceding the target power purchaser's transaction price are determined as the power purchaser in this round of transactions. Similarly, the power seller corresponding to the target power seller's transaction price and the power seller corresponding to the power seller's transaction price preceding the target power seller's transaction price are determined as the power seller in this round of transactions.

3. The microgrid power transaction method of claim 2, wherein, The electricity trading for the users in this round of transactions based on the credit score includes: The electricity purchasers in this round of transactions are sorted in descending order of their credit scores to obtain the sorted electricity purchasers in this round of transactions. The electricity sellers in this round of transactions are sorted in descending order of their credit scores to obtain the sorted electricity sellers for this round of transactions. Electricity transactions are conducted one-to-one between the electricity purchasers and electricity sellers in this round of transactions, according to the aforementioned ranking.

4. The microgrid power transaction method of claim 1, wherein, Also includes: According to the preset update time, obtain the total number of transactions of the transaction participants on the previous day, the transaction volume of each transaction, the maximum transaction volume among all transaction participants, the average transaction volume of all transaction participants, and the average number of transactions of all transaction participants; The reputation value of the transaction participant is updated based on the total number of transactions, the transaction volume of each transaction, the maximum transaction volume, the average transaction volume, and the average number of transactions.

5. The microgrid power trading method of claim 4, wherein, The update of the credit score of the transaction participant based on the total number of transactions, the transaction volume of each transaction, the maximum transaction volume, the average transaction volume, and the average number of transactions includes: ; In the formula, i credit This represents the reputation value of the transaction participants, m represents the total number of transactions, and e represents the total number of transactions. max e represents the maximum transaction volume. t e represents the transaction volume of the t-th transaction. a d represents the average transaction volume, v represents the average number of transactions, and v represents the preset adjustment factor.

6. The microgrid power trading method of claim 1, wherein, The process of conducting electricity transactions for the users in this round of transactions based on the credit score includes: The penalty factor is determined based on the true value of the transaction and the ranked transaction quotes of the users in this round of transactions. If the penalty factor is greater than a preset penalty threshold, the user of the current round of trading with the ranked transaction quotes corresponding to the penalty factor is identified as the penalty target, and the reputation value of the penalty target is reduced according to the penalty factor and the preset adjustment factor. If not, the user of the current round of trading with the ranked transaction quotes corresponding to the penalty factor is identified as the reward target, and the reputation value of the reward target is increased according to the penalty factor and the preset adjustment factor.

7. The microgrid power transaction method of claim 3, wherein, The process of collecting transaction quotes from participants in the blockchain includes: The CA (Certificate Authority) is used to receive registration requests and electricity qualification certificates from transaction participants. The CA (Certificate Authority) will review the transaction participants based on the registration request and the electricity qualification certificate. Once the review is approved, the user data of the transaction participants will be stored in the blockchain. 8.A micro-grid power transaction terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein, When the processor executes the computer program, it implements each step of the microgrid power trading method according to any one of claims 1 to 7.