Cloud-edge collaborative power data transaction method, system, device, equipment and medium
By employing a cloud-edge collaborative approach to power data trading and utilizing homomorphic encryption algorithms to encrypt bidding information, the problem of bidding information leakage in power data trading has been solved, achieving privacy protection and secure transactions.
Patent Information
- Application Number
- CN202411460522.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2044-10-18
AI Technical Summary
The existing auction mechanism in electricity data trading has the problem of exposing trade secrets in the bidding information of buyers and sellers, resulting in insufficient privacy protection.
The cloud-edge collaborative power data trading method uses homomorphic encryption algorithm to encrypt bidding information, generate ciphertext bidding information, and compare pseudonyms and ciphertext between cloud server and edge server to determine the winner and their transaction information.
It effectively protects the privacy of bidders, ensures that the real identities and trade secrets of buyers and sellers are not leaked during the transaction process, and achieves safe and efficient power data trading.
Smart Images

Figure CN119449385B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of power distribution network technology, specifically to a cloud-edge collaborative power data trading method, system, device, equipment, and medium. Background Technology
[0002] Distribution network management is a crucial aspect of the power industry's development. With the rapid advancements in data processing and big data mining technologies, power data within the distribution network has become a vital foundation for improving network management and establishing efficient support mechanisms. It can significantly enhance the grid's intelligent sensing, internal control capabilities, and customer service efficiency. Therefore, power data sharing within the distribution network has become an important source for power companies to optimize their management. One of the most popular mechanisms for data sharing is through auctions to achieve fair transactions and efficient circulation. Auctions are an economically driven scheme that aims to allocate goods and determine the final transaction price through a bidding comparison process between buyers and sellers. Auction theory has been extensively explored in areas such as electricity markets and spectrum allocation. Because auction mechanisms can ensure fairness and efficiency, they show great potential in solving data trading problems.
[0003] The inventors discovered that in traditional auction processes, the bidding information of both buyers and sellers must be fully disclosed to the auctioneer to reach a final transaction. However, the true bidding information of buyers and sellers exposes their financial situation or trade secrets, constituting sensitive information. Without protection, the auctioneer can infer the true identity or business purpose of the buyer or seller based on the available bidding information. In conclusion, existing auction mechanisms have shortcomings in privacy protection and require further improvement and research. Summary of the Invention
[0004] To address the problems in related technologies, embodiments of this disclosure provide a cloud-edge collaborative power data trading method, system, apparatus, equipment, and medium.
[0005] In a first aspect, this disclosure provides a cloud-edge collaborative power data trading method, including:
[0006] Bidders encrypt their bidding information using a pre-stored public key for a homomorphic encryption algorithm to obtain ciphertext bidding information, which includes the bid price and the bid amount.
[0007] The bidder sends a bid request to the cloud server. The bid request carries the bidder's type identifier and encrypted bid information. The bidder's type identifier includes a seller identifier or a buyer identifier.
[0008] In response to the received bidding request, the cloud server assigns a pseudonym to the bidder, wherein a seller pseudonym is assigned to the bidder with the seller identifier and a buyer pseudonym is assigned to the bidder with the buyer identifier.
[0009] The cloud server generates a ciphertext comparison vector for any two bidders based on their ciphertext bidding information and sends the ciphertext comparison vector to the edge server. The ciphertext comparison vector includes ciphertext bidding price comparison information and the corresponding pseudonym identifiers and ciphertext bidding power of the two bidders. The ciphertext bidding price comparison information is used to represent the comparison result of the bidding prices of any two bidders in ciphertext.
[0010] According to the predetermined auction rules, the edge server determines the winner's pseudonym and final transaction information based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, and sends the winner's pseudonym and final transaction information to the cloud server. The final transaction information includes the final transaction price and the final transaction volume.
[0011] Based on the stored correspondence between pseudonyms and bidders, the cloud server notifies the bidders corresponding to the winner's pseudonym to conduct power data transactions according to the winner's final transaction information.
[0012] In one possible implementation, the method further includes:
[0013] The key generation center generates a public key and a private key for a homomorphic encryption algorithm, and sends the public key to the bidder and the cloud server, and sends the private key to the edge server.
[0014] In one possible implementation, the cloud server generates a ciphertext comparison vector for any two bidders based on their ciphertext bidding information, including:
[0015] The cloud server randomly generates a positive integer Z, and encrypts Z using the public key to obtain...
[0016] For any two bidders' two encrypted bid prices and The cloud server calculates the encrypted price comparison value between any two bidders according to the following formula.
[0017]
[0018] The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information between any two bidders includes: and
[0019] In one possible implementation, the edge server determines the winner's pseudonym and final transaction information according to predetermined auction rules, based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, including:
[0020] The edge server uses the private key to decrypt the encrypted bidding price comparison information of any two bidders to determine the size relationship between the bidding prices of any two bidders.
[0021] The edge server uses the private key to decrypt the encrypted bid power of any two bidders to obtain the bid power of any two bidders.
[0022] The edge server, according to predetermined auction rules, determines the pseudonym of the winner in the power data transaction and its final transaction information based on the relationship between the bid prices of each bidder and the bidding power of each bidder.
[0023] In one possible implementation, the edge server, according to predetermined auction rules, determines the pseudonym of the winner in the power data transaction and its final transaction information based on the relationship between the bid prices of each bidder and the bidding power of each bidder, including:
[0024] The edge server determines the seller's bid price ranking fs1 based on the relative sizes of the bid prices from each bidder and the pseudonyms of each bidder. <fs2<...<fs n The bid prices from the buyers are ranked as follows: fb1>fb2>...>fb m m and n are integers greater than or equal to 2, fs j Seller s ranked by bid price at position j j The pseudonym symbol, fb i Buyer b ranked by bid price at position i i The syllabic identifiers, i takes values of 1, 2, ..., m, and j takes values of 1, 2, ..., n;
[0025] The edge server, based on the seller's bid price ranking and the buyer's bid price ranking, determines the seller's pseudonym fs whose bid price ranking is Lth and meets the following conditions. L The buyer's pseudonym fb, ranked Kth by bid price. K :
[0026]
[0027] The edge server determines the winner, including the buyer in the middle of the fb.K The bid price is higher among both buyers and sellers. L The seller with the smaller bid price;
[0028] The edge server determines the winner's final transaction price as the winner's bid price;
[0029] The edge server determines the final transaction volume of each buyer and each seller in the winner based on the bidding power of each buyer and each seller in the winner.
[0030] Among them, qb i For buyer b i The bidding power, ps j For the seller s j The bidding power.
[0031] In one possible implementation, the edge server determines the final transaction volume for each buyer and seller in the winning pool based on the bidding power of each buyer and each seller, including:
[0032] if The final transaction volume for each seller among the winners is determined to be the seller's bid power, and the final transaction volume for each buyer is the buyer's bid power minus a first average value, where the first average value is...
[0033] if The final transaction volume for each buyer among the winners is determined to be the bid power of that buyer, and the final transaction volume for each seller is the bid power of that seller minus a second average value, where the second average value is...
[0034] Secondly, this disclosure provides a cloud-edge collaborative power data trading method, applied to a bidder, where the bidder is either a buyer or a seller, and the method includes:
[0035] Each bidder encrypts its own bid information using a pre-stored public key of a homomorphic encryption algorithm to obtain ciphertext bid information, which includes the bid price and bid electricity amount.
[0036] A bid request is sent to the cloud server. The bid request carries the type identifier of the bidder and encrypted bid information. The type identifier of the bidder includes a seller identifier or a buyer identifier.
[0037] After becoming a winner in the power data transaction, the user receives the final transaction information sent by the cloud server, which includes the final transaction price and the final transaction volume.
[0038] Thirdly, this disclosure provides a cloud-edge collaborative power data trading method applied to a cloud server, the method comprising:
[0039] Receive a bid request sent by a bidder, the bid request carrying the bidder's type identifier and encrypted bid information, the bidder's type identifier including a seller identifier or a buyer identifier;
[0040] In response to the received bid request, a pseudonym is assigned to the bidder, wherein a seller pseudonym is assigned to the bidder identified as a seller, and a buyer pseudonym is assigned to the bidder identified as a buyer.
[0041] Based on the encrypted bidding information of any two bidders, a encrypted comparison vector is generated for the two bidders and the encrypted comparison vector is sent to the edge server. The encrypted comparison vector includes encrypted bidding price comparison information and the corresponding pseudonym identifiers and encrypted bidding power of the two bidders. The encrypted bidding price comparison information is used to represent the comparison result of the bidding prices of the two bidders in encrypted form.
[0042] Receive the winner's pseudonym and their final transaction information returned by the edge server;
[0043] Based on the stored correspondence between pseudonyms and bidders, the bidders corresponding to the winner's pseudonym are notified to conduct power data transactions according to the winner's final transaction information.
[0044] In one possible implementation, generating the ciphertext comparison vectors of any two bidders based on their ciphertext bidding information includes:
[0045] A random positive integer Z is generated, and Z is encrypted using the public key of a pre-stored homomorphic encryption algorithm.
[0046] For any two bidders' two encrypted bid prices and The encrypted price comparison value of any two bidders is calculated using the following formula.
[0047]
[0048] The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information between any two bidders includes: and
[0049] Fourthly, this disclosure provides a cloud-edge collaborative power data trading method applied to an edge server, the method comprising:
[0050] The cloud server receives encrypted comparison vectors of any two bidders. The encrypted comparison vectors include encrypted bidding price comparison information and the corresponding pseudonyms of the two bidders and encrypted bidding power. The encrypted bidding price comparison information is used to encrypt the comparison result of the bidding prices of the two bidders.
[0051] According to the predetermined auction rules, based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vector of any two bidders, the pseudonym of the winner and its final transaction information are determined, including the final transaction price and the final transaction volume.
[0052] The winner's pseudonym and final transaction information are sent to the cloud server.
[0053] In one possible implementation, determining the winner's pseudonym and final transaction information according to predetermined auction rules, based on a pre-stored private key of a homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, includes:
[0054] The private key is used to decrypt the encrypted bidding price comparison information of any two bidders to determine the size relationship between the bidding prices of any two bidders.
[0055] The encrypted bid power of any two bidders is decrypted using the private key to obtain the bid power of any two bidders.
[0056] According to the predetermined auction rules, based on the relationship between the bid prices of each bidder and the bidding power of each bidder, the pseudonym of the winner in the power data transaction and its final transaction information are determined.
[0057] In one possible implementation, determining the pseudonym of the winner and their final transaction information in the power data transaction according to predetermined auction rules, based on the relationship between the bid prices of each bidder and the bidding power of each bidder, includes:
[0058] Based on the relative prices of the bidders and the pseudonyms used by each bidder, the seller's bid price ranking (fs1) is determined. <fs2<...<fs n The bid prices from the buyers are ranked as follows: fb1>fb2>...>fb m m and n are integers greater than or equal to 2, fs j Seller s ranked by bid price at position j jThe pseudonym symbol, fb i Buyer b ranked by bid price at position i i The syllabic identifiers, i takes values of 1, 2, ..., m, and j takes values of 1, 2, ..., n;
[0059] Based on the seller's bid price ranking and the buyer's bid price ranking, determine the seller's pseudonym fs whose bid price ranking is Lth and satisfies the following conditions. L The buyer's pseudonym fb, ranked Kth by bid price. K :
[0060]
[0061] The winners were determined by the ratio of buyers to fb. K The bid price is higher among both buyers and sellers. L The seller with the smaller bid price;
[0062] The final transaction price of the winner is determined to be the winner's bid price;
[0063] Based on the bidding power of each buyer and each seller in the winners, the final transaction volume of each buyer and each seller in the winners is determined;
[0064] Among them, qb i For buyer b i The bidding power, ps j For the seller s j The bidding power.
[0065] In one possible implementation, determining the final transaction volume for each buyer and seller among the winners, based on the bidding power of each buyer and each seller among the winners, includes:
[0066] if The final transaction volume for each seller among the winners is determined to be the seller's bid power, and the final transaction volume for each buyer is the buyer's bid power minus a first average value, where the first average value is...
[0067] if The final transaction volume for each buyer among the winners is determined to be the bid power of that buyer, and the final transaction volume for each seller is the bid power of that seller minus a second average value, where the second average value is...
[0068] Fifthly, this disclosure provides a cloud-edge collaborative power data trading system, which includes a bidder, a cloud server, and an edge server.
[0069] The bidders are configured to encrypt their bidding information using a pre-stored public key of a homomorphic encryption algorithm to obtain ciphertext bidding information, which includes the bid price and bid power. The ciphertext bidding information includes the ciphertext bid price and ciphertext bid power. They then send a bidding request to the cloud server, which carries the bidder's type identifier and ciphertext bidding information. The bidder's type identifier includes either a seller identifier or a buyer identifier.
[0070] The cloud server is configured to, in response to a received bidding request, assign pseudonyms to bidders, wherein a seller pseudonym is assigned to bidders identified as sellers, and a buyer pseudonym is assigned to bidders identified as buyers; generate a ciphertext comparison vector for any two bidders based on their ciphertext bidding information, and send the ciphertext comparison vector to an edge server. The ciphertext comparison vector includes ciphertext bidding price comparison information and its corresponding pseudonyms and ciphertext bidding power of the two bidders. The ciphertext bidding price comparison information is used to represent the comparison result of the bidding prices of the two bidders in ciphertext.
[0071] The edge server is configured to determine the winner's pseudonym and final transaction information based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, according to predetermined auction rules, and send the winner's pseudonym and final transaction information to the cloud server. The final transaction information includes the final transaction price and the final transaction volume.
[0072] The cloud server is also configured to, based on the stored correspondence between pseudonyms and bidders, notify the bidders corresponding to the winner's pseudonym to conduct power data transactions according to the winner's final transaction information.
[0073] In one possible implementation, the system further includes:
[0074] The key generation center is configured to generate public and private keys for homomorphic encryption algorithms, and send the public key to the bidder and the cloud server, and send the private key to the edge server.
[0075] In one possible implementation, the portion of the cloud server that generates the ciphertext comparison vectors of any two bidders based on their ciphertext bidding information is configured as follows:
[0076] The cloud server randomly generates a positive integer Z, and encrypts Z using the public key to obtain...
[0077] For any two bidders' two encrypted bid prices and The cloud server calculates the encrypted price comparison value between any two bidders according to the following formula.
[0078]
[0079] The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information between any two bidders includes: and
[0080] In one possible implementation, the edge server determines the winner's pseudonym and final transaction information according to predetermined auction rules, based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, including:
[0081] The edge server uses the private key to decrypt the encrypted bidding price comparison information of any two bidders to determine the size relationship between the bidding prices of any two bidders.
[0082] The edge server uses the private key to decrypt the encrypted bid power of any two bidders to obtain the bid power of any two bidders.
[0083] The edge server, according to predetermined auction rules, determines the pseudonym of the winner in the power data transaction and its final transaction information based on the relationship between the bid prices of each bidder and the bidding power of each bidder.
[0084] In one possible implementation, the portion of the edge server that determines the pseudonym of the winner in the power data transaction and its final transaction information, based on the relationship between the bid prices of each bidder and the bidding power of each bidder according to predetermined auction rules, is configured as follows:
[0085] The edge server determines the seller's bid price ranking fs1 based on the relative sizes of the bid prices from each bidder and the pseudonyms of each bidder. <fs2<...<fs n The bid prices from the buyers are ranked as follows: fb1>fb2>...>fb m m and n are integers greater than or equal to 2, fs j Seller s ranked by bid price at position j j The pseudonym symbol, fb i Buyer b ranked by bid price at position i i The syllabic identifiers, i takes values of 1, 2, ..., m, and j takes values of 1, 2, ..., n;
[0086] The edge server, based on the seller's bid price ranking and the buyer's bid price ranking, determines the seller's pseudonym fs whose bid price ranking is Lth and meets the following conditions. L The buyer's pseudonym fb, ranked Kth by bid price. K :
[0087]
[0088] The edge server determines the winner, including the buyer in the middle of the fb. K The bid price is higher among both buyers and sellers. L The seller with the smaller bid price;
[0089] The edge server determines the winner's final transaction price as the winner's bid price;
[0090] The edge server determines the final transaction volume of each buyer and each seller in the winner based on the bidding power of each buyer and each seller in the winner.
[0091] Among them, qb i For buyer b i The bidding power, ps j For the seller s j The bidding power.
[0092] In one possible implementation, the portion of the edge server that determines the final transaction volume for each buyer and seller among the winners, based on the bidding power of each buyer and each seller among the winners, is configured as follows:
[0093] if The final transaction volume for each seller among the winners is determined to be the seller's bid power, and the final transaction volume for each buyer is the buyer's bid power minus a first average value, where the first average value is...
[0094] if The final transaction volume for each buyer among the winners is determined to be the bid power of that buyer, and the final transaction volume for each seller is the bid power of that seller minus a second average value, where the second average value is...
[0095] Sixthly, this disclosure provides a cloud-edge collaborative power data trading device, applied to a bidder, which is either a buyer or a seller. The device includes:
[0096] The bidding information encryption module is configured to encrypt the respective bidding information based on the public key of a pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information. The bidding information includes the bid price and the bid electricity amount, and the ciphertext bidding information includes the ciphertext bid price and the ciphertext bid electricity amount.
[0097] The bidding request module is configured to send a bidding request to the cloud server. The bidding request carries the type identifier of the bidder and encrypted bidding information. The type identifier of the bidder includes a seller identifier or a buyer identifier.
[0098] The transaction information receiving module is configured to receive the final transaction information sent by the cloud server after becoming a winner in the power data transaction. The final transaction information includes the final transaction price and the final transaction volume.
[0099] Seventhly, this disclosure provides a cloud-edge collaborative power data trading device applied to a cloud server, the device comprising:
[0100] The request receiving module is configured to receive a bid request sent by a bidder, the bid request carrying the bidder's type identifier and encrypted bid information, the bidder's type identifier including a seller identifier or a buyer identifier;
[0101] The pseudonym allocation module is configured to assign pseudonym identifiers to bidders in response to received bid requests, wherein a seller pseudonym identifier is assigned to bidders identified as sellers, and a buyer pseudonym identifier is assigned to bidders identified as buyers.
[0102] The comparison vector generation module is configured to generate a ciphertext comparison vector for any two bidders based on their ciphertext bidding information. The ciphertext comparison vector includes ciphertext bid price comparison information and the corresponding pseudonyms and ciphertext bid power of the two bidders. The ciphertext bid price comparison information is used to represent the comparison result of the bid prices of the two bidders in ciphertext.
[0103] The comparison vector sending module is configured to send the encrypted comparison vectors of any two bidders to the edge server;
[0104] The winner information receiving module is configured to receive the winner's pseudonym and final transaction information returned by the edge server;
[0105] The transaction information notification module is configured to notify the bidder corresponding to the winner's pseudonym to conduct power data transactions according to the winner's final transaction information, based on the stored correspondence between pseudonym identifiers and bidders.
[0106] In one possible implementation, the comparison vector generation module is configured as follows:
[0107] A random positive integer Z is generated, and Z is encrypted using the public key of a pre-stored homomorphic encryption algorithm.
[0108] For any two bidders' two encrypted bid prices and The encrypted price comparison value of any two bidders is calculated using the following formula.
[0109]
[0110] The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information between any two bidders includes: and
[0111] Eighthly, this disclosure provides a cloud-edge collaborative power data trading device applied to an edge server, the device comprising:
[0112] The comparison vector receiving module is configured to receive encrypted comparison vectors of any two bidders sent by the cloud server. The encrypted comparison vectors include encrypted bidding price comparison information and the corresponding pseudonyms of the two bidders and encrypted bidding power. The encrypted bidding price comparison information is used to encrypt the comparison result of the bidding prices of the two bidders.
[0113] The winner information determination module is configured to determine the winner's pseudonym and final transaction information according to predetermined auction rules, based on the private key of a pre-stored homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders. The final transaction information includes the final transaction price and the final transaction volume.
[0114] The winner information sending module is configured to send the winner's pseudonym and final transaction information to the cloud server.
[0115] In one possible implementation, the winner information determination module is configured as follows:
[0116] The private key is used to decrypt the encrypted bidding price comparison information of any two bidders to determine the size relationship between the bidding prices of any two bidders.
[0117] The encrypted bid power of any two bidders is decrypted using the private key to obtain the bid power of any two bidders.
[0118] According to the predetermined auction rules, based on the relationship between the bid prices of each bidder and the bidding power of each bidder, the pseudonym of the winner in the power data transaction and its final transaction information are determined.
[0119] In one possible implementation, the part of the winner information determination module that determines the pseudonym of the winner in the power data transaction and its final transaction information according to predetermined auction rules, based on the relationship between the bid prices of each bidder and the bidding power of each bidder, is configured as follows:
[0120] Based on the relative prices of the bidders and the pseudonyms used by each bidder, the seller's bid price ranking (fs1) is determined. <fs2<...<fs n The bid prices from the buyers are ranked as follows: fb1>fb2>...>fb m m and n are integers greater than or equal to 2, fs j Seller s ranked by bid price at position j j The pseudonym symbol, fb i Buyer b ranked by bid price at position i i The syllabic identifiers, i takes values of 1, 2, ..., m, and j takes values of 1, 2, ..., n;
[0121] Based on the seller's bid price ranking and the buyer's bid price ranking, determine the seller's pseudonym fs whose bid price ranking is Lth and satisfies the following conditions. L The buyer's pseudonym fb, ranked Kth by bid price. K :
[0122]
[0123] The winners were determined by the ratio of buyers to fb. K The bid price is higher among both buyers and sellers. L The seller with the smaller bid price;
[0124] The final transaction price of the winner is determined to be the winner's bid price;
[0125] Based on the bidding power of each buyer and each seller in the winners, the final transaction volume of each buyer and each seller in the winners is determined;
[0126] Among them, qb i For buyer b i The bidding power, ps j For the seller s j The bidding power.
[0127] In one possible implementation, the portion of the winner information determination module that determines the final transaction volume of each buyer and seller among the winners, based on the bidding power of each buyer and each seller among the winners, is configured as follows:
[0128] if The final transaction volume for each seller among the winners is determined to be the seller's bid power, and the final transaction volume for each buyer is the buyer's bid power minus a first average value, where the first average value is...
[0129] if The final transaction volume for each buyer among the winners is determined to be the bid power of that buyer, and the final transaction volume for each seller is the bid power of that seller minus a second average value, where the second average value is...
[0130] In a ninth aspect, embodiments of this disclosure provide an electronic device including a memory and a processor, wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method as described in any one of the second to fourth aspects.
[0131] In a tenth aspect, embodiments of this disclosure provide a computer-readable storage medium having computer instructions stored thereon that, when executed by a processor, implement the method as described in any one of the second to fourth aspects.
[0132] According to the technical solution provided in this disclosure, bidders can encrypt their bidding information based on a pre-stored public key of a homomorphic encryption algorithm to obtain ciphertext bidding information. This bidding information includes the bid price and bid power, and the ciphertext bidding information includes the ciphertext bid price and ciphertext bid power. A bidding request is then sent to a cloud server. This bidding request carries the bidder's type identifier and the ciphertext bidding information. The bidder's type identifier includes either a seller identifier or a buyer identifier. Thus, the cloud server can only obtain the bidder's ciphertext bidding information, avoiding the exposure of the true bidding information and ensuring the security of the bidding information. In response to the received bidding request, the cloud server assigns a pseudonym identifier to the bidder, specifically a seller pseudonym identifier for bidders with a seller identifier and a buyer pseudonym identifier for bidders with a buyer identifier. A ciphertext comparison vector is generated based on the ciphertext bidding information of any two bidders and sent to an edge server. The comparison vector includes encrypted bidding price comparison information and the corresponding pseudonyms of the two bidders and encrypted bidding power. The encrypted bidding price comparison information is used to represent the comparison result of the bidding prices of any two bidders. Thus, the edge server can only know the pseudonyms of the bidders, the bidding price comparison result, and the encrypted bidding power, avoiding the exposure of the bidders' true identities and bidding prices. According to predetermined auction rules, the edge server, based on the pre-stored private key of the homomorphic encryption algorithm and the encrypted comparison vectors of any two bidders, determines the winner's pseudonym and its final transaction information, and sends the winner's pseudonym and its final transaction information to the cloud server. The final transaction information includes the final transaction price and the final transaction volume. Only when the cloud server stores the correspondence between pseudonyms and bidders can the cloud server notify the bidder corresponding to the winner's pseudonym to conduct power data transactions according to the winner's final transaction information. In the above transaction process, neither the cloud server nor the edge server knows the bidder's actual bid price, thus avoiding the exposure of the bidder's bid price. Only the cloud server knows the bidder's real identity, but it does not know the bid information of each bidder. The edge server only knows the bidder's pseudonym and does not know the bidder's real identity. This effectively ensures the bidder's information security and protects the bidder's privacy.
[0133] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0134] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments, taken in conjunction with the accompanying drawings. In the drawings:
[0135] Figure 1 The flowchart illustrates a cloud-edge collaborative power data trading method provided in an embodiment of this disclosure.
[0136] Figure 2 The flowchart illustrates a cloud-edge collaborative power data trading method for bidders, as provided in an embodiment of this disclosure.
[0137] Figure 3 The flowchart illustrates a cloud-edge collaborative power data trading method for cloud servers provided in an embodiment of this disclosure.
[0138] Figure 4 The flowchart illustrates a cloud-edge collaborative power data trading method applied to an edge server, as provided in an embodiment of this disclosure.
[0139] Figure 5 This diagram illustrates a structural block diagram of a cloud-edge collaborative power data trading system provided in an embodiment of this disclosure.
[0140] Figure 6 This diagram illustrates a structural block diagram of a cloud-edge collaborative power data trading device for bidders, provided in an embodiment of this disclosure.
[0141] Figure 7 This diagram illustrates the structural block diagram of a cloud-edge collaborative power data trading device for cloud servers, provided in an embodiment of this disclosure.
[0142] Figure 8 This diagram illustrates a structural block diagram of a cloud-edge collaborative power data trading device applied to an edge server, as provided in an embodiment of this disclosure.
[0143] Figure 9 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0144] Figure 10 A schematic diagram of the structure of a computer system suitable for implementing the methods of the embodiments of this disclosure is shown. Detailed Implementation
[0145] In the following, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to enable those skilled in the art to readily implement them. Furthermore, for clarity, portions unrelated to the description of exemplary embodiments have been omitted from the drawings.
[0146] In this disclosure, it should be understood that terms such as “comprising” or “having” are intended to indicate the presence of features, figures, steps, behaviors, components, parts or combinations thereof disclosed in this specification, and are not intended to exclude the possibility of the presence or addition of one or more other features, figures, steps, behaviors, components, parts or combinations thereof.
[0147] It should also be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0148] The functions of the entities involved in this public electricity data transaction:
[0149] Bidding parties refer to the buyer and seller participating in the electricity data transaction. Both parties submit bids for the electricity being traded, including sellers and buyers. In the electricity market, sellers are electricity providers, and buyers are electricity consumers. The bilateral auction mechanism adopted in this disclosure ensures that both buyers and sellers bid according to their true intentions to maximize utility; therefore, all bids submitted in this disclosure are genuine.
[0150] Cloud servers: Due to the complex computations involved in this disclosure, such as encryption and big data processing, these cloud-based operations are performed by cloud servers with computing capabilities. The cloud servers primarily collect encrypted bidding prices from both buyers and sellers and utilize homomorphic encryption properties to perform calculations on the ciphertext data to obtain the magnitude of any two bidding prices.
[0151] Edge server: The edge server is mainly responsible for setting the auction rules and comparing the prices of any two bids sent by the cloud server to determine the final winner and complete the auction.
[0152] The basic concepts of the auction mechanism are as follows:
[0153] Bidders: In the auction process, bidders are the buyers and sellers who offer prices with the aim of buying or selling goods in the market.
[0154] Auctioneer: The edge server in this disclosure is primarily responsible for operating the auction process, determining the auction mechanism, making winner decisions, identifying the winner, and distributing payments. In this disclosure, the edge server can collaborate with third-party platforms to conduct the auction process.
[0155] Valuation: During the auction process, both buyers and sellers must value each item they request or sell; furthermore, the valuation can be higher or lower than the final transaction price, which is determined by the edge server during the auction process.
[0156] Final transaction price: During the auction process, after the seller and buyer submit their bids, the edge server will determine the final transaction price based on the optimization objectives; in other words, the final transaction price is the price at which the buyer and seller reach an agreement.
[0157] The key economic attributes involved in auctions include bidding price, utility, and individual rationality. In this disclosure, utility is the difference between the final transaction price and the bid price expected by the bidder; the larger the difference, the higher the utility. The mechanism proposed in this disclosure ensures that participants achieve maximum utility when bidding at their expected price. Individual rationality ensures that the primary objective of both parties in the auction is to maximize their own utility, thus motivating participants to engage in the transaction rather than disrupting the market.
[0158] Figure 1 This diagram illustrates a flowchart of a cloud-edge collaborative power data trading method provided in an embodiment of this disclosure. Figure 1 As shown, the cloud-edge collaborative power data trading method includes the following steps S101-S106:
[0159] In step S101, the bidders encrypt their respective bidding information based on the public key of the pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information. The bidding information includes the bid price and the bid power. The ciphertext bidding information includes the ciphertext bid price and the ciphertext bid power.
[0160] In one possible implementation, each bidder has a pre-stored public key for a homomorphic encryption algorithm. Homomorphic encryption is an encryption method that allows specific computational operations to be performed on ciphertext encrypted with the public key without decrypting the ciphertext. The result of the computation, after decryption using the private key, is the same as the result of performing the corresponding operation directly on the plaintext. This encryption method can protect data privacy and security.
[0161] In one possible implementation, the bidder can be either a buyer or a seller. The buyer's bid price refers to the price offered by the buyer to purchase a unit share of electricity in this transaction, and the bid amount of electricity is the amount of electricity the buyer needs to purchase in this transaction. The seller's bid price refers to the price offered by the seller to sell a unit share of electricity in this transaction, and the bid amount of electricity is the amount of electricity the seller needs to sell in this transaction. For each bidder, whether buyer or seller, they need to encrypt their bid price and bid amount of electricity using a public key to obtain the encrypted ciphertext bid price and ciphertext bid amount of electricity.
[0162] For example, we can define the set of buyers in this transaction as B, where B i ∈B, the seller set is S, where S j ∈S. For buyer B i Its bidding information is recorded as byr i =(vb i ,qb i ), where vb i For buyer B iThe bid price, qb i For buyer B i The bidding power, for seller S j Its bidding information is recorded as Sel j =(vs) j ps j ), where vs j Seller S j The bidding price, ps j For seller S j The bidding power. For any plaintext data m, let the ciphertext decrypted using the above public key be denoted as . Therefore, for buyer B i The encrypted bid information can be recorded as follows: For seller S j The encrypted bid information can be recorded as follows:
[0163] In step S102, the bidder sends a bid request to the cloud server. The bid request carries the bidder's type identifier and encrypted bid information. The bidder's type identifier includes a seller identifier or a buyer identifier.
[0164] In one possible implementation, each bidder can send a bid request to the cloud server to request a bid for this power data transaction. The bid request does not carry the actual bid price and bid power, but rather carries the encrypted bid price and bid power to prevent the actual bid prices of the buyer and seller from revealing their economic situation or trade secrets.
[0165] In one possible implementation, the bidder type identifier is used to enable the cloud server to distinguish the type of bidder, including a seller identifier and a buyer identifier.
[0166] In step S103, the cloud server responds to the received bidding request by assigning pseudonym identifiers to the bidders, wherein a seller pseudonym identifier is assigned to the bidder with the seller identifier, and a buyer pseudonym identifier is assigned to the bidder with the buyer identifier.
[0167] In one possible implementation, after receiving a bid request, the cloud server can assign a seller pseudonym to bidders identified as sellers and a buyer pseudonym to bidders identified as buyers, for example, buyer B. i The buyer's pseudonym is fb i For seller S j Assign seller pseudonym as fs j Only the cloud server knows the correspondence between the pseudonyms and the real identities of the bidders.
[0168] In step S104, the cloud server generates a ciphertext comparison vector for any two bidders based on their ciphertext bidding information and sends the ciphertext comparison vector to the edge server. The ciphertext comparison vector includes ciphertext bidding price comparison information and the pseudonym identifiers and ciphertext bidding power of the two bidders.
[0169] In one possible implementation, the encrypted bidding information of any two bidders can be encrypted bidding information of a seller and encrypted bidding information of a buyer, or encrypted bidding information of two buyers, or encrypted bidding information of two sellers.
[0170] In one possible implementation, the cloud server can perform computational operations such as subtraction or division to compare the encrypted bid prices of two bidders, obtaining encrypted bid price comparison information. Since the encrypted bid price is encrypted using the public key of a homomorphic encryption algorithm, leveraging the homomorphic property of the algorithm, there is no need to decrypt the ciphertext. The result of the comparison operation, after decryption using the private key, is the same as the result of performing the corresponding operation directly on the plaintext.
[0171] In one possible implementation, the cloud server will also send the pseudonyms of the two bidders corresponding to the encrypted bidding price comparison information to the edge server, so that the edge server can determine which two bidders' bidding prices the encrypted bidding price comparison information represents; at the same time, it will also send the encrypted bidding power of the two bidders to the edge server.
[0172] In step S105, the edge server determines the winner's pseudonym and final transaction information based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, according to the predetermined auction rules, and sends the winner's pseudonym and final transaction information to the cloud server.
[0173] In one possible implementation, since the encrypted bid price is ciphertext encrypted using the public key of a homomorphic encryption algorithm, leveraging the homomorphic property of the algorithm, there's no need to decrypt the ciphertext. The result of the comparison operation—the ciphertext bid price comparison information—after decryption using the private key, is the same as the result of directly comparing the plaintext bid price. Therefore, after the edge server decrypts the ciphertext bid price comparison information of the two bidders in the ciphertext comparison vector using the pre-stored private key of the homomorphic encryption algorithm, it can determine the comparison result of the plaintext bid prices of the two bidders. In this way, the edge server can obtain the comparison result of the bid prices between any two bidders (including buyers and sellers).
[0174] In one possible implementation, the edge server can also decrypt the encrypted bid electricity amount using the pre-stored private key of the homomorphic encryption algorithm to obtain the bid electricity amount. Then, the edge server can conduct an auction according to predetermined auction rules, based on the comparison of the bidding prices between any two bidders (including buyers and sellers) and the bid electricity amount, to determine the winner in the electricity data transaction, as well as the winner's final transaction price and final transaction volume. Here, the winner refers to the bidder (including buyers and sellers) who is capable of conducting electricity data transactions. The edge server can send the winner's pseudonym and final transaction information to the cloud server.
[0175] In step S106, the cloud server, based on the stored correspondence between pseudonyms and bidders, notifies the bidders corresponding to the winner's pseudonym to conduct power data transactions according to the winner's final transaction information.
[0176] In one possible implementation, when assigning pseudonyms to bidders, the cloud server can store the correspondence between the pseudonyms and the bidders. In this way, after receiving the winner pseudonym and its final transaction information from the edge server, the cloud server can notify the bidder corresponding to the winner pseudonym to conduct power data transactions according to the final transaction price and final transaction volume of the winner pseudonym.
[0177] In this embodiment, bidders can encrypt their bidding information based on a pre-stored public key of a homomorphic encryption algorithm to obtain ciphertext bidding information, which includes the bid price and bid power. The ciphertext bidding information includes the ciphertext bid price and ciphertext bid power. A bidding request is then sent to the cloud server, carrying the bidder's type identifier and ciphertext bidding information. The bidder's type identifier includes either a seller identifier or a buyer identifier. Thus, the cloud server can only obtain the bidder's ciphertext bidding information, avoiding the exposure of the true bidding information and ensuring the security of the bidding information. In response to the received bidding request, the cloud server assigns a pseudonym identifier to the bidder, specifically a seller pseudonym identifier for bidders with a seller identifier and a buyer pseudonym identifier for bidders with a buyer identifier. A ciphertext comparison vector is generated based on the ciphertext bidding information of any two bidders and sent to the edge server. The ciphertext comparison vector contains... The process includes encrypted bidding price comparison information and the corresponding pseudonyms of the two bidders, as well as encrypted bidding power. The encrypted bidding price comparison information is used to represent the comparison result of the bidding prices of any two bidders. Thus, the edge server can only know the pseudonyms of the bidders, the comparison result of the bidding prices, and the encrypted bidding power, avoiding the exposure of the bidders' true identities and bidding prices. According to predetermined auction rules, the edge server, based on the pre-stored private key of the homomorphic encryption algorithm and the encrypted comparison vectors of the two bidders, determines the pseudonym of the winner and its final transaction information, and sends the winner's pseudonym and final transaction information to the cloud server. The final transaction information includes the final transaction price and the final transaction volume. Only when the cloud server stores the correspondence between pseudonyms and bidders can the cloud server notify the bidder corresponding to the winner's pseudonym to conduct electricity data transactions according to the winner's final transaction information. In the above transaction process, neither the cloud server nor the edge server knows the bidder's actual bid price, thus avoiding the exposure of the bidder's bid price. Only the cloud server knows the bidder's real identity, but it does not know the bid information of each bidder. The edge server only knows the bidder's pseudonym and does not know the bidder's real identity. This effectively ensures the bidder's information security and protects the bidder's privacy.
[0178] In one possible implementation, the method further includes:
[0179] The key generation center generates a public key and a private key for a homomorphic encryption algorithm, and sends the public key to the bidder and the cloud server, and sends the private key to the edge server.
[0180] In this embodiment, the key generation center is a secure, authoritative institution for generating keys. This center can generate public and private keys for homomorphic encryption algorithms. For example, the homomorphic encryption algorithm used in this disclosure can be the Paillier encryption algorithm (an additive homomorphic encryption algorithm). As an asymmetric encryption algorithm, the public key for the Paillier algorithm is publickey = (n, g), where n = p * q, and p and q are two large prime numbers. That is, g is 1 to n 2 A non-zero random number. The private key is privatekey=(μ,λ), where μ=k -1 n (where μ is the remainder when n is divided by k), k satisfies gcd(k,n)=1 (i.e., the greatest common divisor of k and n is 1), and λ=lcm[(p-1),(q-1)] (i.e., λ is the least common multiple of (p-1) and (q-1)). Of course, the homomorphic encryption algorithm used in this disclosure can be other homomorphic encryption algorithms besides the Pailiier encryption algorithm mentioned above, and there are no restrictions here.
[0181] In one possible implementation, the cloud server generates a ciphertext comparison vector for any two bidders based on their ciphertext bidding information, including:
[0182] The cloud server randomly generates a positive integer Z, and encrypts Z using the public key to obtain...
[0183] For any two bidders' two encrypted bid prices and The cloud server calculates the encrypted price comparison value of the two bidders according to the following formula.
[0184]
[0185] The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information includes: and
[0186] In this embodiment, the homomorphic encryption algorithm is the Paillier encryption algorithm, which has the following homomorphic properties:
[0187] Feature A: Multiplying two ciphertexts and then decrypting them with the corresponding private key will yield the result of adding the two plaintexts.
[0188] Feature B: Guarantee that an x-th power of ciphertext will yield x times the plaintext when decrypted with the corresponding private key;
[0189] Feature C: After dividing two ciphertexts, the result of subtracting the two plaintexts can be obtained by decrypting them with the corresponding private key.
[0190] In this implementation, the Paillier encryption algorithm does not allow negative numbers. To ensure that the ciphertext in this disclosure is always positive, the cloud server randomly generates a positive integer Z and encrypts Z using the public key. Thus, for any two ciphertext bid prices and The cloud server will calculate a positive value for the encrypted price comparison of the two bidders according to the above formula. The calculation of the above formula utilizes characteristics A and C of the Paillier encryption algorithm. The setting of the positive integer Z needs to ensure that x-y+Z is positive, which can be set based on experience.
[0191] In this implementation, after the cloud server calculates the encrypted price comparison value, and This constitutes the encrypted bidding price comparison information between the two bidders. Thus, the cloud server can generate encrypted comparison vectors for the two bidders: ( The pseudonyms of the two bidders, and the encrypted bids of the two bidders (electrical power).
[0192] For example, suppose there are two bidders, one of whom is buyer B. i The other is seller S. j Then, for the two encrypted bid prices of these two bidders... and The cloud server can calculate the comparison value of the encrypted prices of the two bidders. This then generates a ciphertext comparison vector.
[0193] In one possible implementation, the edge server determines the winner's pseudonym and final transaction information in the power data transaction based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, according to predetermined auction rules, including:
[0194] The edge server uses the private key to decrypt the encrypted bidding price comparison information of any two bidders to determine the size relationship between the bidding prices of any two bidders.
[0195] The edge server uses the private key to decrypt the encrypted bid power of any two bidders to obtain the bid power of any two bidders.
[0196] The edge server, according to predetermined auction rules, determines the winner's pseudonym and final transaction information in the power data transaction based on the relationship between the bid prices of each bidder and the bidding power of each bidder.
[0197] In this embodiment, the Pailiier encryption algorithm described above is used as an example of homomorphic encryption. The private key of the Pailiier encryption algorithm is used to compare the ciphertext bidding prices of any two bidders. and Decryption yields CP. x,y And Z, due to CP x,y =x-y+Z, therefore CP x,y -Z = xy, if CP x,y -Z > 0, then x > y, if CP x,y -Z < 0, then x < y, if CP x,y If -Z equals 0, then x equals y. In this way, the relationship between the bid prices of the two bidders can be determined without knowing the actual bid prices x and y of the two bidders.
[0198] In this implementation, the edge server uses the private key to decrypt the encrypted bid power of any two bidders to obtain the bid power of any two bidders; for example, for bidder b... i encrypted bidding power Decrypt to obtain qb i For the bidder s j encrypted bidding power Decryption will yield the ps file. j .
[0199] In this implementation, after the above decryption, the relative sizes of the bidding prices of each bidder and the bidding power of each bidder in this power data transaction can be obtained. It should be noted that the bidders here are identified by pseudonyms. The edge server does not know the real identity of the bidders, nor does it know the bidding prices of each bidder. It will not expose the bidders' own economic situation or trade secrets.
[0200] In one possible implementation, the edge server, according to predetermined auction rules, determines the pseudonym of the winner in the power data transaction and its final transaction information based on the relationship between the bid prices of each bidder and the bidding power of each bidder, including:
[0201] The edge server determines the seller's bid price ranking fs1 based on the relative sizes of the bid prices from each bidder and the pseudonyms of each bidder. <fs2<...<fsn The bid prices from the buyers are ranked as follows: fb1>fb2>...>fb m m and n are integers greater than or equal to 2, fs j Seller s ranked by bid price at position j j The pseudonym symbol, fb i Buyer b ranked by bid price at position i i The syllabic identifiers, i takes values of 1, 2, ..., m, and j takes values of 1, 2, ..., n;
[0202] The edge server, based on the seller's bid price ranking and the buyer's bid price ranking, determines the seller's pseudonym fs whose bid price ranking is Lth and meets the following conditions. L The buyer's pseudonym fb, ranked Kth by bid price. K :
[0203]
[0204] The edge server determines the winner, including the buyer in the middle of the fb. K The bid price is higher among both buyers and sellers. L The seller with the smaller bid price;
[0205] The edge server determines the winner's final transaction price as the winner's bid price;
[0206] The edge server determines the final transaction volume of each buyer and each seller in the winner based on the bidding power of each buyer and each seller in the winner.
[0207] Among them, qb i For buyer b i The bidding power, ps j For the seller s j The bidding power.
[0208] In this implementation, after the edge server determines the relative sizes of the bid prices from each bidder, it can sort the pseudonyms corresponding to the buyer's pseudonym identifiers to obtain the bid price ranking fb1>fb2>...>fb m Sort the pseudonyms corresponding to the seller's pseudonyms to obtain the seller's bid price ranking fs1 <fs2<...<fs n .
[0209] In this implementation, for any seller's bid price in the two card sequences mentioned above, a seller's bid price that satisfies fb can be found. K >fs L >fb K+1The situation is complex; since the demand and selling power of each buyer and seller are different, it is also necessary to consider potential winners (i.e., those who bid higher than fb). K The bid price of the buyer and the selling price are less than fs L Whether the seller (based on the bid price) can obtain and sell the corresponding electricity, that is, whether it can meet the following conditions. Alternatively, you can use fs L+1 >fb K >fs L and Therefore, fs L This is the intersection of the two sequences when the above conditions are met. It represents the minimum payment price the buyer makes to purchase electricity data and the maximum selling price the seller makes to sell electricity data. For the seller, the winner is the ratio of fs. L The seller with the smallest bid price is identified by the pseudonym fs1, fs2...fs L-1 For the sellers, the final transaction price is the bid price offered by each seller; for the buyers, the winner is the one who outbids the seller. K The buyers with the largest bids are identified by pseudonyms fb1, fb2, ..., fb K-1 The final transaction price is the bid price of each buyer.
[0210] In this implementation, after the edge server determines the winner, it can obtain the bidding power of each buyer and each seller in the winner. Since the total bidding power of all buyers and the total bidding power of all sellers may not be equal, it is necessary to allocate the final transaction volume to each buyer and each seller in the winner according to the predetermined auction rules, based on the bidding power of each buyer and each seller in the winner.
[0211] In one possible implementation, the edge server determines the final transaction volume for each buyer and seller in the winning pool based on the bidding power of each buyer and each seller, including:
[0212] if The final transaction volume for each seller among the winners is determined to be the seller's bid power, and the final transaction volume for each buyer is the buyer's bid power minus a first average value, where the first average value is...
[0213] if The final transaction volume for each buyer among the winners is determined to be the bid power of that buyer, and the final transaction volume for each seller is the bid power of that seller minus a second average value, where the second average value is...
[0214] In this embodiment, if This means that among the winners, the total electricity sold by sellers is less than or equal to the total electricity demand of buyers, at which point the electricity supply is less than or equal to the demand. Therefore, all sellers among the winners can sell all of their bid electricity, meaning the final transaction volume for each seller among the winners is their bid electricity. However, to ensure that all buyers among the winners receive electricity, each buyer among the winners should reduce the amount of electricity they purchase to avoid situations where some buyers among the winners are unable to purchase electricity. In this embodiment, the auction rule can be that each buyer reduces their purchase amount by the same amount; in this case, the final transaction volume for each buyer is the bid electricity of the buyer minus a first average value.
[0215] if This indicates that among the winners, the total electricity sold by the sellers is greater than or equal to the total electricity demand of the buyers, meaning that the electricity supply exceeds the demand. Therefore, all buyers among the winners can obtain the electricity they wish to purchase, i.e., the final transaction volume for each buyer among the winners is the electricity they bid for. However, to ensure that all sellers among the winners can sell electricity, each seller will reduce the amount of electricity they sell accordingly. In this embodiment, the auction rule can be that each seller reduces the amount of electricity they sell by the same amount; in this case, the final transaction volume for each seller is the electricity they bid for minus a second average value.
[0216] Figure 2 This diagram illustrates a flowchart of a cloud-edge collaborative power data trading method applied to a bidder, as provided in an embodiment of this disclosure. Figure 2 As shown, the method includes the following steps S201-S203:
[0217] In step S201, the bidding information of each party is encrypted based on the public key of the pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information. The bidding information includes the bid price and the bid power. The ciphertext bidding information includes the ciphertext bid price and the ciphertext bid power.
[0218] In one possible implementation, each bidder has a pre-stored public key for a homomorphic encryption algorithm. Homomorphic encryption is an encryption method that allows specific computational operations to be performed on ciphertext encrypted with the public key without decrypting the ciphertext. The result of the computation, after decryption using the private key, is the same as the result of performing the corresponding operation directly on the plaintext. This encryption method can protect data privacy and security.
[0219] In one possible implementation, the bidder can be either a buyer or a seller. The buyer's bid price refers to the price offered by the buyer to purchase a unit share of electricity in this transaction, and the bid amount of electricity is the amount of electricity the buyer needs to purchase in this transaction. The seller's bid price refers to the price offered by the seller to sell a unit share of electricity in this transaction, and the bid amount of electricity is the amount of electricity the seller needs to sell in this transaction. For each bidder, whether buyer or seller, they need to encrypt their bid price and bid amount of electricity using a public key to obtain the encrypted ciphertext bid price and ciphertext bid amount of electricity.
[0220] For example, we can define the set of buyers in this transaction as B, where B i ∈B, the seller set is S, where S j ∈S. For buyer B i Its bidding information is recorded as byr i =(vb i ,qb i ), where vb i For buyer B i The bid price, qb i For buyer B i The bidding power, for seller S j Its bidding information is recorded as Sel j =(vs) j ps j ), where vs j Seller S j The bidding price, ps j For seller S j The bidding power. For any plaintext data m, let the ciphertext decrypted using the above public key be denoted as . Therefore, for buyer B i The encrypted bid information can be recorded as follows: For seller S j The encrypted bid information can be recorded as follows:
[0221] In step S202, a bidding request is sent to the cloud server. The bidding request carries the type identifier of the bidder and encrypted bidding information. The type identifier of the bidder includes a seller identifier or a buyer identifier.
[0222] In one possible implementation, each bidder can send a bid request to the cloud server to request a bid for this power data transaction. The bid request does not carry the actual bid price and bid power, but rather carries the encrypted bid price and bid power to prevent the actual bid prices of the buyer and seller from revealing their economic situation or trade secrets.
[0223] In one possible implementation, the bidder type identifier is used to enable the cloud server to distinguish the type of bidder, including a seller identifier and a buyer identifier.
[0224] In step S203, after becoming the winner in the power data transaction, the final transaction information sent by the cloud server is received. The final transaction information includes the final transaction price and the final transaction volume.
[0225] In one possible implementation, the cloud server, in response to a received bidding request, assigns pseudonyms to bidders, wherein a seller pseudonym is assigned to bidders with seller identifiers, and a buyer pseudonym is assigned to bidders with buyer identifiers. The cloud server generates a ciphertext comparison vector for any two bidders based on their ciphertext bidding information and sends this vector to an edge server. The ciphertext comparison vector includes ciphertext bidding price comparison information and the corresponding pseudonyms of the two bidders, as well as the ciphertext bid electricity amount. The edge server, according to predetermined auction rules, determines the winner's pseudonym and final transaction information based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of the two bidders, and sends the winner's pseudonym and final transaction information to the cloud server. Based on the stored correspondence between pseudonyms and bidders, the cloud server notifies the bidder corresponding to the winner's pseudonym to conduct an electricity data transaction according to the winner's final transaction information. In this way, if the cursor becomes the winner in the power data transaction, it can receive the final transaction information sent by the cloud server, which includes the final transaction price and the final transaction volume.
[0226] Figure 3 This diagram illustrates a flowchart of a cloud-edge collaborative power data trading method applied to a cloud server, as provided in an embodiment of this disclosure. Figure 3 As shown, the method includes the following steps S301-S305:
[0227] In step S301, a bid request sent by a bidder is received. The bid request carries the bidder's type identifier and encrypted bid information. The bidder's type identifier includes a seller identifier or a buyer identifier.
[0228] In one possible implementation, bidders encrypt their bidding information using a pre-stored public key for a homomorphic encryption algorithm, obtaining ciphertext bidding information. Then, each bidder sends a bidding request to a cloud server. This request carries both a bidder type identifier and the ciphertext bidding information. The bidder type identifier can be either a seller's identifier or a buyer's identifier. The bidding information includes the bid price and the bid power, while the ciphertext bidding information includes the ciphertext bid price and the ciphertext bid power.
[0229] In step S302, in response to the received bid request, a pseudonym is assigned to the bidder, wherein a seller pseudonym is assigned to the bidder with the seller pseudonym and a buyer pseudonym is assigned to the bidder with the buyer pseudonym.
[0230] In one possible implementation, after receiving a bid request, the cloud server can assign a seller pseudonym to bidders identified as sellers and a buyer pseudonym to bidders identified as buyers, for example, buyer B. i The buyer's pseudonym is fb i For seller S j Assign seller pseudonym as fs j Only the cloud server knows the correspondence between the pseudonyms and the real identities of the bidders.
[0231] In step S303, a ciphertext comparison vector is generated based on the ciphertext bidding information of any two bidders, and the ciphertext comparison vector is sent to the edge server. The ciphertext comparison vector includes ciphertext bidding price comparison information and the corresponding pseudonym identifiers and ciphertext bidding power of the two bidders.
[0232] The encrypted bidding price comparison information is used to represent the comparison result of the bidding prices of any two bidders in encrypted form.
[0233] In one possible implementation, the encrypted bidding information of any two bidders can be encrypted bidding information of a seller and encrypted bidding information of a buyer, or encrypted bidding information of two buyers, or encrypted bidding information of two sellers.
[0234] In one possible implementation, the cloud server can perform computational operations such as subtraction or division to compare the encrypted bid prices of two bidders, obtaining encrypted bid price comparison information. Since the encrypted bid price is encrypted using the public key of a homomorphic encryption algorithm, leveraging the homomorphic property of the algorithm, there is no need to decrypt the ciphertext. The result of the comparison operation, after decryption using the private key, is the same as the result of performing the corresponding operation directly on the plaintext.
[0235] In one possible implementation, the cloud server will also send the pseudonyms of the two bidders corresponding to the encrypted bidding price comparison information to the edge server, so that the edge server can determine which two bidders' bidding prices the encrypted bidding price comparison information represents; at the same time, it will also send the encrypted bidding power of the two bidders to the edge server.
[0236] In step S304, the pseudonym of the winner and its final transaction information returned by the edge server are received.
[0237] The edge server, according to predetermined auction rules, determines the winner's pseudonym and final transaction information based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, and then sends the winner's pseudonym and final transaction information to the cloud server. In this way, the cloud server can receive the winner's pseudonym and final transaction information returned by the edge server.
[0238] In step S305, based on the stored correspondence between pseudonyms and bidders, the bidders corresponding to the pseudonyms of the winners are notified to conduct power data transactions according to the final transaction information of the winners.
[0239] In one possible implementation, when assigning pseudonyms to bidders, the cloud server can store the correspondence between the pseudonyms and the bidders. In this way, after receiving the winner pseudonym and its final transaction information from the edge server, the cloud server can notify the bidder corresponding to the winner pseudonym to conduct power data transactions according to the final transaction price and final transaction volume of the winner pseudonym.
[0240] In one possible implementation, generating the ciphertext comparison vectors of any two bidders based on their ciphertext bidding information includes:
[0241] A random positive integer Z is generated, and Z is encrypted using the public key of a pre-stored homomorphic encryption algorithm.
[0242] For any two bidders' two encrypted bid prices and The encrypted price comparison value of any two bidders is calculated using the following formula.
[0243]
[0244] The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information between any two bidders includes: and
[0245] In this embodiment, the homomorphic encryption algorithm is the Paillier encryption algorithm, which has the following homomorphic properties:
[0246] Feature A: Multiplying two ciphertexts and then decrypting them with the corresponding private key will yield the result of adding the two plaintexts.
[0247] Feature B: Guarantee that an x-th power of ciphertext will yield x times the plaintext when decrypted with the corresponding private key;
[0248] Feature C: After dividing two ciphertexts, the result of subtracting the two plaintexts can be obtained by decrypting them with the corresponding private key.
[0249] In this implementation, the Paillier encryption algorithm does not allow negative numbers. To ensure that the ciphertext in this disclosure is always positive, the cloud server randomly generates a positive integer Z and encrypts Z using the public key. Thus, for any two ciphertext bid prices and The cloud server will calculate a positive value for the encrypted price comparison of the two bidders according to the above formula. The calculation of the above formula utilizes characteristics A and C of the Paillier encryption algorithm. The setting of the positive integer Z needs to ensure that x-y+Z is positive, which can be set based on experience.
[0250] In this implementation, after the cloud server calculates the encrypted price comparison value, and This constitutes the encrypted bidding price comparison information between the two bidders. Thus, the cloud server can generate encrypted comparison vectors for the two bidders: ( The pseudonyms of the two bidders, and the encrypted bids of the two bidders (electrical power).
[0251] For example, suppose there are two bidders, one of whom is buyer B. i The other is seller S. j Then, for the two encrypted bid prices of these two bidders... and The cloud server can calculate the comparison value of the encrypted prices of the two bidders. This then generates a ciphertext comparison vector.
[0252] Figure 4 This diagram illustrates a flowchart of a cloud-edge collaborative power data trading method applied to an edge server, as provided in an embodiment of this disclosure. Figure 4 As shown, the method includes the following steps S401-S403:
[0253] In step S401, the cloud server sends encrypted comparison vectors of any two bidders. The encrypted comparison vectors include encrypted bidding price comparison information and the corresponding pseudonyms and encrypted bidding power of the two bidders.
[0254] The encrypted bidding price comparison information is used to represent the comparison result of the bidding prices of any two bidders in encrypted form.
[0255] In one possible implementation, bidders encrypt their bidding information using a pre-stored public key for a homomorphic encryption algorithm, resulting in ciphertext bidding information. This ciphertext information includes the bid price and bid power. Then, each bidder sends a bidding request to a cloud server, carrying its type identifier and ciphertext bidding information. The type identifier can be either a seller identifier or a buyer identifier. In response to the received bidding request, the cloud server assigns pseudonyms to the bidders, assigning a seller pseudonym to bidders with a seller identifier and a buyer pseudonym to bidders with a buyer identifier. The cloud server then generates a ciphertext comparison vector between any two bidders based on their ciphertext bidding information and sends this vector to an edge server. This comparison vector includes ciphertext bid price comparison information and the corresponding pseudonyms and ciphertext bid power of the two bidders.
[0256] In one possible implementation, since the encrypted bid price is ciphertext encrypted using the public key of a homomorphic encryption algorithm, leveraging the homomorphic property of the algorithm, there's no need to decrypt the ciphertext. The result of the comparison operation—the ciphertext bid price comparison information—after decryption using the private key, is the same as the result of directly comparing the plaintext bid price. Therefore, after the edge server decrypts the ciphertext bid price comparison information of the two bidders in the ciphertext comparison vector using the pre-stored private key of the homomorphic encryption algorithm, it can determine the comparison result of the plaintext bid prices of the two bidders. In this way, the edge server can obtain the comparison result of the bid prices between any two bidders (including buyers and sellers).
[0257] In one possible implementation, the edge server can also decrypt the encrypted bid electricity amount using the pre-stored private key of the homomorphic encryption algorithm to obtain the bid electricity amount. Then, the edge server can conduct an auction according to predetermined auction rules, based on the comparison of the bidding prices between any two bidders (including buyers and sellers) and the bid electricity amount, to determine the winner in the electricity data transaction, as well as the winner's final transaction price and final transaction volume. Here, the winner refers to the bidder (including buyers and sellers) who is capable of conducting electricity data transactions. The edge server can send the winner's pseudonym and final transaction information to the cloud server.
[0258] In step S402, according to the predetermined auction rules, based on the private key of the pre-stored homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, the pseudonym of the winner and its final transaction information are determined.
[0259] The final transaction information includes the final transaction price and the final transaction volume.
[0260] In one possible implementation, since the encrypted bid price is ciphertext encrypted using the public key of a homomorphic encryption algorithm, leveraging the homomorphic property of the algorithm, there's no need to decrypt the ciphertext. The result of the comparison operation—the ciphertext bid price comparison information—after decryption using the private key, is the same as the result of directly comparing the plaintext bid price. Therefore, after the edge server decrypts the ciphertext bid price comparison information of the two bidders in the ciphertext comparison vector using the pre-stored private key of the homomorphic encryption algorithm, it can determine the comparison result of the plaintext bid prices of the two bidders. In this way, the edge server can obtain the comparison result of the bid prices between any two bidders (including buyers and sellers).
[0261] In one possible implementation, the edge server can also decrypt the encrypted bid electricity amount using the pre-stored private key of the homomorphic encryption algorithm to obtain the bid electricity amount; then, the edge server can conduct an auction according to predetermined auction rules, based on the comparison of the bidding prices between any two bidders (including buyers and sellers), and the bid electricity amount, to determine the winner in the electricity data transaction, as well as the winner's final transaction price and final transaction volume. Here, the winner refers to the bidder (including buyers and sellers) who is able to conduct electricity data transactions.
[0262] In step S403, the pseudonym of the winner and its final transaction information are sent to the cloud server.
[0263] In one possible implementation, the edge server can send the winner's pseudonym and its final transaction information to the cloud server. The cloud server, based on the stored correspondence between pseudonyms and bidders, notifies the bidder corresponding to the winner's pseudonym to conduct power data transactions according to the winner's final transaction information.
[0264] In one possible implementation, determining the winner's pseudonym and final transaction information according to predetermined auction rules, based on a pre-stored private key of a homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, includes:
[0265] The private key is used to decrypt the encrypted bidding price comparison information of any two bidders to determine the size relationship between the bidding prices of any two bidders.
[0266] The encrypted bid power of any two bidders is decrypted using the private key to obtain the bid power of any two bidders.
[0267] According to the predetermined auction rules, based on the relationship between the bid prices of each bidder and the bidding power of each bidder, the pseudonym of the winner in the power data transaction and its final transaction information are determined.
[0268] In this embodiment, the Pailiier encryption algorithm described above is used as an example of homomorphic encryption. The private key of the Pailiier encryption algorithm is used to compare the ciphertext bidding prices of any two bidders. and Decryption yields CP. x,y And Z, due to CP x,y =x-y+Z, therefore CP x,y -Z = xy, if CP x,y -Z > 0, then x > y, if CP x,y -Z < 0, then x < y, if CP x,y If -Z equals 0, then x equals y. In this way, the relationship between the bid prices of the two bidders can be determined without knowing the actual bid prices x and y of the two bidders.
[0269] In this implementation, the edge server uses the private key to decrypt the encrypted bid power of any two bidders to obtain the bid power of any two bidders; for example, for bidder b... i encrypted bidding power Decrypt to obtain qb i For the bidder s j encrypted bidding power Decryption will yield the ps file.j .
[0270] In this implementation, after the above decryption, the relative sizes of the bidding prices of each bidder and the bidding power of each bidder in this power data transaction can be obtained. It should be noted that the bidders here are identified by pseudonyms. The edge server does not know the real identity of the bidders, nor does it know the bidding prices of each bidder. It will not expose the bidders' own economic situation or trade secrets.
[0271] In one possible implementation, determining the pseudonym of the winner and their final transaction information in the power data transaction according to predetermined auction rules, based on the relationship between the bid prices of each bidder and the bidding power of each bidder, includes:
[0272] Based on the relative prices of the bidders and the pseudonyms used by each bidder, the seller's bid price ranking (fs1) is determined. <fs2<...<fs n The bid prices from the buyers are ranked as follows: fb1>fb2>...>fb m m and n are integers greater than or equal to 2, fs j Seller s ranked by bid price at position j j The pseudonym symbol, fb i Buyer b ranked by bid price at position i i The syllabic identifiers, i takes values of 1, 2, ..., m, and j takes values of 1, 2, ..., n;
[0273] Based on the seller's bid price ranking and the buyer's bid price ranking, determine the seller's pseudonym fs whose bid price ranking is Lth and satisfies the following conditions. L The buyer's pseudonym fb, ranked Kth by bid price. K :
[0274]
[0275] The winners were determined by the ratio of buyers to fb. K The bid price is higher among both buyers and sellers. L The seller with the smaller bid price;
[0276] The final transaction price of the winner is determined to be the winner's bid price;
[0277] Based on the bidding power of each buyer and each seller in the winners, the final transaction volume of each buyer and each seller in the winners is determined;
[0278] Among them, qb i For buyer b iThe bidding power, ps j For the seller s j The bidding power.
[0279] In this implementation, after the edge server determines the relative sizes of the bid prices from each bidder, it can sort the pseudonyms corresponding to the buyer's pseudonym identifiers to obtain the bid price ranking fb1>fb2>...>fb m Sort the pseudonyms corresponding to the seller's pseudonyms to obtain the seller's bid price ranking fs1 <fs2<...<fs n .
[0280] In this implementation, for any seller's bid price in the two card sequences mentioned above, a seller's bid price that satisfies fb can be found. K >fs L >fb K+1 The situation is complex; since the demand and selling power of each buyer and seller are different, it is also necessary to consider potential winners (i.e., those who bid higher than fb). K The bid price of the buyer and the selling price are less than fs L Whether the seller (based on the bid price) can obtain and sell the corresponding electricity, that is, whether it can meet the following conditions. Alternatively, you can use fs L+1 >fb K >fs L and Therefore, fs L This is the intersection of the two sequences when the above conditions are met. It represents the minimum payment price the buyer makes to purchase electricity data and the maximum selling price the seller makes to sell electricity data. For the seller, the winner is the ratio of fs. L The seller with the smallest bid price is identified by the pseudonym fs1, fs2...fs L-1 For the sellers, the final transaction price is the bid price offered by each seller; for the buyers, the winner is the one who outbids the seller. K The buyers with the largest bids are identified by pseudonyms fb1, fb2, ..., fb K-1 The final transaction price is the bid price of each buyer.
[0281] In this implementation, after the edge server determines the winner, it can obtain the bidding power of each buyer and each seller in the winner. Since the total bidding power of all buyers and the total bidding power of all sellers may not be equal, it is necessary to allocate the final transaction volume to each buyer and each seller in the winner according to the predetermined auction rules, based on the bidding power of each buyer and each seller in the winner.
[0282] In one possible implementation, determining the final transaction volume for each buyer and seller among the winners, based on the bidding power of each buyer and each seller among the winners, includes:
[0283] if The final transaction volume for each seller among the winners is determined to be the seller's bid power, and the final transaction volume for each buyer is the buyer's bid power minus a first average value, where the first average value is...
[0284] if The final transaction volume for each buyer among the winners is determined to be the bid power of that buyer, and the final transaction volume for each seller is the bid power of that seller minus a second average value, where the second average value is...
[0285] In this embodiment, if This means that among the winners, the total electricity sold by sellers is less than or equal to the total electricity demand of buyers, at which point the electricity supply is less than or equal to the demand. Therefore, all sellers among the winners can sell all of their bid electricity, meaning the final transaction volume for each seller among the winners is their bid electricity. However, to ensure that all buyers among the winners receive electricity, each buyer among the winners should reduce the amount of electricity they purchase to avoid situations where some buyers among the winners are unable to purchase electricity. In this embodiment, the auction rule can be that each buyer reduces their purchase amount by the same amount; in this case, the final transaction volume for each buyer is the bid electricity of the buyer minus a first average value.
[0286] if This indicates that among the winners, the total electricity sold by the sellers is greater than or equal to the total electricity demand of the buyers, meaning that the electricity supply exceeds the demand. Therefore, all buyers among the winners can obtain the electricity they wish to purchase, i.e., the final transaction volume for each buyer among the winners is the electricity they bid for. However, to ensure that all sellers among the winners can sell electricity, each seller will reduce the amount of electricity they sell accordingly. In this embodiment, the auction rule can be that each seller reduces the amount of electricity they sell by the same amount; in this case, the final transaction volume for each seller is the electricity they bid for minus a second average value.
[0287] This disclosure also provides a cloud-edge collaborative power data trading system. Figure 5 This diagram illustrates a structural block diagram of a cloud-edge collaborative power data trading system provided in an embodiment of this disclosure. This system can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 5 As shown, the system includes: a bidder 501, a cloud server 502, and an edge server 503;
[0288] The bidder 501 is configured to encrypt its bidding information using a pre-stored public key of a homomorphic encryption algorithm to obtain ciphertext bidding information, which includes the bid price and bid power. The ciphertext bidding information includes the ciphertext bid price and ciphertext bid power. The bidder then sends a bidding request to the cloud server, which carries the bidder's type identifier and ciphertext bidding information. The bidder's type identifier includes either a seller identifier or a buyer identifier.
[0289] The cloud server 502 is configured to, in response to a received bidding request, assign pseudonyms to bidders, wherein a seller pseudonym is assigned to bidders identified as sellers, and a buyer pseudonym is assigned to bidders identified as buyers; generate a ciphertext comparison vector for any two bidders based on their ciphertext bidding information, and send the ciphertext comparison vector to the edge server. The ciphertext comparison vector includes ciphertext bidding price comparison information and the corresponding pseudonyms and ciphertext bidding power of the two bidders. The ciphertext bidding price comparison information is used to represent the comparison result of the bidding prices of the two bidders in ciphertext.
[0290] The edge server 503 is configured to determine the winner's pseudonym and final transaction information based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, according to predetermined auction rules, and send the winner's pseudonym and final transaction information to the cloud server. The final transaction information includes the final transaction price and the final transaction volume.
[0291] The cloud server 502 is also configured to, based on the stored correspondence between pseudonyms and bidders, notify the bidders corresponding to the winner's pseudonym to conduct power data transactions according to the winner's final transaction information.
[0292] In one possible implementation, the system further includes:
[0293] The key generation center is configured to generate public and private keys for homomorphic encryption algorithms, and send the public key to the bidder and the cloud server, and send the private key to the edge server.
[0294] In one possible implementation, the portion of the cloud server that generates the ciphertext comparison vectors of any two bidders based on their ciphertext bidding information is configured as follows:
[0295] The cloud server randomly generates a positive integer Z, and encrypts Z using the public key to obtain...
[0296] For any two bidders' two encrypted bid prices and The cloud server calculates the encrypted price comparison value between any two bidders according to the following formula.
[0297]
[0298] The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information between any two bidders includes: and
[0299] In one possible implementation, the edge server, according to predetermined auction rules, determines the winner's pseudonym and a portion of their final transaction information based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, as follows:
[0300] The edge server uses the private key to decrypt the encrypted bidding price comparison information of any two bidders to determine the size relationship between the bidding prices of any two bidders.
[0301] The edge server uses the private key to decrypt the encrypted bid power of any two bidders to obtain the bid power of any two bidders.
[0302] The edge server, according to predetermined auction rules, determines the pseudonym of the winner in the power data transaction and its final transaction information based on the relationship between the bid prices of each bidder and the bidding power of each bidder.
[0303] In one possible implementation, the portion of the edge server that determines the pseudonym of the winner in the power data transaction and its final transaction information, based on the relationship between the bid prices of each bidder and the bidding power of each bidder according to predetermined auction rules, is configured as follows:
[0304] The edge server determines the seller's bid price ranking fs1 based on the relative sizes of the bid prices from each bidder and the pseudonyms of each bidder. <fs2<...<fs n The bid prices from the buyers are ranked as follows: fb1>fb2>...>fb m m and n are integers greater than or equal to 2, fs j Seller s ranked by bid price at position j j The pseudonym symbol, fb i Buyer b ranked by bid price at position i i The syllabic identifiers, i takes values of 1, 2, ..., m, and j takes values of 1, 2, ..., n;
[0305] The edge server, based on the seller's bid price ranking and the buyer's bid price ranking, determines the seller's pseudonym fs whose bid price ranking is Lth and meets the following conditions. L The buyer's pseudonym fb, ranked Kth by bid price. K :
[0306]
[0307] The edge server determines the winner, including the buyer in the middle of the fb. K The bid price is higher among both buyers and sellers. L The seller with the smaller bid price;
[0308] The edge server determines the winner's final transaction price as the winner's bid price;
[0309] The edge server determines the final transaction volume of each buyer and each seller in the winner based on the bidding power of each buyer and each seller in the winner.
[0310] Among them, qb i For buyer b i The bidding power, ps j For the seller s j The bidding power.
[0311] In one possible implementation, the portion of the edge server that determines the final transaction volume for each buyer and seller among the winners, based on the bidding power of each buyer and each seller among the winners, is configured as follows:
[0312] if The final transaction volume for each seller among the winners is determined to be the seller's bid power, and the final transaction volume for each buyer is the buyer's bid power minus a first average value, where the first average value is...
[0313] if The final transaction volume for each buyer among the winners is determined to be the bid power of that buyer, and the final transaction volume for each seller is the bid power of that seller minus a second average value, where the second average value is...
[0314] This disclosure also provides a cloud-edge collaborative power data trading device. Figure 6 This diagram illustrates a structural block diagram of a cloud-edge collaborative power data trading device for bidders, provided by an embodiment of this disclosure. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 6 As shown, the cloud-edge collaborative power data trading device includes:
[0315] The bidding information encryption module 601 is configured to encrypt the bidding information of each party based on a pre-stored public key of a homomorphic encryption algorithm to obtain ciphertext bidding information. The bidding information includes the bid price and the bid power. The ciphertext bidding information includes the ciphertext bid price and the ciphertext bid power.
[0316] The bid request module 602 is configured to send a bid request to the cloud server. The bid request carries the type identifier of the bidder and encrypted bid information. The type identifier of the bidder includes a seller identifier or a buyer identifier.
[0317] The transaction information receiving module 603 is configured to receive the final transaction information sent by the cloud server after becoming a winner in the power data transaction. The final transaction information includes the final transaction price and the final transaction volume.
[0318] This disclosure also provides a cloud-edge collaborative power data trading device. Figure 7 This diagram illustrates a structural block diagram of a cloud-edge collaborative power data trading device applied to a cloud server, provided by an embodiment of this disclosure. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 7 As shown, the cloud-edge collaborative power data trading device includes:
[0319] The request receiving module 701 is configured to receive a bid request sent by a bidder, the bid request carrying the bidder's type identifier and encrypted bid information, the bidder's type identifier including a seller identifier or a buyer identifier;
[0320] The pseudonym allocation module 702 is configured to assign pseudonym identifiers to bidders in response to a received bid request, wherein a seller pseudonym identifier is assigned to bidders with a seller identifier and a buyer pseudonym identifier is assigned to bidders with a buyer identifier.
[0321] The comparison vector generation module 703 is configured to generate a ciphertext comparison vector for any two bidders based on their ciphertext bidding information. The ciphertext comparison vector includes ciphertext bid price comparison information and the corresponding pseudonyms and ciphertext bid power of the two bidders. The ciphertext bid price comparison information is used to represent the comparison result of the bid prices of the two bidders in ciphertext.
[0322] The comparison vector sending module 704 is configured to send the encrypted comparison vectors of any two bidders to the edge server;
[0323] The winner information receiving module 705 is configured to receive the winner's pseudonym and final transaction information returned by the edge server;
[0324] The transaction information notification module 706 is configured to notify the bidder corresponding to the winner's pseudonym identifier to conduct power data transactions according to the winner's final transaction information, based on the stored correspondence between pseudonym identifiers and bidders.
[0325] In one possible implementation, the comparison vector generation module is configured as follows:
[0326] A random positive integer Z is generated, and Z is encrypted using the public key of a pre-stored homomorphic encryption algorithm.
[0327] For any two bidders' two encrypted bid prices and The encrypted price comparison value of any two bidders is calculated using the following formula.
[0328]
[0329] The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information between any two bidders includes: and
[0330] This disclosure also provides a cloud-edge collaborative power data trading device. Figure 8 This diagram illustrates a structural block diagram of a cloud-edge collaborative power data trading device applied to an edge server, provided by an embodiment of this disclosure. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 8 As shown, the cloud-edge collaborative power data trading device includes:
[0331] The comparison vector receiving module 801 is configured to receive encrypted comparison vectors of any two bidders sent by the cloud server. The encrypted comparison vectors include encrypted bidding price comparison information and the corresponding pseudonyms of the two bidders and encrypted bidding power. The encrypted bidding price comparison information is used to encrypt the comparison result of the bidding prices of the two bidders.
[0332] The winner information determination module 802 is configured to determine the pseudonym of the winner and its final transaction information according to a predetermined auction rule, based on the private key of a pre-stored homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders. The final transaction information includes the final transaction price and the final transaction volume.
[0333] The winner information sending module 803 is configured to send the winner's pseudonym and final transaction information to the cloud server.
[0334] In one possible implementation, the winner information determination module is configured as follows:
[0335] The private key is used to decrypt the encrypted bidding price comparison information of any two bidders to determine the size relationship between the bidding prices of any two bidders.
[0336] The encrypted bid power of any two bidders is decrypted using the private key to obtain the bid power of any two bidders.
[0337] According to the predetermined auction rules, based on the relationship between the bid prices of each bidder and the bidding power of each bidder, the pseudonym of the winner in the power data transaction and its final transaction information are determined.
[0338] In one possible implementation, the part of the winner information determination module that determines the pseudonym of the winner in the power data transaction and its final transaction information according to predetermined auction rules, based on the relationship between the bid prices of each bidder and the bidding power of each bidder, is configured as follows:
[0339] Based on the relative prices of the bidders and the pseudonyms used by each bidder, the seller's bid price ranking (fs1) is determined. <fs2<...<fs n The bid prices from the buyers are ranked as follows: fb1>fb2>...>fb m m and n are integers greater than or equal to 2, fs j Seller s ranked by bid price at position j j The pseudonym symbol, fb i Buyer b ranked by bid price at position i i The syllabic identifiers, i takes values of 1, 2, ..., m, and j takes values of 1, 2, ..., n;
[0340] Based on the seller's bid price ranking and the buyer's bid price ranking, determine the seller's pseudonym fs whose bid price ranking is Lth and satisfies the following conditions. L The buyer's pseudonym fb, ranked Kth by bid price. K :
[0341]
[0342] The winners were determined by the ratio of buyers to fb. K The bid price is higher among both buyers and sellers. L The seller with the smaller bid price;
[0343] The final transaction price of the winner is determined to be the winner's bid price;
[0344] Based on the bidding power of each buyer and each seller in the winners, the final transaction volume of each buyer and each seller in the winners is determined;
[0345] Among them, qb i For buyer b i The bidding power, ps j For the seller s j The bidding power.
[0346] In one possible implementation, the portion of the winner information determination module that determines the final transaction volume of each buyer and seller among the winners, based on the bidding power of each buyer and each seller among the winners, is configured as follows:
[0347] if The final transaction volume for each seller among the winners is determined to be the seller's bid power, and the final transaction volume for each buyer is the buyer's bid power minus a first average value, where the first average value is...
[0348] if The final transaction volume for each buyer among the winners is determined to be the bid power of that buyer, and the final transaction volume for each seller is the bid power of that seller minus a second average value, where the second average value is...
[0349] The technical terms and features mentioned in this device embodiment are the same as or similar to those mentioned in the above method embodiment. For explanations and descriptions of the technical terms and features involved in this device, please refer to the explanations of the above method embodiment. They will not be repeated here.
[0350] This disclosure also discloses an electronic device. Figure 9 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0351] like Figure 9 As shown, the electronic device includes a memory 901 and a processor 902, wherein the memory 901 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 902 to implement the method according to an embodiment of the present disclosure.
[0352] Figure 10 A schematic diagram of the structure of a computer system suitable for implementing the methods of the embodiments of this disclosure is shown.
[0353] like Figure 10As shown, the computer system 1000 includes a processing unit 1001, which can execute various processes described in the above embodiments according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage portion 1008 into a random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the operation of the computer system 1000. The processing unit 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0354] The following components are connected to I / O interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to I / O interface 1005 as needed. A removable medium 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 1010 as needed so that computer programs read from it can be installed into storage section 1008 as needed. The processing unit 1001 can be implemented as a CPU, GPU, TPU, FPGA, NPU, etc.
[0355] In particular, according to embodiments of this disclosure, the methods described above can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising computer instructions that, when executed by a processor, implement the steps of the methods described above. In such embodiments, the computer program product can be downloaded and installed from a network via communication section 1009, and / or installed from removable media 1011.
[0356] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0357] The units or modules described in the embodiments of this disclosure can be implemented in software or programmable hardware. The described units or modules can also be located in a processor, and the names of these units or modules do not necessarily constitute a limitation on the unit or module itself.
[0358] In another aspect, this disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the electronic device or computer system described above; or it may be a standalone computer-readable storage medium not assembled into a device. The computer-readable storage medium stores one or more programs, which are used by one or more processors to perform the methods described in this disclosure.
[0359] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
Claims
1. A cloud-edge collaborative power data trading method, characterized in that, include: Bidders encrypt their bidding information using a pre-stored public key for a homomorphic encryption algorithm to obtain ciphertext bidding information, which includes the bid price and the bid amount. The bidder sends a bid request to the cloud server. The bid request carries the bidder's type identifier and encrypted bid information. The bidder's type identifier includes a seller identifier or a buyer identifier. In response to the received bidding request, the cloud server assigns a pseudonym to the bidder, wherein a seller pseudonym is assigned to the bidder with the seller identifier and a buyer pseudonym is assigned to the bidder with the buyer identifier. The cloud server generates a ciphertext comparison vector for any two bidders based on their ciphertext bidding information and sends the ciphertext comparison vector to the edge server. The ciphertext comparison vector includes ciphertext bidding price comparison information and the corresponding pseudonym identifiers and ciphertext bidding power of the two bidders. The ciphertext bidding price comparison information is used to represent the comparison result of the bidding prices of any two bidders in ciphertext. According to the predetermined auction rules, the edge server determines the winner's pseudonym and final transaction information based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, and sends the winner's pseudonym and final transaction information to the cloud server. The final transaction information includes the final transaction price and the final transaction volume. Based on the stored correspondence between pseudonyms and bidders, the cloud server notifies the bidders corresponding to the winner's pseudonym to conduct power data transactions according to the winner's final transaction information.
2. The method according to claim 1, characterized in that, The method further includes: The key generation center generates a public key and a private key for a homomorphic encryption algorithm, and sends the public key to the bidder and the cloud server, and sends the private key to the edge server.
3. The method according to claim 1, characterized in that, The cloud server generates a ciphertext comparison vector for any two bidders based on their ciphertext bidding information, including: The cloud server randomly generates a positive integer Z, and encrypts Z using the public key to obtain... For any two bidders' two encrypted bid prices and The cloud server calculates the encrypted price comparison value between any two bidders according to the following formula. The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information between any two bidders includes: and 4. The method according to claim 1, characterized in that, The edge server, according to predetermined auction rules, determines the winner's pseudonym and final transaction information based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, including: The edge server uses the private key to decrypt the encrypted bidding price comparison information of any two bidders to determine the size relationship between the bidding prices of any two bidders. The edge server uses the private key to decrypt the encrypted bid power of any two bidders to obtain the bid power of any two bidders. The edge server, according to predetermined auction rules, determines the pseudonym of the winner in the power data transaction and its final transaction information based on the relationship between the bid prices of each bidder and the bidding power of each bidder.
5. The method according to claim 4, characterized in that, The edge server, according to predetermined auction rules, determines the pseudonym of the winner in the power data transaction and its final transaction information based on the relationship between the bid prices of each bidder and the power quantity bid by each bidder, including: The edge server determines the seller's bid price ranking fs1 based on the relative sizes of the bid prices from each bidder and the pseudonyms of each bidder. <fs2<...<fs n The bid prices from the buyers are ranked as follows: fb1>fb2>...>fb m m and n are integers greater than or equal to 2, fs j Seller s ranked jth by bid price j The pseudonym symbol, fb i Buyer b ranked by bid price at position i i The syllabic identifiers, i takes values of 1, 2, ..., m, and j takes values of 1, 2, ..., n; The edge server, based on the seller's bid price ranking and the buyer's bid price ranking, determines the seller's pseudonym fs whose bid price ranking is Lth and meets the following conditions. L The buyer's pseudonym fb, ranked Kth by bid price. K : The edge server determines the winner, including the buyer in the middle of the fb. K The bid price is higher among both buyers and sellers. L The seller with the smaller bid price; The edge server determines the winner's final transaction price as the winner's bid price; The edge server determines the final transaction volume of each buyer and each seller in the winner based on the bidding power of each buyer and each seller in the winner. Among them, qb i For buyer b i The bidding power, ps j For the seller s j The bidding power.
6. The method according to claim 5, characterized in that, The edge server determines the final transaction volume for each buyer and seller in the winning group based on the bidding power of each buyer and each seller, including: if The final transaction volume for each seller among the winners is determined to be the seller's bid power, and the final transaction volume for each buyer is the buyer's bid power minus a first average value, where the first average value is... if The final transaction volume for each buyer among the winners is determined to be the bid power of that buyer, and the final transaction volume for each seller is the bid power of that seller minus a second average value, where the second average value is...
7. A cloud-edge collaborative method for power data trading, characterized in that, Applied to cloud servers, the method includes: Receive a bid request sent by a bidder, the bid request carrying the bidder's type identifier and encrypted bid information, the bidder's type identifier including a seller identifier or a buyer identifier; In response to the received bid request, a pseudonym is assigned to the bidder, wherein a seller pseudonym is assigned to the bidder identified as a seller, and a buyer pseudonym is assigned to the bidder identified as a buyer. Based on the encrypted bidding information of any two bidders, a encrypted comparison vector is generated for the two bidders and the encrypted comparison vector is sent to the edge server. The encrypted comparison vector includes encrypted bidding price comparison information and the corresponding pseudonym identifiers and encrypted bidding power of the two bidders. The encrypted bidding price comparison information is used to represent the comparison result of the bidding prices of the two bidders in encrypted form. Receive the winner's pseudonym and their final transaction information returned by the edge server; Based on the stored correspondence between pseudonyms and bidders, the bidders corresponding to the winner's pseudonym are notified to conduct power data transactions according to the winner's final transaction information.
8. The method according to claim 7, characterized in that, The step of generating the ciphertext comparison vector for any two bidders based on their ciphertext bidding information includes: A random positive integer Z is generated, and Z is encrypted using the public key of a pre-stored homomorphic encryption algorithm. For any two bidders' two encrypted bid prices and The encrypted price comparison value of any two bidders is calculated using the following formula. The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information between any two bidders includes: and 9. A cloud-edge collaborative power data trading method, characterized in that, Applied to edge servers, the method includes: The cloud server receives encrypted comparison vectors of any two bidders. The encrypted comparison vectors include encrypted bidding price comparison information and the corresponding pseudonyms of the two bidders and encrypted bidding power. The encrypted bidding price comparison information is used to encrypt the comparison result of the bidding prices of the two bidders. According to the predetermined auction rules, based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vector of any two bidders, the pseudonym of the winner and its final transaction information are determined, including the final transaction price and the final transaction volume. The winner's pseudonym and final transaction information are sent to the cloud server.
10. The method according to claim 9, characterized in that, The process of determining the winner's pseudonym and final transaction information according to predetermined auction rules, based on a pre-stored private key of a homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, includes: The private key is used to decrypt the encrypted bidding price comparison information of any two bidders to determine the size relationship between the bidding prices of any two bidders. The encrypted bid power of any two bidders is decrypted using the private key to obtain the bid power of any two bidders. According to the predetermined auction rules, based on the relationship between the bid prices of each bidder and the bidding power of each bidder, the pseudonym of the winner in the power data transaction and its final transaction information are determined.
11. The method according to claim 10, characterized in that, The process of determining the pseudonym of the winner in the power data transaction and its final transaction information according to predetermined auction rules, based on the relationship between the bid prices of each bidder and the bidding power of each bidder, includes: Based on the relative prices of the bidders and the pseudonyms used by each bidder, the seller's bid price ranking (fs1) is determined. <fs2<...<fs n The bid prices from the buyers are ranked as follows: fb1>fb2>...>fb m m and n are integers greater than or equal to 2, fs j Seller s ranked jth by bid price j The pseudonym symbol, fb i Buyer b ranked by bid price at position i i The syllabic identifiers, i takes values of 1, 2, ..., m, and j takes values of 1, 2, ..., n; Based on the seller's bid price ranking and the buyer's bid price ranking, determine the seller's pseudonym fs whose bid price ranking is Lth and satisfies the following conditions. L The buyer's pseudonym fb, ranked Kth by bid price. K : The winners were determined by the ratio of buyers to fb. K The bid price is higher among both buyers and sellers. L The seller with the smaller bid price; The final transaction price of the winner is determined to be the winner's bid price; Based on the bidding power of each buyer and each seller in the winners, the final transaction volume of each buyer and each seller in the winners is determined; Among them, qb i For buyer b i The bidding power, ps j For the seller s j The bidding power.
12. The method according to claim 11, characterized in that, The determination of the final transaction volume for each buyer and seller among the winners, based on the bidding power of each buyer and each seller among the winners, includes: if The final transaction volume for each seller among the winners is determined to be the seller's bid power, and the final transaction volume for each buyer is the buyer's bid power minus a first average value, where the first average value is... if The final transaction volume for each buyer among the winners is determined to be the bid power of that buyer, and the final transaction volume for each seller is the bid power of that seller minus a second average value, where the second average value is...
13. A cloud-edge collaborative power data trading system, characterized in that, The system includes bidders, cloud servers, and edge servers; The bidders are configured to encrypt their bidding information using a pre-stored public key of a homomorphic encryption algorithm to obtain ciphertext bidding information, which includes the bid price and the bid amount. A bid request is sent to the cloud server. The bid request carries the type identifier of the bidder and encrypted bid information. The type identifier of the bidder includes a seller identifier or a buyer identifier. The cloud server is configured to, in response to a received bidding request, assign pseudonyms to bidders, wherein a seller pseudonym is assigned to bidders identified as sellers, and a buyer pseudonym is assigned to bidders identified as buyers; generate a ciphertext comparison vector for any two bidders based on their ciphertext bidding information, and send the ciphertext comparison vector to an edge server. The ciphertext comparison vector includes ciphertext bidding price comparison information and its corresponding pseudonyms and ciphertext bidding power of the two bidders. The ciphertext bidding price comparison information is used to represent the comparison result of the bidding prices of the two bidders in ciphertext. The edge server is configured to determine the winner's pseudonym and final transaction information based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, according to predetermined auction rules, and send the winner's pseudonym and final transaction information to the cloud server. The final transaction information includes the final transaction price and the final transaction volume. The cloud server is also configured to, based on the stored correspondence between pseudonyms and bidders, notify the bidders corresponding to the winner's pseudonym to conduct power data transactions according to the winner's final transaction information.
14. The system according to claim 13, characterized in that, The system also includes: The key generation center is configured to generate public and private keys for homomorphic encryption algorithms, and send the public key to the bidder and the cloud server, and send the private key to the edge server.
15. The system according to claim 13, characterized in that, The portion of the cloud server that generates the ciphertext comparison vector for any two bidders based on their ciphertext bidding information is configured as follows: The cloud server randomly generates a positive integer Z, and encrypts Z using the public key to obtain... For any two bidders' two encrypted bid prices and The cloud server calculates the encrypted price comparison value between any two bidders according to the following formula. The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information between any two bidders includes: and 16. The system according to claim 13, characterized in that, In the edge server, according to predetermined auction rules, based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders, the part determining the winner's pseudonym and their final transaction information is configured as follows: The edge server uses the private key to decrypt the encrypted bidding price comparison information of any two bidders to determine the size relationship between the bidding prices of any two bidders. The edge server uses the private key to decrypt the encrypted bid power of any two bidders to obtain the bid power of any two bidders. The edge server, according to predetermined auction rules, determines the pseudonym of the winner in the power data transaction and its final transaction information based on the relationship between the bid prices of each bidder and the bidding power of each bidder.
17. The system according to claim 16, characterized in that, The edge server, according to predetermined auction rules, determines the pseudonym of the winner in the power data transaction and its final transaction information based on the relationship between the bid prices of each bidder and the bidding power of each bidder. This process is configured as follows: The edge server determines the seller's bid price ranking fs1 based on the relative sizes of the bid prices from each bidder and the pseudonyms of each bidder. <fs2<...<fs n The bid prices from the buyers are ranked as follows: fb1>fb2>...>fb m m and n are integers greater than or equal to 2, fs j Seller s ranked jth by bid price j The pseudonym symbol, fb i Buyer b ranked by bid price at position i i The syllabic identifiers, i takes values of 1, 2, ..., m, and j takes values of 1, 2, ..., n; The edge server, based on the seller's bid price ranking and the buyer's bid price ranking, determines the seller's pseudonym fs whose bid price ranking is Lth and meets the following conditions. L The buyer's pseudonym fb, ranked Kth by bid price. K : The edge server determines the winner, including the buyer in the middle of the fb. K The bid price is higher among both buyers and sellers. L The seller with the smaller bid price; The edge server determines the winner's final transaction price as the winner's bid price; The edge server determines the final transaction volume of each buyer and each seller in the winner based on the bidding power of each buyer and each seller in the winner. Among them, qb i For buyer b i The bidding power, ps j For the seller s j The bidding power.
18. The system according to claim 17, characterized in that, The portion of the edge server that determines the final transaction volume for each buyer and seller among the winners, based on the bidding power of each buyer and each seller among the winners, is configured as follows: if The final transaction volume for each seller among the winners is determined to be the seller's bid power, and the final transaction volume for each buyer is the buyer's bid power minus a first average value, where the first average value is... if The final transaction volume for each buyer among the winners is determined to be the bid power of that buyer, and the final transaction volume for each seller is the bid power of that seller minus a second average value, where the second average value is...
19. A cloud-edge collaborative power data trading device, characterized in that, The device, applied to a cloud server, includes: The request receiving module is configured to receive a bid request sent by a bidder, the bid request carrying the bidder's type identifier and encrypted bid information, the bidder's type identifier including a seller identifier or a buyer identifier; The pseudonym allocation module is configured to assign pseudonym identifiers to bidders in response to received bid requests, wherein a seller pseudonym identifier is assigned to bidders identified as sellers, and a buyer pseudonym identifier is assigned to bidders identified as buyers. The comparison vector generation module is configured to generate a ciphertext comparison vector for any two bidders based on their ciphertext bidding information. The ciphertext comparison vector includes ciphertext bid price comparison information and the corresponding pseudonyms and ciphertext bid power of the two bidders. The ciphertext bid price comparison information is used to represent the comparison result of the bid prices of the two bidders in ciphertext. The comparison vector sending module is configured to send the encrypted comparison vectors of any two bidders to the edge server; The winner information receiving module is configured to receive the winner's pseudonym and final transaction information returned by the edge server; The transaction information notification module is configured to notify the bidder corresponding to the winner's pseudonym to conduct power data transactions according to the winner's final transaction information, based on the stored correspondence between pseudonym identifiers and bidders.
20. The apparatus according to claim 19, characterized in that, The comparison vector generation module is configured as follows: A random positive integer Z is generated, and Z is encrypted using the public key of a pre-stored homomorphic encryption algorithm. For any two bidders' two encrypted bid prices and The encrypted price comparison value of any two bidders is calculated using the following formula. The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information between any two bidders includes: and 21. A cloud-edge collaborative power data trading device, characterized in that, The device, applied to an edge server, includes: The comparison vector receiving module is configured to receive encrypted comparison vectors of any two bidders sent by the cloud server. The encrypted comparison vectors include encrypted bidding price comparison information and the corresponding pseudonyms of the two bidders and encrypted bidding power. The encrypted bidding price comparison information is used to encrypt the comparison result of the bidding prices of the two bidders. The winner information determination module is configured to determine the winner's pseudonym and final transaction information according to predetermined auction rules, based on the private key of a pre-stored homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders. The final transaction information includes the final transaction price and the final transaction volume. The winner information sending module is configured to send the winner's pseudonym and final transaction information to the cloud server.
22. The apparatus according to claim 21, characterized in that, The winner information determination module is configured as follows: The private key is used to decrypt the encrypted bidding price comparison information of any two bidders to determine the size relationship between the bidding prices of any two bidders. The encrypted bid power of any two bidders is decrypted using the private key to obtain the bid power of any two bidders. According to the predetermined auction rules, based on the relationship between the bid prices of each bidder and the bidding power of each bidder, the pseudonym of the winner in the power data transaction and its final transaction information are determined.
23. The apparatus according to claim 22, characterized in that, The winner information determination module, based on predetermined auction rules and the relationship between the bidding prices of each bidder and the bidding power of each bidder, is configured to determine the pseudonym of the winner in the power data transaction and its final transaction information as follows: Based on the relative prices of the bidders and the pseudonyms used by each bidder, the seller's bid price ranking (fs1) is determined. <fs2<...<fs n The bid prices from the buyers are ranked as follows: fb1>fb2>...>fb m m and n are integers greater than or equal to 2, fs j Seller s ranked jth by bid price j The pseudonym symbol, fb i Buyer b ranked by bid price at position i i The syllabic identifiers, i takes values of 1, 2, ..., m, and j takes values of 1, 2, ..., n; Based on the seller's bid price ranking and the buyer's bid price ranking, determine the seller's pseudonym fs whose bid price ranking is Lth and satisfies the following conditions. L The buyer's pseudonym fb, ranked Kth by bid price. K : The winners were determined by the ratio of buyers to fb. K The bid price is higher among both buyers and sellers. L The seller with the smaller bid price; The final transaction price of the winner is determined to be the winner's bid price; Based on the bidding power of each buyer and each seller in the winners, the final transaction volume of each buyer and each seller in the winners is determined; Among them, qb i For buyer b i The bidding power, ps j For the seller s j The bidding power.
24. The apparatus according to claim 23, characterized in that, The portion of the winner information determination module that determines the final transaction volume of each buyer and seller among the winners, based on the bidding power of each buyer and each seller among the winners, is configured as follows: if The final transaction volume for each seller among the winners is determined to be the seller's bid power, and the final transaction volume for each buyer is the buyer's bid power minus a first average value, where the first average value is... if The final transaction volume for each buyer among the winners is determined to be the bid power of that buyer, and the final transaction volume for each seller is the bid power of that seller minus a second average value, where the second average value is...
25. An electronic device, characterized in that, The method includes a memory and a processor, the memory being used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method of any one of claims 1 to 12.
26. A readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, implement the method described in any one of claims 1 to 12.
Citation Information
Patent Citations
McAfee bidirectional auction privacy protection method and auction method
CN107392743A