A data processing method and system in a blockchain-based smart grid
By introducing blockchain technology into the smart grid, service nodes generate public parameters, and user nodes generate ring signatures and store them on the blockchain, thus solving the problems of power data security and tamper resistance, and realizing secure data storage and traceability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING UNIV OF POSTS & TELECOMM
- Filing Date
- 2021-03-22
- Publication Date
- 2026-06-23
AI Technical Summary
The existing smart grid lacks sufficient security and tamper resistance for power data, making the data vulnerable to attacks and insecure to store.
Through a blockchain-based smart grid system, a set of service nodes generates common system parameters, user nodes generate ring signatures and send power data, and the power center equipment verifies and stores the data on the blockchain, combining anonymous and revocable technology to trace the source of the data.
It achieves the security, tamper-proofness and auditability of power data, ensuring the secure storage and tracking of data on the blockchain.
Smart Images

Figure CN115114671B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data processing method and system for a blockchain-based smart grid. Background Technology
[0002] With the development of power grids, traditional power grids are gradually being replaced by smart grids, which integrate technologies such as communication, sensing, automation, and computers.
[0003] However, the current power grid is not highly intelligent, and data security protection and auditing in the power grid still mainly rely on manual labor or have low levels of data security protection. Data is vulnerable to various data attacks, and storing large amounts of data presents numerous security risks, thus failing to effectively guarantee the security of power data. Therefore, ensuring the security of power data has become an urgent problem to be solved. Summary of the Invention
[0004] This invention provides a data processing method and system for a blockchain-based smart grid, which can ensure the security and tamper-proof nature of power data.
[0005] In a first aspect, embodiments of this application provide a data processing method for a blockchain-based smart grid, the data processing method for a blockchain-based smart grid comprising:
[0006] The service nodes in the service node set jointly generate common system parameters. The service node set includes multiple service nodes in the smart grid platform.
[0007] User nodes send key acquisition requests to the smart grid platform;
[0008] If each service node in the service node set successfully authenticates the user node's identity information, then each service node jointly calculates the partial key information and the user secret share information, and the smart grid platform returns the partial key information and the user secret share information to the user node. The partial key information is generated based on the system's public parameters, and the user secret share information is generated based on the partial key information.
[0009] User nodes generate keys based on partial key information and user secret share information;
[0010] User nodes select a set of user node identifiers to generate a ring signature for the power data, and then send the ring-signed power data to the power center equipment. The set of user node identifiers includes the node identifier information of multiple user nodes managed by the smart grid platform, including the user node. The ring signature is generated based on system public parameters and the user node's key.
[0011] The power center equipment receives the power data after it has been ring-signed, verifies the validity of the ring signature of the received power data, and stores the power data in the blockchain after successful verification.
[0012] In one implementation, the data processing method in the blockchain-based smart grid further includes:
[0013] When the power data received by the power center equipment is abnormal, the target service node uses the anonymous and revocable ring signature of the power data to determine the user node to which the power data belongs. The target service node can be any service node in the set of service nodes.
[0014] Secondly, embodiments of this application provide a data processing system for a blockchain-based smart grid. This system includes user nodes and a smart grid platform, wherein the smart grid platform includes service nodes and power center equipment, and multiple service nodes constitute a service node set; wherein:
[0015] The individual service nodes in the service node set are used to jointly generate common system parameters;
[0016] User nodes are used to send key acquisition requests to the smart grid platform;
[0017] If each service node in the service node set successfully authenticates the user node's identity information, then each service node is also used to jointly calculate partial key information and user secret share information, and the smart grid platform returns partial key information and user secret share information to the user node. The partial key information is generated based on the system's public parameters, and the user secret share information is generated based on the partial key information.
[0018] User nodes are also used to generate keys based on partial key information and user secret share information;
[0019] User nodes are also used to select a set of user node identifiers to generate a ring signature for power data, and send the ring-signed power data to the power center equipment. The set of user node identifiers includes node identifier information of multiple user nodes managed by the smart grid platform, including user nodes. The ring signature is generated based on system public parameters and the key of the user node.
[0020] The power center equipment is used to receive power data after ring signing, verify the validity of the ring signature of the received power data, and store the power data in the blockchain after successful verification.
[0021] In one implementation, the system further includes:
[0022] The target service node is used to determine the user node to which the power data belongs by using the ring signature of the power data when the power data received by the power center equipment is abnormal. The target service node is any one of the service nodes in the set of service nodes.
[0023] In this embodiment, each service node jointly generates system common parameters. Based on these common parameters, each service node jointly generates partial key information and user secret share information. The smart grid platform sends the partial key information and user secret share information to the user nodes, and the user nodes generate keys based on these information. The user nodes perform ring signatures on the power data and send the ring-signed power data to the power center equipment. After verifying the validity of the ring signature on the received power data, the power center equipment stores the power data in the blockchain. Therefore, in this embodiment, the user nodes perform ring signatures on the power data, and the power center equipment stores the ring-signed power data in the blockchain, thus ensuring the security and tamper-proof nature of the power data. Furthermore, when a dispute arises between the power center equipment and the user nodes regarding power data, the target service node can intervene to trace the user node to which the power data belongs, ensuring the auditability of the power data. Attached Figure Description
[0024] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a schematic diagram of a smart grid system provided in an embodiment of this application;
[0026] Figure 2 This is a schematic flowchart of a data processing method in a blockchain-based smart grid provided in an embodiment of this application;
[0027] Figure 3 This is a schematic diagram of a process for various service nodes to jointly generate common system parameters, provided in an embodiment of this application.
[0028] Figure 4 This is a schematic diagram illustrating a user node performing ring signature on power data, provided in an embodiment of this application.
[0029] Figure 5 This is a schematic diagram illustrating the process of data processing in a smart grid system using a blockchain-based data processing method provided in an embodiment of this application.
[0030] Figure 6 This is a schematic diagram of a process for revoking anonymity of a target service node, provided in an embodiment of this application. Detailed Implementation
[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0032] Please see Figure 1 , Figure 1 This is a schematic diagram of a smart grid system provided in an embodiment of this application. Figure 1 As shown, a blockchain-based smart grid system includes a smart grid platform, user nodes, and a data center platform. The smart grid platform comprises power center equipment and service nodes. The power center equipment primarily responds to the electricity demands of user nodes in the smart grid system by uploading valid power data from these user nodes to the blockchain. When joining the smart grid system, user nodes need to obtain their identity identifier from the service nodes. User nodes can choose to generate ring signatures with other user nodes in the smart grid system. Service nodes are mainly used to jointly generate partial key information and user secret share information. They also register the identity information of user nodes joining the smart grid system, generate user node identity identifiers and feed them back to the user nodes, and verify the identity identifiers when user nodes log in to the smart grid system. Target service nodes are mainly used to audit power data and determine the user node to which the power data belongs when disputes arise between the power center equipment and user nodes. The target service node can be any service node. The data center platform receives and stores copies of the power data uploaded to the blockchain, providing them to the power center equipment or other research equipment for research use.
[0033] like Figure 1As shown, each service node jointly generates system public parameters and publishes these parameters to the smart grid system. When a user node joins the smart grid system, it obtains a user node identity identifier from the service nodes and logs into the system using this identifier. After the smart grid system verifies the user node's identity identifier, each service node generates partial key information and user secret share information based on the system public parameters. The smart grid platform then feeds back these information to the user node. Once a user node collects at least t user secret share information pieces, it can generate its own key based on the partial key information and the t user secret share information. Subsequently, the user node selects a set of user node identifiers and performs a ring signature on its power data. The user node then sends the ring-signed power data to the power center equipment. The power center equipment verifies the ring signature of the received power data. If valid, it stores the power data in the blockchain. When a power data dispute arises between a user node and the power center equipment, the target service node intervenes, anonymously revoking the data and tracing it back to the user node to which the power data belongs. Here, t is a positive integer, greater than 1 and less than the total number of service nodes.
[0034] The embodiments of this application are based on bilinear mapping pairs that satisfy the properties of bilinear mappings. The definition of a bilinear mapping is given below:
[0035] Let G1 and G2 be two multiplicative cyclic groups of order q. Let P be a generator of G1, and Q be any point in G1. The bilinear mappings satisfy the following property:
[0036] (1) Bilinear: For any For P and Q ∈ G1, e(aP, bQ) = e(P, Q) ab ;
[0037] (2) Non-degeneracy: e(P, P) ≠ 1;
[0038] (3) Computability: For any Both can effectively calculate e(aP, bP).
[0039] Please see Figure 2 , Figure 2 This is a flowchart illustrating a data processing method for a blockchain-based smart grid provided in an embodiment of this application, as shown below. Figure 2 As shown, the method includes steps 201-206.
[0040] Step 201: The service nodes in the service node set jointly generate common system parameters.
[0041] The service node set includes multiple service nodes in the smart grid platform, which are described below. Figure 3 For a detailed explanation of the implementation process of step 201, please refer to [link / reference]. Figure 3 , Figure 3 This is a flowchart illustrating the process of various service nodes jointly generating common system parameters, as provided in an embodiment of this application, including steps 301-302.
[0042] Step 301: Smart grid platform initialization.
[0043] In one implementation, step 301 includes the following steps:
[0044] s3011: Each service node jointly and randomly selects a large prime number q, determines a multiplicative cyclic group G1 and a multiplicative cyclic group G2 of order q based on the large prime number q, and determines the bilinear mapping e: G1×G1→G2.
[0045] s3012: The hash function H1, {0, 1}, is jointly selected by all service nodes. * →G1 and hash functions in, For a set of integers, The integers in the set are greater than 0 and less than q, and are relatively prime to q.
[0046] s3013: Each service node jointly determines the threshold value t for generating the key of the user node, where t is a positive integer, greater than 1, and less than the number of service nodes in the service node set.
[0047] s3014: Common system parameters (params) jointly disclosed by each service node:
[0048] params={q, P, e, G1, G2, H1, H2, t, n} (1)
[0049] Step 302: Each service node generates its own public-private key pair and the public-private key pair of the smart grid platform.
[0050] In one implementation, step 302 includes the following steps:
[0051] s3021: Each service node randomly selects a t-1 order polynomial f i (z)=f i0 +f i1 z+...+f i(t-1) z t-1 , where f i (0)=f i0 =s i s iLet z be the master key share of the i-th service node in the set of service nodes, where i represents the i-th service node in the set of service nodes, and z is the independent variable in the polynomial.
[0052] s3022: Each service node calculates and broadcasts the coefficient value F. ik =f ik The value of P, where k = 1, 2, ..., t-1, f ik These are the coefficients of the polynomial for each service node.
[0053] In one implementation, the coefficients of the polynomials chosen by each service node cannot be directly exposed. However, to allow other service nodes to verify the correctness of their secret shares, each service node multiplies its polynomial coefficients by the generator P of G1 to protect them from exposure. For example, the i-th service node protects the polynomial coefficients f of its chosen polynomial. ik To ensure that the secret share of the i-th service node remains unexposed while guaranteeing that other service nodes can verify its correctness, the i-th service node will use the polynomial coefficients f. ik Multiplying by the generator P of G1, we obtain the coefficient value F of the i-th service node. ik and broadcast the coefficient value F ik .
[0054] s3023: The i-th service node aid i Calculate the secret share s ij =f i (aid j ), where j = 1, 2, ..., i-1, i+1, ..., n, and then sent to the service node aid through a secure channel. j In addition, service node AID i Calculate and save s ii =f i (aid i Where n is the number of service nodes in the service node set, aid i Aid is the identity identifier of the i-th service node in the set of service nodes. j For the set of service nodes excluding service node aid i Identification of service nodes other than those mentioned above.
[0055] s3024: Service node AID i Received aids from n-1 other service nodes j The secret share sent ji Then, by judging the equation Whether it holds true is used to verify the received secret share s jiThe validity of the equation. If the equation is true, then it is valid; otherwise, the service node aid is valid. i Requires service node AID j Rebroadcast secret shares ji until the equation holds true.
[0056] s3025: Service node AID i Computing service node AID i Master key share sk i and the corresponding public key share PK i , pk i =sk i P. The master key s requires at least t master key shares sk. i This allows for recovery and improves system security;
[0057] s3026: Service node AID i The master public key P can be generated by calculating the public key shares of at least t service nodes. pub :
[0058]
[0059] Where s is the master key calculated based on the master key shares of t service nodes, and the master key s requires at least t master key shares sk. i Only then can it be restored, where Ω is the set of t service nodes that meet the requirements for generating the master key.
[0060] s3027: Each service node will transfer the master public key P pub and the identity information set of each service node Adding it to the system public parameters params will result in the following params:
[0061]
[0062] Step 202: The user node sends a key acquisition request to the smart grid platform.
[0063] Step 203: If the identity information of the user node is successfully authenticated by each service node in the service node set, then each service node jointly calculates the partial key information and the user secret share information, and the smart grid platform returns the partial key information and the user secret share information to the user node.
[0064] Step 204: The user node generates a key based on the partial key information and the user secret share information.
[0065] In one implementation, step 204 includes the following steps:
[0066] s2041: The i-th user node After successfully obtaining a key from the smart grid platform and authenticating it, each service node jointly calculates partial key information B. i B i =H1(uid) i ), and send partial key information B i Give user node uid i , where uid i B is the identity identifier of the i-th user node. i This represents partial key information for the i-th user node.
[0067] s2042: Service node AID j Calculate user secret share information psk ij psk ij =sk i B i And send the user's secret share information PSK through a secure channel. ij Give user node uid i .
[0068] s2043: User node uid i Received service node AID j Sending user secret share information psk ij Then, verify the equation e(psk) ij ,P)=e(B i , pk j If true, then the user's secret share information psk is entered into the database. ij Valid, otherwise, user node uid i Discard the message, and the user node uid i Requires service node AID j Resend user secret share information psk ij Until verification is successful.
[0069] s2044: User node uid i After receiving t user secret share information, calculate the user node uid. i Partial private key C i :
[0070]
[0071] In one implementation, C i It is also a point in the cyclic group G1, aid k This is the identity identifier for the k-th user node.
[0072] s2045: User node UID iChoose a random number And calculate the user node uid i Private key information X i =x i C i and user node uid i public key Y i =x i (P+B i Then, the user node's uid i (x) i C i (Y) as the private key i uid i ) is used as the public key, and finally broadcast (Y) i uid i ).
[0073] Step 205: The user node selects a set of user node identifiers to generate a ring signature for the power data, and sends the ring-signed power data to the power center equipment.
[0074] In one implementation, step 205 is the process of the user node performing a ring signature on the power data, which will be described below in conjunction with... Figure 4 For a detailed explanation of the implementation process of step 205, please refer to [link / reference]. Figure 4 , Figure 4 This application provides a schematic diagram of a user node performing ring signature on power data, including the following steps 401-403:
[0075] Step 401: The user node selects a set of user node identifiers.
[0076] The Sth user node uid s Select a set of user node identifiers L = {uid1, uid2, ..., uid3} l}, where uid S ∈L, where l is the number of user nodes in the user node identifier set, and uid s This is the identity identifier of the S-th user node in the user node identifier set.
[0077] Step 402: User nodes perform ring signatures on the power data.
[0078] The Sth user node uid S Select a random number r i Random number u i ,calculate
[0079] U i =u i P(i=1,2,...,l,i≠S) (5)
[0080] R i =r i (P+B i (i = 1, 2, ..., l) (6)
[0081] R' i =r i Y i (i = 1, 2, ..., l) (7)
[0082]
[0083] h i =H2(m||U i ||R||L)(i=1,2,...,l,i≠S) (9)
[0084] Among them, U i R is the point in G1 corresponding to the i-th user node in the user node identifier set. i R' is a partial public key of the i-th user node in the user node identifier set. i To blind the public key of the i-th user node in the user node identifier set, R is the signature of the user node on the set of public keys of all user nodes in the user node identifier set, h i Let x be the hash value of the electricity data of the i-th user node in the user node identifier set. S User node uid s Calculate user node uid s The random number chosen when using the private key
[0085] s2054: User node UID S Choose a random number u S and calculate
[0086]
[0087] in, B S The uid of the Sth user node S Partial key information, U S Let U be a user node on the cyclic group G1, and U S Unlike the user node identifier set, which includes the user node uid s Other than points, U S ≠U i If U S =U i User node uid S You need to select u again. S.
[0088] h S =H2(m||U S ||R||L) (11)
[0089] D = h S x S P pub +h S X S +u S C S (12)
[0090] Among them, h S User node uid s The hash value of the electricity data, D is the signature parameter in the form of the master key s, and m is the user node uid. S Electricity data, X S User node uid s C's private key information S User node uid s Part of the private key.
[0091] User node uid s Generate a ring signature σ for the power data:
[0092] σ=(m,U1,U2,...,U l R1, R2, ..., R z (13)
[0093] Step 403: The user node sends the power data after ring signing to the power center equipment.
[0094] In one implementation, the S-th user node uid s The power data, after being ring-signed, will be sent to the power center equipment.
[0095] Step 206: The power center equipment receives the power data after ring signing and verifies the validity of the ring signature of the received power data. After successful verification, the power data is stored in the blockchain.
[0096] In one implementation, step 206 includes the following steps:
[0097] s2061: After receiving the information, the power center equipment calculates...
[0098] h i =H2(m||U i ||R||L)(i=1, 2,...,l) (14)
[0099] s2062: Verification equation for power center equipment If the equation holds true, the received power data from the user node is considered valid, and the power data is then stored in the blockchain to ensure that the power data is not tampered with.
[0100] In one embodiment, the blockchain-based power grid data processing method provided in this application further includes the following steps:
[0101] Step 207: When the target service node receives abnormal power data from the power center equipment, it uses the anonymous and revocable ring signature of the power data to determine the user node to which the power data belongs.
[0102] The target service node is any one of the service nodes in the set of service nodes.
[0103] In one implementation, step 207 includes the following steps:
[0104] S2071: When a power data anomaly occurs between a user node and the power center equipment, the target service node intervenes to trace the user node that performed the ring signature on the power data. For example, when the power center equipment believes that the received power data m belongs to user node uid... S But user node uid S The power data m is not considered to belong to the user node uid. S At this time, the target service node intervenes to track the user node that performs ring signature on the power data; for example, when the power center equipment believes that the received power data m does not belong to the user node uid. S But user node uid S It is assumed that the power data m belongs to the user node uid. S At that time, the target service node intervenes to trace the user node that performs ring signature on the power data. The target service node communicates with the user node via its UID. i Interact and calculate Get R i value;
[0105] s2072: The target service node obtains all l R i After determining the value, the equation e(R') is used for judgment. i P+B i )=e(R i Y i Whether the verification is true or false, the obtained l R values are: i The validity of the value. If the equation holds, then prove R. i The value is valid. The target service node verifies and confirms l R values. i After the value is valid, the target service node calculates... Finally, the equation e(R, P+B) is used.i ) = e(W, Y i The power data is traced to the user node to which it belongs, where W is a set of partial public keys of all user nodes in the user node identifier set.
[0106] In the blockchain-based power grid data processing method provided in this application embodiment, each service node jointly generates system public parameters. Based on these public parameters, each service node jointly generates partial key information and user secret share information. The smart grid platform sends the partial key information and user secret share information to the user nodes, and the user nodes generate keys based on these information. The user nodes perform ring signatures on the power data and send the ring-signed power data to the power center equipment. After verifying the validity of the ring signature on the received power data, the power center equipment stores the power data in the blockchain. When a power data dispute occurs between the user node and the power center equipment, the target service node can track the user node to which the power data belongs. Therefore, in this application embodiment, the user node performs ring signatures on the power data, and the power center equipment stores the ring-signed power data in the blockchain, thereby ensuring the security and tamper-proof nature of the power data. The target service node's ability to track the user node to which the power data belongs achieves the auditability of the power data.
[0107] Please see Figure 5 , Figure 5 This is a flowchart illustrating the data processing process in a smart grid system using a blockchain-based smart grid data processing method, as provided in an embodiment of this application. Specifically, it may include the following steps:
[0108] S501: All service nodes jointly generate common system parameters.
[0109] S502: Each service node generates its own public-private key pair and the public-private key pair of the smart grid platform.
[0110] S503: User nodes apply to the smart grid platform for a key.
[0111] S504: Each service node verifies whether the user node's identity information is valid. If it is valid, proceed to S505; otherwise, end the process.
[0112] S505: Each service node jointly generates partial key information for the user node.
[0113] S506: The smart grid platform sends the generated partial key information to the user nodes.
[0114] S507: The user node verifies the validity of some key information. If it is valid, proceed to step S508; otherwise, proceed to step S505.
[0115] S508: User nodes generate private keys.
[0116] S509: User nodes generate ring signatures for power data.
[0117] S510: The user node sends the ring signature to the power center device.
[0118] S511: The power center equipment verifies the validity of the ring signature. If it is valid, proceed to S512; otherwise, proceed to S513.
[0119] S512: The power center equipment stores power data to the blockchain and executes S514.
[0120] S513: Power center equipment discards power data.
[0121] S514: When a dispute arises between a user node and the power center equipment regarding power data, the target service node intervenes to determine the user node to which the power data belongs.
[0122] In one implementation, the process of the target service node intervening in S514 to determine the user node to which the power data belongs can be found in [reference needed]. Figure 6 S603-S604 in the middle, Figure 6 This is a schematic diagram of a process for revoking anonymity of a target service node according to an embodiment of this application, including the following steps:
[0123] S601: A power data dispute arises between the user node and the power center equipment.
[0124] S602: The target service node intervenes in arbitration.
[0125] S603: The target service node interacts with the user nodes of each ring signature to obtain R. i value.
[0126] S604: The target service node obtains R i After setting the value, verify R. i If the validity is verified, S605 is executed; otherwise, S603 is executed.
[0127] S605: The target service node determines the user node to which the power data belongs.
[0128] This application provides a data processing system for a blockchain-based smart grid. The system includes user nodes and a smart grid platform. The smart grid platform includes service nodes and power center equipment, with multiple service nodes forming a service node set.
[0129] The individual service nodes in the service node set are used to jointly generate common system parameters;
[0130] User nodes are used to send key acquisition requests to the smart grid platform;
[0131] If each service node in the service node set successfully authenticates the user node's identity information, then each service node is also used to jointly calculate partial key information and user secret share information, and the smart grid platform returns partial key information and user secret share information to the user node. The partial key information is generated based on the system's public parameters, and the user secret share information is generated based on the partial key information.
[0132] User nodes are also used to generate keys based on partial key information and user secret share information;
[0133] User nodes are also used to select a set of user node identifiers to generate a ring signature for power data, and send the ring-signed power data to the power center equipment. The set of user node identifiers includes node identifier information of multiple user nodes managed by the smart grid platform, including user nodes. The ring signature is generated based on system public parameters and the key of the user node.
[0134] The power center equipment is used to receive power data after ring signing, verify the validity of the ring signature of the received power data, and store the power data in the blockchain after successful verification.
[0135] In one implementation, each service node is further configured to jointly and randomly select a large prime number q, determine a multiplicative cyclic group G1 of order q and a multiplicative cyclic group G2 of order q based on the large prime number q, and determine the bilinear mapping e: G1×G1→G2.
[0136] In one implementation, each service node is also used to jointly select a hash function H1: {0, 1}. * →G1 and hash functions in, For a set of integers, The integers in the set are greater than 0 and less than q, and are relatively prime to q.
[0137] In one implementation, each service node is also used to jointly determine a threshold value t for generating the key of the user node, where t is a positive integer, greater than 1, and less than the number of service nodes in the set of service nodes.
[0138] In one implementation, each service node is also used to randomly select a polynomial f of order t-1. i (z)=f i0 +f i1 z+...+f i(t-1) z t-1 , where fi (0)=f i0 =s i , where s i Let z be the master key share of the i-th service node in the set of service nodes, where i represents the i-th service node in the set of service nodes, and z is the independent variable in the polynomial.
[0139] In one implementation, each service node is also used to calculate and broadcast the coefficient value F. ik =f ik The value of P, where k = 1, 2, ..., t-1, P is a generator of G1, f ik These are the coefficients of the polynomial for each service node.
[0140] In one implementation, the i-th service node aid i , used to calculate the aid of the i-th service node i secret share ii =f i (aid i ), and save s ii service node aid i It is also used to calculate the secret share s of the remaining service nodes in the service node set. ij =f i (aid j ), where j = 1, 2, ..., i-1, i+1, ..., n, and n is the number of service nodes in the service node set, aid i Aid is the identity identifier of the i-th service node in the set of service nodes. j For the set of service nodes excluding service node aid i Identification of service nodes other than those mentioned above.
[0141] In one implementation, the service node aid i It is also used to calculate the service node's aid when it is determined that the received secret shares sent by n-1 other service nodes are valid. i Master key share sk i and public key share PK i .
[0142] In one implementation, each service node in the service node set is used to select t service nodes' public key shares to calculate and generate the master public key P. pub :
[0143]
[0144] Where s is the master key of the smart grid platform, and Ω is the set of t service nodes that meet the requirements for generating the master public key.
[0145] In one implementation, each service node is also used to jointly disclose the system parameter params as follows:
[0146]
[0147] in, It is a set of identity information for n service nodes.
[0148] In one implementation, the i-th user node uid i Used to generate the uid of the i-th user node based on t valid user secret share information. i Part of the private key, uid i This is the identity identifier of the i-th user node.
[0149] In one implementation, the user node uid i It is also used to select a random number x. i Based on the random number x i Generate user node uid with part of the private key i The private key, based on the random number x i The user node uid is generated from P and partial key information. i The public key is broadcast, along with the user node's uid. i identity identifier UID i x i Represents the uid of the i-th user node. i The random number chosen when generating the key.
[0150] In one implementation, the S-th user node uid is used in the user node identifier set. s Used to select a random number r i Random number u i Based on the random number r i Random number u i P, partial key information of the user node, H2, user node uid s Power data m, user node uid s The random number x selected when generating the key S Calculation of public key for user nodes:
[0151] U i =u i P(i=1,2,...,l,i≠S),
[0152] R i =r i (P+B i (i = 1, 2, ..., l),
[0153] R' i =r i Y i (i = 1, 2, ..., l),
[0154]
[0155] h i =H2(m||U i ||R||L)(i=1,2,...,l,i≠S),
[0156] Among them, U i Let R be the point in G1 corresponding to the i-th user node in the user node identifier set. i R' is a partial public key of the i-th user node in the user node identifier set. i To blind the public key of the i-th user node in the user node identifier set, R is the signature of the user node on the set of public keys of all user nodes in the user node identifier set, h i Let be the hash value of the power data of the i-th user node in the user node identifier set, L be the user node identifier set, l be the number of user nodes in the user node identifier set, and uid be the hash value of the power data of the i-th user node in the user node identifier set. s B is the identity identifier of the S-th user node in the user node identifier set. i Y represents partial key information for the i-th user node in the user node identifier set. i Let i be the public key of the i-th user node in the user node identifier set.
[0157] In one implementation, the user node uid s It is also used to select a random number u. S According to u S User node uid s Partial key information, U i h i And the user node identifier set excluding user node uid s The public key of the user node other than U is used to obtain U. S U S Let U be the user node on G1, and U S Unlike the user node identifier set, which includes the user node uid s Other points,
[0158] In one implementation, the user node uid s It is also used in U i ≠U S At that time, according to H2, m, U Sh is calculated using R and the set of user node identifiers. S And used according to h S User node uid s Private key information, master public key P pub Random number u S and user node uid s The partial private key calculation includes a signature parameter D in the form of the master key s, where h S For the user node uid s The hash value of the electricity data.
[0159] In one implementation, the user node uid s It is also used to generate ring signatures for power data σ=(m,U1,U2,...,U z R'1, R'2, ..., R' l (R, D, L), and send the power data with ring signature to the power center equipment.
[0160] In one implementation, the user node uid is used as the reference. s The generated ring signature and user node uid s The power data m, the power center equipment, is used to determine the U in the H2, power data m, and ring signature. i h is calculated using R and the set of user node identifiers. i .
[0161] In one implementation, the power center equipment is further configured to, based on a bilinear mapping, master public key, and U... i h i The ring signature contains D, P, and the user node identifier set excluding the user node uid. s The user node's public key is used to determine the user node's UID. s Once the power data m is determined to meet the conditions, the power data m is stored in the blockchain.
[0162] In one implementation, the aforementioned blockchain-based power grid data processing system further includes:
[0163] The target service node is used to determine the user node to which the power data belongs by using the ring signature of the power data in the event of an anomaly in the power data received by the power center equipment.
[0164] In one implementation, when the target service node uses the ring signature of the power data to anonymously and revocably determine the user node to which the power data belongs, it specifically uses:
[0165] Based on the R' of the user node in the user node identifier set iThe user node's R is calculated using the random number selected when generating the key. i , where R' i To blind the public key of the i-th user node in the user node identifier set, R i For the i-th user node in the user node identifier set, use a portion of the public key.
[0166] In verifying the R of l user nodes in the user node identifier set. i When valid, according to l R i Calculate W, and determine the user node to which the power data belongs based on W, R, partial key information of the user node, and the public key of the user node, where W is a set containing partial public keys of all user nodes in the user node identifier set.
[0167] The embodiments of this application and the above-described method embodiments are based on the same concept and have the same technical effects. For the specific principles, please refer to the description of the above-described method embodiments, which will not be repeated here.
[0168] The above-disclosed embodiments are merely partial examples of the present invention and should not be construed as limiting the scope of the invention. Those skilled in the art will understand that all or part of the processes for implementing the above embodiments, and equivalent variations made in accordance with the claims of the present invention, still fall within the scope of the invention.
Claims
1. A data processing method for a blockchain-based smart grid, characterized in that, The method includes: The service nodes in the service node set jointly generate common system parameters, and the service node set includes multiple service nodes in the smart grid platform. The user node sends a key acquisition request to the smart grid platform; If each service node in the service node set successfully authenticates the identity information of the user node, then each service node jointly calculates partial key information and user secret share information, and the smart grid platform returns the partial key information and user secret share information to the user node. The partial key information is generated based on the system public parameters, and the user secret share information is generated based on the partial key information. The user node generates a key based on the partial key information and the user secret share information; The user node selects a set of user node identifiers to generate a ring signature for the power data, and sends the ring-signed power data to the power center equipment. The set of user node identifiers includes node identifier information of multiple user nodes managed by the smart grid platform, including the user node. The ring signature is generated based on the system public parameters and the user node's key. The power center equipment receives the power data after ring signing and verifies the validity of the ring signature of the received power data. After successful verification, the power data is stored in the blockchain.
2. The method according to claim 1, characterized in that, The service nodes in the service node set jointly generate common system parameters, including: Each service node jointly and randomly selects a large prime number q, and determines a multiplicative cyclic group G1 and a multiplicative cyclic group G2 of order q based on the large prime number q, and determines the bilinear mapping e: G1×G1→G2. The service nodes jointly select a hash function H1: {0, 1} * →G1 and hash function H2: Among them, the For a set of integers, the The integers in the set are greater than 0 and less than q, and are relatively prime to q; The service nodes jointly determine a threshold value t for generating the key of the user node, where t is a positive integer, greater than 1, and less than the number of service nodes in the service node set. Each service node randomly selects a polynomial f of order t-1. i (z)=f i0 +f i1 z+...+f i(t-1) z t-1 , where f i (0)=f i0 =s i , wherein the s i Let z be the master key share of the i-th service node in the set of service nodes, and z be the independent variable in the polynomial. Each service node calculates and broadcasts the coefficient value F. ik =f ik The value of P, where k = 1, 2, ..., t-1, P is the generator of G1, and f ik For each of the service nodes, these are the coefficients of their respective polynomials. The i-th service node aid i Calculate the aid of the i-th service node i secret share ii =f i (aid i ), and save the s ii The service node aid i Calculate the secret share s of the remaining service nodes in the set of service nodes. ij =f i (aid j ), where j = 1, 2, ..., i-1, i+1, ..., n, and n is the number of service nodes in the service node set, and aid i The aid is the identity identifier of the i-th service node in the set of service nodes. j For the set of service nodes excluding the service node aid i Identification of service nodes other than those mentioned above; The service node aid i When it is determined that the secret shares received from n-1 other service nodes are valid, the service node aid i Calculate the service node's aid i Master key share sk i and public key share PK i ; Each service node in the service node set selects the public key shares of the t service nodes to calculate and generate the master public key P. pub : Wherein, s is the master key of the smart grid platform, and Ω is the set of t service nodes that generate the master public key; The system parameters (params) jointly disclosed by each service node are as follows: Among them, the This is the set of identity information for the n service nodes.
3. The method according to claim 2, characterized in that, The user node generates a key based on the partial key information and the user secret share information, including: The i-th user node uid i Generate the i-th user node uid based on the t valid user secret share information. i Part of the private key, the uid i This is the identity identifier for the i-th user node; The user node uid i Choose a random number x i According to the random number x i The user node uid is generated using the aforementioned partial private key. i The private key, based on the random number x i The user node uid is generated by the P and the partial key information. i The public key is given, and the public key and the user node uid are broadcast. i identity identifier UID i The x i Represents the uid of the i-th user node. i The random number selected when generating the key, the 4. The method according to claim 3, characterized in that, The user node selects a set of user node identifiers to generate a ring signature for the power data, and then sends the ring-signed power data to the power center equipment, including: The S-th user node in the user node identifier set, uid s Select a random number r i Random number u i According to the random number r i The random number u i The P, the partial key information of the user node, the H2, and the user node uid s The power data m, the user node uid s The random number x selected when generating the key S And the calculation of the public key of the user node: IN i =in i P(i=1,2,...,l,i≠S), R i =r i (P+B i )(i=1,2,...,l), R’ i =r i Y i (i=1,2,...,l), h i =H2(m||U i ||R||L)(i=1,2,...,l,i≠S), Wherein, the U i R is the point in G1 corresponding to the i-th user node in the user node identifier set. i R' is a partial public key of the i-th user node in the user node identifier set. i To blind the public key of the i-th user node in the user node identifier set, R is the signature of the user node on the public key set of all user nodes in the user node identifier set, and h i The hash value of the power data of the i-th user node in the user node identifier set, where L is the user node identifier set, l is the number of user nodes in the user node identifier set, and uid is the hash value of the power data of the i-th user node in the user node identifier set. s B is the identity identifier of the S-th user node in the user node identifier set. i Y is the partial key information of the i-th user node in the user node identifier set. i The public key of the i-th user node in the user node identifier set, the The The user node uid s Choose a random number u S According to the u S The user node uid s Partial key information, the U i The h i And the user node identifier set excluding user node uid s The public key of the user node other than U is used to obtain U. S The U S The user node is a point on G1, and the U S Unlike the user node identifier set, which includes user node uid s Other than the points mentioned The user node uid s In the U i ≠U S At that time, according to the H2, the m, and the U S The R and the user node identifier set are used to calculate h. S and according to the h S The user node uid s The private key information, the master public key P pub The random number u S and the user node uid s The partial private key calculation includes a signature parameter D in the form of the master key s, where h S For the user node uid s The hash value of the power data; The user node uid s Generate a ring signature σ = (m, U1, U2, ..., U...) for the power data. l R'1, R'2, ..., R' l , R, D, L), and send the power data with ring signature to the power center device.
5. The method according to claim 4, characterized in that, The power center equipment receives power data that has undergone ring signing, verifies the validity of the ring signature of the received power data, and, upon successful verification, stores the power data in the blockchain, including: For the user node uid s The generated ring signature and the user node uid s The power data m, the power center equipment based on the H2, the power data m, and the U in the ring signature i The R and the user node identifier set are used to calculate h. i ; The power center equipment, based on the bilinear mapping, the master public key, and the U... i The h i The ring signature's D, the P, and the user node identifier set excluding the user node's uid. s The user node's public key is used to determine the user node's uid. s Once the power data m is determined to meet the conditions, the power data m is stored in the blockchain.
6. The method according to claim 5, characterized in that, The method further includes: When the power data received by the power center equipment is abnormal, the target service node uses the ring signature of the power data to determine the user node to which the power data belongs using anonymous and revocable methods. The target service node is any one of the service nodes in the set of service nodes.
7. The method according to claim 6, characterized in that, The ring signature of the power data utilizes anonymous and revocable methods to determine the user node to which the power data belongs, including: The target service node is determined based on the R' of the user node in the user node identifier set. i The R of the user node is calculated using the random number selected when the user node generates the key. i ; The target service node verifies the R of l user nodes in the user node identifier set. i When valid, for the l R i The summation yields W. Based on W, R, the partial key information of the user node, and the public key of the user node, the user node to which the power data belongs is determined, wherein W is a set containing the partial public keys of all user nodes in the user node identifier set.
8. A data processing system for a blockchain-based smart grid, characterized in that, The system includes user nodes and a smart grid platform. The smart grid platform includes service nodes and power center equipment, with multiple service nodes forming a service node set; wherein: The individual service nodes in the service node set are used to jointly generate common system parameters; User nodes are used to send key acquisition requests to the smart grid platform; If each service node in the service node set successfully authenticates the identity information of the user node, then each service node is also used to jointly calculate partial key information and user secret share information, and the smart grid platform returns the partial key information and user secret share information to the user node. The partial key information is generated based on the system public parameters, and the user secret share information is generated based on the partial key information. The user node is also configured to generate a key based on the partial key information and the user secret share information; The user node is also configured to select a set of user node identifiers to generate a ring signature for the power data, and send the power data after ring signing to the power center equipment. The set of user node identifiers includes node identifier information of multiple user nodes managed by the smart grid platform, including the user node. The ring signature is generated based on the system public parameters and the key of the user node. The power center equipment is used to receive power data after ring signing, verify the validity of the ring signature of the received power data, and store the power data in the blockchain after successful verification.
9. The system according to claim 8, characterized in that, The system also includes: The target service node is used to determine the user node to which the power data belongs by using the ring signature of the power data when the power data received by the power center equipment is abnormal. The target service node is any one of the service nodes in the set of service nodes.
10. The system according to claim 9, characterized in that, When the target service node uses the ring signature of the power data to anonymously and revocably determine the user node to which the power data belongs, it is specifically used for: Based on the R' of the user node in the user node identifier set i The R of the user node is calculated using the random number selected when the user node generates the key. i , wherein, the R' i To blind the public key of the i-th user node in the user node identifier set, the R i This refers to a portion of the public key of the i-th user node in the user node identifier set. In verifying R of l user nodes in the user node identifier set i When valid, for the l R i The summation yields W. Based on W, R, the partial key information of the user node, and the public key of the user node, the user node to which the power data belongs is determined, wherein W is a set containing the partial public keys of all user nodes in the user node identifier set.