Method, device and system for identifying and authenticating hour-level green electricity curve, and storage medium
Through the combination of blockchain technology and encryption algorithms, the problem of incorrect information identification in power transactions is solved, and the full life cycle trustworthy traceability and authentication authority of green power link information is realized, ensuring the reliability of green power consumption .
Patent Information
- Application Number
- CN202410992355.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-26
AI Technical Summary
The existing technology is difficult to fully identify information on green power production, trading, consumption and other links in power transactions, and cannot guarantee the immutability of these information, resulting in insufficient authority and credibility of green power consumption certification.
Using blockchain technology combined with SM9, fully homomorphic encryption and RSA algorithms to realize identity authentication, encryption, hash value calculation and signature of hour-level green electric curve data, forming tamper-proof blockchain information and ensuring data privacy and traceability.
It realizes the credible traceability and immutability of green power production, transactions and consumption information throughout the life cycle, ensures the authority of green power consumption certification, and prevents repeated sales or measurement of green environmental value.
Smart Images

Figure CN119027121A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of green electricity trading, and in particular, relates to an hourly green electricity curve identification authentication method and device, system, and storage medium. Background Art
[0002] With the development of the economy, the demand for green electricity consumption in the whole society will become increasingly strong. While meeting the needs of electricity users to purchase and consume green electricity, green electricity trading will also provide users with corresponding green electricity consumption certification services. Therefore, there is an urgent need for an authentication method that can comprehensively identify information on green electricity production, trading, consumption and other links in electricity trading to ensure that it cannot be tampered with, realize the trusted traceability of the entire life cycle of green electricity, and ensure the authority of green electricity consumption certification. At the same time, it also provides a strong technical guarantee for preventing repeated sales or measurement of green environmental value. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide an hourly green electricity curve identification authentication method and device, system, and storage medium, which can realize information identification authentication of green electricity production and trading links and ensure that it cannot be tampered with.
[0004] To achieve the above object, the present invention adopts the following technical solution:
[0005] An hourly green electricity curve identification authentication method includes:
[0006] Step S1: Authenticate the identity of the owner of the hourly green electricity curve to form a blockchain node;
[0007] Step S2, collecting hourly green electricity curve data to form hourly green electricity curve original data;
[0008] Step S3, performing initial encryption on the original data of the hourly green electricity curve;
[0009] Step S4, calculating the hash value of the hourly green electricity curve encrypted data;
[0010] Step S5: perform signature operation on the hash value of the file to generate data identification hour-level green electricity curve identification information;
[0011] Step S5, upload the hourly green electricity curve identification information to the blockchain node of the hourly green electricity curve owner, broadcast it to each blockchain node, and each blockchain node packages the identification information to generate the hourly green electricity curve information blockchain;
[0012] Step S7: Other nodes in the blockchain verify the hourly green electricity curve data identifier.
[0013] Preferably, in step S1, the identity of the owner of the hourly green electricity curve is authenticated based on the SM9 algorithm, and the identity authentication information is uploaded to the blockchain to form a blockchain node.
[0014] Preferably, in step S3, the original data of the hourly green electricity curve is initially encrypted based on a fully homomorphic encryption algorithm.
[0015] Preferably, in step S5, a signature operation is performed on the file hash value based on an RSA algorithm to generate data identifying hourly green electricity curve identification information.
[0016] The present invention also provides an hourly green electricity curve identification authentication device, comprising:
[0017] The first processing module is used to authenticate the identity of the owner of the hourly green electricity curve and form a blockchain node;
[0018] The second processing module is used to collect hourly green electricity curve data to form hourly green electricity curve raw data;
[0019] The third processing module is used to initially encrypt the raw data of the hourly green electricity curve;
[0020] The fourth processing module is used to calculate the hash value of the hourly green electricity curve encrypted data;
[0021] The fifth processing module is used to perform a signature operation on the file hash value to generate data identification hour-level green electricity curve identification information;
[0022] The sixth processing module is used to upload the hourly green electricity curve identification information to the blockchain node of the hourly green electricity curve owner, broadcast it to each blockchain node, and each blockchain node packages the identification information to generate an hourly green electricity curve information blockchain;
[0023] The seventh processing module is used to enable other nodes of the blockchain to verify the hourly green electricity curve data identification.
[0024] Preferably, the first processing module authenticates the owner of the hourly green electricity curve based on the SM9 algorithm, and uploads the authentication information to the blockchain to form a blockchain node.
[0025] Preferably, the third processing module performs initial encryption on the original data of the hourly green electricity curve based on a fully homomorphic encryption algorithm.
[0026] Preferably, the fifth processing module performs a signature operation on the file hash value based on an RSA algorithm to generate data identifying hourly green electricity curve identification information.
[0027] The present invention also provides an hourly green electricity curve identification authentication system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes the hourly green electricity curve identification authentication method when executed by the processor.
[0028] The present invention also provides a storage medium, on which a computer program is stored, and the computer program executes the hourly green electricity curve identification authentication method when running.
[0029] The present invention utilizes a hybrid encryption algorithm to achieve data traceability and verifiability on the chain while protecting data privacy. First, the identity information of the owner of the hourly green electricity curve is authenticated based on the SM9 algorithm, and the identity authentication information is uploaded to the blockchain to form a blockchain node; then the original data is privacy processed based on the homomorphic encryption algorithm to maintain the privacy security of the data and ensure that the subsequent calculation results are consistent with the original data; finally, the hourly green electricity curve data after the initial encryption is encrypted again, and the hash algorithm is used to extract the hash value for data identification verification, and the RSA algorithm is used to generate the data identification, which is uploaded to the blockchain to achieve data credibility, traceability and verifiability. By adopting the technical solution of the present invention, the information of each link such as green electricity production, trading, and consumption can be fully identified in the electricity transaction to ensure that it cannot be tampered with, realize the trusted traceability of the entire life cycle of green electricity, and ensure the authority of green electricity consumption certification. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0031] Figure 1 It is a flow chart of the hourly green electricity curve identification and authentication method of the present invention. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0034] Embodiment 1:
[0035] like Figure 1 As shown, an embodiment of the present invention provides an hourly green electricity curve identification authentication method, including:
[0036] Step S1: Identity authentication of hourly green electricity curve owner
[0037] Step S11: Initialization phase of the certification service agency
[0038] Step S111, the certification service agency randomly selects three cyclic groups, namely (G1, +), (G2, +), (GT, +), and the orders of the three cyclic groups are all prime numbers H, and they satisfy: there exists a homomorphic mapping ψ from G2 to G1, such that ψ(P2) = P1; the bilinear pairing e is a mapping of G1×G2→GT, where G1 and G2 are additive cyclic groups, GT is a multiplicative cyclic group, P1 is a generator of G1, and P2 is a generator of G2;
[0039] Step S112: The key generation center of the authentication service agency generates a random number s∈[1,H-1] as the master private key of the authentication service agency;
[0040] Step S113: Calculate the element P in G2 pub =[s]×P1, as the master public key of the certification service agency;
[0041] Step S114: Generate a master key pair (s, P) of the authentication service organization pub ), open P pub , secret storage s;
[0042] Step S12: Registration of the identity of the owner of the hourly green electricity curve
[0043] Step S121: Calculate the registration public key Q based on the identity information of the hourly green electricity curve owner. A ;
[0044] Q A =[H1(ID A ||hid)]×P1+P pub
[0045] Among them, Q A Indicates the registered public key of the owner of the hourly green electricity curve, hid indicates the private key generation function identifier, ID A Indicates the identity information of the owner of the hourly green electricity curve.
[0046] Step S122, the hourly green electricity curve owner identity registration information X1 is sent to the certification service agency through a secure channel;
[0047] X1={ID A ,Q A ,TS,LT}
[0048] Among them, TS represents the timestamp, and LT represents the survival time.
[0049] Step S123: After receiving the registration information of the hourly green electricity curve owner, the certification service agency first checks the user's ID A Whether the user has been registered. If so, duplicate registration will be rejected. If not, the key generation center will generate the user's private key based on the user data identifier and public key.
[0050] d A =[H1(ID A ||hid)+s]×P2
[0051] Step S124: The certification service agency sends the registration information X2 to the hourly green electricity curve owner through a secure channel, and the hourly green electricity curve owner sends the hourly green electricity curve owner identity information ID A Upload the public key QA to the blockchain to generate a blockchain node.
[0052] X2={d A ,TS,LT}
[0053] Step S2: collect hourly green electricity curve data, including power generation period, power plant number, generator number, and power generation data. The data collection cycle is 1 hour to form hourly green electricity curve raw data m
[0054] Step S3: Initially encrypt the original data of the hourly green electricity curve based on the fully homomorphic encryption algorithm
[0055] Step S31, key generation: take a as the encryption security parameter, and randomly select two 2-a-bit prime numbers b and c to generate a random public parameter Q of no more than a / 2 bits. The public key of the homomorphic encryption algorithm is (a, N, Q) and the private key c.
[0056] Step S32, encrypting the original data of the hourly green electricity curve: inputting the original data m of the hourly green electricity curve, and outputting the encrypted data M of the hourly green electricity curve.
[0057] M=m+rQ mod N
[0058] Where r is a random parameter of a / 2 bits.
[0059] Step S4: Calculate the hash value W of the hourly green electricity curve encrypted data based on the hash algorithm
[0060] Step S5: Perform a signature operation on the file hash value based on the RSA algorithm to obtain the hourly green electricity curve identification information
[0061] Step S51: Randomly select two unequal prime numbers A and B, and calculate the product C of A and B.
[0062] Step S52: Calculate the Euler function φ(C) of C.
[0063] φ(C)=(A-1)*(B-1)
[0064] Step S53: Randomly select an integer E that is relatively prime to φ(C) and satisfies Compute the multiplicative inverse D of E with respect to φ(C).
[0065] E*D modφ(C)=1modφ(C)
[0066] Step S54: Generate a data key, where the data public key is (N, E) and the data private key is (C, D);
[0067] Step S55: The hash value of the hourly green electricity curve encrypted data is encrypted again using the RSA algorithm to obtain the ciphertext M E .
[0068] C=M E mod N
[0069] Step S56: Form hourly green electricity curve identification information {M E , (N, E), W}
[0070] Step S6: Hourly green electricity curve identification information {M E , (N, E), W} is uploaded to the blockchain node of the owner of the hourly green electricity curve, broadcasted to each blockchain node, and each blockchain node packages the identification information to generate the hourly green electricity curve information blockchain
[0071] Step S7: Other nodes in the blockchain verify the hourly green electricity curve data identifier
[0072] Step S71: Decrypt the data signature based on the RSA algorithm and the public key to obtain the hash value of the data file;
[0073] Step S72: Calculate the data file based on the hash algorithm to obtain the hash value of the data file;
[0074] Step 73: Compare the hash values of the two to see if they are completely consistent. If they are consistent, it indicates that the data file belongs to the blockchain node, otherwise it does not.
[0075] Embodiment 2:
[0076] The embodiment of the present invention provides an hourly green electricity curve identification authentication device, including:
[0077] The first processing module is used to authenticate the identity of the owner of the hourly green electricity curve and form a blockchain node;
[0078] The second processing module is used to collect hourly green electricity curve data to form hourly green electricity curve raw data;
[0079] The third processing module is used to initially encrypt the raw data of the hourly green electricity curve;
[0080] The fourth processing module is used to calculate the hash value of the hourly green electricity curve encrypted data;
[0081] The fifth processing module is used to perform a signature operation on the file hash value to generate data identification hour-level green electricity curve identification information;
[0082] The sixth processing module is used to upload the hourly green electricity curve identification information to the blockchain node of the hourly green electricity curve owner, broadcast it to each blockchain node, and each blockchain node packages the identification information to generate an hourly green electricity curve information blockchain;
[0083] The seventh processing module is used to enable other nodes of the blockchain to verify the hourly green electricity curve data identification.
[0084] As an implementation method of an embodiment of the present invention, the first processing module authenticates the owner of the hourly green electricity curve based on the SM9 algorithm, and uploads the identity authentication information to the blockchain to form a blockchain node.
[0085] As an implementation method of the embodiment of the present invention, the third processing module performs initial encryption on the original data of the hourly green electricity curve based on a fully homomorphic encryption algorithm.
[0086] As an implementation method of the embodiment of the present invention, the fifth processing module performs a signature operation on the file hash value based on the RSA algorithm to generate data identification hourly green electricity curve identification information.
[0087] Embodiment 3:
[0088] An embodiment of the present invention also provides an hourly green electricity curve identification authentication system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes the hourly green electricity curve identification authentication method when executed by the processor.
[0089] Embodiment 4:
[0090] An embodiment of the present invention further provides a storage medium, on which a computer program is stored, and when the computer program is run, the hourly green electricity curve identification and authentication method is executed.
[0091] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for hourly green electricity curve identification and authentication, characterized in that: include: Step S1: Authenticate the identity of the owner of the hourly green electricity curve to form a blockchain node; Step S2, collecting hourly green electricity curve data to form hourly green electricity curve original data; Step S3, performing initial encryption on the original data of the hourly green electricity curve; Step S4, calculating the hash value of the hourly green electricity curve encrypted data; Step S5: perform signature operation on the hash value of the file to generate data identification hour-level green electricity curve identification information; Step S5, upload the hourly green electricity curve identification information to the blockchain node of the hourly green electricity curve owner, broadcast it to each blockchain node, and each blockchain node packages the identification information to generate the hourly green electricity curve information blockchain; Step S7: Other nodes in the blockchain verify the hourly green electricity curve data identifier.
2. The hourly green electricity curve identification authentication method according to claim 1, characterized in that: In step S1, the identity of the owner of the hourly green electricity curve is authenticated based on the SM9 algorithm, and the identity authentication information is uploaded to the blockchain to form a blockchain node.
3. The hourly green electricity curve identification authentication method according to claim 2 is characterized in that: In step S3, the original data of the hourly green electricity curve is initially encrypted based on a fully homomorphic encryption algorithm.
4. The hourly green electricity curve identification authentication method according to claim 3 is characterized in that: In step S5, a signature operation is performed on the file hash value based on the RSA algorithm to generate data identification hourly green electricity curve identification information.
5. An hourly green electricity curve identification and authentication device, characterized in that: include: The first processing module is used to authenticate the identity of the owner of the hourly green electricity curve and form a blockchain node; The second processing module is used to collect hourly green electricity curve data to form hourly green electricity curve raw data; The third processing module is used to initially encrypt the raw data of the hourly green electricity curve; The fourth processing module is used to calculate the hash value of the hourly green electricity curve encrypted data; The fifth processing module is used to perform a signature operation on the file hash value to generate data identification hour-level green electricity curve identification information; The sixth processing module is used to upload the hourly green electricity curve identification information to the blockchain node of the hourly green electricity curve owner, broadcast it to each blockchain node, and each blockchain node packages the identification information to generate an hourly green electricity curve information blockchain; The seventh processing module is used to enable other nodes of the blockchain to verify the hourly green electricity curve data identification.
6. The hourly green electricity curve identification authentication device according to claim 5, characterized in that: The first processing module authenticates the owner of the hourly green electricity curve based on the SM9 algorithm and uploads the authentication information to the blockchain to form a blockchain node.
7. The hourly green electricity curve identification authentication device according to claim 6, characterized in that: The third processing module performs initial encryption on the original data of the hourly green electricity curve based on a fully homomorphic encryption algorithm.
8. The hourly green electricity curve identification authentication device according to claim 7, characterized in that: The fifth processing module performs a signature operation on the file hash value based on the RSA algorithm to generate data identification hour-level green electricity curve identification information.
9. An hourly green electricity curve identification and authentication system, characterized in that: include: A memory and a processor, wherein the memory stores a computer program executed by the processor, and when the computer program is executed by the processor, the hourly green electricity curve identification and authentication method as described in any one of claims 1 to 4 is executed.
10. A storage medium, characterized in that: The storage medium stores a computer program, which executes the hourly green electricity curve identification and authentication method according to any one of claims 1 to 4 when running.
