CN-122018931-A - Upgrading method and system for BOOT of electric energy meter
Abstract
The invention is applicable to the technical field of intelligent electric meters, and provides a method and a system for upgrading BOOT of an electric energy meter, wherein the system comprises a metering core and a meter core, wherein the metering core adopts Cortex-M0+ core for executing electric energy metering; the communication core adopts a Cortex-M0 core, is independent of the metering core and is used for processing communication tasks and managing firmware upgrades; the metering core and the communication core perform data interaction through the SPI interface to form a hardware architecture with function decoupling, the multi-channel integrated upgrading architecture is constructed, multiple communication modes such as 4G, power line carrier, infrared and MBUS are integrated, flexible selection and redundancy backup of a firmware transmission path are realized, the technical bottleneck that the metering function is easily interfered in the upgrading process is broken through, and the electric energy metering precision is ensured to be kept stable in the firmware updating process.
Inventors
- ZHANG YAN
- WANG GUODONG
- HOU GUANG
- WANG PENGFEI
- LI YONGGEN
- Li Panqi
- SONG CHANGCHUN
- LI XIAN
- CHEN PENGBO
Assignees
- 航天亮丽电气有限责任公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251220
Claims (10)
- 1. An upgrade system for a BOOT of an electric energy meter, comprising: The metering core adopts a Cortex-M0+ core and is used for executing electric energy metering; the communication core adopts a Cortex-M0 core, is independent of the metering core and is used for processing communication tasks and managing firmware upgrades; the metering core and the communication core perform data interaction through an SPI interface to form a hardware architecture with function decoupling.
- 2. The upgrade system of the BOOT of the electric energy meter of claim 1 further comprising an isolated power supply system comprising: The first LDO voltage stabilizer provides power for the metering core; a second LDO regulator, independent of the first LDO regulator, for providing power to the communication core; And the first LDO voltage stabilizer and the second LDO voltage stabilizer are isolated by a DC-DC isolation module.
- 3. The upgrading system of the electric energy meter BOOT according to claim 2, wherein the ADC sampling circuit of the metering core is integrated with a magnetic coupling isolator for blocking interference signals generated by the communication side from being conducted to the metering circuit.
- 4. A method for upgrading a BOOT of an electric energy meter based on the system of any one of claims 1 to 3, comprising the steps of: The communication core receives the upgrade data packet through a multi-channel communication mode; In the upgrading process, the metering core continuously executes an electric energy metering task, and the communication core independently processes the upgrading task; after the upgrade is completed, the system is restarted to run the new version BOOT program.
- 5. The method for upgrading a BOOT of an electric energy meter according to claim 4, wherein the implementing of dynamic resource scheduling in the upgrading process specifically comprises: the metering core periodically samples the CPU load rate; triggering a communication deceleration strategy when the load rate of the continuous multiple sampling exceeds a first threshold value, and reducing the communication rate of the communication core or suspending non-critical communication tasks; and when the load rate falls back below the second threshold, the normal communication configuration is restored.
- 6. The method for upgrading a BOOT of an electric energy meter according to claim 4, wherein when the metering core continuously executes an electric energy metering task, a double buffer mechanism is adopted to perform metering data protection, and the double buffer comprises a buffer area a and a buffer area B, specifically: the buffer area A is used as a real-time writing area for the metering core to write real-time metering data; the buffer area B is used as a synchronous backup area, and data is copied from the buffer area A through a timing synchronization mechanism; After the data is copied from buffer a to buffer B, the check value of the data in buffer B is calculated and stored.
- 7. The method for upgrading a BOOT of an electric energy meter according to claim 4, wherein in the upgrading process, a separate RTC chip is adopted and is periodically clock-synchronized with the metering core through an SPI interface, so as to eliminate clock drift caused by the upgrading process.
- 8. The method for upgrading BOOT of electric energy meter according to claim 4, wherein the upgrading data packet adopts a double signature verification mechanism in the transmission process, and the double verification of manufacturer signature and equipment end signature is needed.
- 9. The method for upgrading a BOOT of an electric energy meter according to claim 4, wherein the upgrade data packet is encrypted by using an AES-128 algorithm when stored, and the encryption key is solidified in an OTP security area of the device.
- 10. The method for upgrading a BOOT of an electric energy meter according to claim 4, wherein the communication core calculates a hash value of the received upgrade data, compares the calculated hash value with a hash value pre-stored by the metering core, and starts an upgrade process after consistency verification.
Description
Upgrading method and system for BOOT of electric energy meter Technical Field The invention relates to the technical field of intelligent electric meters, in particular to a method and a system for upgrading a BOOT of an electric energy meter. Background The current electric energy meter firmware upgrading technology faces systematic challenges brought by the traditional single-core architecture, and the core contradiction is that the upgrading process forcedly interrupts metering functions, so that a series of technical defects and application problems are caused. The method is characterized by comprising three key pain points: Firstly, the metering precision is seriously out of alignment, and industry measured data show that the metering error of the main stream brand ammeter reaches +/-0.5% in the upgrading period, and the metering error exceeds the national standard limit value, so that the charging fairness is directly affected; Secondly, sampling distortion caused by communication interference, large-flow data transmission such as carrier communication and the like can obviously interfere an ADC sampling circuit, so that obvious errors of voltage sampling offset reaching 2.3% are caused, and metering deviation is further aggravated; And finally, the clock is synchronously interrupted, and the RTC real-time clock calibration mechanism is suspended in the upgrading process, so that the accuracy of time-sharing charging is directly influenced, and the disputes of multiple electric charges are caused in the practical application. The existing improvement scheme such as double-buffer storage technology can partially alleviate the problem, but still has the risk of second-level data loss, and cannot solve the problem of metering distortion caused by communication interference. The technical defect not only affects the charging fairness, but also greatly increases the operation and maintenance cost, each upgrade failure needs manual field treatment, and the single cost is up to 200 yuan. Therefore, aiming at the current situation, it is highly needed to provide a method and a system for upgrading the BOOT of the electric energy meter, so as to overcome the defects in the current practical application. Disclosure of Invention The invention aims to provide a method and a system for upgrading a BOOT of an electric energy meter, and aims to solve the problems in the background technology. The invention is realized in such a way that an upgrading system of the BOOT of the electric energy meter comprises: The metering core adopts a Cortex-M0+ core and is used for executing electric energy metering; the communication core adopts a Cortex-M0 core, is independent of the metering core and is used for processing communication tasks and managing firmware upgrades; the metering core and the communication core perform data interaction through an SPI interface to form a hardware architecture with function decoupling. As a further aspect of the present invention, there is also provided an isolated power supply system comprising: The first LDO voltage stabilizer provides power for the metering core; a second LDO regulator, independent of the first LDO regulator, for providing power to the communication core; And the first LDO voltage stabilizer and the second LDO voltage stabilizer are isolated by a DC-DC isolation module. As a further scheme of the invention, the ADC sampling circuit of the metering core is integrated with a magnetic coupling isolator for blocking interference signals generated on the communication side from being conducted to the metering circuit. The invention also provides an upgrading method of the BOOT based on the system, which comprises the following steps: The communication core receives the upgrade data packet through a multi-channel communication mode; In the upgrading process, the metering core continuously executes an electric energy metering task, and the communication core independently processes the upgrading task; after the upgrade is completed, the system is restarted to run the new version BOOT program. The invention further provides a method for implementing dynamic resource scheduling in the upgrading process, which specifically comprises the following steps: the metering core periodically samples the CPU load rate; triggering a communication deceleration strategy when the load rate of the continuous multiple sampling exceeds a first threshold value, and reducing the communication rate of the communication core or suspending non-critical communication tasks; and when the load rate falls back below the second threshold, the normal communication configuration is restored. When the metering core continuously executes the electric energy metering task, a double buffer mechanism is adopted for metering data protection, and the double buffer comprises a buffer area A and a buffer area B, specifically: the buffer area A is used as a real-time writing area for the metering core to write real-tim