A disaster-tolerant and traceable smart meter data security aggregation method
Building a hierarchical security aggregation model for smart meter data through blockchain and cross-chain technology, combined with the Shamir sharing algorithm and group supervision method, solves the problems of security and abnormal node tracing in smart meter data aggregation, and improves the robustness of the system. and reliability, and realizes the tracing and accountability of malicious nodes.
Patent Information
- Application Number
- CN202111307823.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-05
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-11-05
AI Technical Summary
Existing smart meter data aggregation methods cannot take into account both data security and abnormal node tracing, and the system's robustness and reliability are insufficient under fault conditions, resulting in data aggregation failure and affecting power dispatch.
Blockchain technology and cross-chain technology are used to build a hierarchical security aggregation model for smart meter data. Shamir sharing algorithm is used to achieve redundant storage and recovery of private keys. Abnormal nodes are detected using group supervision methods, and abnormal information is recorded through the blockchain. Realize the traceability of malicious nodes and disaster recovery of faulty nodes.
It achieves fast and efficient aggregation of smart meter data and power dispatching, protects user privacy, improves the robustness and reliability of the system, can operate normally under fault conditions, and enables traceability and accountability of malicious nodes.
Smart Images

Figure CN114117515B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart grid data security assurance, and more specifically, to a disaster-tolerant and traceable smart meter data security aggregation method. Background Art
[0002] As one of the key metering components for collecting and reporting user electricity consumption information in smart grids, smart meters have been widely deployed around the world. In recent years, the detection of malicious meters for smart grids has received increasing attention. For example, machine learning and data mining methods such as support vector machines, genetic algorithms, and extreme learning machines are used to analyze meter data behavior; however, to achieve the subsequent traceability and accountability after the detection of malicious nodes, a reliable evidence storage system is needed to annotate and store malicious data, and a digital signature algorithm is needed to achieve data non-repudiation. This is a key link that is ignored by existing research and existing aggregation schemes after malicious meter detection.
[0003] In recent years, the problem of malicious meter detection for smart grids has received more and more attention. For example, machine learning and data mining methods such as support vector machines, genetic algorithms, and extreme learning machines are used to analyze meter data behavior; however, to achieve the subsequent traceability and accountability after the detection of malicious nodes, a reliable evidence storage system is needed to mark and store malicious data, and a digital signature algorithm is needed to achieve data non-repudiation. This is a key link that is ignored by existing research and existing aggregation schemes after malicious meter detection. Most existing schemes use homomorphic encryption technology to encrypt and aggregate the electricity consumption data uploaded by smart meters, which is used for monitoring and control by the control center. However, the private key of the control center may be abused, not only to decrypt the aggregated data, but also to leak the electricity consumption of other users. In addition, since smart meters are relatively low-cost devices, they are more prone to failure when running in an unprotected environment. Even if only one meter fails to report data, it will cause the encrypted data aggregated to the server to fail to decrypt, and ultimately lead to a large area or the entire system unable to complete data aggregation. Summary of the invention
[0004] The purpose of the present invention is to provide a disaster-tolerant and traceable smart meter data security aggregation method to solve the problem that it is difficult to balance the security aggregation of smart meter data and the exclusion and tracing of abnormal nodes in existing smart meter data aggregation methods.
[0005] The above technical objectives of the present invention are achieved through the following technical solutions:
[0006] A disaster-tolerant and traceable smart meter data security aggregation method, comprising:
[0007] Based on blockchain technology and cross-chain technology, a hierarchical security aggregation model for smart meter data is constructed, including a data generation layer and a data aggregation layer;
[0008] The data generation layer or the data aggregation layer is grouped, the local aggregation value of the nodes in a single group is solved, the abnormal nodes in the group are judged according to the local aggregation value, and the abnormal nodes are traced according to the judgment results of the abnormal nodes;
[0009] The Shamir sharing algorithm is used to divide the aggregate private key of each node into multiple components and redundantly store them in each node in the group. If a faulty node occurs, the aggregate private key component is used to restore the aggregate key component of the faulty node to achieve disaster recovery of smart meter data aggregation.
[0010] The existing scheme is applied in large-scale power grids, which requires regional division of the power grid and repeated application of data aggregation schemes, which will cause untimely information exchange between regions, resulting in scheduling delays; the present invention proposes a hierarchical aggregation model of smart meter data suitable for a multi-level, multi-aggregation center smart grid structure, so that the data of each aggregation center can be interoperable, and data aggregation and power scheduling can be completed quickly and efficiently. It is difficult for the existing aggregation scheme to balance user privacy protection and malicious user tracing. Dishonest users or malicious attackers confuse the public and report false data under the "protection" of data security aggregation, and use the untraceable characteristics of encrypted aggregation to avoid investigation; or network attackers tamper with meter measurement data and upload false data to the control center, resulting in the theft of power resources and disruption of normal power scheduling; the present invention proposes a group supervision method to detect abnormal meter nodes, and the detected abnormal information will be recorded in the blockchain to realize the tracing of malicious nodes. The existing aggregation scheme adopts the homomorphic encryption method, encrypts the power consumption data of each end node with a key, and uploads it to the aggregation node for decryption to obtain aggregated data. Once a node fails and causes the power consumption data to be lost during transmission, the aggregation node will fail to decrypt and will not be able to obtain the correct aggregated data, which directly affects the robustness and reliability of the aggregation scheme. The present invention proposes a new smart meter data aggregation algorithm that can tolerate the occurrence of node failures to a certain extent and improve the robustness and reliability of the aggregation system.
[0011] Furthermore, the smart meter acts as a data collection terminal to collect data and construct a data generation layer, and the data aggregation node aggregates the data collected by the data collection nodes step by step to construct a data aggregation layer.
[0012] Furthermore, each data aggregation node and the next-level data collection node or the next-level data aggregation node form a consortium blockchain, and the nodes between the data generation layer and the data aggregation layer or between the data aggregation layer and the data aggregation layer interact with each other through cross-chain technology to build a smart meter data transmission model.
[0013] Furthermore, a registry field is added to the block header of the alliance blockchain to store the address information of the slave chain. The slave chain publishes aggregated data and signature information to the superior data aggregation node through the gateway node, and subscribes to the superior's scheduling information.
[0014] Furthermore, the specific steps to implement abnormal node tracing are as follows:
[0015] The gateway node randomly groups the nodes of the data generation layer or the data aggregation layer;
[0016] The DH key negotiation algorithm is used to negotiate keys between two data collection nodes or data aggregation nodes in the group.
[0017] Solve the local aggregate value of each node in a single group in the blockchain, sum the local aggregate value of each node, and offset the summed aggregate value with the aggregate private key to obtain the global aggregate value in the group;
[0018] The gateway node determines the abnormal node status in the group based on the calculated local aggregation value, and determines whether to continue the grouping operation;
[0019] The aggregation node determines that a node in the sub-chain has abnormal behavior, and the nodes in the sub-chain perform recursive queries to trace the malicious nodes.
[0020] Furthermore, if there is only a single abnormal node in the group, the local aggregation values of the remaining nodes in the group will all be abnormal. The gateway node determines that this is an abnormal node based on the abnormal information reported by the remaining nodes. The gateway node determines that this group has converged and no longer performs random grouping operations.
[0021] Furthermore, if there are multiple abnormal nodes in the group, the local aggregation values of the remaining nodes in the group will all be abnormal. The gateway node cannot determine which node is the abnormal node based on the abnormal information reported by the remaining nodes. The gateway node determines that this group does not converge and needs to continue the random grouping operation.
[0022] Furthermore, if there is no abnormal node in the group, the local aggregation values of all nodes are normal, and the gateway node determines that the group has converged and does not continue to group.
[0023] Furthermore, the specific steps to achieve disaster recovery of smart meter data aggregation are as follows:
[0024] For each node in the group, the aggregate private key is obtained through intra-group negotiation. The aggregate private key is split into multiple sub-secrets using the Shamir sharing algorithm, and the sub-secrets are distributed to the remaining data nodes in the group.
[0025] A smart contract for monitoring faulty nodes is established in the blockchain composed of data collection nodes, and the gateway node calls the smart contract to determine whether any data node has failed;
[0026] If there is a faulty node, the smart contract is triggered to request the normal nodes in the group to recover the aggregate private key of the faulty node. The normal node checks the address information of the abnormal information. If it passes, it sends the abnormal node sub-secret to the gateway node. The gateway node runs the Shamir secret recovery algorithm to obtain the aggregate private key of the faulty node, thereby eliminating the impact of the faulty node and obtaining a normal global aggregate value.
[0027] Furthermore, it is determined whether the number of blockchain data reporting nodes in the group during the data aggregation period is less than the number of nodes in the group. If so, there is a faulty node.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] 1. The smart meter data security aggregation model proposed in the present invention is an aggregation model with a multi-level structure and a multi-receiver system model, which enables data from various aggregation centers to communicate with each other, and can quickly and efficiently complete data aggregation and power dispatching, and is more suitable for application in emerging smart grids.
[0030] 2. The group supervision technology proposed in the present invention, combined with the traceable and tamper-proof characteristics of blockchain, can not only protect the user's electricity usage privacy to the greatest extent, but also realize the tracing of malicious nodes.
[0031] 3. The present invention applies Shamir secret sharing technology to achieve disaster tolerance of meter data aggregation in smart grids. When a faulty node occurs, the influence of the faulty node can be eliminated by calling the smart contract deployed in the blockchain, thereby not affecting the data aggregation of normal nodes, thereby improving the robustness and reliability of the entire system. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0033] Figure 1 A method framework diagram provided for an embodiment of the present invention;
[0034] Figure 2 A hierarchical aggregation model for smart meter data provided by an embodiment of the present invention;
[0035] Figure 3 An improved block structure diagram provided for an embodiment of the present invention;
[0036] Figure 4 A smart meter data transmission model provided by an embodiment of the present invention;
[0037] Figure 5 A flow chart of group supervision provided by an embodiment of the present invention;
[0038] Figure 6 A diagram showing a group convergence process and abnormal node judgment structure in group supervision provided by an embodiment of the present invention;
[0039] Figure 7 A flowchart of abnormal node tracing provided by an embodiment of the present invention;
[0040] Figure 8 A flow chart of a smart contract for monitoring faulty nodes provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0042] It should be noted that when a component is referred to as being "fixed to" or "disposed on" another component, it can be directly on the other component or indirectly on the other component. When a component is referred to as being "connected to" another component, it can be directly or indirectly connected to the other component.
[0043] It should be understood that the orientation or position relationship indicated by terms such as "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0044] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0045] Example
[0046] like Figure 1 As shown, this embodiment provides a disaster-tolerant and traceable smart meter data security aggregation method, including:
[0047] Based on blockchain technology and cross-chain technology, a hierarchical security aggregation model for smart meter data is constructed, which includes a data generation layer and a data aggregation layer.
[0048] The data generation layer or the data aggregation layer is grouped, the local aggregation value of the nodes in a single group is solved, the abnormal nodes in the group are judged according to the local aggregation value, and the abnormal nodes are traced according to the judgment results of the abnormal nodes;
[0049] The Shamir sharing algorithm is used to divide the aggregate private key of each node into multiple components and redundantly store them in each node in the group. If a faulty node occurs, the aggregate private key component is used to restore the aggregate key component of the faulty node to achieve disaster recovery of smart meter data aggregation.
[0050] Specifically, Figure 1 As shown, a data hierarchical aggregation model for smart meters is proposed. Blockchain has the natural advantages of being tamper-proof and traceable, and cross-chain technology can realize data sharing among multiple alliance chains. In order to protect the privacy of on-chain data while taking into account reliability, this application establishes a hierarchical security aggregation model for smart meter data based on alliance chains as a framework for realizing data security aggregation in smart grids.
[0051] like Figure 1 As shown in the figure, it is necessary to trace malicious smart meter nodes and realize secure aggregation of smart meter data. First, the use of non-plaintext aggregation can ensure that attackers cannot tamper with the total power consumption. If the attacker reduces or increases the total power consumption, the control center will misestimate and schedule the power supply in the next stage, resulting in a mismatch between the actual power supply and the power demand, resulting in reduced system efficiency, resource waste or failure. Secondly, secure aggregation data prevents attackers from obtaining the data of a single user and obtaining user privacy through non-invasive load monitoring technology. However, the non-plaintext aggregation of data also makes it impossible to accurately locate the power consumption information of abnormal nodes, which makes it difficult to track the situation where malicious meters or attacked meters falsely report power consumption. In view of this, the smart meter nodes (data generation layer) or data aggregation nodes (data aggregation layer) are divided multiple times to form multiple groups, and the malicious nodes are determined by the intra-group supervision method after the groups converge. When a node in the group behaves abnormally, other nodes in the group will find the abnormality and package the abnormal information into the blockchain and upload it to the upper blockchain. Any dishonest behavior will be passed down layer by layer and permanently recorded in the blockchain, making it possible to trace and hold malicious nodes accountable.
[0052] like Figure 1As shown in the figure, the faulty smart meter is troubleshooted. When a node in the group aggregation fails and cannot report data, the aggregated private keys in the group cannot offset each other, which ultimately leads to the failure to complete data aggregation. The proposed smart grid data aggregation disaster recovery algorithm uses the Shamir sharing algorithm to divide the aggregated private key of each node into multiple components and store them redundantly in each node in the group. If a faulty node occurs, the smart contract is called to present the fault proof to the blockchain members. After the nodes in the faulty group detect the fault proof, they use the aggregated private key component to restore the aggregated key component of the faulty node, and the data aggregation can be completed normally.
[0053] Based on the above embodiments, in a further embodiment of the present application, Figure 2 As shown, the smart meter acts as a data collection terminal to collect data and build a data generation layer, and the data aggregation node aggregates the data collected by the data collection nodes step by step to build a data aggregation layer.
[0054] Specifically, Figure 2 As shown, Figure 2 SM stands for data collection node, AG stands for data aggregation node, and the hierarchical security aggregation model of smart meter data includes two types of nodes: smart meter nodes and data aggregation nodes. All smart meters are at the bottom of the smart grid hierarchical model and are terminal nodes in the smart grid. Most of them are installed in residential buildings and are responsible for collecting and reporting users' electricity consumption information. They are the main source of grid data, so the level where smart meters are located is called the "data generation layer".
[0055] The data aggregation node is an abstracted intermediate node with the function of "collection-regulation". The aggregation node includes entities such as aggregators, dispatch centers, and distribution facilities. The aggregator collects data reported by smart meter nodes or downstream aggregation nodes. This process is called "collection"; the aggregator aggregates the electricity consumption information and hands it over to the dispatch center at the same level. The dispatch center regulates the distribution facilities (power plants, distribution stations, and distribution rooms) according to the aggregation results to correctly distribute electricity to the lower-level nodes or adjust the distribution power and distribution lines. This process is called "regulation". All aggregation nodes together constitute the "data aggregation layer".
[0056] On the basis of the above embodiments, in a further embodiment of the present application, the next-level data collection node or the next-level data aggregation node of each data aggregation node forms a consortium blockchain, and the nodes between the data generation layer and the data aggregation layer or between the data aggregation layer and the data aggregation layer interact with each other through cross-chain technology to build a smart meter data transmission model.
[0057] Based on the above embodiments, in a further embodiment of the present application, Figure 4As shown in the figure, in the hierarchical security aggregation model of smart meter data, the data collection nodes under each data aggregation node (or the next-level data aggregation node) form a consortium chain, and the nodes between different levels interact with each other through cross-chain technology to obtain a smart meter data transmission model. From top to bottom, the nodes in each level of the network form multiple groups, and the upper-level nodes aggregate the data reported by the sub-chains of the chain in which they are located. In the smart meter data transmission model, the gateway node preset in the chain is responsible for cross-chain data transmission. The gateway node has strong communication, computing and storage capabilities, and is responsible for calculating the data aggregation calculations in this chain and monitoring abnormal nodes, and packaging the abnormal information to the blockchain at this level and reporting it to the upper-level blockchain.
[0058] like Figure 4 As shown, Figure 4 The SM nodes in the data generation layer form multiple alliance chains, of which the addresses of two chains are 0x101 and 0x102 respectively. Since the SM nodes are at the bottom layer, the slave chain address is null. The nodes named node1 and node2 are located in two blockchains respectively. The upper-level AG nodes together form multiple blockchains. The chain address shown in the figure is 0x201, and its slave chain is the address 0x101, 0x102 of the data generation layer blockchain... Assuming that both nodes node1 and node2 have abnormalities, the blockchain of the data generation layer will package the abnormal type EType and abnormal content EMsg when uploading the aggregate information and upload it to the upper-level blockchain 0x201 through the GW node. The blockchain with the address 0x201 continues to be sent to the upper level, so that each abnormal node can be accurately traced from top to bottom.
[0059] Based on the above embodiments, in a further embodiment of the present application, Figure 3 As shown, a registry field is added to the block header of the alliance blockchain to store the address information of the slave chain. The slave chain publishes aggregated data and signature information to the superior data aggregation node through the gateway node, and subscribes to the superior's scheduling information.
[0060] Specifically, the general form of alliance chain metadata only stores single chain information, that is, it does not support information transmission or collaboration between multiple chains, and it is also impossible to achieve data aggregation on the chain. In order to achieve data sharing between alliance chains, the present invention adds a registry field to the block header of the alliance blockchain to store the address information of the slave chain, and introduces the concept of master-slave chain. Based on this improvement, the slave chain relies on GW to publish aggregated data and signature information to the superior data aggregation node, and subscribes to the scheduling information of the superior node, realizing the master-slave chain collaboration and scheduling information sharing.
[0061] like Figure 3As shown, in order to realize cross-chain data transmission of alliance chain, the concept of master-slave chain is introduced in this embodiment, and registry information is added in the block header. The registry information includes the address Addr of this chain and the address SlaveAddr of the slave chain. A chain can have multiple slave chains, that is, multiple SlaveAddr. Such a "one master and multiple slaves" structure just meets the hierarchical security aggregation model of smart meter data. In order to realize the tracing of problem nodes in the process of meter data aggregation, the SM node or AG node needs to attach the transaction signature Sig (TX) and abnormal information EType and EMsg when packaging the transaction data TX into the blockchain. Among them, EType is the abnormal node type, including failed nodes (Fail) and malicious nodes (Evil); EMsg contains the node information where the abnormality occurs: if it is a failed node, EMsg includes the address of the chain where the abnormal node is located, and the block hash where the abnormal information is located; if it is a malicious node, EMsg also contains the transaction content sent by the malicious node.
[0062] Based on the above embodiments, in a further embodiment of the present application, Figure 5 and Figure 7 As shown in the figure, the specific steps to implement abnormal node tracing are as follows:
[0063] The gateway node randomly groups the nodes of the data generation layer or the data aggregation layer;
[0064] The DH key negotiation algorithm is used to negotiate keys between two data collection nodes or data aggregation nodes in the group.
[0065] Solve the local aggregate value of each node in a single group in the blockchain, sum the local aggregate value of each node, and offset the summed aggregate value with the aggregate private key to obtain the global aggregate value in the group;
[0066] The gateway node determines the abnormal node status in the group based on the calculated local aggregation value, and determines whether to continue the grouping operation;
[0067] The aggregation node determines that a node in the sub-chain has abnormal behavior, and the nodes in the sub-chain perform recursive queries to trace the malicious nodes.
[0068] Specifically, Figure 5 As shown, Figure 5 The flowchart of group supervision is shown in Figure 1. The first step is random grouping. The gateway node randomly generates the number of group nodes, records the number of nodes in each group as k, and broadcasts the group information to all data collection nodes. Since the abnormal node collects the terminal smart meter, assuming that the number of data collection nodes in the chain is n, the final automatic grouping of these n nodes according to the group information generated by the GW is as follows:
[0069]
[0070] In the above formula, represents the group number, and the right side of the equation represents the number of the actual SM in the group. It can be seen that if the number of data acquisition nodes n cannot be divided by k, the redundant data acquisition nodes will be grouped into the last group. Therefore, when grouping, we should try to ensure that the number of data acquisition nodes in the last group is not too different from that of other groups.
[0071] The second step is the intra-group key negotiation. In each group, different SM nodes generate keys through a key exchange protocol as the key for encrypting the data reported by the data collection node. If a node joins a group of k nodes, it generates a secret value a for itself and calculates g a modM, where M is the DH parameter. Through the Diffie-Hellman key exchange algorithm, any two paired nodes can calculate a key of the form g a The key of modM is called the aggregate private key component. After local aggregation of each group, the aggregate private keys are guaranteed to cancel each other out. Therefore, the aggregate private key component negotiated by any two nodes through DH key is guaranteed to be 0. The aggregate private key of a single node is the sum of all aggregate private key components negotiated by this node and other nodes. It should be noted here that after the negotiation, one party must invert the key to ensure that the sum of the keys of both parties is 0.
[0072] Matrix M G It represents the aggregated private key components held by the members of group G (assuming that the number of data collection points in G is k) after completing the intra-group key negotiation.
[0073]
[0074] represents the aggregate private key component negotiated between the mth node and the nth node in group G. And satisfies Based on this matrix, the aggregate private key of each node can be calculated by summing each row of data:
[0075]
[0076] Where ind(G)∈{1,2,…k} represents the number of the node in group G.
[0077] The third step is to determine the convergence of the group. Before this, the aggregation value of the smart meter node needs to be calculated. Assume that the local aggregation values of the k data collection nodes in the group are:
[0078]
[0079] In the formula Indicates the encrypted power consumption value of a single node. This local aggregate value is the sum of the encrypted power consumption data of all nodes in the group except itself. Normal nodes compare this aggregate value with the estimated value to determine whether there are abnormal nodes in their group.
[0080] In order to provide a basis for judging abnormal nodes, the following assumptions need to be made. Assumption 1: For a certain user, the power consumption data is continuous in two consecutive sufficiently long time periods (such as one month); Assumption 2: The power consumption estimate of a certain group can be obtained based on statistical data; Assumption 3: The group size k ensures that only one SM node in the same group will be abnormal.
[0081] According to the assumption, the judgment criteria of abnormal nodes can be determined: if it is the first time to aggregate data, (based on assumption 2) the administrator sets the power consumption estimate and alarm threshold of the group to which GW belongs based on the statistical data; if it is not the first time to aggregate data, (based on assumption 1) the GW calculates the new power consumption estimate and alarm threshold based on historical data. Assume that the historical local aggregation value of the data collection node numbered ind(G) in group G has been obtained, and the value is H ind(G) , and assume that the alarm threshold is δ ind(G) ,(δ>0).
[0082] All nodes in the group use the aggregated private key to encrypt the power consumption data to obtain And broadcast to other nodes in the group:
[0083]
[0084] At the same time, each node calculates the local aggregate value of the group after receiving the broadcast data from other k-1 nodes. This local aggregate value does not include its own node data and is used for abnormal judgment. Finally, k groups of local aggregate data are obtained:
[0085]
[0086] The following explains how to get the global aggregate value from the local aggregate value. Now sum up all the local aggregate values to get After the aggregate private key is offset, This makes it easy to get the global aggregate value within the group Among them U i Represents the actual unencrypted power consumption of node i. The above is the global aggregate value of a group in the blockchain, and the aggregate value of the entire blockchain is the sum of the global aggregate values of all groups.
[0087] The method of calculating the global aggregate value from the local aggregate value is:
[0088]
[0089] That is, the sum of the power consumption of all nodes. The data uploaded to the gateway node is the aggregation of all group data:
[0090]
[0091] According to the calculation of the above local aggregate value, the gateway node determines the abnormal node situation in the group according to the calculated local aggregate value, and determines whether to continue to perform the grouping operation. The judgment conditions are as follows:
[0092]
[0093] The fourth step is to trace abnormal nodes. Since the data aggregation node receives the aggregated data uploaded by the lower-level gateway node, it will be difficult to hold a malicious node accountable once it appears, which will affect the data aggregation of the entire group and the upper-level group, and ultimately disrupt the accuracy of power dispatch.
[0094] Based on the traceability and non-tamperability characteristics of blockchain, the blockchain nodes at the data generation layer and the data aggregation layer will attach the node private key signature and exception information when sending aggregated information. This not only ensures the legitimacy of the identity of the data sender, but also makes it impossible for the node to deny the data it has sent.
[0095] Since the gateway node receives the aggregated data uploaded by the lower-level gateway node, it is difficult to hold the malicious node accountable once it appears, which may affect the data aggregation of the entire group and the upper-level group, and ultimately disrupt the accuracy of power dispatch. Therefore, combined with the traceability and non-tamperability of blockchain, the blockchain nodes of the data generation layer and the data aggregation layer will attach the node private key signature and abnormal information when sending the aggregated information. This not only ensures the legitimacy of the identity of the data sender, but also makes it impossible for the node to deny the data it has sent. Figure 7 As shown, Figure 7 This is a flowchart for tracing abnormal nodes. If the aggregation node detects abnormal information, it can determine that a node in its sub-chain has abnormal behavior. The sub-chain node can continue to recursively query downward according to the private key signature and abnormal information until the malicious node is located.
[0096] Based on the above embodiments, in a further embodiment of the present application, Figure 6 As shown, if there is only a single abnormal node in the group, the local aggregation values of the remaining nodes in the group will be abnormal. The gateway node determines that this is an abnormal node based on the abnormal information reported by the remaining nodes. The gateway node determines that this group has converged and no longer performs random grouping operations.
[0097] Specifically, Figure 6 As shown, Figure 6Part ② is a single abnormal node group supervision. Assume that there are four data collection nodes A, B, C, and D in group G. When the power consumption of A is abnormal, the local convergence values of the three nodes B, C, and D will be abnormal. The GW node can determine that node A is abnormal based on the abnormal information reported by B, C, and D. In this case, the malicious node can be determined as group convergence, and no group operation is performed, and the global aggregation value calculation is performed.
[0098] Based on the above embodiments, in a further embodiment of the present application, Figure 6 As shown in the figure, if there are multiple abnormal nodes in a group, the local aggregation values of the remaining nodes in the group will all be abnormal. The gateway node cannot determine which node is the abnormal node based on the abnormal information reported by the remaining nodes. The gateway node determines that this group does not converge and needs to continue the random grouping operation.
[0099] Specifically, Figure 6 As shown, Figure 6 Part ① is a group supervision of multiple abnormal nodes. Assuming that there are four data collection nodes A, B, C, and D in group G, and the power consumption of nodes A and D is abnormal, the local convergence values of all nodes will be abnormal. The gateway node cannot determine which specific node has an abnormality based on the abnormal information reported by all nodes. In this case, it is determined that the bit grouping does not converge, and it is necessary to continue the grouping operation and execute the random grouping in the above embodiment.
[0100] On the basis of the above-mentioned embodiments, in a further embodiment of the present application, if there is no abnormal node in the group, the local aggregation values of all nodes are normal, and the gateway node determines that the group has converged and does not continue the grouping.
[0101] Specifically, when there is no abnormal node in the group, the convergence values of all nodes are normal, and the gateway node determines that the group is convergent and does not continue the grouping.
[0102] On the basis of the above embodiment, in a further embodiment of the present application, the specific steps of implementing disaster recovery of smart meter data aggregation are as follows:
[0103] For each node in the group, the aggregate private key is obtained through intra-group negotiation. The aggregate private key is split into multiple sub-secrets using the Shamir sharing algorithm, and the sub-secrets are distributed to the remaining data nodes in the group.
[0104] A smart contract for monitoring faulty nodes is established in the blockchain composed of data collection nodes, and the gateway node calls the smart contract to determine whether any data node has failed;
[0105] If there is a faulty node, trigger the smart contract to request the normal nodes in the group to recover the aggregated private key of the faulty node. The normal nodes check the address information of the abnormal information. If it passes, send the sub-secret of the abnormal node to the gateway node. The gateway node runs the Shamir secret recovery algorithm to obtain the aggregated private key of the faulty node, thereby eliminating the influence of the faulty node and obtaining the normal global aggregated value.
[0106] Specifically, the implementation of the disaster tolerance for smart meter data aggregation includes three steps: the first step is the calculation and distribution of the aggregated private key, the second step is to monitor the smart contract process of the faulty node, and the third step is to exclude the smart contract process of the faulty node.
[0107] In the first step, the basic idea of the Shamir threshold secret sharing scheme is to divide the secret s into n shares s1, s2,..., s n , and satisfy that any t or more than t s i can calculate s; any less than or equal to t-1 s i cannot calculate s.
[0108] Suppose there are k SM nodes in the group G, and the aggregated private key of the node numbered ind(G) is ASK ind(G) . After the node obtains the aggregated private key through in-group negotiation, it runs the Shamir threshold secret sharing algorithm to split the aggregated private key into multiple sub-secrets. The specific calculation process is as follows:
[0109] First, set the secret recovery threshold t = N th , (1 < N th < k), select a large prime number p, randomly select coefficients a t-1 , a t-2 , …, a1, and let a0 = ASK ind(G) . Construct a polynomial of degree t-1 over GF(p):
[0110] f(x) = a t-1 x t-1 + a t-2 x t-2 + … + a1x + a0 mod p
[0111] Select n non-zero and distinct x1, x2, …, x n in GF(p), let j = 1, 2, …, k, and calculate
[0112]
[0113] and make x1, x2, …, x n and p public, and send to other SM nodes in the group.
[0114] In the second step, the smart contract is essentially a program that realizes the automated processing of traditional contracts in the form of computer instructions. Smart contracts can trigger the execution of a piece of code logic when both parties send and receive transactions on the blockchain, and can receive and store information, as well as send information to the outside. In the blockchain, smart contracts can be regarded as a trusted entity, which will always operate according to the logic specified in the contract. By deploying a monitoring smart contract in the blockchain network composed of data collection nodes, the gateway node can call this contract regularly to determine whether any data collection node has failed.
[0115] Assuming that abnormal information is received in group G, the smart contract will be triggered to request the normal nodes in G to restore the aggregate private key of the abnormal node c. The normal node will check whether the signature of the abnormal information is the legal signature of the gateway node. If the check passes, the secret fragment of the aggregate private key of the abnormal node will be sent to the gateway node. The gateway node gets t secret shards Then run Shamir's secret recovery algorithm:
[0116]
[0117] Substituting x=0 into the above formula, we can obtain the aggregate private key of the failed node: f(0)=a0=ASK c With the aggregated private key of the faulty node, the influence of the faulty node can be eliminated and the aggregated power value of the normal node can be obtained:
[0118]
[0119] Based on the above embodiments, in a further embodiment of the present application, Figure 8 As shown, it is determined whether the number of blockchain data reporting nodes in the group during the data aggregation period is less than the number of nodes in the group. If so, there is a faulty node.
[0120] Specifically, Figure 8 As shown, the data aggregation cycle is T. Assuming that the number of times k' of group G reporting data is less than k within the period T, the abnormal information is broadcast to the group. Assuming that the node numbered c is abnormal, data aggregation cannot be completed normally. At this time, the reported value of k' (k'=k-1) normal nodes in the group is:
[0121]
[0122] Finally, we get k' groups of aggregated data:
[0123]
[0124] The global aggregate value of group G is:
[0125]
[0126] It can be seen that due to the missing data of node c, the aggregated private key within the group cannot be offset, resulting in the inability to calculate the final aggregation result normally.
[0127] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A disaster-tolerant and traceable smart meter data security aggregation method. It is characterized in that include, Based on blockchain technology and cross-chain technology, a hierarchical security aggregation model for smart meter data is constructed, including a data generation layer and a data aggregation layer; The data generation layer or the data aggregation layer is grouped, the local aggregation value of the nodes in a single group is solved, the abnormal nodes in the group are judged according to the local aggregation value, and the abnormal nodes are traced according to the judgment results of the abnormal nodes; the specific steps to trace the abnormal nodes are as follows: The gateway node randomly groups the nodes of the data generation layer or the data aggregation layer; the DH key negotiation algorithm is used to negotiate keys for the data collection nodes or data aggregation nodes in the group; the local aggregation value of each node in a single group in the blockchain is solved, the local aggregation value of each node is summed, and the summed aggregation value is offset by the aggregation private key to obtain the global aggregation value in the group; the gateway node judges the abnormal node situation in the group according to the calculated local aggregation value, and determines whether to continue the grouping operation; the aggregation node determines that a node in the subchain has abnormal behavior, and the nodes in the subchain perform recursive queries to trace malicious nodes; The Shamir sharing algorithm is used to divide the aggregate private key of each node into multiple components and store them redundantly in each node in the group. If a faulty node occurs, the aggregate private key component is used to restore the aggregate key component of the faulty node to achieve disaster recovery of smart meter data aggregation. The specific steps to achieve disaster recovery of smart meter data aggregation are as follows: obtain the aggregated private key for a single node in the group through intra-group negotiation, use the Shamir sharing algorithm to split the aggregated private key into multiple sub-secrets, and distribute the sub-secrets to the remaining data nodes in the group; establish a smart contract for monitoring faulty nodes in the blockchain composed of data collection nodes, and the gateway node calls the smart contract to determine whether there is a data node failure; if there is a faulty node, trigger the smart contract to request the normal node in the group to recover the aggregated private key of the faulty node, the normal node checks the address information of the abnormal information, and if it passes, sends the abnormal node sub-secret to the gateway node, the gateway node runs the Shamir secret recovery algorithm to obtain the aggregated private key of the faulty node, and then eliminates the influence of the faulty node to obtain a normal global aggregation value; wherein; determine whether the number of blockchain data reporting nodes in the group during the data aggregation period is less than the number of nodes in the group, if less, there is a faulty node.
2. A disaster-tolerant and traceable smart meter data security aggregation method according to claim 1, It is characterized in that Smart meters act as data collection terminals to collect data and build a data generation layer, and data aggregation nodes aggregate the data collected by data collection nodes step by step to build a data aggregation layer.
3. A disaster-tolerant and traceable smart meter data security aggregation method according to claim 2, It is characterized in that The next level data collection node or the next level data aggregation node of each data aggregation node forms a consortium blockchain. The nodes between the data generation layer and the data aggregation layer or between the data aggregation layer and the data aggregation layer interact with each other through cross-chain technology to build a smart meter data transmission model.
4. A disaster-tolerant and traceable smart meter data security aggregation method according to claim 3, It is characterized in that A registry field is added to the block header of the alliance blockchain to store the address information of the slave chain. The slave chain publishes aggregated data and signature information to the superior data aggregation node through the gateway node and subscribes to the superior's scheduling information.
5. A disaster-tolerant and traceable smart meter data security aggregation method according to claim 1, It is characterized in that If there is only a single abnormal node in the group, the local aggregation values of the remaining nodes in the group will all be abnormal. The gateway node determines that this is an abnormal node based on the abnormal information reported by the remaining nodes. The gateway node determines that this group has converged and no longer performs random grouping operations.
6. A disaster-tolerant and traceable smart meter data security aggregation method according to claim 1, It is characterized in that If there are multiple abnormal nodes in a group, the local aggregation values of the remaining nodes in the group will all be abnormal. The gateway node cannot determine which node is the abnormal node based on the abnormal information reported by the remaining nodes. The gateway node determines that this group does not converge and needs to continue the random grouping operation.
7. A disaster-tolerant and traceable smart meter data security aggregation method according to claim 1, It is characterized in that If there is no abnormal node in the group, the local aggregation values of all nodes are normal, and the gateway node determines that the group has converged and will not continue grouping.
Citation Information
Patent Citations
Security distributed aggregation and access system and method based on fog alliance chain
CN111372243A
Method and system for de-anonymization by combining blockchain and secret sharing
WO2020143246A1
