Smart grid security data aggregation method and system based on block chain technology
By employing dynamic mask generation, backtracking correction, and credibility reconstruction strategies, combined with node combinations, the security and efficiency issues in smart grid data transmission have been resolved, achieving efficient and reliable data transmission and storage, and improving the security and real-time performance of grid data.
Patent Information
- Application Number
- CN202511773160.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-02-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing blockchain-based smart grid data aggregation solutions have shortcomings in terms of security and data transmission efficiency. In particular, the risk of data loss or tampering increases in high-interference or high-attenuation environments. Furthermore, they lack multi-node joint repair and dynamic assessment mechanisms for the credibility of abnormal nodes, which affect the real-time performance and reliability of the data.
A dynamic mask generation strategy is adopted, combined with backtracking correction, credibility reconstruction and node combination strategies. Electricity consumption data is transmitted through wireless communication, the transmission frequency is dynamically adjusted, abnormal nodes are identified and corrected, credibility is dynamically evaluated, and data is jointly transmitted on multiple routes and stored using blockchain technology.
It improves the security and reliability of data transmission, reduces the risk of data loss and tampering, improves transmission efficiency and stability, ensures the real-time and reliability of power grid data, and avoids resource waste and load imbalance.
Smart Images

Figure CN121584880A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of power grid security data aggregation, in particular to an intelligent power grid security data aggregation method and system based on a blockchain technology. BACKGROUND
[0002] The intelligent power grid security data aggregation method based on the blockchain technology can ensure the security and integrity of the power consumption data in the power grid. The tamper-proof and decentralized characteristics of the blockchain can effectively prevent the power consumption data from being maliciously tampered with during transmission and storage, and improve the credibility of the data through a multi-node consensus mechanism to ensure data tracing and abnormal tracking.
[0003] The existing intelligent power grid data aggregation scheme based on the blockchain has obvious deficiencies in security and data transmission efficiency. First, the existing technology usually adopts a single encryption and authentication method during data transmission, lacks a dynamic masking strategy, and is difficult to adapt to the wireless communication characteristics in different environments, resulting in an increased risk of data loss or tampering in high-interference or high-attenuation environments. Secondly, the existing technology often uses a fixed threshold and a static evaluation strategy when detecting abnormal nodes, which cannot adapt to the dynamic changes of node states, resulting in normal nodes being misjudged as abnormal or abnormal nodes not being detected for a long time. Thirdly, the existing scheme often uses single-node repair or single-path retransmission in the transmission of abnormal data repair process, which is low in efficiency and easy to be exploited by malicious nodes. Especially in the scene of multiple routes parallel transmission, the existing technology lacks a multi-node joint repair and abnormal node credibility dynamic evaluation mechanism, which cannot ensure the multiple verification and rapid recovery of the transmission data, thereby affecting the real-time and reliability of the intelligent power grid data.
[0004] The present application provides an intelligent power grid security data aggregation method and system based on a blockchain technology, which introduces dynamic masking, backtracking correction, credibility reconstruction and node combination strategies to construct an intelligent power grid security data aggregation mechanism based on a blockchain. SUMMARY
[0005] The present application provides an intelligent power grid security data aggregation method and system based on a blockchain technology, which introduces dynamic masking, backtracking correction, credibility reconstruction and node combination strategies to construct an intelligent power grid security data aggregation mechanism based on a blockchain.
[0006] The present application provides the following technical scheme: an intelligent power grid security data aggregation method based on a blockchain technology, comprising:
[0007] Acquiring power consumption data collected by a monitoring sensor in an intelligent power grid, and transmitting the power consumption data using wireless communication, specifically:
[0008] Dividing 24 hours a day into 24 time periods in units of hours;
[0009] The temperature and humidity of each period are measured by using a temperature and humidity sensor.
[0010] For any route of wireless communication:
[0011] A mask generation strategy is executed to predict the influence of the temperature and humidity of the next period on the transmission of the power consumption data, and a mask is generated.
[0012] The power consumption data is compressed and encoded into transmission data.
[0013] The transmission frequency is dynamically adjusted according to the mask, and the transmission data is sent to the receiving node of the line, and the receiving node judges whether the transmission data is abnormal.
[0014] The receiving node is used to receive the transmission data, and is connected to multiple routes.
[0015] When the transmission data is abnormal:
[0016] A backtracking correction strategy is executed to correct the abnormal transmission data and identify the node causing the abnormal transmission data to obtain an abnormal node.
[0017] A credibility reconstruction strategy is executed to dynamically evaluate the credibility of the abnormal node.
[0018] A credibility threshold is set.
[0019] If the credibility of the abnormal node is greater than or equal to the credibility threshold, the abnormal node returns to normal.
[0020] If the credibility of the abnormal node is less than the credibility threshold, a node combination strategy is executed to combine multiple abnormal nodes for joint transportation of the transmission data.
[0021] The transmission data is packaged and stored based on blockchain technology.
[0022] Preferably, the mask generation strategy is executed to predict the influence of the temperature and humidity of the next period on the transmission of the power consumption data, and the mask is generated, comprising:
[0023] The transmission distance d of the route is obtained.
[0024] The transmission frequency f of the current period is obtained.
[0025] A standard temperature And a standard humidity ;
[0026] The humidity of the next period history is obtained, and the average is calculated, which is recorded as the average humidity of the next period ;
[0027] The temperature of the next period history is obtained, and the average is calculated, which is recorded as the average temperature of the next period ;
[0028] Let the mask of the next period be a predicted mask , the predicted mask is calculated, specifically:
[0029] , wherein, is the speed of light, represents a spatial attenuation model, which describes the natural attenuation of the transmission data with the increase of distance and frequency in the unobstructed space, is a correction coefficient, which represents the influence of temperature and humidity on the spatial attenuation model;
[0030] The formula for calculating is: , wherein, is a set temperature correction coefficient, is a set humidity correction coefficient, which represents the degree of influence of each degree of temperature or each unit of humidity change on the spatial attenuation model.
[0031] Preferably, the sending frequency is dynamically adjusted according to the mask, and the transmission data is sent to the receiving node of the line, and the receiving node judges whether the transmission data is abnormal, comprising:
[0032] Set the maximum mask ;
[0033] Calculate , which represents the proportion of the predicted mask to the maximum mask;
[0034] Calculate , and the result is the sending frequency of the next period;
[0035] When increases, the sending frequency of the next period decreases;
[0036] When decreases, the sending frequency of the next period increases;
[0037] The receiving node is used for receiving transmission data on the line;
[0038] Obtain the transmission data actually received by the receiving node, and decompress the transmission data, wherein the decompressed transmission data includes power consumption data and an actual mask generated by actual transmission, denoted as an actual mask;
[0039] Set an error threshold;
[0040] Calculate |predicted mask-actual mask|, and the result is denoted as a mask error, wherein the symbol || is an absolute value;
[0041] Compare the mask error with the error threshold, if the mask error is less than the error threshold, the transmission data is normal;
[0042] If the mask error is greater than or equal to the error threshold, the transmitted data is abnormal.
[0043] Preferably, the execution of the backtracking correction strategy, correcting the abnormal transmission data, and identifying the nodes that caused the abnormal transmission data, to obtain the abnormal nodes, includes:
[0044] Record the route where the abnormal data is transmitted as the abnormal route;
[0045] The abnormal route contains multiple nodes, which are divided into starting nodes and intermediate nodes;
[0046] Calculate the anomaly rate for each node, specifically as follows:
[0047] The historical number of abnormal data transmissions by statistical nodes is recorded as the number of abnormalities.
[0048] The total number of times data is transmitted by the node is recorded as the transmission count.
[0049] Calculate the number of anomalies divided by the number of transmissions, and record the result as the anomaly rate.
[0050] Set an anomaly rate threshold;
[0051] If the anomaly rate of a node is greater than or equal to the anomaly rate threshold, then the node is marked as a labeled node.
[0052] If the anomaly rate of a node is less than the anomaly rate threshold, the node is recorded as a normal node.
[0053] When the starting node is a normal node:
[0054] Obtain the transmission data of all normal nodes on the abnormal route during the current time period;
[0055] The transmitted data is classified according to whether the values are equal, the number of elements in each category is counted, and the transmitted data with the most elements is recorded as the normal transmitted data for the current time period.
[0056] The transmitted data of each marked node is compared with the normal transmitted data, and the marked nodes containing transmitted data that are different from the normal transmitted data are recorded as abnormal nodes.
[0057] Replace the abnormal transmission data with normal transmission data at the abnormal node and resend.
[0058] Preferably, the execution of the backtracking correction strategy, correcting the abnormal transmission data, and identifying the nodes that caused the abnormal transmission data, to obtain the abnormal nodes, includes:
[0059] When the starting node is a marker node, the route is changed and the data is retransmitted, specifically as follows:
[0060] The receiving node receives transmission data of multiple routes in parallel, and a single intermediate node can simultaneously serve as an intermediate node of multiple routes;
[0061] Each route has an independent starting node;
[0062] The remaining routes connected to the receiving node are used as backup routes;
[0063] All normal nodes on the abnormal route are obtained, and the number of normal nodes on each backup route containing the normal nodes on the abnormal route is counted, which is recorded as the multiplexing number of each backup route;
[0064] A quantity threshold is set;
[0065] Backup routes with a multiplexing number greater than or equal to the quantity threshold are selected as candidate routes;
[0066] The predicted mask of each candidate route is obtained, and the candidate route with the smallest predicted mask is selected as the target route for retransmitting the transmission data;
[0067] The transmission data received by the starting node of the abnormal route is sent to the starting node of the target route, and the transmission data is transmitted to the receiving node according to the target route.
[0068] Preferably, the execution of the credibility reconstruction strategy dynamically assesses the credibility of the abnormal node, including:
[0069] Obtain the transmission data of the target route in the next period, denoted as backup data;
[0070] The backup data is transmitted to the abnormal route;
[0071] The receiving node receives the backup data transmitted by the abnormal route, and decompresses the backup data to obtain the actual mask and the predicted mask of the abnormal route, and calculates the difference value ;
[0072] Set the initial evaluation times ;
[0073] Calculate the actual evaluation times , , wherein is a set correction coefficient for controlling the influence of the mask difference value on the actual evaluation times;
[0074] The credibility of each abnormal node on the abnormal route is recorded as .
[0075] Preferably, if the credibility of the abnormal node is less than the credibility threshold, the node combination strategy is executed to combine multiple abnormal nodes for joint transportation of transmission data, including:
[0076] obtain abnormal nodes with credibility less than the credibility threshold, denoted as low credibility nodes;
[0077] denote the next node of each low credibility node on the route as a neighbor node;
[0078] establish a connection between all low credibility nodes and neighbor nodes;
[0079] set a division number, wherein the division number is less than the total number of low credibility nodes;
[0080] obtain any one low credibility node running in the current period, denoted as a running node;
[0081] obtain transmission data received by the running node, and divide the transmission data into multiple data segments;
[0082] S1, obtain a division number of low credibility nodes not running in the current period, and allocate data segments to each low credibility node not running;
[0083] S2, transport the data segments to the neighbor nodes of the running node by the low credibility nodes;
[0084] S3, the neighbor nodes verify whether the received data segments are normal;
[0085] S4, if all data segments are normal, repeat S1-S4 to continue transmitting the remaining data segments until all data segments are verified as normal, then restore the data segments to the transmission data;
[0086] S5, if there is an abnormal data segment, reselect a low credibility node not running in the current period, allocate the abnormal data segment to the newly selected low credibility node, and record the verification times of the neighbor nodes;
[0087] S6, set a verification threshold;
[0088] if the verification times of the neighbor nodes are less than or equal to the verification threshold, repeat S2-S6;
[0089] if the verification times of the neighbor nodes are greater than the verification threshold, replace the route for transporting the transmission data.
[0090] A system of a smart grid security data aggregation method based on blockchain technology, comprising:
[0091] a data acquisition module, which uses monitoring sensors to collect power consumption data in a smart grid, and uses temperature and humidity sensors to measure temperature and humidity in each period;
[0092] A mask generation module calculates a space attenuation model according to the transmission distance and the sending frequency, and the average temperature and humidity of the next period, and generates a predicted mask by correcting the temperature and humidity influence.
[0093] A data transmission module dynamically adjusts the sending frequency according to the predicted mask, and transmits data to the receiving node through the line.
[0094] An anomaly detection module decompresses the received transmission data, obtains power consumption data and an actual mask, calculates the error between the predicted mask and the actual mask, and determines that the data is abnormal if the error exceeds a set threshold.
[0095] A backtracking correction module calculates the abnormal rate of each node, identifies a marked node, determines normal transmission data according to the transmission data of normal nodes, compares the transmission data of the marked node with the normal transmission data, marks an abnormal node, and replaces the data of the receiving node with the normal transmission data.
[0096] A route switching module connects the receiving node to multiple routes, selects a backup route containing the most normal nodes, and retransmits data on the backup route.
[0097] A credibility reconstruction module transmits backup data to the abnormal node, calculates the difference between the actual mask and the predicted mask, dynamically adjusts the evaluation frequency of the node according to the difference, and restores the node to normal if the credibility is higher than a threshold.
[0098] A node combination module obtains abnormal nodes with credibility lower than a threshold, transmits data segments to non-operating low credibility nodes, jointly transmits the data segments, and recombines and verifies the data segments at adjacent nodes.
[0099] A blockchain storage module packages each transmission data into a block and stores it in a distributed manner through a blockchain network.
[0100] The present application has the following advantages:
[0101] 1. The intelligent power grid security data aggregation method based on the blockchain technology calculates the mask of the route according to the transmission distance and the sending frequency of the route, and the average temperature and humidity of the next period, in combination with the space attenuation model.
[0102] 2、The smart grid security data aggregation method based on blockchain technology calculates the frequency of sending transmission data according to the prediction mask. If the prediction mask value is large, it means that the route is unstable, at this time, the sending frequency is reduced, the number of sending data is reduced, and the stability of transmission is improved. If the mask value is small, it means that the route is stable, at this time, the sending frequency is increased, the number of sending data is increased, and the transmission rate is improved.
[0103] 3、The smart grid security data aggregation method based on blockchain technology calculates the abnormal rate of each node according to the historical transmission data of the abnormal route where the abnormal transmission data is located, and determines that the node with high abnormal rate is likely to be abnormal in this transmission. If the starting node is a normal node, the transmission data with the highest frequency of occurrence in the normal node is counted as normal transmission data, and then it is judged whether the marker node is an abnormal node. At this time, only the transmission data of the abnormal node needs to be changed to normal transmission data to control the abnormal node to send data again, without the need to resend the transmission data from the starting node, reducing the length of the data transmission route and improving the transmission efficiency of the route.
[0104] 4、The smart grid security data aggregation method based on blockchain technology, if the starting node is a marker node, it means that data cannot be sent from the starting node, and other routes connected by the receiving node are replaced. Since the node can be reused, the backup route with the most normal nodes on the abnormal route is selected to retransmit data. Since the load of the power grid is balanced, if the abnormal route cannot transmit data, the load of the nodes on the abnormal route will be reduced. In order to maintain the load balance of the power grid, the backup route with the most reused nodes is selected to maximize the use of nodes on the abnormal route, avoiding load imbalance to damage the transmission effect of the power grid.
[0105] 5、The smart grid security data aggregation method based on blockchain technology uses backup data to verify whether the abnormal route can be used again. The backup data itself can be normally transmitted to the receiving node, so even if the abnormal route cannot transmit data, it will not affect the backup data. The actual evaluation frequency is calculated according to the difference between the actual mask obtained by decompression and the prediction mask of the abnormal route, which is used to calculate the credibility of each abnormal node. Among them, the abnormal node with credibility higher than the credibility threshold is considered to be a short-term transmission abnormality caused by accident, so it is restored to normal. The abnormal node with credibility lower than the credibility threshold is considered to be a long-term abnormality of the node, which cannot ensure the reliability of each transmission data. The credibility of the abnormal node is reconstructed, and then some abnormal nodes are restored to normal nodes, improving the utilization rate of the nodes and avoiding resource waste.
[0106] 6、The smart grid security data aggregation method based on blockchain technology, for low credibility nodes, the possibility of error is large, and if the transmission data data segment is transmitted to different low credibility nodes, the risk of overall failure caused by abnormality of a single node is dispersed, even if some low credibility nodes are abnormal, only part of the data piece needs to be retransmitted, and the whole data does not need to be retransmitted, and multiple data retransmissions can be performed, improve the possibility of normal data transmission of the running node, the data data segment makes it difficult to steal or tamper with the complete data, because the attacker must obtain all the data segments and restore the data at the same time, the verification threshold ensures the transmission capacity and reliability of the node, prevents malicious nodes from repeatedly participating in data transmission, and using low credibility nodes instead of normal nodes to transmit data pieces can dynamically evaluate the credibility of abnormal nodes in the process, if the data segment data can be successfully transmitted, it means that its credibility can be gradually restored. BRIEF DESCRIPTION OF DRAWINGS
[0107] Figure 1 The method flowchart of the application.
[0108] Figure 2 The system module schematic diagram of the application. DETAILED DESCRIPTION
[0109] The technical solutions in the embodiments of the application will be described clearly and completely in conjunction with the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.
[0110] Embodiment one, refer to Figure 1 A smart grid security data aggregation method based on blockchain technology, comprising:
[0111] Obtaining power consumption data collected by a monitoring sensor in a smart grid, and transmitting the power consumption data using wireless communication, specifically:
[0112] Divide 24 hours a day into 24 time periods in units of hours;
[0113] Using a temperature and humidity sensor to measure the temperature and humidity of each time period;
[0114] For any route of wireless communication:
[0115] Performing a mask generation strategy to predict the influence of temperature and humidity of the next time period on the transmission of power consumption data and generating a mask;
[0116] Compress and encode the power consumption data into transmission data;
[0117] According to the mask, the transmission frequency is dynamically adjusted, and the transmission data is sent to the receiving node of the line, and the receiving node judges whether the transmission data is abnormal or not;
[0118] The receiving node is used for receiving transmission data and connecting multiple routes;
[0119] When the transmission data is abnormal:
[0120] The backtracking correction strategy is executed to correct the abnormal transmission data and identify the node causing the abnormal transmission data to obtain an abnormal node;
[0121] The credibility reconstruction strategy is executed to dynamically evaluate the credibility of the abnormal node;
[0122] The credibility threshold is set;
[0123] If the credibility of the abnormal node is greater than or equal to the credibility threshold, the abnormal node returns to normal;
[0124] If the credibility of the abnormal node is less than the credibility threshold, the node combination strategy is executed to combine multiple abnormal nodes for joint transportation of transmission data;
[0125] The transmission data is packaged and stored based on the blockchain technology.
[0126] The mask generation strategy is executed to predict the influence of temperature and humidity in the next period on transmission power data, and a mask is generated, including:
[0127] The transmission distance d of the route is obtained;
[0128] The transmission frequency f of the current period is obtained;
[0129] The standard temperature and the standard humidity are set;
[0130] The humidity of the next period history is obtained, and the mean value is calculated, which is recorded as the average humidity of the next period ;
[0131] The temperature of the next period history is obtained, and the mean value is calculated, which is recorded as the average temperature of the next period ;
[0132] The mask of the next period is recorded as the predicted mask , and the predicted mask is calculated, specifically:
[0133] , wherein, is the speed of light, represents a spatial attenuation model, which describes the natural attenuation of transmission data with increasing distance and frequency in an unobstructed space, To correct the coefficient, the temperature and humidity effects on the spatial attenuation model are represented.
[0134] wherein, It means that the signal strength decreases by 20 dB for every 10 times increase in transmission distance.
[0135] It means that the signal strength decreases by 20 dB for every 10 times increase in transmission frequency.
[0136] It represents the constant term, which represents the standard propagation loss of electromagnetic waves in free space.
[0137] In this embodiment, the spatial attenuation model is mainly used to dynamically evaluate the signal attenuation of wireless communication transmission in the following scenarios:
[0138] Mask generation: At each time period, the model predicts the degree of attenuation of the transmission data in the current environment. According to the transmission distance and transmission frequency, a predicted mask is calculated to represent the signal loss in the natural state.
[0139] Anomaly detection: At the receiving node, by comparing the actual mask of the transmission data with the predicted mask, it is determined whether there is an anomaly (such as data being stolen, tampered with, or severely interfered with) in the transmission process. If the actual mask is significantly greater than the predicted mask, there may be an anomaly.
[0140] Dynamic adjustment of transmission frequency: According to the size of the predicted mask, the transmission frequency of wireless communication is automatically adjusted. The larger the mask, the greater the attenuation, and the transmission frequency is automatically reduced to reduce the error rate.
[0141] The formula for calculating is: wherein, is the set temperature correction coefficient, is the set humidity correction coefficient, which represents the degree of influence of each degree of temperature or each unit of humidity change on the spatial attenuation model.
[0142] In different geographical areas (such as hot tropics, dry deserts, and humid coastal areas), the correction coefficient can be dynamically adjusted to make the model adapt to various environments.
[0143] In actual deployment, the values of the temperature correction coefficient and the humidity correction coefficient can be dynamically adjusted according to the historical data of the monitoring sensors to improve the universality of the model.
[0144] In this embodiment, the smart grid covers a small area, and there are 3 wireless transmission routes, A→B→C→receiving node, D→E→F→receiving node, and G→H→I→receiving node.
[0145] Wherein, B, E and H are abnormal nodes, and their initial credibility is 0.6, 0.4 and 0.5 (lower than the credibility threshold 0.7) respectively;
[0146] Set 24 hours a day into 24 time periods, one hour for one time period;
[0147] It is the 10th time period at present;
[0148] The execution mask generation strategy predicts the influence of temperature and humidity of the next time period on the transmission of power consumption data, generates a mask, comprising:
[0149] Measure temperature and humidity: in the 10th time period, the system measures the temperature as 30℃ and the humidity as 60%.
[0150] Predict the temperature and humidity of the next time period: the average temperature of the 11th time period is 32℃, and the average humidity is 65%.
[0151] Calculate the mask based on the spatial attenuation model:
[0152] Route A→B→C: predicted mask = 0.8;
[0153] Route D→E→F: predicted mask = 0.75;
[0154] Route G→H→I: predicted mask = 0.78;
[0155] The power consumption data is compressed and encoded into transmission data, specifically:
[0156] Each route sends the compressed transmission data:
[0157] The data sent for D→E→F is [100, 200, 150];
[0158] Wherein, 100 is the power consumption of the first measurement point or power consumption unit in the 10th time period, in units of kilowatt-hours (kWh).
[0159] 200 is the power consumption of the second measurement point or power consumption unit in the same time period, also in units of kilowatt-hours (kWh).
[0160] 150 is the power consumption of the third measurement point or power consumption unit in the same time period, also in units of kilowatt-hours (kWh).
[0161] Three routes are sent respectively:
[0162] A→B→C sends data [200, 200, 350] with a mask of 0.8.
[0163] D→E→F sends data [100, 200, 150] with a mask of 0.75.
[0164] Data [100, 300, 150] is sent via G→H→I with a mask of 0.78.
[0165] The execution of the backtracking correction strategy corrects the abnormal transmission data and identifies the nodes that caused the abnormal transmission data, obtaining the abnormal nodes, including:
[0166] Receive node decompressed data:
[0167] The error threshold is 0.05;
[0168] Route A→B→C: Actual mask 0.82 (the difference from the predicted mask 0.8 is 0.02, which is less than the error threshold of 0.05, so the data transmission is normal).
[0169] Route D→E→F: Actual mask 0.85 (difference 0.85-0.75=0.1>0.05, abnormal data transmission).
[0170] Route G→H→I: Actual mask 0.9 (difference 0.9-0.78=0.12>0.05, abnormal data transmission).
[0171] Backtracking correction:
[0172] Route D→E→F:
[0173] Get the anomaly rate of all nodes:
[0174] Node E has an anomaly rate of 0.4, which is higher than the anomaly rate threshold of 0.3, so it is marked as a node.
[0175] Nodes D and F are considered normal if their anomaly rates are below the anomaly rate threshold of 0.3.
[0176] Backtrack to retrieve the normal transmission data of normal nodes D and F.
[0177] The data transmitted by node E was compared with normal data, confirming that E was abnormal.
[0178] Mark node E as an abnormal node, replace it with normal data, and resend it.
[0179] Route G→H→I:
[0180] Node H has an anomaly rate of 0.5, and is marked as a node if it exceeds the threshold of 0.3.
[0181] Nodes G and I with an anomaly rate below the anomaly rate threshold of 0.3 are considered normal nodes.
[0182] Obtain normal transmission data for G and I, and confirm that node H is abnormal.
[0183] Mark H as an abnormal node, replace it with normal data, and resend.
[0184] The execution of the trust reconstruction strategy dynamically assesses the trust of the abnormal node, comprising:
[0185] Dynamically assess the trust of the abnormal node:
[0186] Abnormal node E: from 0.4 to 0.3, lower than the trust threshold 0.7.
[0187] Abnormal node H: from 0.5 to 0.35, lower than the trust threshold 0.7.
[0188] If the trust of the abnormal node is less than the trust threshold, execute the node combination strategy to combine multiple abnormal nodes for joint transport of transmission data, comprising:
[0189] Get low-trust nodes E and H:
[0190] Wherein, the neighbor node of low-trust node E is F.
[0191] The neighbor node of low-trust node H is I.
[0192] Route D→E→F sends transmission data:
[0193] Divide the transmission data [100, 200, 150] into three parts:
[0194] Data segment 1: 100;
[0195] Data segment 2: 200;
[0196] Data segment 3: 150;
[0197] Data allocation:
[0198] The number of division quantities is 1;
[0199] The next period low-trust node E runs, low-trust node H does not run;
[0200] Low-trust node E transmits data segment 1 to low-trust node H.
[0201] Neighbor node verification:
[0202] Neighbor node F receives data data segment and verifies.
[0203] If the data is normal, low-trust node E transmits data segment 2 to low-trust node H, neighbor node F receives data data segment and verifies, and if the data is normal, low-trust node E transmits data segment 3 to low-trust node H.
[0204] The verification threshold is equal to 3;
[0205] If the neighbor node verifies that the low-trust node H transmits any data segment abnormally, reselect the route data [100, 200, 150].
[0206] For low-trust nodes, the possibility of error is large, and if the transmission data data segment is transmitted to different low-trust nodes, the risk of overall failure caused by the abnormality of a single node is dispersed, and even if some low-trust nodes are abnormal, only part of the data needs to be retransmitted, and multiple data retransmissions can be performed, improving the possibility of normal data transmission of the running node, and the data data segment makes it difficult to steal or tamper with the complete data, because the attacker must obtain all data segments and restore the data at the same time, and the verification threshold ensures the transmission capacity and reliability of the node, prevents malicious nodes from repeatedly participating in data transmission, and uses low-trust nodes instead of normal nodes to transmit data pieces. The trustworthiness of abnormal nodes can be dynamically evaluated in the process, and if the data segment data can be successfully transmitted, it means that its trustworthiness can be gradually restored.
[0207] The transmission data is packaged and stored based on blockchain technology, including:
[0208] The successfully transmitted data [100, 200, 150] is encrypted and packaged for storage using blockchain technology, and is tamper-proof.
[0209] In this embodiment, with reference to Figure 2 A system for a smart grid security data aggregation method based on blockchain technology, comprising:
[0210] The data acquisition module uses monitoring sensors to collect power consumption data in the smart grid, and uses temperature and humidity sensors to measure the temperature and humidity of each period;
[0211] The mask generation module calculates a space attenuation model according to the transmission distance and the sending frequency, and corrects the temperature and humidity influence of the next period to generate a predicted mask;
[0212] The data transmission module dynamically adjusts the sending frequency according to the predicted mask, and transmits the data to the receiving node through the line, and the receiving node is connected to multiple routes and receives the data in parallel;
[0213] The anomaly detection module decompresses the received transmission data, obtains the power consumption data and the actual mask, calculates the error between the predicted mask and the actual mask, and if the error exceeds the set threshold, it is determined that the data is abnormal;
[0214] The backtracking correction module calculates the abnormal rate of each node, identifies and marks the nodes, determines the normal transmission data according to the transmission data of the normal nodes, compares the transmission data of the marked nodes with the normal transmission data, marks the abnormal nodes, and replaces the data of the receiving node with the normal transmission data;
[0215] The route switching module receives the node connection multiple routes, selects a backup route containing the most normal nodes, and retransmits data on the backup route;
[0216] The credibility reconstruction module transmits backup data to abnormal nodes, calculates the difference between the actual mask and the predicted mask, dynamically adjusts the evaluation times of the nodes according to the difference, and if the credibility is higher than the threshold, the node is restored to normal;
[0217] The node combination module obtains abnormal nodes with credibility lower than the threshold, transmits data segments to low credibility nodes that are not running, jointly transmits by the low credibility nodes, recombines and verifies the data segments at adjacent nodes;
[0218] The blockchain storage module packages each transmission data into a block and stores it in a distributed manner through a blockchain network.
[0219] It should be noted that in this paper, relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the term "includes", "contains" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment.
[0220] The above is only the preferred embodiment of the present application. It should be noted that for ordinary skilled in the art, without departing from the technical principles of the present application, several improvements and refinements can be made, which should also be considered as the protection scope of the present application.
Claims
1. A method for aggregating smart grid security data based on blockchain technology, characterized in that, include: Acquire electricity consumption data collected by monitoring sensors in the smart grid, and transmit the electricity consumption data using wireless communication, specifically: The day is divided into 24 time periods, with each hour serving as a unit; Temperature and humidity are measured at each time period using temperature and humidity sensors; For any route in wireless communication: Execute a mask generation strategy to predict the impact of temperature and humidity on the transmission of power consumption data in the next time period, and generate a mask. Compress and encode electricity consumption data into transmission data; The transmission frequency is dynamically adjusted according to the mask, and the transmitted data is sent to the receiving node of the line, whereby the receiving node determines whether the transmitted data is abnormal. The receiving node is used to receive transmitted data and connect multiple routes; When data transmission is abnormal: The backtracking correction strategy is executed to correct abnormal transmission data and identify the nodes that caused the abnormal transmission data to be obtained. Implement a credibility reconstruction strategy to dynamically evaluate the credibility of abnormal nodes; Set a credibility threshold; If the credibility of an abnormal node is greater than or equal to the credibility threshold, the abnormal node will return to normal. If the credibility of an abnormal node is less than the credibility threshold, a node combination strategy is executed to combine multiple abnormal nodes for joint data transmission. The transmitted data is packaged and stored using blockchain technology.
2. The smart grid security data aggregation method based on blockchain technology according to claim 1, characterized in that, The execution of the mask generation strategy, predicting the impact of temperature and humidity on the transmission of power consumption data in the next time period, and generating a mask includes: Obtain the transmission distance d of the route; Get the transmission frequency f for the current time period; Set standard temperature and standard humidity ; Obtain the historical humidity data for the next time period, calculate the average, and record it as the average humidity for the next time period. ; Obtain the historical temperature for the next time period, calculate the average, and record it as the average temperature for the next time period. ; The mask for the next time period is recorded as the prediction mask. The prediction mask is calculated as follows: ,in, At the speed of light, This represents a spatial attenuation model, describing the natural attenuation of transmitted data with increasing distance and frequency in an unobstructed space. The correction factor represents the effect of temperature and humidity on the spatial decay model; calculate The formula is: ,in, The set temperature correction factor, The humidity correction factor represents the degree of influence of each degree of temperature or each unit of humidity change on the spatial decay model.
3. The smart grid security data aggregation method based on blockchain technology according to claim 2, characterized in that, The step of dynamically adjusting the transmission frequency according to the mask and sending the transmitted data to the receiving node of the line, whereby the receiving node determines whether the transmitted data is abnormal, includes: Set maximum mask ; calculate , which represents the ratio of the predicted mask to the maximum mask; calculate The result will be used as the transmission frequency for the next time period; when When the frequency is increased, the transmission frequency in the next time period decreases; when When the frequency decreases, the transmission frequency increases in the next time period; Obtain the actual transmitted data received by the receiving node, and decompress the transmitted data. The decompressed transmitted data includes power consumption data and the mask generated by the actual transmission, which is denoted as the actual mask. Set an error threshold; Calculate |predicted mask - actual mask|, and denote the result as the mask error, where || represents the absolute value; Compare the mask error with the error threshold. If the mask error is less than the error threshold, the data transmission is normal. If the mask error is greater than or equal to the error threshold, the transmitted data is abnormal.
4. The smart grid security data aggregation method based on blockchain technology according to claim 1, characterized in that, The execution of the backtracking correction strategy corrects the abnormal transmission data and identifies the nodes that caused the abnormal transmission data, obtaining the abnormal nodes, including: Record the route where the abnormal data is transmitted as the abnormal route; The abnormal route contains multiple nodes, which are divided into starting nodes and intermediate nodes; Calculate the anomaly rate for each node, specifically: The historical number of abnormal data transmissions by statistical nodes is recorded as the number of abnormalities. The total number of times data is transmitted by the node is recorded as the transmission count. Calculate the number of anomalies divided by the number of transmissions, and record the result as the anomaly rate. Set an anomaly rate threshold; If the anomaly rate of a node is greater than or equal to the anomaly rate threshold, then the node is marked as a labeled node. If the anomaly rate of a node is less than the anomaly rate threshold, the node is recorded as a normal node. When the starting node is a normal node: Retrieve the transmission data sent by all normal nodes on the abnormal route during the current time period; The transmitted data is classified according to whether the values are equal, the number of elements in each category is counted, and the transmitted data with the most elements is recorded as the normal transmitted data for the current time period. The transmitted data sent by each marked node is compared with the normal transmitted data, and the marked nodes containing transmitted data that are different from the normal transmitted data are recorded as abnormal nodes. Replace the abnormal transmission data with normal transmission data at the abnormal node and resend.
5. The smart grid security data aggregation method based on blockchain technology according to claim 4, characterized in that, The execution of the backtracking correction strategy corrects the abnormal transmission data and identifies the nodes that caused the abnormal transmission data, obtaining the abnormal nodes, including: When the starting node is a marker node, the route is changed and the data is retransmitted, specifically as follows: The receiving node receives transmission data from multiple routes in parallel, and a single intermediate node can simultaneously serve as an intermediate node for multiple routes. Each route has an independent starting node; The remaining routes connected to the receiving node are used as backup routes; Obtain all normal nodes on the abnormal route, count the number of normal nodes on each backup route that are present on the abnormal route, and record this as the reuse count on each backup route. Set a quantity threshold; Select backup routes with a reuse quantity greater than or equal to the quantity threshold as candidate routes; Obtain the prediction mask for each candidate route, and select the candidate route with the smallest prediction mask as the target route for retransmitting the data. The data received at the starting node of the abnormal route is sent to the starting node of the target route, and the data is then transmitted to the receiving node according to the target route.
6. The smart grid security data aggregation method based on blockchain technology according to claim 5, characterized in that, The execution of the credibility reconstruction strategy, which dynamically evaluates the credibility of abnormal nodes, includes: Obtain the transmission data of the target route in the next time period and record it as backup data; Send backup data to the abnormal route; Obtain the backup data received by the receiving node from the abnormal route, decompress the backup data to obtain the actual mask, and calculate the difference between the actual mask and the predicted mask of the abnormal route. ; Set the initial number of evaluations ; Calculate the actual number of assessments , ,in, The set correction factor is used to control the impact of the mask difference on the actual number of evaluations; The credibility of each abnormal node on the abnormal route is denoted as . .
7. The smart grid security data aggregation method based on blockchain technology according to claim 6, characterized in that, If the credibility of an abnormal node is less than a credibility threshold, a node combination strategy is executed to combine multiple abnormal nodes for joint data transmission, including: Identify abnormal nodes with a credibility level lower than the credibility threshold and record them as low-credibility nodes; The next node on the route for each low-confidence node is recorded as a neighbor node; Establish connections between all low-trust nodes and their neighboring nodes; Set the number of partitions, where the number of partitions is less than the total number of low-confidence nodes; Get any low-confidence node running in the current time period and denote it as the running node; Obtain the transmitted data received by the running node and divide the transmitted data into multiple data segments; S1. Obtain the number of low-confidence nodes that are not running in the current time period, allocate data segments to the low-confidence nodes, and each low-confidence node receives one data segment. S2, The low-reliability node transmits the data segment to the neighboring nodes of the running node; S3. Neighboring nodes verify whether the received data segments are normal; S4. If all data segments are normal, repeat S1-S4 to continue transmitting the remaining data segments until all data segments are verified as normal, then restore the data segments to the transmitted data. S5. If there is an abnormal data segment, a low-confidence node that is not running in the current time period is selected again, and the abnormal data segment is assigned to the newly selected low-confidence node. The number of verifications of the neighboring nodes is recorded. S6. Set the verification threshold; If the number of verifications of a neighboring node is less than or equal to the verification threshold, then repeat steps S2-S6. If the number of verification attempts by a neighboring node exceeds the verification threshold, the data transmission line will be changed.
8. A smart grid security data aggregation system based on blockchain technology, applied to the smart grid security data aggregation method based on blockchain technology as described in any one of claims 1-7, characterized in that, include: The data acquisition module uses monitoring sensors to collect electricity consumption data in the smart grid and uses temperature and humidity sensors to measure temperature and humidity at each time period. The mask generation module calculates the spatial attenuation model and corrects for the effects of temperature and humidity based on the transmission distance, transmission frequency, and average temperature and humidity in the next time period, and generates a predictive mask. The data transmission module dynamically adjusts the transmission frequency based on the predicted mask, and transmits data to the receiving node through the line. The receiving node is connected to multiple lines and receives data in parallel. The anomaly detection module decompresses the received transmission data, obtains the power consumption data and the actual mask, calculates the error between the predicted mask and the actual mask, and determines the data to be abnormal if the error exceeds a set threshold. The backtracking correction module calculates the anomaly rate of each node, identifies and marks nodes, determines normal transmission data based on the transmission data of normal nodes, compares the transmission data of marked nodes with the normal transmission data, marks abnormal nodes, and replaces the data of the receiving node with normal transmission data. The route switching module receives nodes connected to multiple routes, selects the backup route containing the most normal nodes, and retransmits data on the backup route. The credibility reconstruction module transmits backup data to the abnormal node, calculates the difference between the actual mask and the predicted mask, and dynamically adjusts the number of evaluations of the node based on the difference. If the credibility is higher than the threshold, the node returns to normal. The node combination module identifies abnormal nodes with a credibility level below a threshold, transmits data segments to non-running low-credibility nodes for joint transmission, and reassembles and verifies the data segments at adjacent nodes. The blockchain storage module packages each piece of transmitted data into blocks and stores them in a distributed manner through the blockchain network.