Power data pricing transaction method, device and system and medium
By processing quotations in power data transactions using homomorphic encryption and zero-knowledge proof technology, encrypted quotations are generated and double-verified, solving the problems of information leakage and low credibility in power data pricing mechanisms, and realizing fair and reliable power data transactions.
Patent Information
- Application Number
- CN202510990764.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-11-18
AI Technical Summary
The existing electricity data pricing mechanism has flaws in privacy protection. Bidders' bidding information is easily leaked, leading to manipulation behaviors such as bid rigging, malicious price increases, and price suppression. Furthermore, the lack of a reliable verification process affects the fairness and credibility of pricing.
Homomorphic encryption algorithms are used to generate public and private keys, which are then used to encrypt the bidders' original plaintext bids. Zero-knowledge proof technology is used to generate bid commitments, and the encrypted bids are compared. This dual verification mechanism ensures the authenticity of the successful bidder's identity and the credibility of the pricing.
This ensures that bidding information is not leaked during the power data trading process, prevents bid rigging and malicious behavior, and improves the fairness and credibility of pricing.
Smart Images

Figure CN120975818A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data pricing transaction, and particularly relates to a power data pricing transaction method, device, system and medium. BACKGROUND
[0002] With the continuous development of data element market, the transaction and pricing mechanism of high-value data resources such as power data are increasingly concerned. In actual data transaction scenarios, the data pricing is usually carried out in the way of competitive bidding. Multiple bidders submit bids according to their own valuation of the target data, and the platform determines the transaction price according to certain rules. However, the existing data pricing mechanism has great defects in privacy protection. The bidding information of each bidder is usually submitted in plaintext, which is easily obtained or speculated by the platform or other bidders, thereby causing behaviors such as colluding bidding, malicious bidding, and price manipulation, which seriously affects the fairness of pricing.
[0003] In addition, most of the existing pricing mechanisms lack complete and reliable verification processes, so that the final pricing is at risk of being tampered with, which reduces the credibility of the participating parties to the pricing of the transaction data. SUMMARY
[0004] The present application provides a power data pricing transaction method, device, system and medium, which can solve at least one of the above technical problems.
[0005] In a first aspect, the present application provides a power data pricing transaction method, comprising:
[0006] Based on the homomorphic encryption algorithm in the power data pricing transaction system, a public key and a private key are generated;
[0007] Through zero-knowledge proof technology, the original plaintext bid of the bidder is processed to obtain the bid commitment of the bidder;
[0008] Based on the public key, the original plaintext bid of the bidder is homomorphically encrypted to obtain the ciphertext bid of the bidder;
[0009] The ciphertext bid of the bidder is processed to obtain a first ciphertext bid and a second ciphertext bid;
[0010] The first ciphertext bid is sent to the bidder corresponding to the first ciphertext bid, so that the bidder corresponding to the first ciphertext bid decrypts and verifies the first ciphertext bid according to the private key to obtain a first verification result;
[0011] If the first verification result is verified, a second verification result is determined based on the second ciphertext bid and the bid commitment of the bidder, and in the case that the second verification result is verified, a decryption value of the second ciphertext bid is taken as a fixed value of the power data, so that the bidder corresponding to the first ciphertext bid trades the power data at the fixed value.
[0012] In a second aspect, an embodiment of the present application provides a power data pricing transaction device, comprising:
[0013] A first encryption module is configured to generate a public key and a private key based on a homomorphic encryption algorithm in a power data pricing transaction system.
[0014] A bid processing module is configured to process an original plaintext bid of a bidder by zero-knowledge proof technology to obtain a bid commitment of the bidder.
[0015] A second encryption module is configured to homomorphically encrypt the original plaintext bid of the bidder based on the public key to obtain a ciphertext bid of the bidder.
[0016] A comparison processing module is configured to compare the ciphertext bid of the bidder to obtain a first ciphertext bid and a second ciphertext bid.
[0017] A first verification module is configured to send the first ciphertext bid to the bidder corresponding to the first ciphertext bid, so that the bidder corresponding to the first ciphertext bid decrypts and verifies the first ciphertext bid according to the private key to obtain a first verification result.
[0018] A second verification module is configured to determine a second verification result based on the second ciphertext bid and the bid commitment of the bidder if the first verification result is verified, and in the case that the second verification result is verified, a decryption value of the second ciphertext bid is taken as a fixed value of the power data, so that the bidder corresponding to the first ciphertext bid trades the power data at the fixed value.
[0019] In a third aspect, an embodiment of the present application further provides a power data pricing transaction system, comprising: at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any of the methods provided in the embodiments of the present application.
[0020] In a fourth aspect, an embodiment of the present application further provides a non-transitory computer readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute any of the methods provided in the embodiments of the present application.
[0021] The application adopts the homomorphic encryption algorithm in the power data pricing transaction system to generate the public key and the private key, and then encrypts the original plaintext bid of the bidder to keep the ciphertext state in the transmission and processing process, so as to avoid the leakage of the bid information. The homomorphic encryption process encrypts the original bid by the public key to generate the corresponding ciphertext bid. Meanwhile, the zero-knowledge proof technology is combined to generate the bid commitment of the original plaintext bid of the bidder. The ciphertext bids of all bidders are compared to determine the first ciphertext bid and the second ciphertext bid. Then, to prevent the ciphertext tampering or the result forgery, the first ciphertext bid is sent to the corresponding bidder by the ciphertext identity matching mechanism, which is decrypted by the private key, and the decrypted result is compared with the original bid to verify the authenticity of the identity of the bidder corresponding to the first ciphertext bid, and the first verification result is generated. If the first verification result is passed, the decrypted value of the second ciphertext bid is used to generate the verification commitment combined with the commitment algorithm, and the verification commitment is matched with the bid commitment submitted by the bidder recorded in the system. In the case of consistent verification commitment, the second verification result is generated. In this way, through the double verification mechanism, not only the identity of the winning bidder can be ensured to be real and credible, but also the final pricing can be verified to come from the legal bid, so as to improve the fairness and credibility of the whole power data pricing transaction process.
[0022] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the application, nor is it used to limit the scope of the application. Other features of the application will become apparent through the following description. BRIEF DESCRIPTION OF DRAWINGS
[0023] The accompanying drawings are used to better understand the application, and do not constitute a limitation on the application. Among them:
[0024] Figure 1 is a flowchart of the pricing transaction method of the power data according to an embodiment of the application;
[0025] Figure 2 is a structural block diagram of the pricing transaction device of the power data according to an embodiment of the application;
[0026] Figure 3 is a structural block diagram of the bid processing module in the pricing transaction device of the power data according to an embodiment of the application;
[0027] Figure 4 is a structural block diagram of the second encryption module in the pricing transaction device of the power data according to an embodiment of the application;
[0028] Figure 5 is a structural block diagram of the bid processing module in the pricing transaction device of the power data according to an embodiment of the application;
[0029] Figure 6 is a structural block diagram of a first verification module in a pricing transaction device of power data according to an embodiment of the present application;
[0030] Figure 7 is a structural block diagram of a second verification module in a pricing transaction device of power data according to an embodiment of the present application;
[0031] Figure 8 is a block diagram of an electronic device for implementing the method according to an embodiment of the present application. DETAILED DESCRIPTION
[0032] Exemplary embodiments of the present application are described herein with reference to the accompanying drawings, in which various details are set forth to assist in an understanding of the present application. It will be apparent to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Also, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
[0033] Figure 1 is a flowchart of a pricing transaction method of power data according to an embodiment of the present application.
[0034] As shown in Figure 1 , the pricing transaction method of power data can include:
[0035] S110, generating a public key and a private key based on a homomorphic encryption algorithm in a power data pricing transaction system;
[0036] S120, processing an original plaintext bid of a bidder by a zero-knowledge proof technique to obtain a bid commitment of the bidder;
[0037] S130, homomorphic encryption of the original plaintext bid of the bidder based on the public key to obtain a ciphertext bid of the bidder;
[0038] S140, comparison processing of the ciphertext bid of the bidder to obtain a first ciphertext bid and a second ciphertext bid;
[0039] S150, sending the first ciphertext bid to the bidder corresponding to the first ciphertext bid, so that the bidder corresponding to the first ciphertext bid decrypts and verifies the first ciphertext bid according to the private key to obtain a first verification result;
[0040] S160, if the first verification result is verified, determining a second verification result based on the second ciphertext bid and the bid commitment of the bidder, and in the case that the second verification result is verified, taking a decryption value of the second ciphertext bid as a pricing value of the power data, so that the bidder corresponding to the first ciphertext bid trades the power data according to the pricing value.
[0041] In the embodiments of the present application, on the basis of obtaining the public key and the private key through the homomorphic encryption algorithm in the electricity data pricing transaction system, the original plaintext bid of the bidder is processed through the zero-knowledge proof technology to obtain the bid commitment of the bidder, and the original plaintext bid of the bidder is processed through the public key to obtain the bid commitment of the bidder. In this way, the original bid of the bidder is processed through the homomorphic encryption and zero-knowledge proof technology, so that the original bid of the bidder always exists in the form of ciphertext during transmission and processing, without the need to disclose the specific bid information to complete the comparison and verification, thereby avoiding the risk of bid data leakage. The original plaintext bid of the multiple bidders is processed through the zero-knowledge proof technology and homomorphic encryption through the public key, so that the ciphertext bid of the multiple bidders can be obtained. Subsequently, on the basis of comparing the ciphertext bid of the multiple bidders to obtain the first ciphertext bid and the second ciphertext bid, the first ciphertext bid is sent to the bidder corresponding to the first ciphertext bid, so that the bidder corresponding to the first ciphertext bid can decrypt and verify the first ciphertext bid according to the private key, thereby ensuring that the bidder can verify the accuracy of the bid independently, and further verifying the second ciphertext bid and the bid commitment of the bidder after the verification is passed, and finally taking the decryption value of the second ciphertext bid as the pricing value of the electricity data, so that the bidder corresponding to the first ciphertext bid can trade the electricity data according to the pricing value. In this way, the bid winner (i.e., the bidder corresponding to the first ciphertext bid) and the pricing value (i.e., the decryption value of the second ciphertext bid) are verified through the double verification mechanism, thereby improving the credibility of the fair pricing transaction.
[0042] Exemplarily, the electricity data pricing transaction system is a system platform for realizing data value evaluation, data bid and encrypted pricing transaction within an electricity enterprise or between different subjects. The system is usually deployed in a data transaction chain platform or a consortium chain structure, and is jointly participated by data providers, data demanders and platform managers. In order to ensure the privacy and security of the data bid, the system integrates a homomorphic encryption algorithm, and generates a public key and a private key through the homomorphic encryption algorithm, so as to realize the encryption, calculation and non-leakage of the bid.
[0043] Exemplarily, the application field of the electricity data pricing transaction system can be data sharing and value settlement within an electricity enterprise, distributed data right confirmation and value backtracking based on a block chain, and multi-party cooperative energy data market, etc. The electricity data includes metering data (e.g., user electricity consumption data), load data (e.g., substation load curve data) and dispatching data (e.g., power generation plan and execution deviation data), etc.
[0044] For example, the provincial power dispatching center uploads the 5-year historical dispatching data of a certain regional substation to the pricing system in encrypted form, and a third-party energy storage optimization service provider conducts encrypted bidding, and finally the system completes fair pricing and data delivery.
[0045] For another example, a smart park power user authorization platform sells its energy-saving behavior data (such as load peak shaving response), the platform in the system encrypts and authenticates the user data, and performs encrypted bidding comparison and pricing without revealing the original data to realize value distribution.
[0046] Illustratively, the key generation process in the power data pricing transaction system is implemented based on the Paillier Homomorphic Encryption Algorithm (Paillier Homomorphic Encryption Algorithm / Paillier Homomorphic Encryption Algorithm).
[0047] Specifically, the power data pricing transaction system calls the Paillier Encryption (PE) class and specifies the key length (default 1024 bits). The key length determines the encryption strength, and the longer the key provides higher security but reduces the computing efficiency. Two large prime numbers (i.e., large prime number p and large prime number q) are generated using the _generate_prime method. Calculate the parameters (n, λ, g, and μ) of the private key constituting the public key, where n represents the modulus, λ represents the private key intermediate parameter, g represents the generator, and μ represents the decryption multiplication inverse element.
[0048] In this example, n = p * q; λ = lcm(p-1, q-1), where lcm() represents the least common multiple; g = n + 1.
[0049] In this example, let L(u) = (u-1) / n, u = g^λ mod n 2 Then μ = L(g^λ mod n 2 )^(-1) mod n; where L(u) represents the decryption function. Based on the calculated parameters, the public key (n, g) for encrypting data and the private key (λ, μ) for decrypting data are determined.
[0050] Exemplarily, the electricity data pricing transaction system adopts a Vickrey auction mechanism, which requires each bidder to submit a bid in a secret form, and the platform selects the highest bidder as the winning bidder, and the actual transaction price is the second highest bid. This mechanism encourages bidders to submit their true valuations and avoids "bidding up" or "price manipulation". Therefore, the bidder needs to ensure the authenticity of the bidding process, the non-falsifiability of the bid value, and the invisibility of the bid value to the outside world (to prevent leaks). In this way, the bidding behavior of each bidder based on the Vickrey auction of the system makes the original plaintext bid of the bidder reflect the true valuation of the electricity data to be traded.
[0051] Exemplarily, the bid commitment refers to a verifiable but non-falsifiable proof file generated by the bidder based on encryption algorithms and zero-knowledge proof technology without revealing the original plaintext bid. The bid commitment is used to ensure that the bid declared by the bidder is authentic and credible, and the original plaintext bid cannot be obtained by the system or other bidders during the bidding phase. After that, the bid commitment of the bidder can be uploaded to the blockchain or consortium chain, so that it can be used for subsequent ciphertext bid verification without exposing the true bid.
[0052] Exemplarily, the first ciphertext bid refers to the ciphertext bid ranked first among all ciphertext bids submitted by bidders after calculation by an encryption comparison algorithm, i.e., the highest price in the encrypted state. The second ciphertext bid refers to the ciphertext bid ranked second among all ciphertext bids submitted by bidders after calculation by an encryption comparison algorithm, i.e., the second highest price.
[0053] Exemplarily, there are three existing bidders, namely bidder A, bidder B, and bidder C, wherein the original plaintext bid, ciphertext bid, and bid commitment of each bidder are shown in Table 1.
[0054] Table 1
[0055] bidder clear price m cipher price E(m) price commitment C A 38 E_A C_A B 45 E_B C_B C 42 E_C C_C
[0056] In the table, m represents the plaintext bid; A, B, and C represent the identity of the bidder; E(m) represents the ciphertext bid; E_A represents the ciphertext bid of bidder A, and similarly, E_B and E_C represent the ciphertext bids of bidder B and bidder C, respectively; C_A represents the bid commitment of bidder A, and similarly, C_B and C_C represent the bid commitments of bidder B and bidder C, respectively.
[0057] According to the pricing rule of taking the highest price in each ciphertext bid as the first ciphertext bid and the second highest price as the second ciphertext bid, it can be known that the first ciphertext bid obtained after homomorphic encryption and ciphertext bid comparison is E_B=E(45) (bidder B wins the bid), and the second ciphertext bid is E_C=E(42). In the case that the first ciphertext bid of bidder B is verified by the private key decryption and the first verification result is obtained, the system verifies E_C. Since the ciphertext bid is obtained based on the encryption of the original plaintext bid, the decryption value obtained by decrypting the ciphertext bid is the same as the original plaintext bid, and therefore the decryption value of the second ciphertext bid in this example is 42. Based on the decryption value of the second ciphertext bid and the bid commitment of the bidder corresponding to the second ciphertext bid, the system performs consistency verification, and in the case that the verification is passed, the decryption value of the second ciphertext bid is taken as the fixed value of the power data, so that the bidder corresponding to the first ciphertext bid trades the power data according to the fixed value. That is, the system determines the fixed value as 42, and notifies the winning bidder (i.e. bidder B) to trade the power data according to the fixed value.
[0058] According to the above-mentioned embodiments, based on the homomorphic encryption algorithm configured in the power data pricing transaction system, the public key and the private key are generated, and the original plaintext bid of the bidder is generated by using the zero-knowledge proof technology. At the same time, the original bid is encrypted by using the public key to obtain the ciphertext bid. Through the combination of homomorphic encryption and zero-knowledge proof, the bid of the bidder is always in the ciphertext state during transmission and processing, so as to avoid information leakage. After the comparison processing of the ciphertext bids of multiple bidders, the first ciphertext bid (the highest bid) and the second ciphertext bid (the second highest bid) are determined. The platform sends the first ciphertext bid to the corresponding bidder, which is decrypted and verified by using the private key, so as to ensure the authenticity and credibility of the bid. If the verification is passed, the second ciphertext bid and its corresponding bid commitment are further verified, and if the verification is also passed, the decryption value of the second ciphertext bid is taken as the final fixed value, so that the winning bidder completes the data transaction according to the price. In this way, through the double verification mechanism, not only the effectiveness of the bid of the winning bidder is ensured, but also the credibility of the source of the fixed value is ensured, so as to improve the fairness and security of the entire pricing transaction process.
[0059] In an embodiment, the original plaintext bid of the bidder is processed by a zero-knowledge proof technology to obtain a bid commitment of the bidder, including: the original plaintext bid of the bidder is encrypted by a Pedersen commitment algorithm to obtain a commitment value corresponding to the original plaintext bid of the bidder; a zero-knowledge proof interval is obtained based on a Bulletproofs (Bulletproofs, sub-bullet) zero-knowledge proof protocol and the commitment value corresponding to the original plaintext bid of the bidder; the zero-knowledge proof interval is verified to obtain a third verification result, and the zero-knowledge proof interval and the commitment value are taken as the bid commitment of the bidder when the third verification result is verified.
[0060] For example, the function expression of the Pedersen commitment algorithm is represented as: C = g m ·h r mod p; wherein m represents the original plaintext bid of the bidder; r represents a random number; g and h both represent a system preset generator, which satisfies that log_g(h) is not available; p represents a large prime modulus; and C represents a commitment value, which satisfies the hiding property and the binding property, that is, m cannot be derived from C, but m cannot be changed once C is determined.
[0061] In this example, the zero-knowledge proof interval is obtained based on the Bulletproofs zero-knowledge proof protocol and the commitment value corresponding to the original plaintext bid of the bidder. This process can be represented by a function expression as: π = Bulletproofs.Prove(C, m, r, [a, b]); wherein π represents the zero-knowledge proof interval; C represents the commitment value of the bidder; m represents the original plaintext bid of the bidder; r represents a random number; and [a, b] represents a system pre-set bid legal interval. The bidder must bid within the [a, b] interval to be accepted by the system. Since this interval proof is non-interactive, the bidder does not need to expose m or r to prove to the system that the bid value belongs to a reasonable range.
[0062] The system runs a verification function: Verify(C, π, [a, b])→True or False; if the result is True, a verification pass is generated as the third verification result, that is, it can be confirmed that the bid commitment submitted by the bidder is legal and effective. Finally, the commitment value C and the interval proof π are taken as the complete bid commitment of the bidder.
[0063] For example, it is assumed that: the bid of the bidder is m, and m = 45; the system sets the bid legal interval as [0, 100]; the generator is g = 5 and h = 7; the large prime modulus p = 1019; and the random number selected by the bidder is r = 17. The commitment value C = 5 45 ·7 17mod 1019 = 853. Based on each parameter and the Bulletproofs zero-knowledge proof protocol, construct π to prove that m ∈ [0, 100] and C is a legal commitment of m and r. The system performs verification: Verify(853, π, [0, 100]) → True, and obtains a third verification result of pass. The system accepts the commitment value C = 853 and the interval proof π as the final bid commitment of the bidder.
[0064] According to the above embodiment, first, the Pedersen commitment algorithm is used to encrypt the original plaintext bid of the bidder to generate a commitment value corresponding to the bid; then, the Bulletproofs zero-knowledge proof protocol is combined to construct a zero-knowledge proof based on the commitment value corresponding to the original plaintext bid of the bidder, to obtain a zero-knowledge proof interval; then, the zero-knowledge proof interval is verified to obtain a third verification result, and if the verification passes, the zero-knowledge proof interval and the commitment value are jointly used as the bid commitment of the bidder. On the one hand, the bidder does not need to publicly disclose the original bid, so as to avoid the disclosure of the bid data of the bidder; on the other hand, the commitment value and the interval proof are combined to form a complete bid commitment structure that is verifiable and traceable, thereby laying a foundation for subsequent ciphertext comparison and decryption verification.
[0065] In one embodiment, based on the public key, the original plaintext bid of the bidder is homomorphic encrypted to obtain the ciphertext bid of the bidder, including: obtaining a public key, wherein the public key includes an encryption base and an encryption modulus; determining a first operation result based on the encryption base and the power of the original plaintext bid of the bidder; determining a second operation result based on the power of the encryption modulus and a random number; taking the modulus of the product of the first operation result and the second operation result and the square of the encryption modulus to obtain the ciphertext bid of the bidder.
[0066] Exemplarily, the public key generated by the system can be represented as (n, g), wherein n represents the encryption modulus, and the value of n is the product of the multiplication of two large prime numbers; g represents the encryption base.
[0067] Exemplarily, the calculation of the ciphertext bid of the bidder can be expressed by a function expression as: c = (g m · r n ) mod n 2 ; wherein c represents the ciphertext bid of the bidder; m represents the original plaintext bid of the bidder; g m represents the first operation result; r represents a random number; and r n represents the second operation result. By bringing the public key, the original plaintext bid of the bidder, and the random number generated by the system into the calculation function expression of the ciphertext bid, the ciphertext bid of the bidder can be obtained.
[0068] According to the above implementation method, under the homomorphic encryption framework, the bidder's original plaintext bid is calculated by exponentiation of the encryption base in the public key and the plaintext bid to obtain the first operation result. Simultaneously, the encryption modulus in the public key is exponentiation of the random number to obtain the second operation result. These two operation results are multiplied and then the remainder of the square of the encryption modulus is taken to finally generate the ciphertext bid. Employing a homomorphic encryption mechanism based on exponential perturbation of the encryption base and encryption modulus allows for the generation of ciphertext bids without exposing the original bid, thus protecting bid privacy and supporting subsequent verifiable ciphertext operations and price comparison processing, thereby improving the security and credibility of the electricity data pricing and trading process.
[0069] In one implementation, the encrypted bids of bidders are compared to obtain a first encrypted bid and a second encrypted bid, including: determining a first encrypted bid sequence based on the encrypted bids of each bidder; using the encrypted bids of two adjacent bidders as the creation requirements for encrypted bid pairs, processing the encrypted bids of each bidder in the first encrypted bid sequence to obtain a second encrypted bid sequence; updating the second encrypted bid sequence based on the DGK comparison protocol to obtain a third encrypted bid sequence; and using the encrypted bid that is first in the third encrypted bid sequence as the first encrypted bid, and the encrypted bid that is second in the third encrypted bid sequence as the second encrypted bid.
[0070] For example, based on the encrypted bids submitted by bidders A, B, C, and D, which are Enc(mA), Enc(mB), Enc(mC), and Enc(mD), respectively, the first encrypted bid sequence is determined to be L1, then L1 = [Enc(mA), Enc(mB), Enc(mC), Enc(mD)].
[0071] For example, the system processes the ciphertext bids of each bidder in the first ciphertext bid sequence L1 based on the requirement of creating ciphertext bid pairs using the ciphertext bids of two adjacent bidders, to obtain the second ciphertext bid sequence L2. Then, L2 = {(Enc(mA), Enc(mB))}.
[0072] (Enc(mB), Enc(mC)), (Enc(mC), Enc(mD))}.
[0073] For example, for each ciphertext quote pair in the second ciphertext quote sequence L2, the DGK comparison protocol (The The Comparison Protocol (DGK) is used to process the data and output the larger ciphertext price from each ciphertext price pair. That is, for each ciphertext price pair, a larger ciphertext price is obtained. Since there are multiple ciphertext price pairs in L2, the larger ciphertext price from each pair can be obtained to form a third ciphertext price sequence. Subsequently, the values of each ciphertext price in the third ciphertext price sequence are sorted in descending order to update the third ciphertext price sequence. The first ciphertext price in the sorted third ciphertext price sequence is taken as the third ciphertext price, and the second ciphertext price in the third ciphertext price sequence is taken as the second ciphertext price. This ensures that the first ciphertext price is the highest price among all ciphertext prices, and the second ciphertext price is the second highest price among all ciphertext prices.
[0074] According to the above implementation method, by combining pairwise comparison of encrypted quotations and encrypted sequence updates with the DGK comparison protocol, a trusted price comparison process at the encrypted level is achieved, which ensures the privacy, security, and trustworthiness of the quotation ranking process and improves the privacy and practicality of the power data pricing system.
[0075] In one implementation, a first encrypted quote is sent to the bidder corresponding to the first encrypted quote, so that the bidder can decrypt and verify the first encrypted quote using its private key to obtain a first verification result. This includes: traversing the encrypted quote-bidder mapping table stored in the database to obtain the bidder corresponding to the first encrypted quote, and sending the first encrypted quote to it, so that the bidder can decrypt the first encrypted quote using its private key to obtain a decryption result; if the decryption result matches the bidder's original plaintext quote, then the verification is passed and taken as the first verification result.
[0076] For example, the system's local database stores a mapping table of encrypted bids and bidders. By traversing this mapping table, the bidder corresponding to the first encrypted bid can be determined. The first encrypted bid is sent to the bidder corresponding to the first encrypted bid (i.e., the winning bidder). The winning bidder decrypts and verifies the first encrypted bid using their private key to determine whether it matches the original plaintext bid they submitted. If the decryption result obtained based on the private key matches the original plaintext bid, the verification is considered successful and is taken as the first verification result. This step verifies whether the first encrypted bid was indeed submitted by its corresponding bidder, preventing the encrypted bid from being tampered with, switched, or the wrong bidder selected during the bidding process, and enabling the winning bidder to independently decrypt and verify the bid.
[0077] In an embodiment, determining the second verification result based on the second ciphertext bid and the bid commitment of the bidder comprises: decrypting the second ciphertext bid by using the private key to obtain a decrypted value corresponding to the second ciphertext bid; encrypting the decrypted value corresponding to the second ciphertext bid by using a commitment algorithm to obtain a verification commitment; extracting the bid commitment submitted by the bidder corresponding to the second ciphertext bid from the bid commitment database; and if the verification commitment matches the bid commitment submitted by the bidder corresponding to the second ciphertext bid, the verification passes as the second verification result.
[0078] Illustratively, the algorithm used for encrypting the decrypted value corresponding to the second ciphertext bid can be a Pedersen commitment algorithm.
[0079] Illustratively, the platform or the key owner decrypts the second ciphertext bid by using the private key to obtain the original plaintext bid, which can be expressed by a function expression as m2=Dec sk (Enc(m2)), wherein sk represents the private key; m2 represents the decrypted value corresponding to the second ciphertext bid; and Enc(m2) represents the second ciphertext bid.
[0080] Illustratively, the same commitment algorithm (for example, a Pedersen commitment) used in the bidding stage can be used to encrypt m2 and the regenerated random number r'2 to obtain the verification commitment c'2. This process can be expressed by a function expression as wherein c'2 represents the verification commitment; m2 represents the decrypted value corresponding to the second ciphertext bid; g and h both represent a generator; r'2 represents the regenerated random number of the system; and p represents a large prime number.
[0081] Illustratively, the bid commitment stored in the bid commitment database is the original bid commitment of the bidder. By querying the bid commitment database, the bid commitment submitted by the bidder corresponding to the second ciphertext bid (denoted as c2) is extracted, and is matched with the verification commitment. If c'2=c2, it means that the two are matched, that is, the verification passes, and the verification pass is recorded as the second verification result. If they are not equal, it means that the data is tampered with or the bidder's identity does not match.
[0082] According to the above embodiment, by decrypting the second ciphertext bid and reconstructing the verification commitment value based on the commitment algorithm, and matching and verifying it with the original bid commitment, the trusted verification of the pricing result can be realized, and the security and auditability of the data transaction platform can be improved.
[0083] Figure 2 is a structural block diagram of a power data pricing transaction device according to an embodiment of the present application.
[0084] AsFigure 2 As shown, the power data pricing transaction device can include:
[0085] The first encryption module 510 is configured to generate a public key and a private key based on a homomorphic encryption algorithm in the power data pricing transaction system.
[0086] The bid processing module 520 is configured to process the original plaintext bid of the bidder by zero-knowledge proof technology to obtain a bid commitment of the bidder.
[0087] The second encryption module 530 is configured to homomorphically encrypt the original plaintext bid of the bidder based on the public key to obtain a ciphertext bid of the bidder.
[0088] The bid comparison processing module 540 is configured to process the ciphertext bid of the bidder to obtain a first ciphertext bid and a second ciphertext bid.
[0089] The first verification module 550 is configured to send the first ciphertext bid to the bidder corresponding to the first ciphertext bid, so that the bidder corresponding to the first ciphertext bid decrypts and verifies the first ciphertext bid according to the private key to obtain a first verification result.
[0090] The second verification module 560 is configured to determine a second verification result based on the second ciphertext bid and the bid commitment of the bidder if the first verification result is verified, and in the case that the second verification result is verified, take the decrypted value of the second ciphertext bid as the pricing value of the power data, so that the bidder corresponding to the first ciphertext bid trades the power data at the pricing value.
[0091] In an embodiment, as shown, Figure 3 The bid processing module 520 includes:
[0092] The commitment value calculation unit 521 is configured to encrypt and process the original plaintext bid of the bidder by Pedersen commitment algorithm to obtain a commitment value corresponding to the original plaintext bid of the bidder.
[0093] The zero-knowledge proof construction unit 522 is configured to construct a zero-knowledge proof interval based on the Bulletproofs zero-knowledge proof protocol and the commitment value corresponding to the original plaintext bid of the bidder.
[0094] The third verification result obtaining unit 523 is configured to verify the zero-knowledge proof interval to obtain a third verification result, and in the case that the third verification result is verified, take the zero-knowledge proof interval and the commitment value as the bid commitment of the bidder.
[0095] In an embodiment, as shown in Figure 4 The second encryption module 530 comprises:
[0096] The public key obtaining unit 531 is configured to obtain the public key, wherein the public key comprises an encryption base and an encryption modulus.
[0097] The first operation result determining unit 532 is configured to determine a first operation result based on the encryption base and the power of the original plaintext bid of the bidder.
[0098] The second operation result determining unit 533 is configured to determine a second operation result based on the encryption modulus and the power of the random number.
[0099] The ciphertext bid obtaining unit 534 is configured to obtain the ciphertext bid of the bidder by taking the modulus of the product of the first operation result and the second operation result and the square of the encryption modulus.
[0100] In an embodiment, as shown in Figure 5 The price processing module 540 comprises:
[0101] The first ciphertext bid sequence determining unit 541 is configured to determine a first ciphertext bid sequence based on the ciphertext bids of the bidders.
[0102] The second ciphertext bid sequence obtaining unit 542 is configured to process the ciphertext bids of the bidders in the first ciphertext bid sequence to obtain a second ciphertext bid sequence, by taking the ciphertext bids of two adjacent bidders as the creation requirement of a ciphertext bid pair.
[0103] The updating unit 543 is configured to update the second ciphertext bid sequence to obtain a third ciphertext bid sequence based on the DGK comparison protocol.
[0104] The as unit 544 is configured to take the ciphertext bid located at the first position in the third ciphertext bid sequence as the first ciphertext bid, and take the ciphertext bid located at the second position in the third ciphertext bid sequence as the second ciphertext bid.
[0105] In an embodiment, as shown in Figure 6 The first verification module 550 comprises:
[0106] The traversal unit 551 is configured to traverse the ciphertext bid and bidder mapping table stored in the database to obtain the bidder corresponding to the first ciphertext bid, and send the first ciphertext bid to the bidder, so that the bidder corresponding to the first ciphertext bid decrypts the first ciphertext bid according to the private key to obtain a decryption result.
[0107] The first matching unit 552 is configured to, if the decryption result matches the original plaintext bid of the bidder, take the verification pass as the first verification result.
[0108] In one embodiment, as shown in Figure 7 The second verification module 560 includes:
[0109] The decryption value obtaining unit 561 is configured to decrypt the second ciphertext bid by using the private key to obtain a decryption value corresponding to the second ciphertext bid.
[0110] The verification commitment obtaining unit 562 is configured to encrypt the decryption value corresponding to the second ciphertext bid by using a commitment algorithm to obtain a verification commitment.
[0111] The bid commitment extracting unit 563 is configured to extract the bid commitment submitted by the bidder corresponding to the second ciphertext bid from a bid commitment database.
[0112] The second matching unit 564 is configured to, if the verification commitment matches the bid commitment submitted by the bidder corresponding to the second ciphertext bid, take the verification pass as the second verification result.
[0113] The specific functions and examples of the modules and sub-modules of the system of the embodiments of the present application are described above in the related description of the corresponding steps in the method embodiments, and will not be described here again.
[0114] In the technical solution of the present application, the acquisition, storage and application of user personal information comply with relevant laws and regulations and do not violate public order and good customs.
[0115] The embodiments of the present application also provide a power data pricing transaction system, which includes:
[0116] at least one processor; and a memory connected with the at least one processor in communication;
[0117] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in any one of the embodiments of the present application.
[0118] The power data pricing transaction system of the embodiments of the present application has the same beneficial effects as the power data pricing transaction method described above, and will not be described here again.
[0119] The embodiments of the present application also provide a non-transitory computer readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in any one of the embodiments of the present application.
[0120] The storage medium of the present application has the same advantages as the power data pricing transaction method described above, and thus will not be described here.
[0121] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present application is shown. The electronic device 800 is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device 800 can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application described and / or claimed in this document.
[0122] As shown in Figure 8 The electronic device 800 includes a computing unit 801 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the electronic device 800 can also be stored in the RAM 803. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0123] Various components in the electronic device 800 are connected to the I / O interface 805, including an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; the storage unit 808, such as a magnetic disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0124] The computing unit 801 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs various methods and processes described above, such as the pricing transaction method for power data. For example, in some embodiments, the pricing transaction method for power data can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded onto the RAM 803 and executed by the computing unit 801, one or more steps of the pricing transaction method for power data described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the pricing transaction method for power data by any other suitable means, such as by means of firmware.
[0125] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0126] Program code for carrying out methods of the present application can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0127] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store program for use by or in connection with an instruction execution system, apparatus, or device. Machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable medium can include, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage medium would include one or more lines of electrical wire, portable computer diskette, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
[0128] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0129] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0130] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0131] It should be understood that the various forms of flow shown above can be used to reorder, add, or remove steps. For example, the steps described in the present disclosure can be performed in parallel, in series, or in a different order, without limitation herein, so long as the desired results of the technology disclosed herein are achieved.
[0132] The above detailed description does not limit the scope of the present application. It is understood that various modifications, combinations, sub-combinations, and alternatives can be employed herein without departing from the principles of the application. Any and all modifications, variations or equivalent alternative embodiments also are included within the scope of the present application. Accordingly, the specification and figures are to be regarded in an illustrative manner and representations are to be served in no way as a binding interpretation of the subject matter set forth herein.
Claims
1. A method for pricing and trading electricity data, characterized in that, include: Based on the homomorphic encryption algorithm in the power data pricing and trading system, a public key and a private key are generated. By using zero-knowledge proof technology, the bidder's original plaintext quotation is processed to obtain the bidder's quotation commitment; Based on the public key, the bidder's original plaintext bid is homomorphically encrypted to obtain the bidder's ciphertext bid. The encrypted bids from the bidders are compared to obtain a first encrypted bid and a second encrypted bid. Send the first ciphertext bid to the bidder corresponding to the first ciphertext bid, so that the bidder corresponding to the first ciphertext bid can decrypt and verify the first ciphertext bid according to the private key, and obtain the first verification result; If the first verification result is successful, then based on the second encrypted price and the bidder's price commitment, a second verification result is determined. If the second verification result is successful, the decrypted value of the second encrypted price is used as the fixed value of the power data, so that the bidder corresponding to the first encrypted price can conduct power data transactions at the fixed value.
2. The method according to claim 1, characterized in that, The process of processing the bidder's original plaintext bid using zero-knowledge proof technology to obtain the bidder's bid commitment includes: The original plaintext bid of the bidder is encrypted using the Pedersen commitment algorithm to obtain the commitment value corresponding to the original plaintext bid of the bidder; Based on the Bulletproofs zero-knowledge proof protocol and the commitment value corresponding to the bidder's original plaintext bid, a zero-knowledge proof range is constructed to obtain the zero-knowledge proof range. The zero-knowledge proof interval is verified to obtain a third verification result. If the third verification result is successful, the zero-knowledge proof interval and the commitment value are used as the bidder's bid commitment.
3. The method according to claim 1, characterized in that, The process of homomorphically encrypting the bidder's original plaintext bid based on the public key to obtain the bidder's ciphertext bid includes: Obtain the public key, wherein the public key includes the encryption base and the encryption modulus; The first calculation result is determined based on the power of the encryption base and the bidder's original plaintext bid. The second calculation result is determined based on the power of the encryption modulus and the random number; The product of the first and second operation results is moduloed by the square of the encryption modulus to obtain the bidder's encrypted bid.
4. The method according to claim 1, characterized in that, The process of comparing the encrypted bids of the bidders to obtain a first encrypted bid and a second encrypted bid includes: Based on the encrypted bids of each bidder, a first encrypted bid sequence is determined; The encrypted bids of two adjacent bidders are used as the creation requirement for encrypted bid pairs. The encrypted bids of each bidder in the first encrypted bid sequence are processed to obtain the second encrypted bid sequence. Based on the DGK comparison protocol, the second ciphertext quotation sequence is updated to obtain the third ciphertext quotation sequence; The first ciphertext quote in the third ciphertext quote sequence is used as the first ciphertext quote, and the second ciphertext quote in the third ciphertext quote sequence is used as the second ciphertext quote.
5. The method according to claim 1, characterized in that, Sending the first ciphertext bid to the bidder corresponding to the first ciphertext bid, so that the bidder corresponding to the first ciphertext bid can decrypt and verify the first ciphertext bid using the private key to obtain a first verification result, includes: Traverse the mapping table of encrypted bids and bidders stored in the database to obtain the bidder corresponding to the first encrypted bid, and send the first encrypted bid to it so that the bidder corresponding to the first encrypted bid can decrypt the first encrypted bid according to the private key to obtain the decryption result; If the decryption result matches the bidder's original plaintext bid, then the verification is considered successful and is taken as the first verification result.
6. The method according to claim 1, characterized in that, The second encrypted quote and the bidder's quote commitment determine the second verification result, including: The second ciphertext quote is decrypted using the private key to obtain the decrypted value corresponding to the second ciphertext quote; The decrypted value corresponding to the second ciphertext quote is encrypted using a commitment algorithm to obtain the verified commitment; Extract the bid commitment submitted by the bidder corresponding to the second encrypted bid from the bid commitment database; If the verification commitment matches the bid commitment submitted by the bidder corresponding to the second encrypted bid, then the verification is passed and taken as the second verification result.
7. A pricing and trading device for electricity data, characterized in that, include: The first encryption module is used to generate public and private keys based on the homomorphic encryption algorithm in the electricity data pricing and trading system. The quotation processing module is used to process the bidder's original plaintext quotation using zero-knowledge proof technology to obtain the bidder's quotation commitment; The second encryption module is used to perform homomorphic encryption on the bidder's original plaintext bid based on the public key to obtain the bidder's ciphertext bid; The price comparison processing module is used to compare the encrypted bids of the bidders to obtain a first encrypted bid and a second encrypted bid. The first verification module is used to send the first ciphertext bid to the bidder corresponding to the first ciphertext bid, so that the bidder corresponding to the first ciphertext bid can decrypt and verify the first ciphertext bid according to the private key, and obtain the first verification result. The second verification module is used to determine a second verification result based on the second encrypted price and the bidder's price commitment if the first verification result is successful. If the second verification result is successful, the decrypted value of the second encrypted price is used as the value of the power data, so that the bidder corresponding to the first encrypted price can conduct power data transactions at the value.
8. The apparatus according to claim 7, characterized in that, The quotation processing module includes: The commitment value calculation unit is used to encrypt the bidder's original plaintext bid using the Pedersen commitment algorithm to obtain the commitment value corresponding to the bidder's original plaintext bid. A zero-knowledge proof construction unit is used to construct a zero-knowledge proof based on the Bulletproofs zero-knowledge proof protocol and the commitment value corresponding to the bidder's original plaintext bid, thereby obtaining a zero-knowledge proof range. The third verification result obtaining unit is used to verify the zero-knowledge proof interval, obtain the third verification result, and if the third verification result is a successful verification, use the zero-knowledge proof interval and the commitment value as the bidder's bid commitment.
9. A pricing and trading system for electricity data, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.