Blockchain and attribute encryption based remote automatic software upgrade system for internet of things devices

CN122132063BActive Publication Date: 2026-10-27SHENZHEN JIETONG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610433906.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-04-03
Publication Date
2026-10-27
Estimated Expiration
2046-04-03

AI Technical Summary

Technical Problem

上述方式虽然能够在一定程度上完成版本统一、功能更新,但在具体实现中普遍缺乏对智能电表运行异常特征的精细感知,难以及时识别出那些存在频繁重启、通信报文重传异常、电压或功率越界等运行风险较高的设备,也缺乏将此类异常特征量化为风险评分并进一步影响升级优先级的机制

Benefits of technology

(1)该系统通过特征聚合模块和馈线分段分析模块,将智能电表采集报文、馈线采集报文和负荷预测报文在馈线拓扑关系表下进行统一聚合,构造设备异常运行特征向量、馈线聚合异常数据以及馈线异常特征向量,并采用基于欧氏范数形式的算法公式计算馈线分段风险指数Rseg,再结合风险区间阈值对馈线分段风险指数Rseg进行分级评估,生成风险等级标识,并写入区块链网络,以不可篡改方式形成馈线风险分段记录。由此实现了对频繁重启、电压越界、功率突变以及通信重传等多维异常特征的量化融合和分级标记,使系统能够在馈线粒度上及时识别出整体异常程度较高的高风险馈线,为后续升级优先级提供客观量化依据,同时依托区块链网络保证风险评估过程和结果的可追溯性,克服了现有技术中仅按设备类型或区域进行固定批次升级、难以及时感知和响应运行异常风险的不足。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122132063B_ABST
    Figure CN122132063B_ABST
Patent Text Reader

Abstract

The application discloses a blockchain and attribute encryption-based remote automatic software upgrading system for Internet of Things devices, and relates to the technical field of Internet of Things.The system aggregates the message collected by the smart meter through a feature aggregation module and a feeder segmentation analysis module, constructs an abnormal feature vector, calculates a feeder segmentation risk index Rseg, and then combines the risk interval threshold to perform hierarchical evaluation on the feeder segmentation risk index Rseg, generates a risk level identifier, and writes it into a blockchain network to form a feeder risk segmentation record in an unalterable manner.Thus, the quantitative fusion and hierarchical marking of multi-dimensional abnormal features such as frequent restart, voltage out-of-limit, power mutation and communication retransmission are realized, the system can timely identify high-risk feeders with high overall abnormality at the feeder granularity, and provides an objective quantitative basis for subsequent upgrading priority, and the traceability of the risk evaluation process and results is ensured by relying on the blockchain network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) technology, specifically to a remote automatic upgrade system for IoT device software based on blockchain and attribute encryption. Background Technology

[0002] With the large-scale deployment of IoT technology and distribution feeders in urban power distribution networks, numerous smart meters are connected to each feeder. These smart meters are connected to the master station via the distribution communication network to perform functions such as electricity consumption information collection, energy metering, and policy distribution. In actual operation, some feeder smart meters may experience abnormal phenomena such as intermittent tripping, voltage fluctuations, frequent restarts, and communication instability, while other feeders operate relatively smoothly. However, existing technologies typically still perform batch upgrades of smart meters according to a "regional division plus fixed upgrade cycle" approach, which cannot distinguish the actual operational risk differences between different feeders. This can easily lead to untimely patch upgrades for smart meters on high-risk feeders, while low-risk feeders are frequently interfered with by upgrades, resulting in delayed security patch response and increased on-site maintenance burden.

[0003] Currently, existing remote automatic upgrade systems for smart meter software in distribution networks typically group upgrades based on "device type, region division, and version number," and distribute upgrade packages uniformly "by batch and by time window." Upgrade strategies are mostly fixed-cycle or manually pre-configured scheduling rules. While this approach can achieve version unification and functional updates to some extent, it generally lacks a fine-grained perception of abnormal smart meter operation characteristics. It struggles to promptly identify devices with high operational risks, such as frequent restarts, abnormal communication message retransmissions, or voltage or power outages. Furthermore, it lacks a mechanism to quantify these abnormal characteristics into risk scores and further influence upgrade priorities. As a result, high-risk and low-risk devices are upgraded uniformly in the same batch or at the same pace, making it difficult to reflect the actual safety risk distribution of the devices and hindering timely priority patch updates and security hardening for high-risk devices.

[0004] Given the current situation, the lack of dynamic risk assessment and tiered upgrade mechanisms for addressing abnormal equipment operation characteristics makes existing remote upgrade solutions for smart meter software prone to a series of problems in high-risk scenarios. For example, when some smart meters continuously experience peak currents, frequent restarts, or a significantly increased communication retransmission rate, the system still performs unified upgrades according to fixed batches or preset schedules. This results in these devices with potential faults or security vulnerabilities not receiving priority repairs for an extended period, leading to delayed security patch response times, excessively large security patch lags, and patch release times that are difficult to keep close to the vulnerability disclosure time, or even later than the attack window, increasing the probability of equipment being attacked or malfunctioning. Simultaneously, in feeder areas with heavy workloads, if the upgrade pace is not dynamically adjusted in conjunction with abnormal risks, a large number of abnormal devices may be upgraded simultaneously within the wrong time window, triggering a chain reaction of localized communication congestion, abnormal power metering, and amplified voltage fluctuations. This causes the upgrade process and results to deviate from actual safety requirements and operating conditions, adversely affecting the safe and stable operation of the distribution network. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a remote automatic software upgrade system for IoT devices based on blockchain and attribute encryption, which solves the problems mentioned in the background section.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solution: including a feature aggregation module, a feeder segmentation analysis module, an upgrade strategy generation module, and an encryption upgrade module; The feature aggregation module collects smart meter data in real time by setting up several collection points on the smart meter of the Internet of Things device, and transmits the data remotely to the automatic upgrade system through the communication network, and then performs feature aggregation to obtain the feeder abnormal feature vector. The feeder segmentation analysis module calculates the feeder segmentation risk index Rseg based on the feeder anomaly feature vector, then performs risk assessment based on the preset risk interval threshold and the feeder segmentation risk index Rseg, and generates feeder risk segmentation records based on the risk assessment results and writes them into the blockchain network. The upgrade strategy generation module triggers adaptive attribute encryption upgrade scheduling when the risk assessment result generates a level 3 risk feeder. The adaptive attribute encryption upgrade scheduling calculates and outputs the upgrade urgency coefficient Unrg based on the feeder segment risk index Rseg. The encryption upgrade module evaluates the urgency by setting a preset urgency range threshold and then comparing it with the upgrade urgency coefficient Unrg. Based on the urgency evaluation result, it executes an adaptive upgrade strategy and attribute encryption control.

[0007] Preferably, the feature aggregation module includes a data acquisition unit; The data acquisition unit sets up several acquisition points on the smart meter of the Internet of Things device. Each acquisition point has its own measurement module, and the smart meter data is collected in real time in a 15-minute acquisition cycle. The data is then transmitted to the data feature aggregation module in the automatic upgrade system through the power distribution communication network. The data collection points include smart meter data collection point P1, feeder-side concentrator data collection point P2, and main station-side load prediction data collection point P3. The smart meter data includes data collected from the distribution communication network, data collected from the feeder, and load forecast data. The power distribution communication network will collect messages including the number of restarts Nrm, the cumulative time Tov for voltage exceeding the upper and lower limits, and the number of power surge events Nps; The feeder-collected messages include the total number of messages Npf and the number of retransmitted messages Nrf within the entire feeder; The load forecast message includes the peak active load Pha(j,t) of the j-th feeder at time t.

[0008] Preferably, the feature aggregation module further includes a data aggregation unit; The data aggregation unit maintains a feeder topology table in the automatic upgrade system. The feeder topology table is used to map the device identifier of each smart meter to its corresponding feeder number j, thereby dividing the smart meter into the corresponding feeder or feeder segment. Next, the power distribution communication network will parse the collected messages, match the device identifiers in the collected messages with the feeder topology table, and classify the number of restarts Nrm, the cumulative time Tov for voltage exceeding the upper and lower limits, and the number of power mutation events Nps carried in the collected messages according to the device identifiers, and construct the device abnormal operation feature vector Fdev(i) for each smart meter i. The feature aggregation unit also parses the feeder acquisition messages received through the power distribution communication network, matches the feeder number j in the feeder acquisition message with the feeder topology table, reads the total number of messages Npf and the number of retransmitted messages Nrf carried in the feeder acquisition message, and calculates the communication retransmission rate Rretrans(j) of the j-th feeder based on the ratio of the total number of messages Npf and the number of retransmitted messages Nrf. Then, combined with the aggregation statistics of the abnormal operation feature vectors Fdev(i) of multiple devices belonging to feeder number j on the device set, the total number of restarts Nrm of the j-th feeder corresponding to the feeder is obtained. sum (j) The total cumulative time Tov of voltage out-of-bounds operation of the j-th feeder sum The total number of power mutation events (j) and the j-th feeder Nps sum (j), thereby constructing feeder aggregation of abnormal data. Further, the load forecast message received through the power distribution communication network is analyzed. The peak active load Pha(j,t) of the j-th feeder at time t is classified according to the feeder number j. Then, the ratio is calculated with the reference load Pref(j) preset for feeder j to obtain the load forecast feature Lpred(j) of the j-th feeder. Then, based on the total number of restarts Nrm of the j-th feeder sum (j) The total cumulative time Tov of voltage out-of-bounds operation of the j-th feeder sum The total number of power mutation events (j) and the j-th feeder Nps sum (j) and the communication retransmission rate Rre(j) of the j-th feeder are normalized according to the ratio calculation with the reference value. The feeder aggregated abnormal data are mapped to the restart abnormal normalization index Ere(j), the communication abnormal normalization index Ecom(j) of the j-th feeder, and the voltage abnormal normalization index Epo(j) of the power of the j-th feeder, respectively. They are then uniformly summarized according to the feeder number j to form the feeder abnormal feature vector.

[0009] Preferably, the feeder segmentation analysis module includes a feeder segmentation risk calculation unit; The feeder segment risk calculation unit quantifies the overall anomaly degree of feeder j by calculating the feeder segment risk index Rseg based on the feeder anomaly feature vector and in the form of Euclidean norm. The feeder segment risk index Rseg is calculated and output using the following algorithm formula; In the formula, Rseg(j) represents the feeder segment risk index of the j-th feeder.

[0010] Preferably, the feeder segmentation analysis module further includes a feeder segmentation risk assessment unit; The feeder segment risk assessment unit pre-sets risk interval thresholds in the automatic upgrade system. The risk interval thresholds include a low-risk upper limit threshold Rth1 and a high-risk lower limit threshold Rth2. The real-time acquired feeder segment risk index Rseg is used to conduct a risk assessment with the risk interval threshold. Based on the risk assessment results, the feeder risk level is classified, and a risk level identifier is obtained. The risk level identifier includes first-level risk feeders, second-level risk feeders, and third-level risk feeders. The specific risk assessment content is as follows: When the feed segment risk index Rseg(j) of the j-th feed line is less than or equal to the low-risk upper limit threshold Rth1, it is marked as a first-level risk feed line. When the low-risk upper limit threshold Rth1 < the feeder segment risk index Rseg(j) of the j-th feeder ≤ the high-risk lower limit threshold Rth2, it is marked as a secondary risk feeder; When the feed segment risk index Rseg(j) of the j-th feed line is less than or equal to the high-risk lower limit threshold Rth2, it is marked as a level 3 risk feed line. Among them, the first-level risk feeder < the second-level risk feeder < the third-level risk feeder.

[0011] Preferably, the feeder segmentation analysis module further includes a blockchain recording unit; The blockchain recording unit constructs a feeder risk segmentation record after the feeder segmentation risk assessment unit completes the risk level assessment of the j-th feeder. The feeder risk segmentation record includes the feeder number, the feeder segment risk index Rseg(j) of the j-th feeder, the feeder risk level, and the risk assessment generation timestamp. The feeder risk segmentation record is then encapsulated as a transaction data payload into a blockchain transaction. The blockchain transaction includes a node identifier that identifies the source node of the transaction, a transaction hash value that ensures integrity, and digital signature information that ensures identity trustworthiness. The blockchain network broadcasts blockchain transactions to multiple blockchain nodes, which then execute a consensus algorithm to verify the transactions. Verified transactions are packaged into new blocks and linked to the existing blockchain, ensuring that the feeder risk segmentation record of the j-th feeder is stored in the blockchain network in an immutable manner.

[0012] Preferably, the upgrade strategy generation module includes an upgrade urgency triggering unit; The upgrade urgency triggering unit triggers adaptive attribute encryption upgrade scheduling by using a risk level identifier obtained based on the feeder risk level classification and executing triggering logic based on the risk level identifier. The triggering logic is as follows: When the risk level identifier indicates that feeder j belongs to a level 1 risk feeder, feeder j is simply marked as a regular upgrade object without triggering adaptive attribute encryption upgrade scheduling. When the risk level identifier indicates that feeder j belongs to the level 2 risk feeder, feeder j is marked as an optional accelerated upgrade object, and a prompt message is generated for the operation and maintenance personnel to select and trigger the adaptive attribute encryption upgrade scheduling. When the risk level indicator shows that feeder j belongs to the third-level risk feeder, an upgrade urgency trigger signal is generated to trigger the adaptive attribute encryption upgrade scheduling.

[0013] Preferably, the upgrade strategy generation module includes an upgrade urgency analysis unit; The upgrade urgency triggering unit reads the feeder segment risk index Rseg(j) and the load prediction feature Lpred(j) of the j-th feeder corresponding to the third-level risk feeder from the feature aggregation module and the blockchain network after triggering the adaptive attribute encryption upgrade scheduling, and calculates and outputs the upgrade urgency coefficient Unrg to quantify and analyze the upgrade urgency of feeder j under the dual constraints of risk level and load carrying capacity within the upgrade time window. The upgrade urgency coefficient Unrg is calculated and output using the following algorithm formula; In the formula, Unrg(j) represents the urgency coefficient for upgrading the j-th feeder.

[0014] Preferably, the encryption upgrade module includes an adaptive upgrade strategy evaluation unit; The adaptive upgrade strategy evaluation unit pre-sets urgency interval thresholds in the automatic upgrade system, the urgency interval thresholds including a low urgency threshold Uth1 and a medium urgency threshold Uth2; Next, the urgency coefficient Unrg(j) of each j-th feeder, which is obtained in real time, is compared with the urgency interval threshold to evaluate the urgency. A hierarchical control strategy is then implemented for each feeder to obtain the upgrade mode identifier. At the same time, an adaptive upgrade strategy is executed. The specific details are as follows: When the upgrade urgency coefficient Unrg(j) of the j-th feeder is less than or equal to the low urgency threshold Uth1, it is determined to be at level one urgency. At this time, the upgrade mode is identified as the normal upgrade mode. The normal upgrade mode limits the allowed upgrade time window to a time window where the load prediction characteristic Lpred(j) of the j-th feeder is less than or equal to 0.5, and limits the maximum number of concurrent upgrade devices to no more than 5% of the total number of IoT devices on the j-th feeder. When the low urgency threshold Uth1 < the upgrade urgency coefficient Unrg(j) of the j-th feeder ≤ the medium urgency threshold Uth2, it is determined to be a level 2 urgency. At this time, the upgrade mode is identified as the accelerated upgrade mode. The accelerated upgrade mode sets the allowed upgrade time window condition to the time window when the load prediction characteristic Lpred(j) of the j-th feeder ≤ 0.8, and limits the maximum number of concurrent upgrade devices to 5%-20% of the total number of IoT devices in the j-th feeder. When the upgrade urgency coefficient Unrg(j) of the j-th feeder is greater than the medium urgency threshold Uth2, it is determined to be at level three urgency. At this time, the upgrade mode is identified as emergency upgrade mode. The emergency upgrade mode limits the allowed upgrade time window to the time window when the load prediction characteristic Lpred(j) of the j-th feeder is ≤0.9, and limits the maximum number of concurrent upgrade devices to 20%-50% of the total number of IoT devices on the j-th feeder.

[0015] Preferably, the encryption upgrade module further includes an attribute encryption control unit; The attribute encryption control unit executes attribute encryption control that matches the adaptive upgrade strategy based on the results of the hierarchical control strategy. The specific content of the attribute encryption control is as follows: Receive the upgrade mode identifier of the j-th feeder, and construct the attribute policy set of the j-th feeder based on the upgrade mode identifier, the feeder number, risk level, area information, and IoT device firmware version information corresponding to the j-th feeder. The attribute encryption control unit is also configured to: call the attribute encryption algorithm to encrypt the upgrade package for the j-th feeder, embed the attribute policy set as an access control policy into the encryption process, generate an encrypted upgrade package corresponding to the attribute policy set, and send the encrypted upgrade package to IoT devices through the power distribution communication network in a broadcast or targeted manner, so that only IoT devices whose local device attribute set satisfies the attribute policy set can complete the attribute policy matching, decrypt the encrypted upgrade package and perform the upgrade locally. The attribute encryption control unit also interacts with the smart contract logic in the blockchain network. Based on the upgrade urgency coefficient Uurg and the upgrade mode identifier, it sets the upgrade task priority, maximum number of concurrent tasks, and allowed upgrade time window for the j-th feeder. After the upgrade is completed, it collects upgrade success information, upgrade failure information, and upgrade retry information returned by IoT devices, generates upgrade task records, encapsulates the upgrade task records into blockchain transactions, and broadcasts them to the blockchain network, so that the upgrade execution process and results are recorded in the blockchain in an auditable manner.

[0016] This invention provides a remote automatic software upgrade system for IoT devices based on blockchain and attribute encryption. It offers the following advantages: (1) This system uses a feature aggregation module and a feeder segmentation analysis module to uniformly aggregate smart meter acquisition messages, feeder acquisition messages, and load forecast messages under the feeder topology table. It constructs equipment abnormal operation feature vectors, feeder aggregated abnormal data, and feeder abnormal feature vectors. It then uses an algorithm formula based on Euclidean norm to calculate the feeder segment risk index Rseg. Combined with the risk interval threshold, the feeder segment risk index Rseg is graded and evaluated to generate risk level identifiers, which are written into the blockchain network to form feeder risk segmentation records in an immutable manner. This achieves the quantitative fusion and graded marking of multi-dimensional abnormal features such as frequent restarts, voltage overruns, power surges, and communication retransmissions. The system can identify high-risk feeders with a high overall degree of abnormality at the feeder granularity in a timely manner, providing an objective quantitative basis for subsequent upgrade priorities. At the same time, it relies on the blockchain network to ensure the traceability of the risk assessment process and results, overcoming the shortcomings of existing technologies that only upgrade in fixed batches according to equipment type or region and are difficult to detect and respond to abnormal operation risks in a timely manner.

[0017] (2) The system triggers adaptive attribute encryption upgrade scheduling when the feeder is evaluated as a level 3 risk feeder through the upgrade urgency triggering unit and upgrade urgency analysis unit in the upgrade strategy generation module. It obtains the feeder segment risk index Rseg and load prediction feature Lpred from the feature aggregation module and the blockchain network, calculates the upgrade urgency coefficient Unrg according to the preset algorithm formula, and then the adaptive upgrade strategy evaluation unit evaluates the urgency coefficient Unrg through the urgency interval threshold, maps the feeder to the normal upgrade mode, accelerated upgrade mode or emergency upgrade mode, and outputs clear upgrade time window conditions and maximum number of concurrent upgrade devices for each feeder. Furthermore, the attribute encryption control unit constructs an attribute strategy set, calls the ciphertext strategy attribute base encryption CP-ABE algorithm to encrypt the upgrade package, generates an encrypted upgrade package, and distributes it in a targeted or broadcast manner under the constrained upgrade time window and concurrency. Through the above mechanism, on the one hand, at the algorithm level, "risk level Rseg" and "load carrying capacity Lpred" are coupled into the upgrade urgency coefficient Unrg, which avoids excessive upgrades to a large number of devices during high load periods, causing communication congestion and operational fluctuations. On the other hand, attribute encryption ensures that only target devices that meet the attribute policy set can decrypt and execute the upgrade, which significantly improves the fineness of upgrade scheduling and the security of the upgrade process.

[0018] (3) The system constructs a risk identification and marking link from "multi-source acquisition of messages, feature aggregation, feeder anomaly feature vector, feeder segment risk index Rseg, risk level identification, and on-chain risk segment record". At the same time, it uses the feeder segment risk index Rseg and load prediction feature Lpred as inputs, and constructs an upgrade execution link from "risk assessment results, urgency quantification, adaptive upgrade resource allocation, target equipment encryption upgrade, and on-chain record of upgrade task" through upgrade urgency coefficient Unrg(j), urgency interval threshold, adaptive upgrade mode, and attribute encryption upgrade control based on CP-ABE. The two are connected to form an "anomaly feature identification, risk quantification, urgency calculation, adaptive upgrade and on-chain auditable closed loop". Under this closed loop, the system can prioritize the selection of third-level risk feeders with a larger feeder segment risk index Rseg, and combine the load forecasting characteristic Lpred to prioritize the upgrade of corresponding equipment within a suitable time window with controlled concurrency intensity. This allows high-risk equipment in high-risk feeders to receive shorter security patch lags, making patch release times closer to or even earlier than vulnerability exposure times. As a result, the overall security patch lag is reduced, and the comprehensive upgrade efficiency index is improved. The upgrade process is transformed from the original one-size-fits-all fixed batch approach to a refined and highly secure upgrade mode that is highly matched with the actual operational risk distribution and load conditions. This significantly improves the technical problems in the existing technology where high-risk equipment is not prioritized for repair and upgrade behavior is disconnected from actual risks. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the remote automatic software upgrade system for IoT devices based on blockchain and attribute encryption, as described in this invention. Figure 2 This diagram illustrates the connection between smart meter data collection points for IoT devices and the automatic upgrade system. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0021] Example 1 Please see Figure 1 This invention provides a remote automatic upgrade system for IoT device software based on blockchain and attribute encryption. To achieve the above objectives, this invention is implemented through the following technical solutions: including a feature aggregation module, a feeder segmentation analysis module, an upgrade strategy generation module, and an encrypted upgrade module. The feature aggregation module collects smart meter data in real time by setting up several collection points on the smart meter of the Internet of Things device, and transmits the data remotely to the automatic upgrade system through the communication network, and then performs feature aggregation to obtain the feeder abnormal feature vector. The feeder segmentation analysis module calculates the feeder segmentation risk index Rseg based on the feeder anomaly feature vector, then performs risk assessment based on the preset risk interval threshold and the feeder segmentation risk index Rseg, and generates feeder risk segmentation records based on the risk assessment results and writes them into the blockchain network. When the upgrade strategy generation module generates a level 3 risk feeder based on the risk assessment results, it triggers the adaptive attribute encryption upgrade scheduling. The adaptive attribute encryption upgrade scheduling calculates and outputs the upgrade urgency coefficient Unrg based on the feeder segment risk index Rseg. The encryption upgrade module assesses the urgency of an upgrade by setting a threshold range and then comparing it with the upgrade urgency coefficient Unrg. Based on the urgency assessment results, it executes an adaptive upgrade strategy and attribute encryption control.

[0022] In this embodiment, the system forms a continuous closed-loop control link through a feature aggregation module, a feeder segmentation analysis module, an upgrade strategy generation module, and an encryption upgrade module. First, the feature aggregation module deploys smart meter collection point P1 on the smart meter side, concentrator collection point P2 on the feeder side, and load prediction collection point P3 on the master station side. It aggregates operational data such as the number of restarts, the cumulative time of voltage exceeding the upper and lower limits, the number of power mutation events, the total number of messages, the number of retransmitted messages, and the peak active load into a feeder anomaly feature vector. The actual purpose of this is not simply to collect more data, but to map the three originally dispersed risk factors of "equipment anomaly," "communication quality," and "load level" onto the same feeder dimension, so that the system can see "which feeder is most dangerous overall," rather than just seeing the local phenomenon of occasional anomalies in a few meters. Based on this, the feeder segmentation analysis module calculates the feeder segmentation risk index Rseg using the feeder anomaly feature vector. Then, it uses a preset risk range threshold to classify and evaluate Rseg, and writes the results to the blockchain network. The physical meaning is that a larger Rseg indicates a more severe degree of "restarts, out-of-bounds errors, and retransmissions" on the feeder. Solidifying the evaluation results into feeder risk segmentation records on the blockchain can prevent subsequent maintenance strategies from being tampered with or difficult to trace afterward. For example, when a feeder is in a high-risk state for an extended period but is not prioritized for upgrades, leading to an accident, the risk segmentation record in the blockchain can directly prove that Rseg had exceeded the high-risk lower threshold, but the upgrade was not implemented, thus forcing strategy optimization. The upgrade strategy generation module and the encrypted upgrade module start with Rseg and take the upgrade urgency coefficient Unrg as the core. They use algorithms rather than experience to determine "who to upgrade first, when to upgrade, and how much to upgrade": When a feeder is determined to be a level 3 risk feeder, adaptive attribute encrypted upgrade scheduling is triggered. By combining Rseg with the feeder load prediction feature Lpred to calculate Unrg, the contradictory issues of "the more dangerous, the more we want to upgrade" and "the higher the load, the less we should upgrade" are unified into an urgency index. Then, the encrypted upgrade module classifies Unrg according to the urgency interval threshold, which precisely limits the upgrade time window and the proportion of concurrent upgrade devices. With the help of attribute encryption control, it ensures that only devices that meet the attribute constraints such as region, feeder, risk level, and firmware version can decrypt the upgrade package. In this way, when a typical dangerous scenario occurs, such as "a certain feeder frequently malfunctions and is under high load", the system will not either force a large-scale upgrade in one go or simply postpone it to the next unified window, as existing technologies do. Instead, it will prioritize, phase, and steadily upgrade high-risk equipment through a smaller concurrency and controlled time window. This not only reduces the patch lag time of high-risk equipment, but also significantly reduces the probability of communication congestion, voltage fluctuations, and cascading failures caused by upgrades under high load conditions, thereby achieving an overall improvement in upgrade security, real-time performance, and auditability.

[0023] Example 2 Please see Figure 1 and Figure 2 Specifically: the feature aggregation module includes a data acquisition unit; The data acquisition unit sets up several acquisition points on the smart meter of the Internet of Things device. Each acquisition point has its own measurement module and collects smart meter data in real time every 15 minutes. The data is then transmitted to the data feature aggregation module in the automatic upgrade system through the power distribution communication network. The data collection points include smart meter data collection point P1, feeder-side concentrator data collection point P2, and main station-side load prediction data collection point P3; Smart meter data includes messages collected by the distribution communication network, feeder messages, and load forecast messages; The power distribution communication network will collect messages including the number of restarts Nrm, the cumulative time Tov for voltage exceeding the upper and lower limits, and the number of power surge events Nps; The feeder message collection includes the total number of messages Npf and the number of retransmitted messages Nrf within the entire feeder; The load forecast message includes the peak active load Pha(j,t) of the j-th feeder at time t; Specific explanation: The smart meter collection point P1 is set up by a large number of smart meters connected to each power distribution feeder. The metering module and event recording module inside the smart meter statistically analyze the operating status of the smart meter within a preset collection period. The periodic statistics are obtained as follows: number of restarts Nrm, cumulative time Tov for voltage exceeding the upper and lower limits, and number of power change events Nps. At the end of the collection period, the above statistical results are encapsulated into a collection message for the power distribution communication network. The feeder-side concentrator acquisition point P2, through the feeder concentrator and distribution automation terminal set on the feeder side, counts the total number of messages Npf and the number of retransmitted messages Nrf in the entire feeder during the acquisition period, and encapsulates the statistical results into feeder acquisition messages; The load prediction acquisition point P3 on the main station side is set up in the main station side dispatching system and load management system to extract the active load sequence in real time. The active load sequence is sorted according to the sampling time of the sampling period. Each sequence point is the active load peak value Pha(j,t) of the j-th feeder at time t, and is encapsulated into a load prediction message.

[0024] The feature aggregation module also includes a data aggregation unit; The data aggregation unit maintains a feeder topology table in the automatic upgrade system. The feeder topology table is used to match the device identifier of each smart meter with its corresponding feeder number j, thereby assigning the smart meter to the corresponding feeder or feeder segment. Next, the power distribution communication network will parse the collected messages, match the device identifiers in the collected messages with the feeder topology table, and classify the number of restarts Nrm, the cumulative time Tov for voltage exceeding the upper and lower limits, and the number of power mutation events Nps carried in the collected messages according to the device identifiers, and construct the device abnormal operation feature vector Fdev(i) for each smart meter i. The feature aggregation unit also parses the feeder acquisition messages received through the power distribution communication network, matches the feeder number j in the feeder acquisition message with the feeder topology table, reads the total number of messages Npf and the number of retransmitted messages Nrf carried in the feeder acquisition message, and calculates the communication retransmission rate Rretrans(j) of the j-th feeder based on the ratio of the total number of messages Npf and the number of retransmitted messages Nrf. Then, combined with the aggregation statistics of the abnormal operation feature vectors Fdev(i) of multiple devices belonging to feeder number j on the device set, the total number of restarts Nrm of the j-th feeder corresponding to the feeder is obtained. sum (j) The total cumulative time Tov of voltage out-of-bounds operation of the j-th feeder sum The total number of power mutation events (j) and the j-th feeder Nps sum (j), thereby constructing feeder aggregation of abnormal data. Further, the load forecast message received through the power distribution communication network is parsed. The peak active load Pha(j,t) of the j-th feeder at time t is classified according to the feeder number j. Then, the ratio is calculated with the reference load Pref(j) preset for feeder j to obtain the load forecast feature Lpred(j) of the j-th feeder. The value range of the load forecast feature Lpred(j) of the j-th feeder is limited to 0 to 1. Then, based on the total number of restarts Nrm of the j-th feeder sum (j) The total cumulative time Tov of voltage out-of-bounds operation of the j-th feeder sum The total number of power mutation events (j) and the j-th feeder Nps sum (j) and the communication retransmission rate Rre(j) of the j-th feeder are normalized according to the ratio calculation with the reference value. The feeder aggregated abnormal data are mapped to the restart abnormal normalization index Ere(j), the communication abnormal normalization index Ecom(j) of the j-th feeder, and the voltage abnormal normalization index Epo(j) of the power of the j-th feeder, respectively. They are then uniformly summarized according to the feeder number j to form the feeder abnormal feature vector.

[0025] In this embodiment, the feature aggregation module of the system distributes collection points P1, P2, and P3 across smart meters, feeder concentrators, and the load forecasting side of the main station via the data acquisition unit. Every 15 minutes, it generates a complete set of raw data on "equipment operating status + communication quality + load level." The purpose of this design is not simply to increase the sampling frequency, but to ensure that once frequent restarts (Nrm), voltage out-of-range time (Tov), power surges (Nps), or increases in retransmission ratio (Nrf / Npf) begin to occur on a feeder, the system can detect the trend changes within a very short timescale, rather than waiting for manual inspections or monthly reports to discover the problem. Physically, this means exposing potential faults as early as possible. Based on this, the data aggregation unit uses a feeder topology table to precisely assign the abnormal operating feature vector Fdev(i) of each smart meter to the feeder number j, and then combines this with feeder-level statistical Nrm data. sum (j), Tov sum (j) Nps sum The communication retransmission rate Rre(j) and load forecasting feature Lpred of feeder j are uniformly normalized into Ere(j), Ecom(j), and Epo(j) to form a feeder anomaly feature vector. The core function of this is to compress the originally discrete indicators with "different dimensions and different scales" to the same scale of 0 to 1, which is convenient for subsequent direct use in the calculation of the risk index Rseg and the horizontal comparison between different feeders. For example, if we only look at the Nrm and Tov of a single meter, it is easy to misjudge it as an occasional event due to the small sample size. However, by accumulating and normalizing over the feeder dimension, the system can identify that "the overall restart and boundary crossing of this feeder is significantly higher than the historical reference level", thereby providing early warning of risks in the area. Through the above implementation methods, the feature aggregation module realizes the transformation from "device-level scattered alarms" to "feeder-level quantitative risk profiles," effectively avoiding the problems of focusing only on single-point alarms and difficulty in identifying large-scale anomalies and trend deterioration in existing technologies. It provides a high-quality and quantifiable input basis for subsequent feeder segment risk index Rseg calculation, upgrade urgency coefficient Unrg assessment, and adaptive upgrade strategy distribution, thereby improving the overall accuracy of risk identification and the pertinence of upgrade decisions.

[0026] Example 3 Please see Figure 1 Specifically: the feeder segmentation analysis module includes a feeder segmentation risk calculation unit; The feeder segment risk calculation unit calculates the feeder segment risk index Rseg based on the feeder anomaly feature vector and in accordance with the Euclidean norm, thereby quantifying the overall anomaly degree of feeder j. The feeder segmentation risk index Rseg is calculated and output using the following algorithm formula; In the formula, Rseg(j) represents the feeder segment risk index of the j-th feeder; The formula structure is derived from the Euclidean norm form commonly used in multi-index comprehensive evaluation, which is consistent with the mathematical foundation of existing technology. It does not have explicit weight coefficients, but simply squares, sums, normalizes and then takes the square root of the three outlier dimensions. It is more sensitive to outliers than the arithmetic mean. The normalization denominator is set to 3, which is a natural approach to equivalent processing of the three-dimensional indicators.

[0027] The feeder segmentation analysis module also includes a feeder segmentation risk assessment unit; The feeder segment risk assessment unit pre-sets risk interval thresholds in the automatic upgrade system. The risk interval thresholds include a low-risk upper limit threshold Rth1 and a high-risk lower limit threshold Rth2. Among them, the risk interval threshold is set based on the historical feeder segment risk index Rseg. Specifically, the low risk upper limit threshold Rth1 is used to limit the maximum feeder segment risk index corresponding to the low risk feeder, and the high risk lower limit threshold Rth2 is used to limit the minimum feeder segment risk index corresponding to the high risk feeder, and the low risk upper limit threshold Rth is less than the high risk lower limit threshold Rth2. The real-time acquired feeder segment risk index Rseg is used to conduct a risk assessment with the risk interval threshold. Based on the risk assessment results, the feeder risk level is classified, and a risk level identifier is obtained. The risk level identifier includes Level 1 risk feeders, Level 2 risk feeders, and Level 3 risk feeders. The specific risk assessment content is as follows: When the feed segment risk index Rseg(j) of the j-th feed line is less than or equal to the low-risk upper limit threshold Rth1, it is marked as a first-level risk feed line. When the low-risk upper limit threshold Rth1 < the feeder segment risk index Rseg(j) of the j-th feeder ≤ the high-risk lower limit threshold Rth2, it is marked as a secondary risk feeder; When the feed segment risk index Rseg(j) of the j-th feed line is less than or equal to the high-risk lower limit threshold Rth2, it is marked as a level 3 risk feed line. Among them, the first-level risk feeder < the second-level risk feeder < the third-level risk feeder.

[0028] The feeder segmentation analysis module also includes a blockchain recording unit; The blockchain recording unit constructs a feeder risk segment record after the feeder segment risk assessment unit completes the risk level assessment of the j-th feeder. The feeder risk segmentation record includes the feeder number, the feeder segment risk index Rseg(j) of the j-th feeder, the feeder risk level, and the risk assessment generation timestamp. The feeder risk segmentation record is then encapsulated as a transaction data payload into a blockchain transaction. The blockchain transaction includes a node identifier that identifies the source node of the transaction, a transaction hash value that ensures integrity, and digital signature information that ensures identity trustworthiness. The blockchain network broadcasts blockchain transactions to multiple blockchain nodes, which then execute a consensus algorithm to verify the transactions. Verified transactions are packaged into new blocks and linked to the existing blockchain, ensuring that the feeder risk segmentation record of the j-th feeder is stored in the blockchain network in an immutable manner. This data is then accessible and invoked by the subsequent upgrade strategy generation module and the cryptographic upgrade module based on the blockchain data.

[0029] In this embodiment, the feeder segment analysis module of the system first compresses the aforementioned feeder anomaly feature vector into a single feeder segment risk index Rseg using the feeder segment risk calculation unit. Essentially, this is done by performing a root mean square operation on the three-dimensional normalized indicators of "restart anomaly, communication anomaly, and power or voltage anomaly" in Euclidean norm form: if any one dimension is significantly abnormally large, the feeder segment risk index Rseg will increase significantly, avoiding the dilution of "sharp risks" by simple arithmetic averaging. The real significance of this is that the system is not looking at a single indicator, but rather at "how abnormal the entire feeder is." For example, even if a feeder has normal communication, but numerous restarts and out-of-bounds errors, the feeder segment risk index Rseg will still be raised, thus preventing it from being incorrectly classified as low-risk. The feeder segment risk assessment unit then uses the historical feeder segment risk index Rseg distribution to extract the low-risk upper limit threshold Rth1 and the high-risk lower limit threshold Rth2, classifying the real-time feeder segment risk index Rseg into levels one, two, and three, essentially giving each feeder a "health tag." When there are many feeders in the network, maintenance personnel don't need to monitor the raw data for each feeder; they can quickly identify which feeders require priority by simply checking the risk level. Finally, the blockchain recording unit writes each risk assessment result, along with the feeder number and timestamp, into the blockchain. This prevents "modifying the ledger afterward to cover up unaddressed high-risk situations" and provides a reliable and traceable historical view of risks for the upgrade strategy generation module and the encrypted upgrade module. Overall, this implementation transforms previously scattered and easily overlooked anomaly statistics into quantifiable, tiered, and traceable feeder risk indices and risk levels. This allows subsequent upgrade scheduling to move beyond guesswork, precisely queuing and allocating resources around the most dangerous feeders, significantly improving the targeting and security margin of upgrade decisions.

[0030] Example 4 Please see Figure 1 Specifically: the upgrade strategy generation module includes an upgrade urgency triggering unit; The upgrade urgency triggering unit triggers adaptive attribute encryption upgrade scheduling by using the risk level identifier obtained from the feeder risk level classification and executing the triggering logic based on the risk level identifier. The triggering logic is as follows: When the risk level identifier indicates that feeder j belongs to a level 1 risk feeder, feeder j is simply marked as a regular upgrade object without triggering adaptive attribute encryption upgrade scheduling. When the risk level identifier indicates that feeder j belongs to the level 2 risk feeder, feeder j is marked as an optional accelerated upgrade object, and a prompt message is generated for the operation and maintenance personnel to select and trigger the adaptive attribute encryption upgrade scheduling. When the risk level identifier indicates that feeder j belongs to the third-level risk feeder, an upgrade urgency trigger signal is generated to trigger adaptive attribute encryption upgrade scheduling, which instructs the start of an adaptive attribute encryption upgrade scheduling process based on the feeder segment risk index Rseg(j) of feeder j and the load forecast feature Lpred(j) of feeder j for feeder j, which is a third-level risk feeder.

[0031] The upgrade strategy generation module includes an upgrade urgency analysis unit; After triggering the adaptive attribute encrypted upgrade scheduling, the upgrade urgency triggering unit reads the feeder segment risk index Rseg(j) of the j-th feeder corresponding to the level 3 risk feeder and the load prediction feature Lpred(j) of the j-th feeder from the feature aggregation module and the blockchain network, and calculates and outputs the upgrade urgency coefficient Unrg to quantify and analyze the upgrade urgency of feeder j under the dual constraints of risk level and load carrying capacity within the upgrade time window. The upgrade urgency coefficient Unrg is calculated and output using the following algorithm formula; In the formula, Unrg(j) represents the urgency coefficient for upgrading the j-th feeder; The numerator of the formula reflects how dangerous the j-th feeder is, while the denominator reflects whether the feeder can currently withstand a large-scale upgrade.

[0032] In this embodiment, the upgrade strategy generation module of the system first determines whether to take action based on the upgrade urgency triggering unit, and then determines how and how aggressively to take action based on the upgrade urgency analysis unit. The upgrade urgency triggering unit does not trigger complex scheduling indiscriminately whenever there is risk. Instead, it handles feeders with risks in three tiers: Level 1 risk feeders only undergo regular scheduling and do not trigger adaptive attribute encryption upgrade scheduling, avoiding excessive disruption to relatively healthy feeders. Level 2 risk feeders only generate prompt information, and maintenance personnel manually confirm whether to trigger the upgrade, leaving room for human judgment. Only when a feeder is assessed as a Level 3 risk feeder will an upgrade urgency trigger signal be automatically generated, initiating an adaptive attribute encryption upgrade scheduling process based on the feeder segment risk index Rseg and load forecasting feature Lpred. This design can avoid erroneous actions that could trigger across the entire network at once, ensuring that the system's scheduling complexity matches the risk level. After being triggered, the upgrade urgency analysis unit reads the feeder segment risk index Rseg and load forecast feature Lpred of the j-th feeder from the feature aggregation module and the blockchain network. It then calculates the upgrade urgency coefficient Unrg according to a preset formula. This single number simultaneously characterizes "how dangerous this feeder is" and "whether this feeder can withstand a large-scale upgrade." For example, if Rseg is high but Lpred is close to 1, Unrg will be lowered by the denominator, and the system will choose to reduce concurrency and postpone some upgrades, avoiding adding a large amount of upgrade traffic during already high-load and unstable periods. This combined implementation of "triggering by risk level first, then using Unrg for fine-tuning" ensures that truly high-risk feeders are not overlooked, while avoiding unnecessary large-scale upgrades under medium-to-low risk or high-load conditions. This improves the overall accuracy of upgrade priority decisions and reduces the impact of false triggers on distribution network communication and operational stability.

[0033] Example 5 Please see Figure 1 Specifically: the encryption upgrade module includes an adaptive upgrade strategy evaluation unit; The adaptive upgrade strategy evaluation unit pre-sets urgency interval thresholds in the automatic upgrade system. The urgency interval thresholds include a low urgency threshold Uth1 and a medium urgency threshold Uth2. Among them, the urgency interval threshold is extracted based on the historical upgrade urgency coefficient Unrg. Specifically, the low urgency threshold Uth1 is used to limit the upgrade urgency coefficient Unrg to the upper limit of the low urgency interval, and the medium urgency threshold Uth2 is used to limit the upgrade urgency coefficient Unrg to the upper limit of the medium urgency interval, and the low urgency threshold Uth1 is less than the medium urgency threshold Uth2. Next, the urgency coefficient Unrg(j) of each j-th feeder, which is obtained in real time, is compared with the urgency interval threshold to evaluate the urgency. A hierarchical control strategy is then implemented for each feeder to obtain the upgrade mode identifier. At the same time, an adaptive upgrade strategy is executed. The specific details are as follows: When the upgrade urgency coefficient Unrg(j) of the j-th feeder is less than or equal to the low urgency threshold Uth1, it is determined to be at level one urgency. At this time, the upgrade mode is identified as the normal upgrade mode. The normal upgrade mode limits the allowed upgrade time window to the time window when the load prediction characteristic Lpred(j) of the j-th feeder is less than or equal to 0.5, and limits the maximum number of concurrent upgrade devices to no more than 5% of the total number of IoT devices on the j-th feeder. When the low urgency threshold Uth1 < the upgrade urgency coefficient Unrg(j) of the j-th feeder ≤ the medium urgency threshold Uth2, it is determined to be a level 2 urgency. At this time, the upgrade mode is identified as the accelerated upgrade mode. The accelerated upgrade mode limits the allowed upgrade time window to the time window where the load prediction characteristic Lpred(j) of the j-th feeder ≤ 0.8, and limits the maximum number of concurrent upgrade devices to 5%-20% of the total number of IoT devices in the j-th feeder. When the upgrade urgency coefficient Unrg(j) of the j-th feeder is greater than the medium urgency threshold Uth2, it is determined to be at level three urgency. At this time, the upgrade mode is identified as emergency upgrade mode. The emergency upgrade mode limits the allowed upgrade time window to the time window when the load prediction characteristic Lpred(j) of the j-th feeder is ≤0.9, and limits the maximum number of concurrent upgrade devices to 20%-50% of the total number of IoT devices on the j-th feeder.

[0034] The encryption upgrade module also includes an attribute encryption control unit; The attribute encryption control unit executes attribute encryption control that matches the adaptive upgrade strategy based on the results of the hierarchical control strategy. The specific content of the attribute encryption control is as follows: Receive the upgrade mode identifier of the j-th feeder, and construct the attribute policy set of the j-th feeder based on the upgrade mode identifier, the feeder number, risk level, area information, and IoT device firmware version information corresponding to the j-th feeder. The attribute encryption control unit is also configured to: call the attribute encryption algorithm to encrypt the upgrade package for the j-th feeder, embed the attribute policy set as an access control policy into the encryption process, generate an encrypted upgrade package corresponding to the attribute policy set, and send the encrypted upgrade package to IoT devices through the power distribution communication network in a broadcast or targeted manner, so that only IoT devices whose local device attribute set satisfies the attribute policy set can complete the attribute policy matching, decrypt the encrypted upgrade package and perform the upgrade locally. The attribute encryption control unit also interacts with the smart contract logic in the blockchain network. Based on the upgrade urgency coefficient Uurg and the upgrade mode identifier, it sets the upgrade task priority, maximum number of concurrent tasks, and allowed upgrade time window for the j-th feeder. After the upgrade is completed, it collects upgrade success information, upgrade failure information, and upgrade retry information returned by IoT devices, generates upgrade task records, encapsulates the upgrade task records into blockchain transactions, and broadcasts them to the blockchain network. This allows the upgrade execution process and results to be recorded in the blockchain in an auditable manner for subsequent querying and strategy optimization. The attribute encryption algorithm employs the existing ciphertext policy attribute-based encryption CP-ABE algorithm, with a preferred choice being the BSW07 algorithm proposed by Bethencourt-Sahai-Waters, which specifically includes: The key management entity performs the system initialization process of the CP-ABE algorithm, generating the public parameter PK and the master key MK; The key management entity generates a corresponding attribute private key SKattr for each IoT device by calling the CP-ABE key generation algorithm KeyGen(MK,AttrSet) based on the attribute set of IoT devices (including area attributes, feeder identification attributes, risk level attributes, and firmware version attributes, etc.). When encrypting the upgrade package, the attribute policy set is transformed into the CP-ABE access structure Policy(j), and the CP-ABE encryption algorithm Encrypt(PK, upgrade package, Policy(j)) is called to generate the encrypted upgrade package corresponding to the j-th feeder. This ensures that the CP-ABE decryption algorithm Decrypt(decrypt encrypted upgrade package, SKattr) can be called to successfully decrypt and obtain the plaintext of the upgrade package and perform the upgrade only when the attribute set held locally by the IoT device satisfies the access structure Policy(j).

[0035] In this embodiment, the encryption upgrade module of the system first uses the adaptive upgrade strategy evaluation unit to truly translate the "upgrade urgency coefficient Unrg(j)" into executable upgrade parameters: instead of simply saying "upgrade more devices if it is urgent", it explicitly divides each feeder into three urgency levels using the low urgency threshold Uth1 and the medium urgency threshold Uth2, and directly gives hard constraints on the "allowed upgrade time window conditions" and the "maximum number of concurrent upgrade devices" for each level. For example, when the upgrade urgency coefficient Unrg(j) of the j-th feeder is low, the load forecasting characteristic Lpred(j) of the j-th feeder is required to be ≤0.5 and the maximum number of concurrent upgrade devices should not exceed 5% of the total number of IoT devices on the j-th feeder. The physical meaning of this design is very direct: under low risk conditions, it is better to be slower and have fewer upgrades to ensure that the upgrades cause almost no disturbance to the distribution network load and communication. When the upgrade urgency coefficient Unrg(j) of the j-th feeder rises to level two or three urgency, the system gradually relaxes the upper limit of the load forecasting characteristic Lpred and increases the concurrency ratio, so that feeders that are truly "dangerous yet have spare load" can quickly complete the upgrade of more devices and avoid high-risk devices from operating with defects for a long time. The attribute encryption control unit addresses the questions of "who gets upgraded" and "how to ensure only the right devices get upgraded": First, it constructs an attribute policy set based on upgrade mode identifier, feeder number, risk level, region information, and firmware version information, writing "which devices must be upgraded first and which devices cannot be upgraded incorrectly" into the access control rules; Second, it calls the Ciphertext Policy Attribute Base Encryption CP-ABE algorithm (preferably the BSW07 algorithm proposed by Bethencourt-Sahai-Waters) to transform the attribute policy set into an access structure Policy(j), encrypting the upgrade package so that only the local device attribute set can be accessed. Only IoT devices that meet the access structure Policy(j) can recover the plaintext and execute the upgrade via Decrypt (decrypting the encrypted upgrade package, SKattr). This effectively prevents the upgrade package from being used by incorrect devices or illegal nodes, preventing problems such as "cross-regional accidental upgrades" and "device failure due to firmware version mismatch." Thirdly, the attribute encryption control unit entrusts the upgrade urgency coefficient Unrg(j) and upgrade mode identifier to the blockchain smart contract. The smart contract controls the task priority, the maximum number of concurrent tasks, and the allowed upgrade time window, and writes the upgrade success rate, failure rate, and number of retries into the blockchain to achieve full traceability. In summary, this implementation method precisely constrains "when and how many devices to upgrade" in terms of quantity, preventing secondary impacts during high-load or vulnerable periods. On the other hand, it precisely controls "which devices are allowed to upgrade" in terms of quality, and uses the blockchain to solidify the entire decision-making and execution process, thereby simultaneously improving the security, controllability, and auditability of the upgrade process. This is significantly better than the existing technology's practice of indiscriminately broadcasting upgrade packages, lacking access control, and being difficult to trace.

[0036] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention.

Claims

1. A remote automatic software upgrade system for IoT devices based on blockchain and attribute encryption, characterized in that: It includes a feature aggregation module, a feeder segmentation analysis module, an upgrade strategy generation module, and an encryption upgrade module; The feature aggregation module collects smart meter data in real time by setting up several collection points on the smart meter of the Internet of Things device, and transmits the data remotely to the automatic upgrade system through the communication network, and then performs feature aggregation to obtain the feeder abnormal feature vector. The feature aggregation module also includes a data aggregation unit; The data aggregation unit maintains a feeder topology table in the automatic upgrade system. The feeder topology table is used to map the device identifier of each smart meter to its corresponding feeder number j, thereby dividing the smart meter into the corresponding feeder or feeder segment. Next, the power distribution communication network will parse the collected messages, match the device identifiers in the collected messages with the feeder topology table, and classify the number of restarts Nrm, the cumulative time Tov for voltage exceeding the upper and lower limits, and the number of power mutation events Nps carried in the collected messages according to the device identifiers, and construct the device abnormal operation feature vector Fdev(i) for each smart meter i. The feature aggregation unit also parses the feeder acquisition messages received through the power distribution communication network, matches the feeder number j in the feeder acquisition message with the feeder topology table, reads the total number of messages Npf and the number of retransmitted messages Nrf carried in the feeder acquisition message, and calculates the communication retransmission rate Rretrans(j) of the j-th feeder based on the ratio of the total number of messages Npf and the number of retransmitted messages Nrf. Then, combined with the aggregation statistics of the abnormal operation feature vectors Fdev(i) of multiple devices belonging to feeder number j on the device set, the total number of restarts Nrm of the j-th feeder corresponding to the feeder is obtained. sum (j) The total cumulative time Tov of voltage out-of-bounds operation of the j-th feeder sum The total number of power mutation events (j) and the j-th feeder Nps sum (j), thereby constructing feeder aggregation of abnormal data, Further, the load forecast message received through the power distribution communication network is analyzed. The peak active load Pha(j,t) of the j-th feeder at time t is classified according to the feeder number j. Then, the ratio is calculated with the reference load Pref(j) preset for feeder j to obtain the load forecast feature Lpred(j) of the j-th feeder. Then, based on the total number of restarts Nrm of the j-th feeder sum (j) The total cumulative time Tov of voltage out-of-bounds operation of the j-th feeder sum The total number of power mutation events (j) and the j-th feeder Nps sum (j) and the communication retransmission rate Rre(j) of the j-th feeder are normalized according to the ratio calculation with the reference value. The feeder aggregated abnormal data are mapped to the restart abnormal normalization index Ere(j), the communication abnormal normalization index Ecom(j) of the j-th feeder, and the voltage abnormality normalization index Epo(j) of the power of the j-th feeder, respectively. They are then uniformly summarized according to the feeder number j to form the feeder abnormal feature vector. The feeder segmentation analysis module calculates the feeder segmentation risk index Rseg based on the feeder anomaly feature vector, then performs risk assessment based on the preset risk interval threshold and the feeder segmentation risk index Rseg, and generates feeder risk segmentation records based on the risk assessment results and writes them into the blockchain network. The upgrade strategy generation module triggers adaptive attribute encryption upgrade scheduling when the risk assessment result generates a level 3 risk feeder. The adaptive attribute encryption upgrade scheduling calculates and outputs the upgrade urgency coefficient Unrg based on the feeder segment risk index Rseg. The encryption upgrade module evaluates the urgency by setting a preset urgency range threshold and then comparing it with the upgrade urgency coefficient Unrg. Based on the urgency evaluation result, it executes an adaptive upgrade strategy and attribute encryption control.

2. The IoT device software remote automatic upgrade system based on blockchain and attribute encryption according to claim 1, characterized in that: The feature aggregation module includes a data acquisition unit; The data acquisition unit sets up several acquisition points on the smart meter of the Internet of Things device. Each acquisition point has its own measurement module, and the smart meter data is collected in real time in a 15-minute acquisition cycle. The data is then transmitted to the data feature aggregation module in the automatic upgrade system through the power distribution communication network. The data collection points include smart meter data collection point P1, feeder-side concentrator data collection point P2, and main station-side load prediction data collection point P3. The smart meter data includes data collected from the distribution communication network, data collected from the feeder, and load forecast data. The power distribution communication network will collect messages including the number of restarts Nrm, the cumulative time Tov for voltage exceeding the upper and lower limits, and the number of power surge events Nps; The feeder-collected messages include the total number of messages Npf and the number of retransmitted messages Nrf within the entire feeder; The load forecast message includes the peak active load Pha(j,t) of the j-th feeder at time t.

3. The IoT device software remote automatic upgrade system based on blockchain and attribute encryption according to claim 1, characterized in that: The feeder segmentation analysis module includes a feeder segmentation risk calculation unit. The feeder segment risk calculation unit quantifies the overall anomaly degree of feeder j by calculating the feeder segment risk index Rseg based on the feeder anomaly feature vector and in the form of Euclidean norm. The feeder segment risk index Rseg is calculated and output using the following algorithm formula; In the formula, Rseg(j) represents the feeder segment risk index of the j-th feeder.

4. The IoT device software remote automatic upgrade system based on blockchain and attribute encryption according to claim 3, characterized in that: The feeder segmentation analysis module also includes a feeder segmentation risk assessment unit. The feeder segment risk assessment unit pre-sets risk interval thresholds in the automatic upgrade system. The risk interval thresholds include a low-risk upper limit threshold Rth1 and a high-risk lower limit threshold Rth2. The real-time acquired feeder segment risk index Rseg is used to conduct a risk assessment with the risk interval threshold. Based on the risk assessment results, the feeder risk level is classified, and a risk level identifier is obtained. The risk level identifier includes first-level risk feeders, second-level risk feeders, and third-level risk feeders. The specific risk assessment content is as follows: When the feed segment risk index Rseg(j) of the j-th feed line is less than or equal to the low-risk upper limit threshold Rth1, it is marked as a first-level risk feed line. When the low-risk upper limit threshold Rth1 < the feeder segment risk index Rseg(j) of the j-th feeder ≤ the high-risk lower limit threshold Rth2, it is marked as a secondary risk feeder; When the feed segment risk index Rseg(j) of the j-th feed line is less than or equal to the high-risk lower limit threshold Rth2, it is marked as a level 3 risk feed line. Among them, the first-level risk feeder < the second-level risk feeder < the third-level risk feeder.

5. The IoT device software remote automatic upgrade system based on blockchain and attribute encryption according to claim 4, characterized in that: The feeder segmentation analysis module also includes a blockchain recording unit; The blockchain recording unit constructs a feeder risk segmentation record after the feeder segmentation risk assessment unit completes the risk level assessment of the j-th feeder. The feeder risk segmentation record includes the feeder number, the feeder segment risk index Rseg(j) of the j-th feeder, the feeder risk level, and the risk assessment generation timestamp. The feeder risk segmentation record is then encapsulated as a transaction data payload into a blockchain transaction. The blockchain transaction includes a node identifier that identifies the source node of the transaction, a transaction hash value that ensures integrity, and digital signature information that ensures identity trustworthiness. The blockchain network broadcasts blockchain transactions to multiple blockchain nodes, which then execute a consensus algorithm to verify the transactions. Verified transactions are packaged into new blocks and linked to the existing blockchain, ensuring that the feeder risk segmentation record of the j-th feeder is stored in the blockchain network in an immutable manner.

6. The IoT device software remote automatic upgrade system based on blockchain and attribute encryption according to claim 5, characterized in that: The upgrade strategy generation module includes an upgrade urgency triggering unit; The upgrade urgency triggering unit triggers adaptive attribute encryption upgrade scheduling by using a risk level identifier obtained based on the feeder risk level classification and executing triggering logic based on the risk level identifier. The triggering logic is as follows: When the risk level identifier indicates that feeder j belongs to a level 1 risk feeder, feeder j is simply marked as a regular upgrade object without triggering adaptive attribute encryption upgrade scheduling. When the risk level identifier indicates that feeder j belongs to the level 2 risk feeder, feeder j is marked as an optional accelerated upgrade object, and a prompt message is generated for the operation and maintenance personnel to select and trigger the adaptive attribute encryption upgrade scheduling. When the risk level indicator shows that feeder j belongs to the third-level risk feeder, an upgrade urgency trigger signal is generated to trigger the adaptive attribute encryption upgrade scheduling.

7. The IoT device software remote automatic upgrade system based on blockchain and attribute encryption according to claim 6, characterized in that: The upgrade strategy generation module includes an upgrade urgency analysis unit; The upgrade urgency triggering unit reads the feeder segment risk index Rseg(j) and the load prediction feature Lpred(j) of the j-th feeder corresponding to the third-level risk feeder from the feature aggregation module and the blockchain network after triggering the adaptive attribute encryption upgrade scheduling, and calculates and outputs the upgrade urgency coefficient Unrg to quantify and analyze the upgrade urgency of feeder j under the dual constraints of risk level and load carrying capacity within the upgrade time window. The upgrade urgency coefficient Unrg is calculated and output using the following algorithm formula; In the formula, Unrg(j) represents the urgency coefficient for upgrading the j-th feeder.

8. The IoT device software remote automatic upgrade system based on blockchain and attribute encryption according to claim 7, characterized in that: The encryption upgrade module includes an adaptive upgrade strategy evaluation unit; The adaptive upgrade strategy evaluation unit pre-sets urgency interval thresholds in the automatic upgrade system, the urgency interval thresholds including a low urgency threshold Uth1 and a medium urgency threshold Uth2; Next, the urgency coefficient Unrg(j) of each j-th feeder, which is obtained in real time, is compared with the urgency interval threshold to evaluate the urgency. A hierarchical control strategy is then implemented for each feeder to obtain the upgrade mode identifier. At the same time, an adaptive upgrade strategy is executed. The specific details are as follows: When the upgrade urgency coefficient Unrg(j) of the j-th feeder is less than or equal to the low urgency threshold Uth1, it is determined to be at level one urgency. At this time, the upgrade mode is identified as the normal upgrade mode. The normal upgrade mode limits the allowed upgrade time window to a time window where the load prediction characteristic Lpred(j) of the j-th feeder is less than or equal to 0.5, and limits the maximum number of concurrent upgrade devices to no more than 5% of the total number of IoT devices on the j-th feeder. When the low urgency threshold Uth1 < the upgrade urgency coefficient Unrg(j) of the j-th feeder ≤ the medium urgency threshold Uth2, it is determined to be a level 2 urgency. At this time, the upgrade mode is identified as the accelerated upgrade mode. The accelerated upgrade mode sets the allowed upgrade time window condition to the time window when the load prediction characteristic Lpred(j) of the j-th feeder ≤ 0.8, and limits the maximum number of concurrent upgrade devices to 5%-20% of the total number of IoT devices in the j-th feeder. When the upgrade urgency coefficient Unrg(j) of the j-th feeder is greater than the medium urgency threshold Uth2, it is determined to be at level three urgency. At this time, the upgrade mode is identified as emergency upgrade mode. The emergency upgrade mode limits the allowed upgrade time window to the time window when the load prediction characteristic Lpred(j) of the j-th feeder is ≤0.9, and limits the maximum number of concurrent upgrade devices to 20%-50% of the total number of IoT devices on the j-th feeder.

9. The IoT device software remote automatic upgrade system based on blockchain and attribute encryption according to claim 8, characterized in that: The encryption upgrade module also includes an attribute encryption control unit; The attribute encryption control unit executes attribute encryption control that matches the adaptive upgrade strategy based on the results of the hierarchical control strategy. The specific content of the attribute encryption control is as follows: Receive the upgrade mode identifier of the j-th feeder, and construct the attribute policy set of the j-th feeder based on the upgrade mode identifier, the feeder number, risk level, area information, and IoT device firmware version information corresponding to the j-th feeder. The attribute encryption control unit is also configured to: call the attribute encryption algorithm to encrypt the upgrade package for the j-th feeder, embed the attribute policy set as an access control policy into the encryption process, generate an encrypted upgrade package corresponding to the attribute policy set, and send the encrypted upgrade package to IoT devices through the power distribution communication network in a broadcast or targeted manner, so that only IoT devices whose local device attribute set satisfies the attribute policy set can complete the attribute policy matching, decrypt the encrypted upgrade package and perform the upgrade locally. The attribute encryption control unit also interacts with the smart contract logic in the blockchain network. Based on the upgrade urgency coefficient Uurg and the upgrade mode identifier, it sets the upgrade task priority, maximum number of concurrent tasks, and allowed upgrade time window for the j-th feeder. After the upgrade is completed, it collects upgrade success information, upgrade failure information, and upgrade retry information returned by IoT devices, generates upgrade task records, encapsulates the upgrade task records into blockchain transactions, and broadcasts them to the blockchain network, so that the upgrade execution process and results are recorded in the blockchain in an auditable manner.

Citation Information

Patent Citations

  • Internet of Things equipment software remote automatic upgrading method and system

    CN116166305A

  • Upgrading method, system and equipment of power line signal acquisition front end and medium

    CN117519746A