Remote software upgrade method and system based on HPLC high-speed power line carrier network

The remote software upgrade method using HPLC high-speed power line carrier network, employing dynamic fragmented transmission, multi-path concurrency, and voltage zero-crossing switching technology, solves the problem of high upgrade failure rate in low-voltage power line carrier communication, achieving efficient, safe, and reliable software upgrades in a low-noise environment.

CN120880496BActive Publication Date: 2025-11-28SHENZHEN LANCHAO TECH CO LTD

Patent Information

Application Number
CN202511377860.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2025-11-28
Estimated Expiration
2045-09-25

AI Technical Summary

Technical Problem

Existing low-voltage power line carrier communication suffers from high packet loss rates due to dynamic fluctuations in channel quality, insufficient service continuity assurance, and poor compatibility with resource-constrained equipment during software upgrades, resulting in a high upgrade failure rate.

Method used

A remote software upgrade method based on HPLC high-speed power line carrier network is adopted. Through dynamic fragmented transmission, multi-path concurrent transmission, breakpoint resume protocol, voltage zero-crossing switching technology and three-level verification mechanism, combined with hardware fingerprint dynamic degradation mechanism, a triple leap in safety, operation and maintenance and energy efficiency is achieved.

Benefits of technology

It reduced the upgrade failure rate, met the millisecond-level real-time metering requirements of smart meters, reduced transmission time and storage requirements, improved operation and maintenance response efficiency, and extended equipment life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120880496B_ABST
    Figure CN120880496B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of power communication of Internet of Things, and discloses a remote software upgrading method and system based on HPLC high-speed power line carrier network; the remote software upgrading method is applied to a software upgrading device and specifically comprises the following steps: S101: obtaining a master node of software to be upgraded; the master node completes an encrypted upgrading instruction package through HPLC network broadcasting; if the master node is in an offline state, a response is triggered through a power line power frequency cycle synchronization wake-up pulse signal to ensure that all network nodes complete instruction synchronization within a preset time. The present application realizes all-around upgrading optimization through three core technologies of dynamic fragmentation transmission, millisecond-level service continuity guarantee and resource limit adaptation; an adaptive fragmentation strategy (128KB-512KB) based on a signal-to-noise ratio compresses a packet loss rate in a high-noise environment to 0.1%; combined with multi-path concurrent transmission and a breakpoint resume protocol, average transmission time is reduced from 30 minutes to 17.4 minutes; and a power frequency synchronization wake-up mechanism is used to realize 300ms network-wide instruction synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet of Things power communication, in particular to a remote software upgrading method and system based on HPLC high-speed power line carrier network. BACKGROUND

[0002] Low-voltage power line carrier communication is the most basic communication method in power information collection system. Low-voltage power line carrier communication has been widely used in centralized meter reading, and has begun to be applied in the fields of smart home and smart building. At present, the state is vigorously promoting the construction of smart grid, and low-voltage power carrier communication, as an important technical means to solve the "last mile" problem existing in the smart grid, plays an increasingly important role in centralized meter reading. However, the power data collection system and the routing module on the power data collection terminal cannot directly communicate, and if any abnormality occurs in the routing software, it can only be repaired on site, which makes the updating and upgrading of the routing software very troublesome. The traditional power line carrier upgrading scheme has three bottlenecks:

[0003] Dynamic fluctuation of channel quality: power line network is disturbed by power frequency harmonics and load switching noise (signal-to-noise ratio fluctuation up to ±20dB), resulting in upgrade package transmission packet loss rate exceeding 5%, and fixed fragmentation strategy is easy to cause transmission timeout failure in high noise period;

[0004] Insufficient business continuity guarantee: the device needs to be restarted to interrupt the business process during upgrading, the communication interruption time is > 50ms, which cannot meet the millisecond-level response demand of smart meter real-time metering and distribution network protection device;

[0005] Poor compatibility of resource-limited devices: the terminal node FLASH capacity is small (usually 1-4MB), and the CPU computing power is low (<100MHz), which cannot support complete upgrade package verification and storage, and the existing scheme has a high upgrade failure rate of up to 15% due to insufficient hardware resources.

[0006] Based on the above, it is urgent to design a remote software upgrading method and system based on HPLC high-speed power line carrier network to make up for the deficiencies of the traditional power line carrier upgrading scheme mentioned above. SUMMARY

[0007] The purpose of the present application is to provide a remote software upgrading method and system based on HPLC high-speed power line carrier network, to build a full life cycle intelligent management system to realize the three transitions of safety, operation and maintenance, and energy efficiency: in terms of safety, the embedded version dependency tree automatically parses the multi-stage upgrading path to avoid compatibility faults, and the atomic partition switching combined with three-level verification greatly reduces the upgrade abnormality rate, aiming to solve the problem of resource-limited terminal upgrading in the prior art.

[0008] The application is achieved based on a remote software upgrading method of an HPLC high-speed power line carrier network, applied to a software upgrading device, and specifically includes the following steps:

[0009] S101: A master node of software to be upgraded is acquired, and the master node completes an encrypted upgrading instruction package through HPLC network broadcasting; if the master node is in an offline state, a response is triggered through a power line power frequency cycle synchronization wake-up pulse signal to ensure that all network nodes complete instruction synchronization within a preset time;

[0010] S102: The master node dynamically fragments the upgrading instruction package according to 128 KB-512 KB, each fragment is attached with CRC-32 and SHA-256 double check codes, and the upgrading instruction package is transmitted through multi-path concurrency, a relay node with a load lower than 60% is preferentially selected to establish a transmission link, when power line noise burst is detected, the transmission process automatically switches to a backup frequency band, and when the node is restarted after power failure, the last valid fragment offset is recovered;

[0011] S103: After the node receives the switching instruction of the master node, a partition switching operation is completed within 10 ms of a power line voltage zero crossing point, during which business data is temporarily stored through a bypass cache queue, the communication interruption time is less than 5 ms, when the switching fails, the node automatically rolls back to the original partition and reports error logs to the master node;

[0012] S104: Double backup partitions are divided in a local non-volatile storage area, the node performs three-level verification after receiving complete fragments, and after verification, the node decompresses the upgrading file in the backup partition, simultaneously detects hardware compatibility, if resources are insufficient, the node automatically cleans up log caches and reserves a safe storage space, after completion, the node sends a ready signal to the master node, and freezes a state snapshot of a current business process to an independent storage sector in the double backup partition;

[0013] S105: After the independent storage sector starts, a self-checking program is executed to verify the running state of a key function module, if heartbeat detection is normal for three times in succession, the old partition file is deleted and dynamic fragments of the upgrading instruction package are received, after receiving is completed, verification software upgrading is completed, if self-checking fails or heartbeat times out, rollback is completed within 30 s, and the rollback is broadcast to the master node through the HPLC network to re-perform a remote software upgrading request.

[0014] Further, in S101, the master node completes the encrypted upgrading instruction package through HPLC network broadcasting, including:

[0015] The instruction package contains an upgrading version number, a file hash value, a fragment strategy and a target node range;

[0016] The terminal node of the required upgraded software captures the instruction package in the low-power listening mode, wakes up the core processor after verifying the digital signature, and generates a hierarchical forwarding path based on the network topology.

[0017] Further, the core processor is woken up after verifying the digital signature, and a hierarchical forwarding path is generated based on the network topology, comprising:

[0018] The master node divides the terminal nodes into N levels according to physical distance and channel quality based on the network topology database;

[0019] The coverage radius of the first layer of relay nodes is ≤500 meters, and a cross-layer relay selection algorithm is used between each level to calculate the signal-to-noise ratio gain, historical packet loss rate, and load weight factor between nodes to generate an optimal path tree;

[0020] When a node failure is detected, a backup relay node is dynamically enabled and the path weight is updated to ensure that the broadcast delay fluctuation range is less than ±5%.

[0021] Further, in S102, the master node dynamically fragments the upgrade instruction package into 128KB-512KB, comprising:

[0022] The size of the dynamic fragment is adaptively adjusted according to the real-time channel signal-to-noise ratio, and when the HPLC channel utilization is less than 40%, 512KB fragments are used, when the utilization is 40-70%, 256KB fragments are used, and when the utilization is higher than 70%, 128KB fragments are used;

[0023] The fragment transmission uses a priority-based pre-emptive retransmission mechanism, the key boot file fragments are given the highest priority, and after a failure, they are immediately retransmitted within 20ms, and the application layer fragments allow a maximum of 3 retransmissions with adaptive incremental intervals each time.

[0024] Further, in S103, after receiving the switching instruction from the master node, the node completes the partition switching operation within 10ms of the power line voltage zero crossing point, comprising:

[0025] The switching timing is started 1ms before the grid voltage zero crossing point, the 50Hz power frequency waveform is tracked in real time through a phase-locked loop circuit, a synchronization signal is sent when the voltage amplitude is detected to be lower than 5V, if no valid zero crossing point is captured for two consecutive periods, a temperature compensation crystal oscillator timer is enabled, the FLASH controller write operation is frozen, and the logical address is redirected and mapped to the new partition physical address through a 32-bit bus single-cycle update mapping register;

[0026] Immediately after the address remapping is completed, 128 KB boot code is prefetched from the new partition address to the CPU L1 cache, the memory protection unit is started to isolate the kernel space, the four-stage security verification chain is executed synchronously, the first stage adopts CRC-32 to check the integrity of the boot header structure, the second stage verifies the partition image hash value through SHA-256, the third stage verifies the developer certificate based on the ECDSA P-256 algorithm, and the final stage verifies the power grid root certificate chain using the national standard SM2;

[0027] After verification, the AES-256 encrypted service snapshot is read from the independent encrypted storage area, the LZ77 decompression algorithm is executed to restore the metering real-time data, the TCP / IP protocol stack state and the security session key, the base snapshot and the differential log are checked for integrity through CRC-16, the temporarily stored pulse count of the electric meter in the SRAM is directly written to the metering ASIC through the DMA channel, the network protocol state is played back according to the transaction log, and finally the event record is written in timestamp order.

[0028] Further, in S104, the local non-volatile storage area is divided into double backup partitions, and the node performs three-stage verification after receiving the complete shard, including:

[0029] A 32-bit CRC check is performed on each received upgrade package shard in real time, the check code is calculated in parallel through a hardware accelerator during shard transmission, and after receiving is completed, the tail CRC value of the shard is compared with the calculation result, and if the check fails, the retransmission mechanism of the shard is triggered immediately;

[0030] After all shards are received, the complete upgrade package is reconstructed in memory and the SHA-256 hash engine is started, the 256-bit hash value calculated through the memory mapping technology is compared with the target hash value in the instruction package bit by bit, and if the match fails, the received shard is deleted and an error code 0xF2 is reported;

[0031] The digital signature of the upgrade package is verified using the power grid root certificate preset by the device, the developer certificate chain is parsed first, then the signature validity is verified through elliptic curve point multiplication operation, and finally the certificate validity period and revocation list are checked, and if the verification fails, the safety fuse mechanism is activated to prevent switching operation.

[0032] Further, in S105, the self-checking program is executed after the start of the independent storage sector, and the running state of the key function module is verified, the key function module including:

[0033] The carrier communication protocol stack is verified by injecting standard test frames for bidirectional transmission and reception test, counting the packet loss rate and transmission delay, and synchronously monitoring the physical layer signal-to-noise ratio and the MAC layer retransmission rate, and if any index is out of limit, an error code 0xC1 is recorded;

[0034] The metering core algorithm is verified in the following mode: a high-precision standard source is connected to apply a dynamic load, and the voltage effective value error, current harmonic analysis precision and electric energy cumulative error are compared, and an alarm is triggered when the error exceeds three power frequency periods in succession;

[0035] The security encryption engine is verified in the following mode: the SM4 / CBC mode encryption and decryption throughput test is performed, the true random number generator entropy value and the key storage area write protection state are verified, and the encryption consistency under voltage drop is simulated, and the security subsystem is fused when the test fails.

[0036] Further, if the self-checking fails or the heartbeat times out, the rollback is completed within 30s, and the HPLC network is used to broadcast the rollback to the master node to re-perform the remote software upgrade request, including:

[0037] The storage access is frozen immediately after detecting the upgrade exception, the partition mapping table is rolled back to the previous effective state through the hardware register operation, the new partition cache data is synchronously cleared, and the mapping table CRC-8 check code is verified, so that the lossless switching is completed within 500 mu s, and the fuse protection mechanism is activated if the verification fails;

[0038] The forced reset signal of the watchdog chip is triggered, the system cold start is completed within 3ms, the program reads the backup boot area mark to load the old partition image, and the power supply voltage fluctuation range is monitored, and the reset process is strictly controlled within 50ms to restore the basic metering function;

[0039] The old partition automatically constructs an encryption retransmission request frame after stable operation, and sends the frame to the master node through the HPLC network according to an exponential backoff strategy, preferentially requests key fragments, and avoids repeated upgrades of the same version within 24 hours.

[0040] Compared with the prior art, the remote software upgrade method and system based on the HPLC high-speed power line carrier network have the following beneficial effects:

[0041] 1、The present application realizes all-round upgrade optimization through three core technologies of dynamic fragmentation transmission, millisecond-level service continuity guarantee and resource limit adaptation: in the transmission layer, the adaptive fragmentation strategy (128KB-512KB) based on the signal-to-noise ratio reduces the packet loss rate in a high-noise environment to 0.1%, and the multi-path concurrent transmission and breakpoint resume protocol are combined to reduce the average transmission time from 30 minutes to 17.4 minutes, and the power frequency synchronous wake-up mechanism is used to realize 300ms network instruction synchronization; in the service layer, the voltage zero-crossing switching technology and the bypass cache queue are used in cooperation, and the double-buffer protocol stack design is used to meet the millisecond-level real-time metering demand of the smart meter; in the resource layer, the hardware fingerprint dynamic degradation mechanism reduces the FLASH demand to 0.8MB to cover most old devices, and the incremental compression snapshot technology reduces the storage occupation by 60%, thereby completely solving the upgrade problem of resource-limited terminals;

[0042] 2. Constructing a full life cycle intelligent management system to realize the triple transition of safety, operation and maintenance, and energy efficiency: In terms of safety, the embedded version dependency tree automatically analyzes the multi-stage upgrade path to avoid compatibility failures, and the atomic partition switching combined with three-level verification greatly reduces the upgrade exception rate; In terms of operation and maintenance, the transaction log replay of encrypted business snapshots guarantees 100% data consistency, and the rollback diagnosis engine automatically locates the root causes such as voltage fluctuation and memory overflow, which improves the operation and maintenance response efficiency by 10 times; In terms of energy efficiency, the valley period upgrade based on load prediction reduces network congestion by 70%, the avoidance strategy of automatically suspending transmission when the harmonic distortion rate is greater than 8% avoids the deterioration of power quality, and the FLASH wear leveling algorithm prolongs the storage life by 3 times, the bad block rate of more than 0.5% automatically migrates the partition technology to reduce hardware failure rate, forming a "transmission-execution-maintenance" full chain optimization closed loop.

[0043] The remote software upgrade system based on the HPLC high-speed power line carrier network is used to execute the remote software upgrade method described above, and the remote software upgrade system comprises:

[0044] An instruction management module integrated in the FPGA programmable logic unit of the master node is used to generate an encrypted upgrade instruction package, broadcast differential instructions through the HPLC physical layer chip, construct a hierarchical forwarding path tree in real time, and dynamically select relay nodes;

[0045] A dynamic fragmentation transmission engine deployed in the dual-core processor of the master node and the relay node is used to collect the signal-to-noise ratio and network load rate in real time, drive dynamic adjustment of the fragmentation size, establish a concurrent transmission link based on a routing weight table, and simultaneously integrate a 2-12MHz frequency hopping transceiver that switches to a standby frequency band when detecting a burst noise;

[0046] A dual-partition controller is used to divide dual backup partitions and perform three-level verification, and to analyze a hardware description file, dynamically shut down non-core modules, and simultaneously include a voltage zero-crossing detection circuit and an address remapping register to realize atomic switching within 10ms;

[0047] A rollback management module is used to freeze the process state and perform LZ77 incremental compression, store to an independent sector, monitor the heartbeat signal of a key function module, trigger rollback when timeout, and collect voltage fluctuation waveforms and memory stack images to generate an encrypted diagnosis report;

[0048] A global scheduling module is used to analyze historical data based on an ARIMA model, lock the valley period, calculate the current THD value in real time, decompress the version dependency tree in the upgrade package, and initiate a multi-stage upgrade sequence.

[0049] Specifically, the dynamic fragmentation transmission engine comprises:

[0050] Fragmentation decision subunit, based on SNR sensor and MAC layer statistics adaptive controller, when SNR>15dB and channel utilization <40%, activate 512KB fragmentation mode, SNR<15dB or utilization >70%, switch to 128KB fragmentation;

[0051] Multi-path concurrent subunit, integrated routing table updater and link quality evaluator, select the optimal 3 paths through path weight weighting decision algorithm, when the packet loss rate of a path >5%, degrade its weight by 50% and enable the standby path, and 3 independent HPLC PHY layer transceiver channels, the total throughput is increased to 12Mbps;

[0052] Anti-interference strengthening subunit, used for storing typical power noise spectrum characteristics, and performing FFT analysis on input signals, triggering frequency hopping after matching noise fingerprints, switching between 2MHz / 7MHz / 12MHz three clean frequency bands. BRIEF DESCRIPTION OF DRAWINGS

[0053] Figure 1 The flowchart of the remote software upgrade method based on the HPLC high-speed power line carrier network is provided in the application.

[0054] Figure 2 The flowchart of the remote software upgrade method based on the HPLC high-speed power line carrier network is provided in the application.

[0055] Figure 3 The structure diagram of the remote software upgrade system based on the HPLC high-speed power line carrier network is provided in the application.

[0056] Figure 4 The structure diagram of the dynamic fragmentation transmission engine in the remote software upgrade system based on the HPLC high-speed power line carrier network is provided in the application. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical scheme and advantages of the application clearer, the application is further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the application and do not limit the application.

[0058] The implementation of the application is described in detail below in combination with specific examples.

[0059] The same or similar reference numerals in the drawings of the embodiments correspond to the same or similar components; in the description of the present application, it should be understood that if the orientations or positional relationships indicated by the terms "upper", "lower", "left", "right" and the like are based on the orientations or positional relationships shown in the drawings, they are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, therefore the terms describing the positional relationship in the drawings are only used for exemplary illustration, and cannot be understood as a limitation on the present application, for those skilled in the art, the specific meanings of the above terms can be understood according to the specific circumstances.

[0060] Referring to Figures 1-2 As shown, the remote software upgrading method based on the HPLC high-speed power line carrier network is applied to a software upgrading device, and specifically includes the following steps:

[0061] S101: Obtain the master node of the software to be upgraded, and the master node completes the encrypted upgrade instruction package through HPLC network broadcast, if the master node is in an offline state, the response is triggered by the wake-up pulse signal of the power line power frequency cycle synchronization, to ensure that all network nodes complete instruction synchronization within a preset time;

[0062] Among them, the master node completes the encrypted upgrade instruction package through HPLC network broadcast, including:

[0063] The instruction package contains the upgrade version number, file hash value, fragmentation strategy and target node range;

[0064] The terminal node of the software required for upgrading captures the instruction package in the low-power listening mode, wakes up the core processor after verifying the digital signature, and generates a hierarchical forwarding path based on the network topology;

[0065] S102: The master node dynamically fragments the upgrade instruction package according to 128KB-512KB, each fragment is attached with CRC-32 and SHA-256 double check code, and is transmitted through multi-path concurrent transmission, the transmission link is established by preferentially selecting relay nodes with a load lower than 60%, when a power line noise burst is detected, it is automatically switched to a backup frequency band, the transmission process adopts a breakpoint resume protocol, and when the node restarts after power failure, it is recovered from the last valid fragment offset;

[0066] Among them, the master node dynamically fragments the upgrade instruction package according to 128KB-512KB, including:

[0067] The size of the dynamic fragmentation is adaptively adjusted according to the real-time channel signal-to-noise ratio, when the HPLC channel utilization is lower than 40%, 512KB fragmentation is adopted, when the utilization is 40-70%, 256KB fragmentation is adopted, and when the utilization is higher than 70%, 128KB fragmentation is adopted;

[0068] The slice transmission adopts a priority-based pre-emptive retransmission mechanism, the key boot file slice is given the highest priority, and is retransmitted immediately after failure within 20 ms, the application layer slice allows a maximum of 3 retransmissions, and each time interval is adaptively increased;

[0069] S103: After receiving the switching instruction of the master node, the node completes the partition switching operation within 10 ms of the zero-crossing point of the power line voltage, during which the service data is temporarily stored through the bypass cache queue, the communication interruption time is <5 ms, and when the switching fails, it is automatically rolled back to the original partition and the error log is reported to the master node;

[0070] Among them, after receiving the switching instruction of the master node, the node completes the partition switching operation within 10 ms of the zero-crossing point of the power line voltage, including:

[0071] The switching timing is started 1 ms before the zero-crossing point of the grid voltage, the 50Hz power frequency waveform is tracked in real time through the phase-locked loop circuit, the synchronization signal is sent when the voltage amplitude is detected to be lower than 5V, if no valid zero-crossing point is captured for two consecutive periods, then the temperature compensation crystal oscillator is enabled, the FLASH controller write operation is frozen, and the logical address is redirected and mapped to the new partition physical address through the 32-bit bus single-cycle update mapping register;

[0072] After the address remapping is completed, 128KB boot code is prefetched from the new partition address to the CPU L1 cache, the memory protection unit is started to isolate the kernel space, and the four-stage security verification chain is executed synchronously, the first stage uses CRC-32 to check the integrity of the boot header structure, the second stage verifies the partition image hash value through SHA-256, the third stage verifies the manufacturer's certificate based on the ECDSA P-256 algorithm, and the final stage uses the national SM2 to verify the grid root certificate chain;

[0073] After verification, the AES-256 encrypted business snapshot is read from the independent encrypted storage area, the LZ77 decompression algorithm is executed to restore the metering real-time data, TCP / IP protocol stack state and security session key, the basic snapshot and difference log are checked for integrity by CRC-16, and the temporarily stored pulse count of the electric meter in the SRAM is directly written to the metering ASIC through the DMA channel, the network protocol state is played back according to the transaction log, and finally the event record is written in time sequence;

[0074] S104: Divide the double backup partition in the local non-volatile storage area, the node performs three-level verification after receiving the complete slice, and after verification, the upgrade file is decompressed in the standby partition, while detecting hardware compatibility, if the resources are insufficient, automatically clean up the log cache and reserve a safe storage space, send a ready signal to the master node after completion, and freeze the state snapshot of the current business process to the independent storage sector in the double backup partition;

[0075] S105: After the independent storage sector starts, a self-checking program is executed to verify the running state of the key function modules. If the heartbeat detection is normal for three consecutive times, the old partition file is deleted and the dynamic fragments of the upgrade instruction package are received. After the receiving is completed, the software upgrade verification is completed. If the self-checking fails or the heartbeat times out, the rollback is completed within 30s, and the rollback to the master node is broadcast through the HPLC network to re-perform the remote software upgrade request;

[0076] In the embodiment, after the independent storage sector starts, a self-checking program is executed to verify the running state of the key function modules. The key function modules include:

[0077] The carrier communication protocol stack is verified by injecting a standard test frame for bidirectional transceiving test, counting the packet loss rate and transmission delay, synchronously monitoring the physical layer signal-to-noise ratio and the MAC layer retransmission rate. If any index is out of limit, an error code 0xC1 is recorded.

[0078] The metering core algorithm is verified by accessing a high-precision standard source to apply a dynamic load, comparing the voltage effective value error, current harmonic analysis accuracy, and electric energy cumulative error. If the error is out of limit for three consecutive power frequency periods, an alarm is triggered.

[0079] The security encryption engine is verified by performing SM4 / CBC mode encryption and decryption throughput test, verifying the true random number generator entropy value and the key storage area write protection state, and simulating the encryption consistency under voltage drop. When the test fails, the security subsystem is fused. Through the construction of the whole life cycle intelligent management system, the security, operation and maintenance, and energy efficiency triple transition is realized. In terms of security, the embedded version dependency tree automatically parses the multi-stage upgrade path to avoid compatibility faults, the atomic partition switching combined with three-level verification greatly reduces the upgrade exception rate. In terms of operation and maintenance, the transaction log replay of the encrypted business snapshot ensures 100% data consistency, the rollback diagnosis engine automatically locates the root causes such as voltage fluctuation and memory overflow, and the operation and maintenance response efficiency is improved by 10 times. In terms of energy efficiency, the valley period upgrade based on load prediction reduces network congestion by 70%, the avoidance strategy of automatically suspending transmission when the harmonic distortion rate is greater than 8% avoids the deterioration of power quality, the FLASH wear leveling algorithm prolongs the storage life by 3 times, and the bad block rate of more than 0.5% automatically migrates the partition technology to reduce the hardware failure rate, forming a "transmission-execution-maintenance" whole chain optimization closed loop.

[0080] In S101 of the embodiment, after the digital signature is verified, the core processor is awakened, and a hierarchical forwarding path is generated based on the network topology, including:

[0081] The master node divides the terminal nodes into N levels according to the physical distance and channel quality based on the network topology database.

[0082] The first layer relay node coverage radius is less than or equal to 500 meters, and a cross-layer relay selection algorithm is used between each layer to calculate the signal-to-noise ratio gain, historical packet loss rate and load weight factor between nodes to generate an optimal path tree.

[0083] When a node failure is detected, a backup relay node is dynamically enabled and the path weight is updated to ensure that the broadcast delay fluctuation range is less than ± 5%.

[0084] In S105 of the embodiment, if the self-check fails or the heartbeat times out, rollback is completed within 30s, and the rollback to the master node for remote software upgrade request is broadcasted through the HPLC network, including:

[0085] After detecting the upgrade exception, the storage access is immediately frozen, the partition mapping table is rolled back to the previous valid state through hardware register operation, the new partition cache data is synchronously cleared and the mapping table CRC-8 check code is verified to ensure that the lossless switching is completed within 500us, and if the verification fails, the fuse protection mechanism is activated.

[0086] A forced reset signal of a watchdog chip is triggered, the system cold start is completed within 3ms, the backup boot area flag is read by a boot program to load the old partition image, and the power supply voltage fluctuation range is monitored, and the reset process is strictly controlled within 50ms to restore the basic metering function.

[0087] After the old partition runs stably, an encrypted retransmission request frame is automatically constructed, and is sent to the master node through the HPLC network according to an exponential backoff strategy, and key fragments are preferentially requested, and the same version repeated upgrade within 24 hours is avoided.

[0088] The application realizes all-round upgrade optimization through three core technologies of dynamic fragmentation transmission, millisecond service continuity guarantee and resource limit adaptation: in the transmission layer, the adaptive fragmentation strategy (128KB-512KB) based on signal-to-noise ratio compresses the packet loss rate in a high-noise environment to 0.1%, and the multi-path concurrent transmission and breakpoint resume protocol are combined to reduce the average transmission time from 30 minutes to 17.4 minutes, and the 300ms network instruction synchronization is realized by the power frequency synchronous wakeup mechanism; in the service layer, the voltage zero-crossing switching technology and the bypass cache queue cooperate to meet the millisecond real-time metering demand of the smart meter by the double-buffer protocol stack design; in the resource layer, the hardware fingerprint dynamic degradation mechanism reduces the FLASH demand to 0.8MB to cover most old equipment, and the incremental compression snapshot technology reduces the storage occupation by 60%, and the resource limited terminal upgrade problem is completely solved.

[0089] Reference Figures 3-4As shown, the remote software upgrade system based on the HPLC high-speed power line carrier network is used for executing the remote software upgrade method, and the remote software upgrade system comprises: an instruction management module integrated in an FPGA programmable logic unit of a master node, used for generating an encrypted upgrade instruction package, broadcasting a differential instruction through an HPLC physical layer chip, constructing a hierarchical forwarding path tree in real time, and dynamically selecting a relay node; a dynamic fragmentation transmission engine deployed in a dual-core processor of the master node and the relay node, used for collecting a signal-to-noise ratio and a network load rate in real time, driving dynamic adjustment of a fragmentation size, establishing a concurrent transmission link based on a routing weight table, simultaneously integrating a 2-12MHz frequency hopping transceiver, and switching to a backup frequency band when detecting a burst noise; a dual-partition controller, used for dividing a dual-backup partition and performing three-level verification, and analyzing a hardware description file, dynamically closing a non-core module, and containing a voltage zero-crossing detection circuit and an address remapping register, to realize atomic switching within 10ms; a rollback management module, used for freezing a process state and performing LZ77 incremental compression, storing to an independent sector, monitoring a heartbeat signal of a key function module, triggering rollback in timeout, and collecting a voltage fluctuation waveform and a memory stack image, to generate an encrypted diagnostic report; a global scheduling module, used for analyzing historical data based on an ARIMA model, locking a valley period, calculating a current THD value in real time, simultaneously decompressing a version dependency tree in an upgrade package, initiating a multi-stage upgrade sequence, and compressing a packet loss rate in a high-noise environment to 0.1% based on an adaptive fragmentation strategy (128KB-512KB) of a signal-to-noise ratio, combining multi-path concurrent transmission and a breakpoint resume protocol, reducing an average transmission time consumption from 30 minutes to 17.4 minutes, and assisting a power frequency synchronous wake-up mechanism to realize 300ms network-wide instruction synchronization; a voltage zero-crossing switching technology cooperates with a bypass cache queue, and cooperates with a double-buffer protocol stack design to meet the millisecond-level real-time metering demand of a smart meter; a hardware fingerprint dynamic degradation mechanism reduces FLASH demand to 0.8MB to cover most old devices, an incremental compression snapshot technology reduces storage occupation by 60%, and the resource-restricted terminal upgrade problem is completely solved.

[0090] In the city example, the dynamic fragmentation transmission engine includes: a fragmentation decision subunit based on the SNR sensor and the adaptive controller of the MAC layer statistics, activates the 512KB fragmentation mode when SNR>15dB and the channel utilization is <40%, and switches to the 128KB fragmentation when SNR<15dB or the utilization is >70%; a multi-path concurrent subunit integrating the routing table updater and the link quality evaluator, selects the optimal 3 paths through the path weight weighting decision algorithm, degrades the weight of a certain path by 50% and enables the standby path when the packet loss rate of the path is >5%, and 3 independent HPLC PHY layer transceiver channels, the total throughput is improved to 12Mbps; an anti-interference strengthening subunit for storing typical power noise spectrum characteristics and performing FFT analysis on the input signal, triggering frequency hopping after matching the noise fingerprint, switching between 2MHz / 7MHz / 12MHz three clean frequency bands, and realizing the triple transition of safety, operation and maintenance, and energy efficiency through the construction of the whole life cycle intelligent management system: in the safety aspect, the embedded version dependency tree automatically parses the multi-stage upgrade path to avoid compatibility failures, and the atomic partition switching combined with three-level verification greatly reduces the upgrade exception rate.

[0091] In the operation and maintenance aspect of the embodiment, the transaction log replay of the encrypted business snapshot guarantees 100% consistency of data, the rollback diagnosis engine automatically locates the root causes such as voltage fluctuation and memory overflow, and the operation and maintenance response efficiency is improved by 10 times; in the energy efficiency aspect, the valley period upgrade based on load prediction reduces network congestion by 70%, the avoidance strategy of automatically suspending transmission when the harmonic distortion rate is >8% avoids the deterioration of power quality, the FLASH wear leveling algorithm prolongs the storage life by 3 times, the bad block rate >0.5% automatically migrates the partition technology to reduce the hardware failure rate, and forms a "transmission-execution-maintenance" whole chain optimization closed loop.

[0092] In the embodiment, the whole operation process can be controlled by a computer to realize the sequential performance of the steps, which are all conventional knowledge of automatic control, and will not be repeated here.

[0093] The above only describes the preferred embodiments of the present application and is not used to limit the present application, and any modification, equivalent replacement and improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A remote software upgrade method based on HPLC high-speed power line carrier network, characterized in that, Applied to software upgrade equipment, the specific steps include: S101: Obtain the master control node of the software to be upgraded. The master control node completes the encrypted upgrade instruction package through HPLC network broadcast. If the master control node is offline, it triggers the response through the wake-up pulse signal of the power line frequency period synchronization to ensure that all nodes in the network complete the instruction synchronization within a preset time. S102: The master node dynamically fragments the upgrade command packet into 128KB-512KB segments. Each segment is attached with CRC-32 and SHA-256 double check codes. It transmits the data through multiple paths concurrently, prioritizing the establishment of transmission links with relay nodes whose load is below 60%. When a sudden power line noise is detected, it automatically switches to the backup frequency band. The transmission process adopts a breakpoint resume protocol. When the node restarts after a power outage, it recovers from the offset of the last valid segment. S103: After receiving the switching instruction from the master node, the node completes the partition switching operation within 10ms of the power line voltage crossing zero point. During this period, business data is temporarily stored through a bypass buffer queue. The communication interruption time is <5ms. If the switching fails, it automatically rolls back to the original partition and reports the error log to the master node. S104: Divide the local non-volatile storage area into dual backup partitions. After receiving the complete fragment, the node performs three-level verification. After the verification is successful, the upgrade file is decompressed in the backup partition. At the same time, hardware compatibility is checked. If resources are insufficient, the log cache is automatically cleaned up and safe storage space is reserved. After completion, a ready signal is sent to the master node, and the current business process status snapshot is frozen to the independent storage sector in the dual backup partition. S105: After the independent storage sector starts, it executes a self-test program to verify the operating status of key functional modules. If the heartbeat test is normal for 3 consecutive times, it deletes the old partition files and receives the dynamic fragmentation of the upgrade instruction package. After receiving, it completes the verification of the software upgrade. If the self-test fails or the heartbeat times out, it completes the rollback within 30 seconds and rolls back to the master node via HPLC network broadcast to re-request the remote software upgrade.

2. The remote software upgrade method based on HPLC high-speed power line carrier network as described in claim 1, characterized in that, In S101, the master node broadcasts the encryption upgrade command packet via the HPLC network, including: The instruction package includes the upgrade version number, file hash value, sharding strategy, and target node range; The terminal node that needs to upgrade the software captures instruction packets in low-power listening mode, verifies the digital signature, wakes up the core processor, and generates a hierarchical forwarding path based on the network topology.

3. The remote software upgrade method based on HPLC high-speed power line carrier network as described in claim 2, characterized in that, After verifying the digital signature, the core processor is awakened, and a hierarchical forwarding path is generated based on the network topology, including: The master control node, based on the network topology database, divides the terminal nodes into N levels according to physical distance and channel quality; The coverage radius of the first-layer relay node is ≤500 meters. A cross-layer relay selection algorithm is used between each layer to calculate the signal-to-noise ratio gain, historical packet loss rate, and load weight factor between nodes to generate the optimal path tree. When a node failure is detected, a backup relay node is dynamically activated and the path weight is updated to ensure that the broadcast latency fluctuation range is less than ±5%.

4. The remote software upgrade method based on HPLC high-speed power line carrier network as described in claim 3, characterized in that, In S102, the master node dynamically fragments the upgrade command packet into 128KB-512KB segments, including: The size of the dynamic fragment is adaptively adjusted according to the real-time channel signal-to-noise ratio. When the HPLC channel utilization is below 40%, a 512KB fragment is used; when the utilization is between 40% and 70%, a 256KB fragment is used; and when the utilization is above 70%, a 128KB fragment is used. The fragmented transmission adopts a priority-based preemptive retransmission mechanism. Critical boot file fragments are given the highest priority and are retransmitted immediately within 20ms after failure. Application layer fragments allow a maximum of 3 retransmissions, with the interval between each retransmission increasing adaptively.

5. The remote software upgrade method based on HPLC high-speed power line carrier network as described in claim 4, characterized in that, In S103, after receiving the switching command from the master node, the node completes the partition switching operation within 10ms of the power line voltage zero crossing point, including: The switching timing is initiated 1ms before the grid voltage crosses zero. The 50Hz power frequency waveform is tracked in real time through the phase-locked loop circuit. When the voltage amplitude is detected to be lower than 5V, a synchronization signal is issued. If a valid zero crossing is not captured for two consecutive cycles, the temperature-compensated crystal oscillator timer is enabled, the FLASH controller write operation is frozen, and the logical address is redirected to the new partition physical address by updating the mapping register in a single cycle through the 32-bit bus. After the address remapping is completed, 128KB of boot code is prefetched from the new partition address into the CPU L1 cache, the memory protection unit is started to isolate the kernel space, and a four-level security verification chain is executed synchronously. The first stage uses CRC-32 to verify the integrity of the boot header structure, the second stage uses SHA-256 to verify the partition image hash value, the third stage uses ECDSA P-256 algorithm to verify the developer certificate, and the final stage uses the national cryptographic SM2 to verify the power grid root certificate chain. After successful verification, the AES-256 encrypted business snapshot is read from the independent encrypted storage area. The LZ77 decompression algorithm is executed to restore the real-time metering data, TCP / IP protocol stack status and security session key. The basic snapshot and difference log are verified by CRC-16 to ensure integrity. Simultaneously, the meter pulse count temporarily stored in SRAM is written directly to the metering ASIC through the DMA channel. The network protocol status is replayed according to the transaction log. Finally, the event record is written in order of timestamp.

6. The remote software upgrade method based on HPLC high-speed power line carrier network as described in claim 5, characterized in that, In S104, dual backup partitions are created in the local non-volatile storage area. After receiving the complete fragment, the node performs three levels of verification, including: Each received upgrade packet fragment is subjected to a 32-bit CRC check in real time. During the fragment transmission process, the check code is calculated in parallel by a hardware accelerator. After the reception is completed, the CRC value at the end of the fragment is compared with the calculation result. If the check fails, the retransmission mechanism of the fragment is immediately triggered. Once all fragments have been received, the complete upgrade package is reconstructed in memory and the SHA-256 hash engine is started. Memory mapping technology is used to avoid secondary data copying. The calculated 256-bit hash value is compared bit by bit with the target hash value in the instruction packet. If the match fails, the received fragments are deleted and error code 0xF2 is reported. The digital signature of the upgrade package is verified using the power grid root certificate pre-installed on the device. First, the developer's certificate chain is parsed, then the signature validity is verified through elliptic curve dot product operation, and finally the certificate validity period and revocation list are checked. If the verification fails, a safety circuit breaker mechanism is activated to prevent the switching operation.

7. The remote software upgrade method based on HPLC high-speed power line carrier network as described in claim 6, characterized in that, In S105, after the independent storage sector starts, a self-test program is executed to verify the operating status of key functional modules, which include: The carrier communication protocol stack is verified by injecting standard test frames to perform bidirectional transmission and reception tests, statistically analyzing packet loss rate and transmission delay, and synchronously monitoring the physical layer signal-to-noise ratio and MAC layer retransmission rate. If any indicator exceeds the limit, error code 0xC1 is recorded. The core metering algorithm is verified by connecting a high-precision standard source and applying a dynamic load, comparing the voltage RMS error, current harmonic analysis accuracy, and energy accumulation error. If the error exceeds the tolerance for three consecutive power frequency cycles, an alarm is triggered. The security encryption engine is verified by performing SM4 / CBC mode encryption and decryption throughput tests, verifying the entropy value of the true random number generator and the write protection status of the key storage area, and simulating encryption consistency under voltage drop. In case of failure, the security subsystem is tripped.

8. The remote software upgrade method based on HPLC high-speed power line carrier network as described in claim 7, characterized in that, If the self-test fails or the heartbeat times out, a rollback will be completed within 30 seconds, and the rollback will be broadcast over the HPLC network to the master node to re-request a remote software upgrade, including: Upon detecting an upgrade anomaly, storage access is immediately frozen. The partition mapping table is rolled back to its previous valid state through hardware register operations. Simultaneously, the cached data of the new partition is cleared and the CRC-8 checksum of the mapping table is verified to ensure a lossless switch is completed within 500μs. If the verification fails, the circuit breaker protection mechanism is activated. The watchdog chip is triggered to force a reset signal, and the system cold start is completed within 3ms. The boot program reads the backup boot sector flag and loads the old partition image. At the same time, the power supply voltage fluctuation range is monitored. The reset process is strictly controlled to restore the basic metering function within 50ms. Once the old partition is running stably, an encrypted retransmission request frame is automatically constructed and sent to the master node via the HPLC network according to an exponential backoff strategy. Priority is given to requesting critical fragments, while avoiding repeated upgrades of the same version within 24 hours.

9. A remote software upgrade system based on HPLC high-speed power line carrier network, characterized in that, The remote software upgrade system is used to perform the remote software upgrade method according to any one of claims 1-8, the remote software upgrade system comprising: The instruction management module, integrated into the FPGA programmable logic unit of the master control node, is used to generate encrypted upgrade instruction packages, broadcast differential instructions through the HPLC physical layer chip, build a hierarchical forwarding path tree in real time, and dynamically select relay nodes. The dynamic fragmentation transmission engine is deployed on the dual-core processors of the master node and relay nodes. It is used to collect the signal-to-noise ratio and network load rate in real time, drive the dynamic adjustment of fragment size, and establish concurrent transmission links based on the routing weight table. It also integrates a 2-12MHz frequency hopping transceiver to switch to a backup frequency band when sudden noise is detected. The dual-partition controller is used to divide the system into two backup partitions and perform three-level verification, as well as parse the hardware description file, dynamically shut down non-core modules, and includes a voltage zero-crossing detection circuit and an address remapping register to achieve atomic switching within 10ms. The rollback management module is used to freeze the process state and perform LZ77 incremental compression, store it in an independent sector, monitor the heartbeat signal of key functional modules, trigger rollback upon timeout, and collect voltage fluctuation waveforms and memory stack images to generate encrypted diagnostic reports. The global scheduling module is used to analyze historical data based on the ARIMA model, lock in the valley period, calculate the current THD value in real time, and decompress the version dependency tree in the upgrade package to initiate a multi-stage upgrade sequence.

10. The remote software upgrade system based on HPLC high-speed power line carrier network as described in claim 9, characterized in that, The dynamic fragmentation transmission engine includes: The fragmentation decision subunit is an adaptive controller based on SNR sensor and MAC layer statistics. When SNR>15dB and channel utilization<40%, it activates the 512KB fragmentation mode and switches to 128KB fragmentation when SNR<15dB or utilization>70%. The multi-path concurrent subunit integrates a routing table updater and a link quality evaluator. It selects the optimal three paths through a path weighted decision algorithm. When the packet loss rate of a certain path is >5%, its weight is downgraded by 50% and a backup path is activated. It also has three independent HPLC PHY layer transceiver channels, increasing the total throughput to 12Mbps. The anti-interference enhancement subunit is used to store typical power noise spectrum characteristics and perform FFT analysis on the input signal. After matching the noise fingerprint, it triggers frequency hopping and switches between three clean frequency bands of 2MHz / 7MHz / 12MHz.

Citation Information

Patent Citations

  • Module upgrading method and system

    CN114201202A

  • Network rapid upgrading method based on HPLC power line carrier

    CN115695185A

Cited By

  • Serial port equipment firmware upgrading method and system

    CN121680894A