Cloud edge collaborative power data transaction method, system, device, equipment and medium

By adopting cloud-edge collaborative power data trading method and homomorphic encryption algorithm in power data transactions, the problem of insufficient privacy protection in the existing auction mechanism is solved, and the secure encryption and privacy protection of bid information is realized.

CN119449385AActive Publication Date: 2025-02-14ELECTRIC POWER RESEARCH INSTITUTE OF STATE GRID QINGHAI ELECTRIC POWER COMPANY +2
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411460522.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-02-14
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

The existing auction mechanism has defects in privacy protection, and the real bid information of buyers and sellers is easily exposed, resulting in the leakage of commercial secrets.

Method used

The power data trading method of cloud-edge collaboration is adopted to encrypt bid information through homomorphic encryption algorithms, generate ciphertext bid information, and operate collaboratively between cloud servers and edge servers to ensure the privacy of bid information.

Benefits of technology

It effectively protects the bidder's commercial secrets, prevents the leakage of real bid information, and ensures the safety and fairness of power data transactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449385A_ABST
    Figure CN119449385A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power distribution networks, in particular to a cloud-side collaborative power data transaction method, system, device and equipment and a medium, and the method comprises the steps that bidding parties encrypt respective bidding information based on public keys to obtain ciphertext bidding information and send the ciphertext bidding information to a cloud server; the cloud server allocates a seller pseudonym identifier to the seller, allocates a buyer pseudonym identifier to the buyer, generates a ciphertext comparison vector of any two bidders according to the ciphertext bidding information of any two bidders and sends the ciphertext comparison vector to the edge server, and the ciphertext comparison vector comprises ciphertext bidding price comparison information; and the edge server determines the pseudonym identifier of the winner and the final transaction information thereof based on the private key and the ciphertext comparison vector of any two bidders, and sends the pseudonym identifier and the final transaction information to the cloud server, and the cloud server notifies the winner to carry out transaction according to the final transaction information of the winner based on the stored correspondence between the pseudonym identifier and the bidders. According to the technical scheme, the privacy of the bidding party can be protected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of power distribution networks, and in particular to a cloud-edge collaborative power data trading method, system, device, equipment and medium. Background Art

[0002] Distribution network management is a key link in the development of the power industry. With the rapid development of data processing and big data mining technology, power data in the distribution network has become an important basis for improving distribution network management and establishing an efficient guarantee mechanism, which can significantly improve the intelligent perception, internal control capabilities and customer service efficiency of the power grid. Therefore, power data sharing in the distribution network has become an important source for various power companies to optimize their own management. One of the most popular mechanisms for data sharing is to achieve fair transactions and effective circulation through auctions. Auctions are an economically driven scheme whose purpose is to allocate goods through a bidding comparison process between buyers and sellers and determine the final transaction price. Auction theory has been well explored in the fields of power markets and spectrum allocation. Since the auction mechanism can ensure fairness and efficiency, it shows great potential in solving data trading problems.

[0003] The inventors found that in the traditional auction process, the bidding information of buyers and sellers needs to be fully displayed to the auctioneer in order to reach a final transaction. However, the real bidding information of buyers and sellers will expose their own economic situation or business secrets, which is sensitive information. If it is not protected, the auctioneer can infer the real identity or business purpose of the buyer or seller based on the existing bidding information. In summary, the existing auction mechanism still has defects in privacy protection and needs further improvement and research. Summary of the invention

[0004] In order to solve the problems in the related art, the embodiments of the present disclosure provide a cloud-edge collaborative power data trading method, system, device, equipment and medium.

[0005] In a first aspect, an embodiment of the present disclosure provides a cloud-edge collaborative power data trading method, including:

[0006] The bidders encrypt their respective bidding information based on the public key of the pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information, wherein the bidding information includes the bidding price and the bidding electricity amount, and the ciphertext bidding information includes the ciphertext bidding price and the ciphertext bidding electricity amount;

[0007] The bidder sends a bid request to the cloud server, wherein the bid request carries the bidder's type identifier and encrypted bidding information, wherein the bidder's type identifier includes a seller identifier or a buyer identifier;

[0008] The cloud server allocates pseudonym identifiers to bidders in response to the received bidding request, wherein the bidder with the seller identifier is allocated a seller pseudonym identifier, and the bidder with the buyer identifier is allocated a buyer pseudonym identifier;

[0009] The cloud server generates a ciphertext comparison vector of any two bidders according to the ciphertext bidding information of the any two bidders and sends the ciphertext comparison vector to the edge server, wherein the ciphertext comparison vector includes the ciphertext bidding price comparison information and the corresponding pseudonym identifiers of the two bidders and the ciphertext bidding power, wherein the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the any two bidders;

[0010] The edge server determines the winner's pseudonym identifier and final transaction information according to the predetermined auction rules, based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of the arbitrary two bidders, and sends the winner's pseudonym identifier and final transaction information to the cloud server, wherein the final transaction information includes a final transaction price and a final transaction volume;

[0011] The cloud server notifies the bidder corresponding to the winner's pseudonym to conduct power data trading according to the winner's final transaction information based on the stored correspondence between the pseudonym identifier and the bidder.

[0012] In a possible implementation, the method further includes:

[0013] The key generation center generates a public key and a private key of 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 a possible implementation manner, the cloud server generates a ciphertext comparison vector of any two bidders according to the ciphertext bidding information of the any two bidders, including:

[0015] The cloud server randomly generates a positive integer Z and encrypts Z using the public key to obtain

[0016] For any two ciphertext bidding prices of two bidders and The cloud server calculates the ciphertext price comparison value of 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 of any two bidders includes: and

[0019] In a possible implementation, the edge server determines the winner's pseudonym identifier and final transaction information according to a predetermined auction rule based on a pre-stored private key of the homomorphic encryption algorithm and a ciphertext comparison vector of any two bidders, including:

[0020] The edge server uses the private key to decrypt the ciphertext bidding price comparison information of the two arbitrary bidders to determine the size relationship between the bidding prices of the two arbitrary bidders;

[0021] The edge server uses the private key to decrypt the ciphertext bid power amounts of the two arbitrary bidders to obtain the bid power amounts of the two arbitrary bidders;

[0022] The edge server determines the pseudonym identification of the winner in the power data transaction and its final transaction information according to the predetermined auction rules, based on the size relationship between the bidding prices of the bidders and the bid power of the bidders.

[0023] In a possible implementation, the edge server determines the pseudonym identifier of the winner in the power data transaction and its final transaction information according to a predetermined auction rule based on the size relationship between the bid prices of the bidders and the bid power of the bidders, including:

[0024] The edge server determines the bid price ranking fs1 of the seller based on the size relationship between the bid prices of the bidders and the pseudonym identifiers of the bidders. <fs2<...<fs n And the buyer's bidding price is sorted as fb1>fb2>...>fb m ; m and n are integers greater than or equal to 2, fs j The seller s whose bid price is ranked in the jth order j Pseudonymous ID, Facebook i The bid price of buyer b ranked in the ith order i Pseudonymous identifier, i takes the value of 1, 2...m, j takes the value of 1, 2...n;

[0025] The edge server determines the seller pseudonym fs of the Lth bid price ranking that satisfies the following conditions based on the seller's bid price ranking and the buyer's bid price ranking: L and the buyer's pseudonym fb ranked by bid price K :

[0026]

[0027] The edge server determines that the winner includes the buyer'sK The bid price is larger than that of the buyer and seller. L The seller whose bid price is small;

[0028] The edge server determines the final transaction price of the winner as the bid price of the winner;

[0029] The edge server determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners;

[0030] Among them, qb i For buyer b i The bid power, ps j For sellers j The amount of electricity bid.

[0031] In a possible implementation manner, the edge server determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners, including:

[0032] if The final transaction volume of each seller among the winners is determined to be the bid power of the seller, and the final transaction volume of each buyer is determined to be the bid power of the buyer minus the first average value, where the first average value is

[0033] if The final transaction volume of each buyer among the winners is determined to be the bid power of the buyer, and the final transaction volume of each seller is determined to be the bid power of the seller minus the second average value, where the second average value is

[0034] In a second aspect, a cloud-edge collaborative power data trading method is provided in an embodiment of the present disclosure, which is applied to a bidder, where the bidder is a buyer or a seller, and the method includes:

[0035] Encrypting the respective bidding information based on the public key of the pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information, wherein the bidding information includes the bidding price and the bidding electricity amount, and the ciphertext bidding information includes the ciphertext bidding price and the ciphertext bidding electricity amount;

[0036] Sending a bidding request to a cloud server, wherein the bidding request carries a type identifier of the bidder and encrypted bidding information, wherein 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 final transaction information sent by the cloud server is received, and the final transaction information includes a final transaction price and a final transaction volume.

[0038] In a third aspect, an embodiment of the present disclosure provides a cloud-edge collaborative power data transaction method, which is applied to a cloud server, and the method includes:

[0039] Receiving a bidding request sent by a bidder, wherein the bidding request carries a type identifier and encrypted bidding information of the bidder, wherein the type identifier of the bidder includes a seller identifier or a buyer identifier;

[0040] In response to the received bidding request, assigning pseudonym identifications to the bidders, wherein the bidder with the seller identification is assigned the seller pseudonym identification, and the bidder with the buyer identification is assigned the buyer pseudonym identification;

[0041] Generate a ciphertext comparison vector of any two bidders according to the ciphertext bidding information of the any two bidders and send the ciphertext comparison vector to the edge server, wherein the ciphertext comparison vector includes the ciphertext bidding price comparison information and the corresponding pseudonym identifiers of the two bidders and the ciphertext bidding power, wherein the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the any two bidders;

[0042] receiving the winner's pseudonym identification and final transaction information returned by the edge server;

[0043] Based on the stored correspondence between the pseudonym identifier and the bidder, the bidder corresponding to the pseudonym identifier of the winner is notified to conduct power data trading according to the final transaction information of the winner.

[0044] In a possible implementation manner, generating the ciphertext comparison vectors of any two bidders according to the ciphertext bidding information of the any two bidders includes:

[0045] Randomly generate a positive integer Z and encrypt Z using the public key of the pre-stored homomorphic encryption algorithm to obtain

[0046] For any two ciphertext bidding prices of two bidders and The ciphertext price comparison value of any two bidders is calculated according to the following formula:

[0047]

[0048] The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information of any two bidders includes: and

[0049] In a fourth aspect, an embodiment of the present disclosure provides a cloud-edge collaborative power data trading method, which is applied to an edge server, and the method includes:

[0050] Receiving a ciphertext comparison vector of any two bidders sent by a cloud server, wherein the ciphertext comparison vector includes ciphertext bidding price comparison information and the corresponding pseudonym identifiers of the two bidders and the ciphertext bid power, wherein the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the any two bidders;

[0051] According to predetermined auction rules, based on a pre-stored private key of a homomorphic encryption algorithm and a ciphertext comparison vector of any two bidders, determining the winner's pseudonymous identifier and final transaction information thereof, wherein the final transaction information includes a final transaction price and a final transaction volume;

[0052] The winner's pseudonym identification and final transaction information are sent to the cloud server.

[0053] In a possible implementation, determining the winner's pseudonym identifier and final transaction information according to a predetermined auction rule based on a pre-stored private key of a homomorphic encryption algorithm and a ciphertext comparison vector of any two bidders includes:

[0054] Decrypting the ciphertext bidding price comparison information of the two arbitrary bidders using the private key to determine the size relationship between the bidding prices of the two arbitrary bidders;

[0055] Decrypting the ciphertext bid power amounts of the two arbitrary bidders using the private key to obtain the bid power amounts of the two arbitrary bidders;

[0056] According to the predetermined auction rules, based on the size relationship between the bid prices of the bidders and the bid electricity of the bidders, the pseudonym identification of the winner in the power data transaction and its final transaction information are determined.

[0057] In a possible implementation, the determining of the pseudonym identifier of the winner in the power data transaction and its final transaction information according to the predetermined auction rules based on the size relationship between the bid prices of the bidders and the bid power of the bidders includes:

[0058] Based on the relationship between the bid prices of each bidder and the pseudonym of each bidder, the bid price ranking of the seller is determined fs1 <fs2<...<fs n And the buyer's bidding price is sorted as fb1>fb2>...>fb m ; m and n are integers greater than or equal to 2, fs j The seller s whose bid price is ranked in the jth order jPseudonymous ID, Facebook i The bid price of buyer b ranked in the ith order i Pseudonymous identifier, i takes the value of 1, 2...m, j takes the value of 1, 2...n;

[0059] Based on the bidding price ranking of the seller and the bidding price ranking of the buyer, determine the bidding price ranking that satisfies the following conditions in the Lth seller pseudonym identifier fs L and the buyer's pseudonym fb ranked by bid price K :

[0060]

[0061] Determine the winner including the buyer in the fb K The bid price is larger than that of the buyer and seller. L The seller whose bid price is small;

[0062] Determine the final transaction price of the winner as the bid price of the winner;

[0063] Determine the final transaction volume of each buyer and each seller among the winners based on the bid electricity amount of each buyer and each seller among the winners;

[0064] Among them, qb i For buyer b i The bid power, ps j For sellers j The amount of electricity bid.

[0065] In a possible implementation manner, determining the final transaction volume of each buyer and each seller among the winners based on the bid electricity amount of each buyer and the bid electricity amount of each seller among the winners includes:

[0066] if The final transaction volume of each seller among the winners is determined to be the bid power of the seller, and the final transaction volume of each buyer is determined to be the bid power of the buyer minus the first average value, where the first average value is

[0067] if The final transaction volume of each buyer among the winners is determined to be the bid power of the buyer, and the final transaction volume of each seller is determined to be the bid power of the seller minus the second average value, where the second average value is

[0068] In a fifth aspect, a cloud-edge collaborative power data trading system is provided in an embodiment of the present disclosure, the system comprising a bidder, a cloud server and an edge server;

[0069] The bidders are configured to encrypt their respective bidding information based on a public key of a pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information, wherein the bidding information includes a bidding price and a bidding amount of electricity, and the ciphertext bidding information includes a ciphertext bidding price and a ciphertext bidding amount of electricity; send a bidding request to a cloud server, wherein the bidding request carries a type identifier of the bidder and the ciphertext bidding information, and the type identifier of the bidder includes a seller identifier or a buyer identifier;

[0070] The cloud server is configured to, in response to the received bidding request, assign pseudonym identifiers to the bidders, wherein the seller pseudonym identifier is assigned to the bidder with the seller identifier, and the buyer pseudonym identifier is assigned to the bidder with the buyer identifier; generate a ciphertext comparison vector of any two bidders according to the ciphertext bidding information of the any two bidders and send the ciphertext comparison vector to the edge server, wherein the ciphertext comparison vector includes ciphertext bidding price comparison information and the pseudonym identifiers and ciphertext bidding power amounts of the two bidders corresponding thereto, and the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the any two bidders;

[0071] The edge server is configured to determine the winner's pseudonym identifier and final transaction information thereof according to a predetermined auction rule based on a pre-stored private key of the homomorphic encryption algorithm and a ciphertext comparison vector of any two bidders, and send the winner's pseudonym identifier and final transaction information thereof to a cloud server, wherein the final transaction information includes a final transaction price and a final transaction volume;

[0072] The cloud server is further configured to notify the bidder corresponding to the winner's pseudonym to conduct power data trading according to the winner's final transaction information based on the stored correspondence between the pseudonym and the bidder.

[0073] In a possible implementation, the system further includes:

[0074] The key generation center is configured to generate a public key and a private key of a homomorphic encryption algorithm, and send the public key to the bidder and the cloud server, and send the private key to the edge server.

[0075] In a possible implementation manner, the part of the cloud server that generates the ciphertext comparison vectors of any two bidders according to the ciphertext bidding information of any two bidders 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 ciphertext bidding prices of two bidders and The cloud server calculates the ciphertext price comparison value of 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 of any two bidders includes: and

[0080] In a possible implementation, the edge server determines the winner's pseudonym identifier and final transaction information according to a predetermined auction rule based on a pre-stored private key of the homomorphic encryption algorithm and a ciphertext comparison vector of any two bidders, including:

[0081] The edge server uses the private key to decrypt the ciphertext bidding price comparison information of the two arbitrary bidders to determine the size relationship between the bidding prices of the two arbitrary bidders;

[0082] The edge server uses the private key to decrypt the ciphertext bid power amounts of the two arbitrary bidders to obtain the bid power amounts of the two arbitrary bidders;

[0083] The edge server determines the pseudonym identification of the winner in the power data transaction and its final transaction information according to the predetermined auction rules, based on the size relationship between the bidding prices of the bidders and the bid power of the bidders.

[0084] In a possible implementation, the portion of the edge server that determines the pseudonym identifier of the winner in the power data transaction and its final transaction information according to a predetermined auction rule based on the size relationship between the bid prices of the bidders and the bid power of the bidders is configured as follows:

[0085] The edge server determines the bid price ranking fs1 of the seller based on the size relationship between the bid prices of the bidders and the pseudonym identifiers of the bidders. <fs2<...<fs n And the buyer's bidding price is sorted as fb1>fb2>...>fb m ; m and n are integers greater than or equal to 2, fs j The seller s whose bid price is ranked in the jth order j Pseudonymous ID, Facebook i The bid price of buyer b ranked in the ith order i Pseudonymous identifier, i takes the value of 1, 2...m, j takes the value of 1, 2...n;

[0086] The edge server determines the seller pseudonym fs of the Lth bid price ranking that satisfies the following conditions based on the seller's bid price ranking and the buyer's bid price ranking: L and the buyer's pseudonym fb ranked by bid price K :

[0087]

[0088] The edge server determines that the winner includes the buyer's K The bid price is larger than that of the buyer and seller. L The seller whose bid price is small;

[0089] The edge server determines the final transaction price of the winner as the bid price of the winner;

[0090] The edge server determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners;

[0091] Among them, qb i For buyer b i The bid power, ps j For sellers j The amount of electricity bid.

[0092] In a possible implementation manner, the portion of the edge server that determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners is configured as follows:

[0093] if The final transaction volume of each seller among the winners is determined to be the bid power of the seller, and the final transaction volume of each buyer is determined to be the bid power of the buyer minus the first average value, where the first average value is

[0094] if The final transaction volume of each buyer among the winners is determined to be the bid power of the buyer, and the final transaction volume of each seller is determined to be the bid power of the seller minus the second average value, where the second average value is

[0095] In a sixth aspect, a cloud-edge collaborative power data trading device is provided in an embodiment of the present disclosure, which is applied to a bidder, where the bidder is a buyer or a seller, and the device includes:

[0096] A bidding information encryption module is configured to encrypt the respective bidding information based on a pre-stored public key of a homomorphic encryption algorithm to obtain ciphertext bidding information, wherein the bidding information includes a bidding price and a bidding amount of electricity, and the ciphertext bidding information includes a ciphertext bidding price and a ciphertext bidding amount of electricity;

[0097] A bidding request module is configured to send a bidding request to a cloud server, wherein the bidding request carries a type identifier of the bidder and ciphertext bidding information, wherein 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, and the final transaction information includes a final transaction price and a final transaction volume.

[0099] In a seventh aspect, an embodiment of the present disclosure provides a cloud-edge collaborative power data trading device, which is applied to a cloud server, and the device includes:

[0100] A request receiving module is configured to receive a bidding request sent by a bidder, wherein the bidding request carries a type identifier and ciphertext bidding information of the bidder, wherein the type identifier of the bidder includes a seller identifier or a buyer identifier;

[0101] A pseudonym assignment module is configured to assign pseudonym identifications to bidders in response to received bidding requests, wherein the seller pseudonym identification is assigned to the bidder with the seller identification, and the buyer pseudonym identification is assigned to the bidder with the buyer identification;

[0102] A comparison vector generation module is configured to generate a ciphertext comparison vector of any two bidders according to the ciphertext bidding information of the two bidders; the ciphertext comparison vector includes the ciphertext bidding price comparison information and the corresponding pseudonym identifiers of the two bidders and the ciphertext bidding power, wherein the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the two bidders;

[0103] A comparison vector sending module, configured to send the ciphertext comparison vectors of any two bidders to an edge server;

[0104] A winner information receiving module, configured to receive the winner's pseudonym identification 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 transaction according to the winner's final transaction information based on the stored correspondence between the pseudonym and the bidder.

[0106] In a possible implementation, the comparison vector generation module is configured to:

[0107] Randomly generate a positive integer Z and encrypt Z using the public key of the pre-stored homomorphic encryption algorithm to obtain

[0108] For any two ciphertext bidding prices of two bidders and The ciphertext price comparison value of any two bidders is calculated according to the following formula:

[0109]

[0110] The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information of any two bidders includes: and

[0111] In an eighth aspect, an embodiment of the present disclosure provides a cloud-edge collaborative power data trading device, which is applied to an edge server, and the device includes:

[0112] A comparison vector receiving module is configured to receive a ciphertext comparison vector of any two bidders sent by a cloud server, wherein the ciphertext comparison vector includes ciphertext bidding price comparison information and the corresponding pseudonym identifiers of the two bidders and the ciphertext bid power amount, wherein the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the any two bidders;

[0113] A winner information determination module is configured to determine the winner's pseudonym identifier and final transaction information thereof according to predetermined auction rules based on a pre-stored private key of a homomorphic encryption algorithm and a ciphertext comparison vector of any two bidders, wherein the final transaction information includes a final transaction price and a final transaction volume;

[0114] The winner information sending module is configured to send the winner's pseudonym identification and final transaction information to the cloud server.

[0115] In a possible implementation, the winner information determination module is configured to:

[0116] Decrypting the ciphertext bidding price comparison information of the two arbitrary bidders using the private key to determine the size relationship between the bidding prices of the two arbitrary bidders;

[0117] Decrypting the ciphertext bid power amounts of the two arbitrary bidders using the private key to obtain the bid power amounts of the two arbitrary bidders;

[0118] According to the predetermined auction rules, based on the size relationship between the bid prices of the bidders and the bid electricity of the bidders, the pseudonym identification of the winner in the power data transaction and its final transaction information are determined.

[0119] In a possible implementation manner, the part of the winner information determination module that determines the pseudonym identifier of the winner in the power data transaction and its final transaction information according to the predetermined auction rules based on the size relationship between the bid prices of the bidders and the bid power of the bidders is configured as follows:

[0120] Based on the relationship between the bid prices of each bidder and the pseudonym of each bidder, the bid price ranking of the seller is determined fs1 <fs2<...<fs n And the buyer's bidding price is sorted as fb1>fb2>...>fb m ; m and n are integers greater than or equal to 2, fs j The seller s whose bid price is ranked in the jth order j Pseudonymous ID, Facebook i The bid price of buyer b ranked in the ith order i Pseudonymous identifier, i takes the value of 1, 2...m, j takes the value of 1, 2...n;

[0121] Based on the bidding price ranking of the seller and the bidding price ranking of the buyer, determine the bidding price ranking that satisfies the following conditions in the Lth seller pseudonym identifier fs L and the buyer's pseudonym fb ranked by bid price K :

[0122]

[0123] Determine the winner including the buyer in the fb K The bid price is larger than that of the buyer and seller. L The seller whose bid price is small;

[0124] Determine the final transaction price of the winner as the bid price of the winner;

[0125] Determine the final transaction volume of each buyer and each seller among the winners based on the bid electricity amount of each buyer and each seller among the winners;

[0126] Among them, qb i For buyer b i The bid power, ps j For sellers j The amount of electricity bid.

[0127] In a possible implementation manner, the part of the winner information determination module that determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners is configured as follows:

[0128] if The final transaction volume of each seller among the winners is determined to be the bid power of the seller, and the final transaction volume of each buyer is determined to be the bid power of the buyer minus the first average value, where the first average value is

[0129] if The final transaction volume of each buyer among the winners is determined to be the bid power of the buyer, and the final transaction volume of each seller is determined to be the bid power of the seller minus the second average value, where the second average value is

[0130] In a ninth aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer instructions, and wherein the one or more computer instructions are executed by the processor to implement a method as described in any one of the second to fourth aspects.

[0131] In the tenth aspect, a computer-readable storage medium is provided in an embodiment of the present disclosure, on which computer instructions are stored. When the computer instructions are executed by a processor, a method as described in any one of the second to fourth aspects is implemented.

[0132] According to the technical solution provided by the embodiment of the present disclosure, the bidders can encrypt their respective bidding information based on the public key of the pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information, wherein the bidding information includes the bidding price and the bidding electricity amount, and the ciphertext bidding information includes the ciphertext bidding price and the ciphertext bidding electricity amount; and send a bidding request to the cloud server, wherein the bidding request carries the type identification and ciphertext bidding information of the bidder, and the type identification of the bidder includes the seller identification or the buyer identification; in this way, the cloud server can only obtain the ciphertext bidding information of the bidder, avoid exposing the real bidding information, and ensure the security of the bidding information; the cloud server assigns a pseudonym identification to the bidder in response to the received bidding request, wherein the seller pseudonym identification is assigned to the bidder with the seller identification, and the buyer pseudonym identification is assigned to the bidder with the buyer identification; a ciphertext comparison vector of any two bidders is generated according to the ciphertext bidding information of the any two bidders and the ciphertext comparison vector is sent to the edge server, ... The comparison vector includes ciphertext bidding price comparison information and its corresponding pseudonym identifiers of the two bidders and the ciphertext bidding electricity amount, wherein the ciphertext bidding price comparison information is used to ciphertextally represent the size comparison result of the bidding prices of any two bidders; in this way, the edge server can only know the pseudonym of the bidder, the size comparison result of the bidding price and the ciphertext bidding electricity amount, avoiding the exposure of the true identity of the bidder and the bidding price. The edge server determines the winner's pseudonym identifier and its final transaction information according to the predetermined auction rules, based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vector of the any two bidders, and sends the winner's pseudonym identifier and its final transaction information to the cloud server, wherein the final transaction information includes the final transaction price and the final transaction amount; only the cloud server stores the correspondence between the pseudonym identifier and the bidder, so that the cloud server can notify the bidder corresponding to the winner's pseudonym identifier to conduct electricity data trading according to the winner's final transaction information. In the above transaction process, neither the cloud server nor the edge server knows the actual bidding price of the bidder, which prevents the bid price of the bidder from being exposed. Only the cloud server knows the true identity of the bidder, but the cloud server is not clear about the bidding information of each bidder, and the edge server only knows the bidder's pseudonym but not the bidder's true identity. This effectively ensures the bidder's information security and protects the bidder's privacy.

[0133] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0134] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the accompanying drawings:

[0135] Figure 1 A flow chart of a cloud-edge collaborative power data trading method provided by an embodiment of the present disclosure is shown.

[0136] Figure 2 A flow chart of a cloud-edge collaborative power data trading method applied to a bidder provided in an embodiment of the present disclosure is shown.

[0137] Figure 3 A flow chart of a cloud-edge collaborative power data trading method applied to a cloud server provided by an embodiment of the present disclosure is shown.

[0138] Figure 4 A flow chart of a cloud-edge collaborative power data trading method applied to an edge server provided in an embodiment of the present disclosure is shown.

[0139] Figure 5 A structural block diagram of a cloud-edge collaborative power data trading system provided by an embodiment of the present disclosure is shown.

[0140] Figure 6 A structural block diagram of a cloud-edge collaborative power data trading device applied to a bidder provided in an embodiment of the present disclosure is shown.

[0141] Figure 7 A structural block diagram of a cloud-edge collaborative power data trading device applied to a cloud server provided by an embodiment of the present disclosure is shown.

[0142] Figure 8 A structural block diagram of a cloud-edge collaborative power data trading device applied to an edge server provided in an embodiment of the present disclosure is shown.

[0143] Fig. 9 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0144] Fig.10 A schematic diagram showing the structure of a computer system suitable for implementing the method of the embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0145] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.

[0146] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate the presence of features, numbers, steps, behaviors, components, parts, or a combination thereof disclosed in the present specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or a combination thereof exist or are added.

[0147] It should also be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0148] Functions of the entities involved in this public power data transaction:

[0149] Bidder: refers to the buyer and seller who participate in the power data transaction. Both parties bid for the bid power of the transaction, including the seller and the buyer. In the power market, the seller is the seller of power and the buyer is the consumer of power. The bilateral auction mechanism adopted in this disclosure requires the buyer and seller to bid according to their true thoughts to obtain the maximum utility. Therefore, in this disclosure, the bids of both parties are real.

[0150] Cloud Server: Since the present disclosure involves complex operations such as encryption and big data processing, these operations are performed by cloud servers with computing power. The cloud server mainly collects the encrypted bid prices from both buyers and sellers, and uses the homomorphic encryption properties to calculate the ciphertext data to obtain the size of any two bid prices.

[0151] Edge server: The edge server mainly formulates the auction rules and compares 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 an auction, bidders are buyers and sellers who offer bids with the purpose of buying or selling goods in the market.

[0154] Auctioneer: The edge server in this disclosure is mainly responsible for the operation of the auction process, determining the auction mechanism, making winner decisions, determining the winner and making payments and allocations. In this disclosure, the edge server can cooperate with a third-party platform to conduct the auction process.

[0155] Valuation: During an auction, both buyers and sellers provide a valuation for each item they are asking for or selling; 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 bid prices, the edge server will determine the final transaction price based on the optimization goal; in other words, the final transaction price is the price at which the buyer and seller reach a deal.

[0157] The main 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 expected bidding price. The larger the difference, the higher the utility. The mechanism proposed in this disclosure will ensure that the current participants get the maximum utility when bidding according to their expected bidding price. Individual rationality ensures that the main purpose of both parties in the auction is to maximize their own utility, so that participants are motivated to participate in the transaction instead of disrupting the market.

[0158] Figure 1 A flow chart of a cloud-edge collaborative power data trading method provided by an embodiment of the present disclosure is shown. 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, wherein the bidding information includes the bidding price and the bid electricity amount, and the ciphertext bidding information includes the ciphertext bidding price and the ciphertext bid electricity amount.

[0160] In one possible implementation, each bidder has a pre-stored public key of a homomorphic encryption algorithm, which is an encryption method that allows specific computing operations to be performed on ciphertext encrypted with a public key without decrypting the ciphertext, and the result of the calculation is the same as the result of the corresponding operation directly on the plaintext after being decrypted with a private key. This encryption method can protect data privacy and security.

[0161] In a possible implementation, the bidder can be a buyer or a seller. The buyer's bid price refers to the bid that the buyer makes to purchase a unit share of electricity in this transaction, and the buyer's bid electricity is the amount of electricity that the buyer needs to purchase in this transaction; the seller's bid price refers to the seller's asking price for selling a unit share of electricity in this transaction, and the seller's bid electricity is the amount of electricity that the seller needs to sell in this transaction. For each bidder, whether it is a buyer or a seller, it is necessary to encrypt its bid price and bid electricity using a public key to obtain the encrypted ciphertext bid price and ciphertext bid electricity.

[0162] For example, the buyer set of this transaction can be defined as B, where B i ∈B, the set of sellers is S, where S j ∈S. For buyer B i , whose bidding information is recorded as byr i =(vb i ,qb i ), where vb i For Buyer B iThe bidding price, qb i For Buyer B i The bid power of the seller S j , whose bidding information is recorded as Sel j =(vs j ,ps j ), where vs j Seller S j Bidding price, ps j For the seller S j For any plaintext data m, the ciphertext decrypted using the above public key is recorded as Therefore, for buyer B i The encrypted bidding information can be recorded as To the seller j The encrypted bidding information can be recorded as

[0163] In step S102, the bidder sends a bid request to the cloud server, wherein the bid request carries the bidder's type identifier and encrypted bid information, wherein 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, where the bid request is used to request a bid for this power data transaction. The bid request does not carry the actual bid price and bid electricity amount, but carries the encrypted bid price and encrypted bid electricity amount to prevent the buyer and seller's actual bid prices from exposing their own economic situation or business secrets.

[0165] In a possible implementation, the bidder's type identifier is used to enable the cloud server to distinguish the type of the bidder, including a seller identifier and a buyer identifier.

[0166] In step S103, the cloud server allocates pseudonym identifications to bidders in response to the received bidding requests, wherein the bidder with the seller identification is allocated a seller pseudonym identification, and the bidder with the buyer identification is allocated a buyer pseudonym identification.

[0167] In a possible implementation, after receiving the bidding request, the cloud server may assign a seller pseudonym to the bidder identified by the seller, and assign a buyer pseudonym to the bidder identified by the buyer. For example, i Assign the buyer pseudonym to fb i , for the seller S j Assign the seller pseudonym to fs j ,The correspondence between the pseudonym identification and the real identity of the bidder is only known by the cloud server.

[0168] In step S104, the cloud server generates a ciphertext comparison vector of any two bidders based on the ciphertext bidding information of the any two bidders and sends the ciphertext comparison vector to the edge server. The ciphertext comparison vector includes the ciphertext bidding price comparison information and its corresponding pseudonym identifiers and ciphertext bid power amounts of the two bidders.

[0169] In a possible implementation, the ciphertext bidding information of any two bidders may be the ciphertext bidding information of a seller and the ciphertext bidding information of a buyer, or the ciphertext bidding information of two buyers, or the ciphertext bidding information of two sellers.

[0170] In a possible implementation, the cloud server can perform a calculation operation to compare the ciphertext bidding prices of the two bidders, such as a calculation operation such as subtraction or division, to obtain ciphertext bidding price comparison information. Since the ciphertext bidding price is the ciphertext encrypted by the public key of the homomorphic encryption algorithm, the homomorphic characteristics of the homomorphic encryption algorithm are utilized, and there is no need to decrypt the ciphertext. The calculation result of the comparison calculation operation is the same as the result of the corresponding operation directly performed on the plaintext after being decrypted using the private key.

[0171] In a possible implementation, the cloud server will also send the pseudonymous identifiers 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 are the comparison result of the encrypted bidding price comparison information; at the same time, the encrypted bid electricity amounts of the two bidders will also be sent to the edge server.

[0172] In step S105, the edge server determines the winner's pseudonym identifier and its final transaction information in accordance with predetermined auction rules, 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 identifier and its final transaction information to the cloud server.

[0173] In a possible implementation, since the ciphertext bidding price is the ciphertext obtained by encrypting the bidding price using the public key of the homomorphic encryption algorithm, the homomorphic characteristics of the homomorphic encryption algorithm are utilized, and there is no need to decrypt the ciphertext, and the result of the comparison operation on the ciphertext bidding price comparison information after decryption using the private key is the same as the result of the comparison operation directly on the plaintext bidding price. Therefore, after the edge server decrypts the ciphertext bidding price comparison information of the two bidders in the ciphertext comparison vector based on the pre-stored private key of the homomorphic encryption algorithm, the comparison result of the plaintext bidding prices of the two bidders can be determined. In this way, the edge server can obtain the comparison result of the bidding prices between any two of the bidders (including buyers and sellers).

[0174] In a possible implementation, the edge server can also decrypt the ciphertext bid power amount according to the pre-stored private key of the homomorphic encryption algorithm to obtain the bid power amount; then, the edge server can conduct an auction according to the predetermined auction rules, based on the comparison results of the bidding prices between any two bidders (including buyers and sellers), and the bid power amount, to determine the winner in the power data transaction and the final transaction price and final transaction volume of the winner. The winner here refers to the bidder (including buyers and sellers) who can conduct power data transactions. The edge server can send the winner's pseudonym identification and its final transaction information to the cloud server

[0175] In step S106, the cloud server notifies the bidder corresponding to the winner's pseudonym to conduct power data trading according to the winner's final transaction information based on the stored correspondence between the pseudonym and the bidder.

[0176] In a possible implementation, when the cloud server assigns a pseudonym identifier to a bidder, it can store the correspondence between the pseudonym identifier and the bidder. In this way, after receiving the winner's pseudonym identifier and its final transaction information sent by the edge server, the cloud server can notify the bidder corresponding to the winner's pseudonym identifier to conduct electricity data transactions according to the final transaction price and final transaction volume of the winner's pseudonym identifier.

[0177] In this embodiment, the bidders can encrypt their respective bidding information based on the public key of the pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information, wherein the bidding information includes the bidding price and the bidding electricity, and the ciphertext bidding information includes the ciphertext bidding price and the ciphertext bidding electricity; and send a bidding request to the cloud server, wherein the bidding request carries the type identification and ciphertext bidding information of the bidder, and the type identification of the bidder includes the seller identification or the buyer identification; in this way, the cloud server can only obtain the ciphertext bidding information of the bidder, avoid exposing the real bidding information, and ensure the security of the bidding information; the cloud server responds to the received bidding request and assigns a pseudonym identification to the bidder, wherein the seller pseudonym identification is assigned to the bidder with the seller identification, and the buyer pseudonym identification is assigned to the bidder with the buyer identification; a ciphertext comparison vector of any two bidders is generated according to the ciphertext bidding information of the any two bidders and the ciphertext comparison vector is sent to the edge server, wherein the ciphertext comparison vector includes The invention comprises ciphertext bidding price comparison information and its corresponding pseudonym identifiers of the two bidders and ciphertext bidding electricity, wherein the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of any two bidders; in this way, the edge server can only know the pseudonym of the bidder, the comparison result of the bidding price and the ciphertext bidding electricity, so as to avoid the exposure of the true identity of the bidder and the bidding price. The edge server determines the pseudonym identifier and the final transaction information of the winner according to the predetermined auction rules, based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vector of the any two bidders, and sends the pseudonym identifier and the final transaction information of the winner to the cloud server, wherein the final transaction information includes the final transaction price and the final transaction volume; only the cloud server stores the correspondence between the pseudonym identifier and the bidder, so that the cloud server can notify the bidder corresponding to the pseudonym identifier of the winner to conduct electricity data transaction according to the final transaction information of the winner. In the above transaction process, neither the cloud server nor the edge server knows the actual bidding price of the bidder, which prevents the bid price of the bidder from being exposed. Only the cloud server knows the true identity of the bidder, but the cloud server is not clear about the bidding information of each bidder, and the edge server only knows the bidder's pseudonym but not the bidder's true identity. This effectively ensures the bidder's information security and protects the bidder's privacy.

[0178] In a possible implementation, the method further includes:

[0179] The key generation center generates a public key and a private key of 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 authority for generating keys. The key generation center can generate a public key and a private key of a homomorphic encryption algorithm. For example, the homomorphic encryption algorithm used in the present disclosure can be a Paillier encryption algorithm (an additive homomorphic encryption algorithm). As an asymmetric encryption algorithm, the public key of the Paillier algorithm is publickey=(n,g), where n=p*q, p, q are two large prime numbers. That is, g is 1 to n 2 A non-zero random number in . The private key is privatekey=(μ,λ), where μ=k -1 n (i.e., μ is the remainder of n 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 the present disclosure may be other homomorphic encryption algorithms in addition to the above-mentioned Pailiier encryption algorithm, which is not limited here.

[0181] In a possible implementation manner, the cloud server generates a ciphertext comparison vector of any two bidders according to the ciphertext bidding information of the any two bidders, including:

[0182] The cloud server randomly generates a positive integer Z and encrypts Z using the public key to obtain

[0183] For any two ciphertext bidding prices of two bidders and The cloud server calculates the ciphertext 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 implementation, the homomorphic encryption algorithm is a Paillier encryption algorithm, which has the following homomorphic properties:

[0187] Feature A: After multiplying two ciphertexts, the result of adding the two plaintexts can be obtained by decrypting them with the corresponding private key;

[0188] Property B: Ensure that a ciphertext to the power of x can be decrypted with the corresponding private key to obtain x times the plaintext;

[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 embodiment, the Paillier encryption algorithm does not allow the appearance of negative numbers. In order to ensure that the ciphertext in the present disclosure is always positive, the cloud server randomly generates a positive integer Z and uses the public key to encrypt Z to obtain Thus, for any two ciphertext bidding prices and The ciphertext price comparison value of the two bidders calculated by the cloud server according to the above formula will be positive. 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, and can be set based on experience.

[0191] In this implementation, after the cloud server calculates the ciphertext price comparison value, and This constitutes the ciphertext bidding price comparison information of the two bidders. In this way, the cloud server can generate the ciphertext comparison vector of the two bidders: ( The two bidders’ pseudonymous identifiers and the two bidders’ ciphertext bid electricity quantities).

[0192] For example, suppose there are two bidders, one of which is buyer B. i , the other is the seller S j , then for the two ciphertext bidding prices of the two bidders and The cloud server can calculate the ciphertext price comparison value of the two bidders Then generate the ciphertext comparison vector

[0193] In a possible implementation manner, the edge server determines the winner pseudonym identification 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 the predetermined auction rules, including:

[0194] The edge server uses the private key to decrypt the ciphertext bidding price comparison information of the two arbitrary bidders to determine the size relationship between the bidding prices of the two arbitrary bidders;

[0195] The edge server uses the private key to decrypt the ciphertext bid power amounts of the two arbitrary bidders to obtain the bid power amounts of the two arbitrary bidders;

[0196] The edge server determines the winner's pseudonym identification and final transaction information in the power data transaction according to the predetermined auction rules and based on the size relationship between the bid prices of the bidders and the bid power of the bidders.

[0197] In this implementation, for example, the homomorphic encryption algorithm is the Pailiier encryption algorithm mentioned above, and the ciphertext bidding price comparison information of any two bidders is compared using the private key of the Pailiier encryption algorithm. and Decryption can get CP x,y and Z, due to CP x,y =x-y+Z, so CP x,y -Z=xy, if CP x,y -Z is greater than 0, then x is greater than y, if CP x,y -Z is less than 0, then x is less than y, if CP x,y -Z is equal to 0, then x is equal to y. In this way, the size relationship between the bidding prices of the two bidders can be determined without knowing the actual bidding prices x and y of the two bidders.

[0198] In this implementation, the edge server uses the private key to decrypt the ciphertext bid power of any two bidders, and thus obtains the bid power of any two bidders. i The encrypted bidding power Decrypt it and you can get qb i , for bidders j The encrypted bidding power Decrypt it and you can get ps j .

[0199] In this implementation, after the above decryption, the relationship between the bidding prices of each bidder and the bidding electricity of each bidder in this power data transaction can be obtained. It should be noted here that the bidders here are all identified by pseudonyms, and the edge server does not know the true identity of the bidder, nor the bidding price of each bidder, and will not expose the bidder's own economic situation or business secrets.

[0200] In a possible implementation, the edge server determines the pseudonym identifier of the winner in the power data transaction and its final transaction information according to a predetermined auction rule based on the size relationship between the bid prices of the bidders and the bid power of the bidders, including:

[0201] The edge server determines the bid price ranking fs1 of the seller based on the size relationship between the bid prices of the bidders and the pseudonym identifiers of the bidders. <fs2<...<fsn And the buyer's bidding price is sorted as fb1>fb2>...>fb m ; m and n are integers greater than or equal to 2, fs j The seller s whose bid price is ranked in the jth order j Pseudonymous ID, Facebook i The bid price of buyer b ranked in the ith order i Pseudonymous identifier, i takes the value of 1, 2...m, j takes the value of 1, 2...n;

[0202] The edge server determines the seller pseudonym fs of the Lth bid price ranking that satisfies the following conditions based on the seller's bid price ranking and the buyer's bid price ranking: L and the buyer's pseudonym fb ranked by bid price K :

[0203]

[0204] The edge server determines that the winner includes the buyer's K The bid price is larger than that of the buyer and seller. L The seller whose bid price is small;

[0205] The edge server determines the final transaction price of the winner as the bid price of the winner;

[0206] The edge server determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners;

[0207] Among them, qb i For buyer b i The bid power, ps j For sellers j The amount of electricity bid.

[0208] In this implementation, after the edge server determines the size relationship between the bid prices of the bidders, it can sort the pseudonym identifiers corresponding to the buyer pseudonym identifiers to obtain the buyer's bid price sorting fb1>fb2>...>fb m , sort the pseudonym identifiers corresponding to the seller pseudonym identifiers to obtain the seller's bidding price ranking fs1 <fs2<...<fs n .

[0209] In this embodiment, for any seller's bid price in the above two deck sequences, a seller's bid price can be found that satisfies fb K >fs L >fb K+1Since the demand and bid power quantity sold by each buyer and seller are different, it is also necessary to consider the potential winner (i.e. the bid is greater than fb K The bid price of the buyer and the selling price is less than fs L Whether the seller can obtain and sell the corresponding amount of electricity at the bidding price, that is, Alternatively, you can use fs L+1 >fb K >fs L and Therefore, fs L is the intersection of the two sequences when the above conditions are met, which represents the lowest payment price for the buyer to purchase power data and the highest selling price for the seller to sell power data. For the seller, the winner is the ratio fs L The sellers with the lowest bid prices are identified by pseudonyms fs1, fs2, ... fs L-1 The final transaction price is the bid price of each seller; for buyers, the winner is the bidder of the bid. K The buyers with the largest bidding prices are identified by pseudonyms as fb1, fb2, ..., fb K-1 The final transaction price is the bid price of each buyer.

[0210] In this embodiment, after the edge server determines the winner, it can obtain the bid electricity amount of each buyer and the bid electricity amount of each seller among the winners. Since the total bid electricity amount of all buyers and the total bid electricity amount of all sellers may not be equal, it is necessary to allocate the final transaction volume to each buyer and each seller among the winners based on the bid electricity amount of each buyer and the bid electricity amount of each seller among the winners in accordance with the predetermined auction rules.

[0211] In a possible implementation manner, the edge server determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners, including:

[0212] if The final transaction volume of each seller among the winners is determined to be the bid power of the seller, and the final transaction volume of each buyer is determined to be the bid power of the buyer minus the first average value, where the first average value is

[0213] if The final transaction volume of each buyer among the winners is determined to be the bid power of the buyer, and the final transaction volume of each seller is determined to be the bid power of the seller minus the second average value, where the second average value is

[0214] In this embodiment, if This means that among the winners, the sellers’ total electricity data sales are less than or equal to the buyers’ total electricity demand, and the electricity supply is less than or equal to the demand. Therefore, all the sellers among the winners can sell all of their bid electricity, that is, the final transaction volume of each seller among the winners is the bid electricity of the sellers; but in order to allow all buyers among the winners to obtain electricity, each buyer among the winners should reduce the amount of electricity purchased to avoid the situation where some buyers among the winners cannot purchase electricity. The auction rules set in this embodiment can be that each buyer reduces the amount of electricity purchased by the same amount. In this case, the final transaction volume of each buyer is the bid electricity of the buyer minus the 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, and the electricity supply is greater than the demand. Therefore, all buyers among the winners can obtain the bid electricity they want to purchase, that is, the final transaction volume of each buyer among the winners is the bid electricity of the buyer; but in order to allow all sellers among the winners to sell electricity, each seller will reduce the amount of electricity sold accordingly. The auction rules set in this embodiment can be that each seller reduces the same amount of electricity sold. In this case, the final transaction volume of each seller is the bid electricity of the seller minus the second average value.

[0216] Figure 2 A flowchart of a cloud-edge collaborative power data trading method for bidders provided by an embodiment of the present disclosure is shown. Figure 2 As shown, the method includes the following steps S201-S203:

[0217] In step S201, the respective bidding information is encrypted based on the public key of the pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information, wherein the bidding information includes the bidding price and the bidding electricity amount, and the ciphertext bidding information includes the ciphertext bidding price and the ciphertext bidding electricity amount.

[0218] In one possible implementation, each bidder has a pre-stored public key of a homomorphic encryption algorithm, which is an encryption method that allows specific computing operations to be performed on ciphertext encrypted with a public key without decrypting the ciphertext, and the result of the calculation is the same as the result of the corresponding operation directly on the plaintext after being decrypted with a private key. This encryption method can protect data privacy and security.

[0219] In a possible implementation, the bidder can be a buyer or a seller. The buyer's bid price refers to the bid that the buyer makes to purchase a unit share of electricity in this transaction, and the buyer's bid electricity is the amount of electricity that the buyer needs to purchase in this transaction; the seller's bid price refers to the seller's asking price for selling a unit share of electricity in this transaction, and the seller's bid electricity is the amount of electricity that the seller needs to sell in this transaction. For each bidder, whether it is a buyer or a seller, it is necessary to encrypt its bid price and bid electricity using a public key to obtain the encrypted ciphertext bid price and ciphertext bid electricity.

[0220] For example, the buyer set of this transaction can be defined as B, where B i ∈B, the set of sellers is S, where S j ∈S. For buyer B i , whose bidding information is recorded as byr i =(vb i ,qb i ), where vb i For Buyer B i The bidding price, qb i For Buyer B i The bid power of the seller S j , whose bidding information is recorded as Sel j =(vs j ,ps j ), where vs j Seller S j Bidding price, ps j For the seller S j For any plaintext data m, the ciphertext decrypted using the above public key is recorded as Therefore, for buyer B i The encrypted bidding information can be recorded as To the seller j The encrypted bidding information can be recorded as

[0221] In step S202, a bidding request is sent to a cloud server, wherein the bidding request carries the type identifier of the bidder and encrypted bidding information, wherein 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, where the bid request is used to request a bid for this power data transaction. The bid request does not carry the actual bid price and bid electricity amount, but carries the encrypted bid price and encrypted bid electricity amount to prevent the buyer and seller's actual bid prices from exposing their own economic situation or business secrets.

[0223] In a possible implementation, the bidder's type identifier is used to enable the cloud server to distinguish the type of the 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, and the final transaction information includes the final transaction price and the final transaction volume.

[0225] In a possible implementation, the cloud server allocates a pseudonym identifier to the bidder in response to the received bidding request, wherein the seller pseudonym identifier is allocated to the bidder with the seller identifier, and the buyer pseudonym identifier is allocated to the bidder with the buyer identifier. The cloud server generates a ciphertext comparison vector of any two bidders based on the ciphertext bidding information of the two bidders and sends the ciphertext comparison vector to the edge server, wherein the ciphertext comparison vector includes the ciphertext bidding price comparison information and the corresponding pseudonym identifiers of the two bidders and the ciphertext bidding power amount. The edge server determines the winner's pseudonym identifier and its final transaction information based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of the two bidders in accordance with the predetermined auction rules, and sends the winner's pseudonym identifier and its final transaction information to the cloud server. Based on the stored correspondence between the pseudonym identifier and the bidder, the cloud server notifies the bidder corresponding to the winner's pseudonym identifier to trade power data according to the winner's final transaction information. In this way, if the cursor party becomes the winner in the power data transaction, it can receive the final transaction information sent by the cloud server, and the final transaction information includes the final transaction price and the final transaction volume.

[0226] Figure 3 A flow chart of a power data trading method for cloud-edge collaboration applied to a cloud server provided by an embodiment of the present disclosure is shown. Figure 3 As shown, the method includes the following steps S301-S305:

[0227] In step S301, a bidding request sent by a bidder is received, wherein the bidding request carries a type identifier of the bidder and encrypted bidding information, wherein the type identifier of the bidder includes a seller identifier or a buyer identifier.

[0228] In a possible implementation, the bidders encrypt their respective bidding information based on the public key of the pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information, and then the bidders send a bidding request to the cloud server, the bidding request carries the type identifier of the bidder and the ciphertext bidding information, the type identifier of the bidder includes a seller identifier or a buyer identifier. The bidding information includes the bidding price and the bidding power, and the ciphertext bidding information includes the ciphertext bidding price and the ciphertext bidding power.

[0229] In step S302, in response to the received bidding request, pseudonym identifications are assigned to the bidders, wherein the bidder with the seller identification is assigned a seller pseudonym identification, and the bidder with the buyer identification is assigned a buyer pseudonym identification.

[0230] In a possible implementation, after receiving the bidding request, the cloud server may assign a seller pseudonym to the bidder identified by the seller, and assign a buyer pseudonym to the bidder identified by the buyer. For example, i Assign the buyer pseudonym to fb i , for the seller S j Assign the seller pseudonym to fs j ,The correspondence between the pseudonym identification and the real identity of the bidder is only known by the cloud server.

[0231] In step S303, a ciphertext comparison vector of any two bidders is generated based on the ciphertext bidding information of the two bidders and the ciphertext comparison vector is sent to the edge server. The ciphertext comparison vector includes the ciphertext bidding price comparison information and its corresponding pseudonym identifiers and ciphertext bid power amounts of the two bidders.

[0232] The ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of any two bidders.

[0233] In a possible implementation, the ciphertext bidding information of any two bidders may be the ciphertext bidding information of a seller and the ciphertext bidding information of a buyer, or the ciphertext bidding information of two buyers, or the ciphertext bidding information of two sellers.

[0234] In a possible implementation, the cloud server can perform a calculation operation to compare the ciphertext bidding prices of the two bidders, such as a calculation operation such as subtraction or division, to obtain ciphertext bidding price comparison information. Since the ciphertext bidding price is the ciphertext encrypted by the public key of the homomorphic encryption algorithm, the homomorphic characteristics of the homomorphic encryption algorithm are utilized, and there is no need to decrypt the ciphertext. The calculation result of the comparison calculation operation is the same as the result of the corresponding operation directly performed on the plaintext after being decrypted using the private key.

[0235] In a possible implementation, the cloud server will also send the pseudonymous identifiers 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 are the comparison result of the encrypted bidding price comparison information; at the same time, the encrypted bid electricity amounts of the two bidders will also be sent to the edge server.

[0236] In step S304, the winner's pseudonym identification and final transaction information returned by the edge server are received.

[0237] The edge server determines the winner's pseudonym identifier and final transaction information based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of the two arbitrary bidders according to the predetermined auction rules, and sends the winner's pseudonym identifier and final transaction information to the cloud server. In this way, the cloud server can receive the winner's pseudonym identifier and final transaction information returned by the edge server.

[0238] In step S305, based on the stored correspondence between the pseudonym identifier and the bidder, the bidder corresponding to the pseudonym identifier of the winner is notified to perform power data trading according to the final transaction information of the winner.

[0239] In a possible implementation, when the cloud server assigns a pseudonym identifier to a bidder, it can store the correspondence between the pseudonym identifier and the bidder. In this way, after receiving the winner's pseudonym identifier and its final transaction information sent by the edge server, the cloud server can notify the bidder corresponding to the winner's pseudonym identifier to conduct electricity data transactions according to the final transaction price and final transaction volume of the winner's pseudonym identifier.

[0240] In a possible implementation manner, generating the ciphertext comparison vectors of any two bidders according to the ciphertext bidding information of the any two bidders includes:

[0241] Randomly generate a positive integer Z and encrypt Z using the public key of the pre-stored homomorphic encryption algorithm to obtain

[0242] For any two ciphertext bidding prices of two bidders and The ciphertext price comparison value of any two bidders is calculated according to the following formula:

[0243]

[0244] The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information of any two bidders includes: and

[0245] In this implementation, the homomorphic encryption algorithm is a Paillier encryption algorithm, which has the following homomorphic properties:

[0246] Feature A: After multiplying two ciphertexts, the result of adding the two plaintexts can be obtained by decrypting them with the corresponding private key;

[0247] Property B: Ensure that a ciphertext to the power of x can be decrypted with the corresponding private key to obtain x times the plaintext;

[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 embodiment, the Paillier encryption algorithm does not allow the appearance of negative numbers. In order to ensure that the ciphertext in the present disclosure is always positive, the cloud server randomly generates a positive integer Z and uses the public key to encrypt Z to obtain Thus, for any two ciphertext bidding prices and The ciphertext price comparison value of the two bidders calculated by the cloud server according to the above formula will be positive. 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, and can be set based on experience.

[0250] In this implementation, after the cloud server calculates the ciphertext price comparison value, and This constitutes the ciphertext bidding price comparison information of the two bidders. In this way, the cloud server can generate the ciphertext comparison vector of the two bidders: ( The two bidders’ pseudonymous identifiers and the two bidders’ ciphertext bid electricity quantities).

[0251] For example, suppose there are two bidders, one of which is buyer B. i , the other is the seller S j , then for the two ciphertext bidding prices of the two bidders and The cloud server can calculate the ciphertext price comparison value of the two bidders Then generate the ciphertext comparison vector

[0252] Figure 4 A flow chart of a power data trading method for cloud-edge collaboration applied to edge servers provided by an embodiment of the present disclosure is shown. Figure 4 As shown, the method includes the following steps S401-S403:

[0253] In step S401, a ciphertext comparison vector of any two bidders sent by a cloud server is received, wherein the ciphertext comparison vector includes ciphertext bidding price comparison information and the corresponding pseudonym identifiers and ciphertext bid power amounts of the two bidders.

[0254] The ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of any two bidders.

[0255] In a possible implementation, the bidders encrypt their respective bidding information based on the public key of the pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information, wherein the bidding information includes the bidding price and the bidding power, and the ciphertext bidding information includes the ciphertext bidding price and the ciphertext bidding power. Then, the bidder sends a bidding request to the cloud server, wherein the bidding request carries the type identification and ciphertext bidding information of the bidder, and the type identification of the bidder includes the seller identification or the buyer identification. In response to the received bidding request, the cloud server assigns a pseudonym identification to the bidder, wherein the seller pseudonym identification is assigned to the bidder with the seller identification, and the buyer pseudonym identification is assigned to the bidder with the buyer identification. Then, the cloud server generates a ciphertext comparison vector of any two bidders based on the ciphertext bidding information of the two bidders and sends the ciphertext comparison vector to the edge server, wherein the ciphertext comparison vector includes the ciphertext bidding price comparison information and the corresponding pseudonym identifications and ciphertext bidding power of the two bidders.

[0256] In a possible implementation, since the ciphertext bidding price is the ciphertext obtained by encrypting the bidding price using the public key of the homomorphic encryption algorithm, the homomorphic characteristics of the homomorphic encryption algorithm are utilized, and there is no need to decrypt the ciphertext, and the result of the comparison operation on the ciphertext bidding price comparison information after decryption using the private key is the same as the result of the comparison operation directly on the plaintext bidding price. Therefore, after the edge server decrypts the ciphertext bidding price comparison information of the two bidders in the ciphertext comparison vector based on the pre-stored private key of the homomorphic encryption algorithm, the comparison result of the plaintext bidding prices of the two bidders can be determined. In this way, the edge server can obtain the comparison result of the bidding prices between any two of the bidders (including buyers and sellers).

[0257] In a possible implementation, the edge server can also decrypt the ciphertext bid power amount according to the pre-stored private key of the homomorphic encryption algorithm to obtain the bid power amount; then, the edge server can conduct an auction according to the predetermined auction rules, based on the comparison results of the bidding prices between any two bidders (including buyers and sellers), and the bid power amount, to determine the winner in the power data transaction and the final transaction price and final transaction volume of the winner. The winner here refers to the bidder (including buyers and sellers) who can conduct power data transactions. The edge server can send the winner's pseudonym identification and its final transaction information to the cloud server

[0258] In step S402, according to the 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 winner's pseudonym identifier and final transaction information are determined.

[0259] The final transaction information includes the final transaction price and the final transaction volume.

[0260] In a possible implementation, since the ciphertext bidding price is the ciphertext obtained by encrypting the bidding price using the public key of the homomorphic encryption algorithm, the homomorphic characteristics of the homomorphic encryption algorithm are utilized, and there is no need to decrypt the ciphertext, and the result of the comparison operation on the ciphertext bidding price comparison information after decryption using the private key is the same as the result of the comparison operation directly on the plaintext bidding price. Therefore, after the edge server decrypts the ciphertext bidding price comparison information of the two bidders in the ciphertext comparison vector based on the pre-stored private key of the homomorphic encryption algorithm, the comparison result of the plaintext bidding prices of the two bidders can be determined. In this way, the edge server can obtain the comparison result of the bidding prices between any two of the bidders (including buyers and sellers).

[0261] In a possible implementation, the edge server can also decrypt the ciphertext bid power amount according to the pre-stored private key of the homomorphic encryption algorithm to obtain the bid power amount; then, the edge server can conduct an auction according to the predetermined auction rules, based on the comparison results of the bidding prices between any two bidders (including buyers and sellers), and the bid power amount, to determine the winner in the power data transaction and the final transaction price and final transaction volume of the winner. The winner here refers to the bidder (including buyers and sellers) who can conduct power data transactions.

[0262] In step S403, the winner's pseudonym identification and final transaction information are sent to the cloud server.

[0263] In a possible implementation, the edge server may send the winner's pseudonym identifier and its final transaction information to the cloud server, and the cloud server, based on the stored correspondence between the pseudonym identifier and the bidder, notifies the bidder corresponding to the winner's pseudonym identifier to conduct electricity data trading according to the winner's final transaction information.

[0264] In a possible implementation, determining the winner's pseudonym identifier and final transaction information according to a predetermined auction rule based on a pre-stored private key of a homomorphic encryption algorithm and a ciphertext comparison vector of any two bidders includes:

[0265] Decrypting the ciphertext bidding price comparison information of the two arbitrary bidders using the private key to determine the size relationship between the bidding prices of the two arbitrary bidders;

[0266] Decrypting the ciphertext bid power amounts of the two arbitrary bidders using the private key to obtain the bid power amounts of the two arbitrary bidders;

[0267] According to the predetermined auction rules, based on the size relationship between the bid prices of the bidders and the bid electricity of the bidders, the pseudonym identification of the winner in the power data transaction and its final transaction information are determined.

[0268] In this implementation, for example, the homomorphic encryption algorithm is the Pailiier encryption algorithm mentioned above, and the ciphertext bidding price comparison information of any two bidders is compared using the private key of the Pailiier encryption algorithm. and Decryption can get CP x,y and Z, due to CP x,y =x-y+Z, so CP x,y -Z=xy, if CP x,y -Z is greater than 0, then x is greater than y, if CP x,y -Z is less than 0, then x is less than y, if CP x,y -Z is equal to 0, then x is equal to y. In this way, the size relationship between the bidding prices of the two bidders can be determined without knowing the actual bidding prices x and y of the two bidders.

[0269] In this implementation, the edge server uses the private key to decrypt the ciphertext bid power of any two bidders, and thus obtains the bid power of any two bidders. i The encrypted bidding power Decrypt it and you can get qb i , for bidders j The encrypted bidding power Decrypt it and you can get psj .

[0270] In this implementation, after the above decryption, the relationship between the bidding prices of each bidder and the bidding electricity of each bidder in this power data transaction can be obtained. It should be noted here that the bidders here are all identified by pseudonyms, and the edge server does not know the true identity of the bidder, nor the bidding price of each bidder, and will not expose the bidder's own economic situation or business secrets.

[0271] In a possible implementation, the determining of the pseudonym identifier of the winner in the power data transaction and its final transaction information according to the predetermined auction rules based on the size relationship between the bid prices of the bidders and the bid power of the bidders includes:

[0272] Based on the relationship between the bid prices of each bidder and the pseudonym of each bidder, the bid price ranking of the seller is determined fs1 <fs2<...<fs n And the buyer's bidding price is sorted as fb1>fb2>...>fb m ; m and n are integers greater than or equal to 2, fs j The seller s whose bid price is ranked in the jth order j Pseudonymous ID, Facebook i The bid price of buyer b ranked in the ith order i Pseudonymous identifier, i takes the value of 1, 2...m, j takes the value of 1, 2...n;

[0273] Based on the bidding price ranking of the seller and the bidding price ranking of the buyer, determine the bidding price ranking that satisfies the following conditions in the Lth seller pseudonym identifier fs L and the buyer's pseudonym fb ranked by bid price K :

[0274]

[0275] Determine the winner including the buyer in the fb K The bid price is larger than that of the buyer and seller. L The seller whose bid price is small;

[0276] Determine the final transaction price of the winner as the bid price of the winner;

[0277] Determine the final transaction volume of each buyer and each seller among the winners based on the bid electricity amount of each buyer and each seller among the winners;

[0278] Among them, qb i For buyer b iThe bid power, ps j For sellers j The amount of electricity bid.

[0279] In this implementation, after the edge server determines the size relationship between the bid prices of the bidders, it can sort the pseudonym identifiers corresponding to the buyer pseudonym identifiers to obtain the buyer's bid price sorting fb1>fb2>...>fb m , sort the pseudonym identifiers corresponding to the seller pseudonym identifiers to obtain the seller's bidding price ranking fs1 <fs2<...<fs n .

[0280] In this embodiment, for any seller's bid price in the above two deck sequences, a seller's bid price can be found that satisfies fb K >fs L >fb K+1 Since the demand and bid power quantity sold by each buyer and seller are different, it is also necessary to consider the potential winner (i.e. the bid is greater than fb K The bid price of the buyer and the selling price is less than fs L Whether the seller can obtain and sell the corresponding amount of electricity at the bidding price, that is, Alternatively, you can use fs L+1 >fb K >fs L and Therefore, fs L is the intersection of the two sequences when the above conditions are met, which represents the lowest payment price for the buyer to purchase power data and the highest selling price for the seller to sell power data. For the seller, the winner is the ratio fs L The sellers with the lowest bid prices are identified by pseudonyms fs1, fs2, ... fs L-1 The final transaction price is the bid price of each seller; for buyers, the winner is the bidder of the bid. K The buyers with the largest bidding prices are identified by pseudonyms as fb1, fb2, ..., fb K-1 The final transaction price is the bid price of each buyer.

[0281] In this embodiment, after the edge server determines the winner, it can obtain the bid electricity amount of each buyer and the bid electricity amount of each seller among the winners. Since the total bid electricity amount of all buyers and the total bid electricity amount of all sellers may not be equal, it is necessary to allocate the final transaction volume to each buyer and each seller among the winners based on the bid electricity amount of each buyer and the bid electricity amount of each seller among the winners in accordance with the predetermined auction rules.

[0282] In a possible implementation manner, determining the final transaction volume of each buyer and each seller among the winners based on the bid electricity amount of each buyer and the bid electricity amount of each seller among the winners includes:

[0283] if The final transaction volume of each seller among the winners is determined to be the bid power of the seller, and the final transaction volume of each buyer is determined to be the bid power of the buyer minus the first average value, where the first average value is

[0284] if The final transaction volume of each buyer among the winners is determined to be the bid power of the buyer, and the final transaction volume of each seller is determined to be the bid power of the seller minus the second average value, where the second average value is

[0285] In this embodiment, if This means that among the winners, the sellers’ total electricity data sales are less than or equal to the buyers’ total electricity demand, and the electricity supply is less than or equal to the demand. Therefore, all the sellers among the winners can sell all of their bid electricity, that is, the final transaction volume of each seller among the winners is the bid electricity of the sellers; but in order to allow all buyers among the winners to obtain electricity, each buyer among the winners should reduce the amount of electricity purchased to avoid the situation where some buyers among the winners cannot purchase electricity. The auction rules set in this embodiment can be that each buyer reduces the amount of electricity purchased by the same amount. In this case, the final transaction volume of each buyer is the bid electricity of the buyer minus the 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, and the electricity supply is greater than the demand. Therefore, all buyers among the winners can obtain the bid electricity they want to purchase, that is, the final transaction volume of each buyer among the winners is the bid electricity of the buyer; but in order to allow all sellers among the winners to sell electricity, each seller will reduce the amount of electricity sold accordingly. The auction rules set in this embodiment can be that each seller reduces the same amount of electricity sold. In this case, the final transaction volume of each seller is the bid electricity of the seller minus the second average value.

[0287] The present disclosure also provides a cloud-edge collaborative power data trading system. Figure 5 The structure diagram of a cloud-edge collaborative power data trading system provided by an embodiment of the present disclosure is shown. The 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 respective bidding information based on a public key of a pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information, wherein the bidding information includes a bidding price and a bidding amount of electricity, and the ciphertext bidding information includes a ciphertext bidding price and a ciphertext bidding amount of electricity; send a bidding request to a cloud server, wherein the bidding request carries a type identifier of the bidder and ciphertext bidding information, and the type identifier of the bidder includes a seller identifier or a buyer identifier;

[0289] The cloud server 502 is configured to, in response to the received bidding request, assign pseudonym identifiers to the bidders, wherein the seller pseudonym identifier is assigned to the bidder with the seller identifier, and the buyer pseudonym identifier is assigned to the bidder with the buyer identifier; generate a ciphertext comparison vector of any two bidders according to the ciphertext bidding information of the any two bidders and send the ciphertext comparison vector to the edge server, wherein the ciphertext comparison vector includes the ciphertext bidding price comparison information and the corresponding pseudonym identifiers of the two bidders and the ciphertext bidding power, and the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the any two bidders;

[0290] The edge server 503 is configured to determine the winner's pseudonym identifier and final transaction information according to the predetermined auction rules based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of the arbitrary two bidders, and send the winner's pseudonym identifier and final transaction information to the cloud server, wherein the final transaction information includes a final transaction price and a final transaction volume;

[0291] The cloud server 502 is further configured to notify the bidder corresponding to the winner's pseudonym to conduct power data trading according to the winner's final transaction information based on the stored correspondence between the pseudonym and the bidder.

[0292] In a possible implementation, the system further includes:

[0293] The key generation center is configured to generate a public key and a private key of a homomorphic encryption algorithm, and send the public key to the bidder and the cloud server, and send the private key to the edge server.

[0294] In a possible implementation manner, the part of the cloud server that generates the ciphertext comparison vectors of any two bidders according to the ciphertext bidding information of any two bidders 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 ciphertext bidding prices of two bidders and The cloud server calculates the ciphertext price comparison value of 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 of any two bidders includes: and

[0299] In a possible implementation, the portion of the edge server that determines the winner's pseudonymous identifier and final transaction information according to a predetermined auction rule based on a pre-stored private key of the homomorphic encryption algorithm and a ciphertext comparison vector of any two bidders is configured as follows:

[0300] The edge server uses the private key to decrypt the ciphertext bidding price comparison information of the two arbitrary bidders to determine the size relationship between the bidding prices of the two arbitrary bidders;

[0301] The edge server uses the private key to decrypt the ciphertext bid power amounts of the two arbitrary bidders to obtain the bid power amounts of the two arbitrary bidders;

[0302] The edge server determines the pseudonym identification of the winner in the power data transaction and its final transaction information according to the predetermined auction rules, based on the size relationship between the bidding prices of the bidders and the bid power of the bidders.

[0303] In a possible implementation, the portion of the edge server that determines the pseudonym identifier of the winner in the power data transaction and its final transaction information according to a predetermined auction rule based on the size relationship between the bid prices of the bidders and the bid power of the bidders is configured as follows:

[0304] The edge server determines the bid price ranking fs1 of the seller based on the size relationship between the bid prices of the bidders and the pseudonym identifiers of the bidders. <fs2<...<fs n And the buyer's bidding price is sorted as fb1>fb2>...>fb m ; m and n are integers greater than or equal to 2, fs j The seller s whose bid price is ranked in the jth order j Pseudonymous ID, Facebook i The bid price of buyer b ranked in the ith order i Pseudonymous identifier, i takes the value of 1, 2...m, j takes the value of 1, 2...n;

[0305] The edge server determines the seller pseudonym fs of the Lth bid price ranking that satisfies the following conditions based on the seller's bid price ranking and the buyer's bid price ranking: L and the buyer's pseudonym fb ranked by bid price K :

[0306]

[0307] The edge server determines that the winner includes the buyer's K The bid price is larger than that of the buyer and seller. L The seller whose bid price is small;

[0308] The edge server determines the final transaction price of the winner as the bid price of the winner;

[0309] The edge server determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners;

[0310] Among them, qb i For buyer b i The bid power, ps j For sellers j The amount of electricity bid.

[0311] In a possible implementation manner, the portion of the edge server that determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners is configured as follows:

[0312] if The final transaction volume of each seller among the winners is determined to be the bid power of the seller, and the final transaction volume of each buyer is determined to be the bid power of the buyer minus the first average value, where the first average value is

[0313] if The final transaction volume of each buyer among the winners is determined to be the bid power of the buyer, and the final transaction volume of each seller is determined to be the bid power of the seller minus the second average value, where the second average value is

[0314] The present disclosure also provides a cloud-edge collaborative power data trading device, Figure 6 The structure block diagram of the cloud-edge collaborative power data trading device provided by the embodiment of the present disclosure for use by the bidder is shown. The device can be implemented as part or all of the 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 respective bidding information based on the public key of the pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information, wherein the bidding information includes the bidding price and the bidding power amount, and the ciphertext bidding information includes the ciphertext bidding price and the ciphertext bidding power amount;

[0316] The bidding request module 602 is configured to send a bidding request to the cloud server, wherein the bidding request carries the type identifier of the bidder and the encrypted bidding information, wherein 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, and the final transaction information includes a final transaction price and a final transaction volume.

[0318] The present disclosure also provides a cloud-edge collaborative power data trading device, Figure 7 The structure block diagram of the cloud-edge collaborative power data trading device applied to the cloud server provided by the embodiment of the present disclosure is shown. The device can be implemented as part or all of the 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 bidding request sent by a bidder, wherein the bidding request carries a type identifier and encrypted bidding information of the bidder, wherein the type identifier of the bidder includes a seller identifier or a buyer identifier;

[0320] The pseudonym assignment module 702 is configured to assign pseudonym identifiers to bidders in response to received bidding requests, wherein the seller pseudonym identifier is assigned to the bidder with the seller identifier, and the buyer pseudonym identifier is assigned to the bidder with the buyer identifier;

[0321] The comparison vector generation module 703 is configured to generate a ciphertext comparison vector of any two bidders according to the ciphertext bidding information of the two bidders; the ciphertext comparison vector includes the ciphertext bidding price comparison information and the corresponding pseudonym identifiers of the two bidders and the ciphertext bid power, wherein the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the two bidders;

[0322] A comparison vector sending module 704 is configured to send the ciphertext comparison vectors of any two bidders to an edge server;

[0323] The winner information receiving module 705 is configured to receive the winner's pseudonym identification 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 to conduct power data transaction according to the winner's final transaction information based on the stored correspondence between the pseudonym and the bidder.

[0325] In a possible implementation, the comparison vector generation module is configured to:

[0326] Randomly generate a positive integer Z and encrypt Z using the public key of the pre-stored homomorphic encryption algorithm to obtain

[0327] For any two ciphertext bidding prices of two bidders and The ciphertext price comparison value of any two bidders is calculated according to the following formula:

[0328]

[0329] The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information of any two bidders includes: and

[0330] The present disclosure also provides a cloud-edge collaborative power data trading device, Figure 8 The structure block diagram of the cloud-edge collaborative power data trading device applied to the edge server provided by the embodiment of the present disclosure is shown. The device can be implemented as part or all of the 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 a ciphertext comparison vector of any two bidders sent by the cloud server, wherein the ciphertext comparison vector includes ciphertext bidding price comparison information and the corresponding pseudonym identifiers of the two bidders and the ciphertext bid power amount, wherein the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the any two bidders;

[0332] The winner information determination module 802 is configured to determine the winner's pseudonym identifier and final transaction information thereof according to predetermined auction rules based on a pre-stored private key of a homomorphic encryption algorithm and a ciphertext comparison vector of any two bidders, wherein the final transaction information includes a final transaction price and a final transaction volume;

[0333] The winner information sending module 803 is configured to send the winner's pseudonym identification and final transaction information to the cloud server.

[0334] In a possible implementation, the winner information determination module is configured to:

[0335] Decrypting the ciphertext bidding price comparison information of the two arbitrary bidders using the private key to determine the size relationship between the bidding prices of the two arbitrary bidders;

[0336] Decrypting the ciphertext bid power amounts of the two arbitrary bidders using the private key to obtain the bid power amounts of the two arbitrary bidders;

[0337] According to the predetermined auction rules, based on the size relationship between the bid prices of the bidders and the bid electricity of the bidders, the pseudonym identification of the winner in the power data transaction and its final transaction information are determined.

[0338] In a possible implementation manner, the part of the winner information determination module that determines the pseudonym identifier of the winner in the power data transaction and its final transaction information according to the predetermined auction rules based on the size relationship between the bid prices of the bidders and the bid power of the bidders is configured as follows:

[0339] Based on the relationship between the bid prices of each bidder and the pseudonym of each bidder, the bid price ranking of the seller is determined fs1 <fs2<...<fs n And the buyer's bidding price is sorted as fb1>fb2>...>fb m ; m and n are integers greater than or equal to 2, fs j The seller s whose bid price is ranked in the jth order j Pseudonymous ID, Facebook i The bid price of buyer b ranked in the ith order i Pseudonymous identifier, i takes the value of 1, 2...m, j takes the value of 1, 2...n;

[0340] Based on the bidding price ranking of the seller and the bidding price ranking of the buyer, determine the bidding price ranking that satisfies the following conditions in the Lth seller pseudonym identifier fs L and the buyer's pseudonym fb ranked by bid price K :

[0341]

[0342] Determine the winner including the buyer in the fb K The bid price is larger than that of the buyer and seller. L The seller whose bid price is small;

[0343] Determine the final transaction price of the winner as the bid price of the winner;

[0344] Determine the final transaction volume of each buyer and each seller among the winners based on the bid electricity amount of each buyer and each seller among the winners;

[0345] Among them, qb i For buyer b i The bid power, ps j For sellers j The amount of electricity bid.

[0346] In a possible implementation manner, the part of the winner information determination module that determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners is configured as follows:

[0347] if The final transaction volume of each seller among the winners is determined to be the bid power of the seller, and the final transaction volume of each buyer is determined to be the bid power of the buyer minus the first average value, where the first average value is

[0348] if The final transaction volume of each buyer among the winners is determined to be the bid power of the buyer, and the final transaction volume of each seller is determined to be the bid power of the seller minus the second average value, where the second average value is

[0349] The technical terms and technical features mentioned in the implementation manner of the present device are the same as or similar to those mentioned in the implementation manner of the above method. For the explanation and description of the technical terms and technical features involved in the present device, reference may be made to the explanation and description of the implementation manner of the above method, and they will not be repeated here.

[0350] The present disclosure also discloses an electronic device, Fig. 9 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0351] like Fig. 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] Fig.10 A schematic diagram showing the structure of a computer system suitable for implementing the method of the embodiment of the present disclosure is shown.

[0353] like Fig.10As shown, the computer system 1000 includes a processing unit 1001, which can perform various processes in the above-mentioned embodiments according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the computer system 1000 are also stored. The processing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other 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 the I / O interface 1005: an input part 1006 including a keyboard, a mouse, etc.; an output part 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage part 1008 including a hard disk, etc.; and a communication part 1009 including a network interface card such as a LAN card, a modem, etc. The communication part 1009 performs communication processing via a network such as the Internet. The drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that the computer program read therefrom is installed into the storage part 1008 as needed. Among them, the processing unit 1001 can be implemented as a processing unit such as a CPU, a GPU, a TPU, an FPGA, an NPU, etc.

[0355] In particular, according to an embodiment of the present disclosure, the method described above can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes computer instructions, and the computer instructions are executed by a processor to implement the method steps described above. In such an embodiment, the computer program product can be downloaded and installed from a network through the communication part 1009, and / or installed from a removable medium 1011.

[0356] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0357] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or programmable hardware. The units or modules described may also be set in a processor, and the names of these units or modules do not constitute limitations on the units or modules themselves in some cases.

[0358] As another aspect, the present disclosure further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the electronic device or computer system in the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into a device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the method described in the present disclosure.

[0359] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.

Claims

1. A cloud-edge collaborative power data trading method, characterized in that: include: The bidders encrypt their respective bidding information based on the public key of the pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information, wherein the bidding information includes the bidding price and the bidding electricity amount, and the ciphertext bidding information includes the ciphertext bidding price and the ciphertext bidding electricity amount; The bidder sends a bid request to the cloud server, wherein the bid request carries the bidder's type identifier and encrypted bidding information, wherein the bidder's type identifier includes a seller identifier or a buyer identifier; The cloud server allocates pseudonym identifiers to bidders in response to the received bidding request, wherein the bidder with the seller identifier is allocated a seller pseudonym identifier, and the bidder with the buyer identifier is allocated a buyer pseudonym identifier; The cloud server generates a ciphertext comparison vector of any two bidders according to the ciphertext bidding information of the any two bidders and sends the ciphertext comparison vector to the edge server, wherein the ciphertext comparison vector includes the ciphertext bidding price comparison information and the corresponding pseudonym identifiers of the two bidders and the ciphertext bidding power, wherein the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the any two bidders; The edge server determines the winner's pseudonym identifier and final transaction information according to the predetermined auction rules, based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of the arbitrary two bidders, and sends the winner's pseudonym identifier and final transaction information to the cloud server, wherein the final transaction information includes a final transaction price and a final transaction volume; The cloud server notifies the bidder corresponding to the winner's pseudonym to conduct power data trading according to the winner's final transaction information based on the stored correspondence between the pseudonym identifier and the bidder.

2. The method according to claim 1, characterized in that The method further comprises: The key generation center generates a public key and a private key of 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 of any two bidders according to the ciphertext bidding information of the any two bidders, including: The cloud server randomly generates a positive integer Z and encrypts Z using the public key to obtain For any two ciphertext bidding prices of two bidders and The cloud server calculates the ciphertext price comparison value of any two bidders according to the following formula: The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information of any two bidders includes: and 4. The method according to claim 1, characterized in that: The edge server determines the winner's pseudonym identifier and final transaction information according to the predetermined auction rules based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of the arbitrary two bidders, including: The edge server uses the private key to decrypt the ciphertext bidding price comparison information of the two arbitrary bidders to determine the size relationship between the bidding prices of the two arbitrary bidders; The edge server uses the private key to decrypt the ciphertext bid power amounts of the two arbitrary bidders to obtain the bid power amounts of the two arbitrary bidders; The edge server determines the pseudonym identification of the winner in the power data transaction and its final transaction information according to the predetermined auction rules, based on the size relationship between the bidding prices of the bidders and the bid power of the bidders.

5. The method according to claim 4, characterized in that The edge server determines the pseudonym identifier of the winner in the power data transaction and its final transaction information according to the predetermined auction rules, based on the size relationship between the bid prices of the bidders and the bid power of the bidders, including: The edge server determines the bid price ranking fs1 of the seller based on the size relationship between the bid prices of the bidders and the pseudonym identifiers of the bidders. <fs2<...<fs n And the buyer's bidding price is sorted as fb1>fb2>...>fb m ; m and n are integers greater than or equal to 2, fs j The seller s whose bid price is ranked in the jth order j Pseudonymous ID, Facebook i The bid price of buyer b ranked in the ith order i Pseudonymous identifier, i takes the value of 1, 2...m, j takes the value of 1, 2...n; The edge server determines the seller pseudonym fs of the Lth bid price ranking that satisfies the following conditions based on the seller's bid price ranking and the buyer's bid price ranking: L and the buyer's pseudonym fb ranked by bid price K : The edge server determines that the winner includes the buyer's K The bid price is larger than that of the buyer and seller. L The seller whose bid price is small; The edge server determines the final transaction price of the winner as the bid price of the winner; The edge server determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners; Among them, qb i For buyer b i The bid power, ps j For sellers j The amount of electricity bid.

6. The method according to claim 5, characterized in that The edge server determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners, including: if The final transaction volume of each seller among the winners is determined to be the bid power of the seller, and the final transaction volume of each buyer is determined to be the bid power of the buyer minus the first average value, where the first average value is if The final transaction volume of each buyer among the winners is determined to be the bid power of the buyer, and the final transaction volume of each seller is determined to be the bid power of the seller minus the second average value, where the second average value is 7. A cloud-edge collaborative power data trading method, characterized in that: Applied to a bidder, the bidder being a buyer or a seller, the method comprises: Encrypting the respective bidding information based on the public key of the pre-stored homomorphic encryption algorithm to obtain ciphertext bidding information, wherein the bidding information includes the bidding price and the bidding electricity amount, and the ciphertext bidding information includes the ciphertext bidding price and the ciphertext bidding electricity amount; Sending a bidding request to a cloud server, wherein the bidding request carries a type identifier of the bidder and encrypted bidding information, wherein the type identifier of the bidder includes a seller identifier or a buyer identifier; After becoming a winner in the power data transaction, the final transaction information sent by the cloud server is received, and the final transaction information includes a final transaction price and a final transaction volume.

8. A cloud-edge collaborative power data trading method, characterized in that: Applied to a cloud server, the method comprises: Receiving a bidding request sent by a bidder, wherein the bidding request carries a type identifier and encrypted bidding information of the bidder, wherein the type identifier of the bidder includes a seller identifier or a buyer identifier; In response to the received bidding request, assigning pseudonym identifications to the bidders, wherein the bidder with the seller identification is assigned the seller pseudonym identification, and the bidder with the buyer identification is assigned the buyer pseudonym identification; Generate a ciphertext comparison vector of any two bidders according to the ciphertext bidding information of the any two bidders and send the ciphertext comparison vector to the edge server, wherein the ciphertext comparison vector includes the ciphertext bidding price comparison information and the corresponding pseudonym identifiers of the two bidders and the ciphertext bidding power, wherein the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the any two bidders; receiving the winner's pseudonym identification and final transaction information returned by the edge server; Based on the stored correspondence between the pseudonym identifier and the bidder, the bidder corresponding to the pseudonym identifier of the winner is notified to conduct power data trading according to the final transaction information of the winner.

9. The method according to claim 8, characterized in that The step of generating a ciphertext comparison vector of any two bidders according to the ciphertext bidding information of the any two bidders comprises: Randomly generate a positive integer Z and encrypt Z using the public key of the pre-stored homomorphic encryption algorithm to obtain For any two ciphertext bidding prices of two bidders and The ciphertext price comparison value of any two bidders is calculated according to the following formula: The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information of any two bidders includes: and 10. A cloud-edge collaborative power data trading method, characterized in that: Applied to an edge server, the method comprises: Receiving a ciphertext comparison vector of any two bidders sent by a cloud server, wherein the ciphertext comparison vector includes ciphertext bidding price comparison information and the corresponding pseudonym identifiers of the two bidders and the ciphertext bid power, wherein the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the any two bidders; According to predetermined auction rules, based on a pre-stored private key of a homomorphic encryption algorithm and a ciphertext comparison vector of any two bidders, determining the winner's pseudonymous identifier and final transaction information thereof, wherein the final transaction information includes a final transaction price and a final transaction volume; The winner's pseudonym identification and final transaction information are sent to the cloud server.

11. The method according to claim 10, characterized in that The method of determining the winner's pseudonym identifier and final transaction information according to the predetermined auction rules based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of any two bidders includes: Decrypting the ciphertext bidding price comparison information of the two arbitrary bidders using the private key to determine the size relationship between the bidding prices of the two arbitrary bidders; Decrypting the ciphertext bid power amounts of the two arbitrary bidders using the private key to obtain the bid power amounts of the two arbitrary bidders; According to the predetermined auction rules, based on the size relationship between the bid prices of the bidders and the bid electricity of the bidders, the pseudonym identification of the winner in the power data transaction and its final transaction information are determined.

12. The method according to claim 11, characterized in that The method of determining the pseudonym of the winner in the power data transaction and its final transaction information according to the predetermined auction rules and based on the size relationship between the bid prices of the bidders and the bid power of the bidders includes: Based on the relationship between the bid prices of each bidder and the pseudonym of each bidder, the bid price ranking of the seller is determined fs1 <fs2<...<fs n And the buyer's bidding price is sorted as fb1>fb2>...>fb m ; m and n are integers greater than or equal to 2, fs j Seller s ranked by bid price j Pseudonymous ID, Facebook i The bid price of buyer b ranked in the ith order i Pseudonymous identifier, i takes the value of 1, 2...m, j takes the value of 1, 2...n; Based on the bidding price ranking of the seller and the bidding price ranking of the buyer, determine the bidding price ranking that satisfies the following conditions in the Lth seller pseudonym identifier fs L and the buyer's pseudonym fb ranked by bid price K : Determine the winner including the buyer in the fb K The bid price is larger than that of the buyer and seller. L The seller whose bid price is small; Determine the final transaction price of the winner as the bid price of the winner; Determine the final transaction volume of each buyer and each seller among the winners based on the bid electricity amount of each buyer and each seller among the winners; Among them, qb i For buyer b i The bid power, ps j For sellers j The amount of electricity bid.

13. The method according to claim 12, characterized in that The determining of the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and each seller among the winners includes: if The final transaction volume of each seller among the winners is determined to be the bid power of the seller, and the final transaction volume of each buyer is determined to be the bid power of the buyer minus the first average value, where the first average value is if The final transaction volume of each buyer among the winners is determined to be the bid power of the buyer, and the final transaction volume of each seller is determined to be the bid power of the seller minus the second average value, where the second average value is 14. A cloud-edge collaborative power data trading system, characterized in that: The system includes a bidder, a cloud server, and an edge server; The bidders are configured to encrypt their respective bidding information based on a pre-stored public key of a homomorphic encryption algorithm to obtain ciphertext bidding information, wherein the bidding information includes a bidding price and a bidding amount of electricity, and the ciphertext bidding information includes a ciphertext bidding price and a ciphertext bidding amount of electricity; Sending a bidding request to a cloud server, wherein the bidding request carries a type identifier of the bidder and encrypted bidding information, wherein the type identifier of the bidder includes a seller identifier or a buyer identifier; The cloud server is configured to, in response to the received bidding request, assign pseudonym identifiers to the bidders, wherein the seller pseudonym identifier is assigned to the bidder with the seller identifier, and the buyer pseudonym identifier is assigned to the bidder with the buyer identifier; generate a ciphertext comparison vector of any two bidders according to the ciphertext bidding information of the any two bidders and send the ciphertext comparison vector to the edge server, wherein the ciphertext comparison vector includes ciphertext bidding price comparison information and the pseudonym identifiers and ciphertext bidding power amounts of the two bidders corresponding thereto, and the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the any two bidders; The edge server is configured to determine the winner's pseudonym identifier and final transaction information thereof according to a predetermined auction rule based on a pre-stored private key of the homomorphic encryption algorithm and a ciphertext comparison vector of any two bidders, and send the winner's pseudonym identifier and final transaction information thereof to a cloud server, wherein the final transaction information includes a final transaction price and a final transaction volume; The cloud server is further configured to notify the bidder corresponding to the winner's pseudonym to conduct power data trading according to the winner's final transaction information based on the stored correspondence between the pseudonym and the bidder.

15. The system according to claim 14, characterized in that The system further comprises: The key generation center is configured to generate a public key and a private key of a homomorphic encryption algorithm, and send the public key to the bidder and the cloud server, and send the private key to the edge server.

16. The system according to claim 14, characterized in that The part of the cloud server that generates the ciphertext comparison vectors of any two bidders according to the ciphertext bidding information of any two bidders 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 ciphertext bidding prices of two bidders and The cloud server calculates the ciphertext price comparison value of any two bidders according to the following formula: The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information of any two bidders includes: and 17. The system according to claim 14, characterized in that The part of the edge server that determines the pseudonymous identifier of the winner and the final transaction information thereof according to the predetermined auction rules based on the pre-stored private key of the homomorphic encryption algorithm and the ciphertext comparison vectors of the arbitrary two bidders is configured as follows: The edge server uses the private key to decrypt the ciphertext bidding price comparison information of the two arbitrary bidders to determine the size relationship between the bidding prices of the two arbitrary bidders; The edge server uses the private key to decrypt the ciphertext bid power amounts of the two arbitrary bidders to obtain the bid power amounts of the two arbitrary bidders; The edge server determines the pseudonym identification of the winner in the power data transaction and its final transaction information according to the predetermined auction rules, based on the size relationship between the bidding prices of the bidders and the bid power of the bidders.

18. The system according to claim 17, characterized in that The part of the edge server that determines the pseudonym identifier of the winner in the power data transaction and its final transaction information according to the predetermined auction rules and based on the size relationship between the bid prices of the bidders and the bid power of the bidders is configured as follows: The edge server determines the bid price ranking fs1 of the seller based on the size relationship between the bid prices of the bidders and the pseudonym identifiers of the bidders. <fs2<...<fs n And the buyer's bidding price is sorted as fb1>fb2>...>fb m ; m and n are integers greater than or equal to 2, fs j Seller s ranked by bid price j Pseudonymous ID, Facebook i The bid price of buyer b ranked in the ith order i Pseudonymous identifier, i takes the value of 1, 2...m, j takes the value of 1, 2...n; The edge server determines the seller pseudonym fs of the Lth bid price ranking that satisfies the following conditions based on the seller's bid price ranking and the buyer's bid price ranking: L and the buyer's pseudonym fb ranked by bid price K : The edge server determines that the winner includes the buyer's K The bid price is larger than that of the buyer and seller. L The seller whose bid price is small; The edge server determines the final transaction price of the winner as the bid price of the winner; The edge server determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners; Among them, qb i For buyer b i The bid power, ps j For sellers j The amount of electricity bid.

19. The system according to claim 18, characterized in that The part of the edge server that determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners is configured as follows: if The final transaction volume of each seller among the winners is determined to be the bid power of the seller, and the final transaction volume of each buyer is determined to be the bid power of the buyer minus the first average value, where the first average value is if The final transaction volume of each buyer among the winners is determined to be the bid power of the buyer, and the final transaction volume of each seller is determined to be the bid power of the seller minus the second average value, where the second average value is 20. A cloud-edge collaborative power data trading device, characterized in that: Applied to a bidder, the bidder being a buyer or a seller, the device comprises: A bidding information encryption module is configured to encrypt the respective bidding information based on a pre-stored public key of a homomorphic encryption algorithm to obtain ciphertext bidding information, wherein the bidding information includes a bidding price and a bidding amount of electricity, and the ciphertext bidding information includes a ciphertext bidding price and a ciphertext bidding amount of electricity; A bidding request module is configured to send a bidding request to a cloud server, wherein the bidding request carries a type identifier of the bidder and ciphertext bidding information, wherein the type identifier of the bidder includes a seller identifier or a buyer identifier; 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, and the final transaction information includes a final transaction price and a final transaction volume.

21. A cloud-edge collaborative power data trading device, characterized in that: Applied to a cloud server, the device comprises: A request receiving module is configured to receive a bidding request sent by a bidder, wherein the bidding request carries a type identifier and ciphertext bidding information of the bidder, wherein the type identifier of the bidder includes a seller identifier or a buyer identifier; A pseudonym assignment module is configured to assign pseudonym identifications to bidders in response to received bidding requests, wherein the seller pseudonym identification is assigned to the bidder with the seller identification, and the buyer pseudonym identification is assigned to the bidder with the buyer identification; A comparison vector generation module is configured to generate a ciphertext comparison vector of any two bidders according to the ciphertext bidding information of the two bidders; the ciphertext comparison vector includes the ciphertext bidding price comparison information and the corresponding pseudonym identifiers of the two bidders and the ciphertext bidding power, wherein the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the two bidders; A comparison vector sending module, configured to send the ciphertext comparison vectors of any two bidders to an edge server; A winner information receiving module, configured to receive the winner's pseudonym identification 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 transaction according to the winner's final transaction information based on the stored correspondence between the pseudonym and the bidder.

22. The device according to claim 21, characterized in that The comparison vector generation module is configured as follows: Randomly generate a positive integer Z and encrypt Z using the public key of the pre-stored homomorphic encryption algorithm to obtain For any two ciphertext bidding prices of two bidders and The ciphertext price comparison value of any two bidders is calculated according to the following formula: The homomorphic encryption algorithm includes the Paillier encryption algorithm, and the ciphertext bidding price comparison information of any two bidders includes: and 23. A cloud-edge collaborative power data trading device, characterized in that: Applied to an edge server, the device comprises: A comparison vector receiving module is configured to receive a ciphertext comparison vector of any two bidders sent by a cloud server, wherein the ciphertext comparison vector includes ciphertext bidding price comparison information and the corresponding pseudonym identifiers of the two bidders and the ciphertext bid power amount, wherein the ciphertext bidding price comparison information is used to ciphertextally represent the comparison result of the bidding prices of the any two bidders; A winner information determination module is configured to determine the winner's pseudonym identifier and final transaction information thereof according to predetermined auction rules based on a pre-stored private key of a homomorphic encryption algorithm and a ciphertext comparison vector of any two bidders, wherein the final transaction information includes a final transaction price and a final transaction volume; The winner information sending module is configured to send the winner's pseudonym identification and final transaction information to the cloud server.

24. The device according to claim 23, characterized in that The winner information determination module is configured to: Decrypting the ciphertext bidding price comparison information of the two arbitrary bidders using the private key to determine the size relationship between the bidding prices of the two arbitrary bidders; Decrypting the ciphertext bid power amounts of the two arbitrary bidders using the private key to obtain the bid power amounts of the two arbitrary bidders; According to the predetermined auction rules, based on the size relationship between the bid prices of the bidders and the bid electricity of the bidders, the pseudonym identification of the winner in the power data transaction and its final transaction information are determined.

25. The device according to claim 24, characterized in that The part of the winner information determination module that determines the pseudonym identifier of the winner in the power data transaction and its final transaction information according to the predetermined auction rules, based on the size relationship between the bid prices of the bidders and the bid power of the bidders is configured as follows: Based on the relationship between the bid prices of each bidder and the pseudonym of each bidder, the bid price ranking of the seller is determined fs1 <fs2<...<fs n And the buyer's bidding price is sorted as fb1>fb2>...>fb m ; m and n are integers greater than or equal to 2, fs j The seller s whose bid price is ranked in the jth order j Pseudonymous ID, Facebook i The bid price of buyer b ranked in the ith order i Pseudonymous identifier, i takes the value of 1, 2...m, j takes the value of 1, 2...n; Based on the bidding price ranking of the seller and the bidding price ranking of the buyer, determine the bidding price ranking that satisfies the following conditions in the Lth seller pseudonym identifier fs L and the buyer's pseudonym fb ranked by bid price K : Determine the winner including the buyer in the fb K The bid price is larger than that of the buyer and seller. L The seller whose bid price is small; Determine the final transaction price of the winner as the bid price of the winner; Determine the final transaction volume of each buyer and each seller among the winners based on the bid electricity amount of each buyer and each seller among the winners; Among them, qb i For buyer b i The bid power, ps j For sellers j The amount of electricity bid.

26. The device according to claim 25, characterized in that The part of the winner information determination module that determines the final transaction volume of each buyer and each seller among the winners based on the bid power amount of each buyer and the bid power amount of each seller among the winners is configured as follows: if The final transaction volume of each seller among the winners is determined to be the bid power of the seller, and the final transaction volume of each buyer is determined to be the bid power of the buyer minus the first average value, where the first average value is if The final transaction volume of each buyer among the winners is determined to be the bid power of the buyer, and the final transaction volume of each seller is determined to be the bid power of the seller minus the second average value, where the second average value is 27. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method according to any one of claims 1 to 13.

28. A readable storage medium, characterized in that: Computer instructions are stored thereon, and when the computer instructions are executed by a processor, the method steps described in any one of claims 1 to 13 are implemented.

Citation Information

Patent Citations

  • Privacy protecting heterogeneous spectrum allocation method

    CN106714183A

  • McAfee bidirectional auction privacy protection method and auction method

    CN107392743A

  • Quantum sealing auction method based on quantum public key cryptography

    CN113628017A

  • Mobile-assisted edge computing framework for emerging IoT applications

    US11412061B1

  • Private edge-station auction house

    US20210374841A1