A remote encryption upgrade method, an energy storage battery management system, a processing device and a storage medium

By adopting a multi-level encryption upgrade mode in the energy storage battery management system, the problem of single security during remote upgrades is solved, achieving data transmission security and system stability. It is suitable for energy storage battery management systems of various sizes, especially large-scale distributed systems.

CN122160095APending Publication Date: 2026-06-05HEFEI GUOXUAN HIGH TECH POWER ENERGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HEFEI GUOXUAN HIGH TECH POWER ENERGY
Filing Date
2026-01-28
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

The existing remote upgrade methods for energy storage battery management systems have limited security, cannot adapt to diverse application scenarios, and are vulnerable to network attacks and tampering, affecting system stability and reliability.

Method used

A remote encrypted upgrade method is provided, which adopts light encryption mode, medium encryption mode and high encryption mode. The verification is carried out by CRC check, digital signature based on fixed asymmetric key and digital signature based on public key infrastructure certificate chain, respectively, to ensure the integrity and authenticity of firmware file. Multi-level encryption upgrade mode is supported to adapt to different security requirements.

Benefits of technology

It ensures the security and integrity of data transmission during remote upgrades, reduces manual intervention, improves system operation and maintenance efficiency, reduces the frequency of on-site maintenance, and ensures that the system can roll back to a stable state in the event of an upgrade failure, thereby enhancing system security and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122160095A_ABST
    Figure CN122160095A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of remote encryption upgrade method, energy storage battery management system, processing device and storage medium, wherein, method includes: according to actual security needs, select encryption upgrade mode, including light encryption mode, middle-level encryption mode and high-level encryption mode;In remote upgrade process, the server side of cloud according to the selected encryption upgrade mode is processed to the energy storage battery management system of the firmware file to be upgraded, and is transmitted to energy storage battery management system, and the firmware file to be upgraded is verified according to the current encryption upgrade mode after processing, if the firmware file to be upgraded is verified, then the firmware file to be upgraded is updated;If the firmware file to be upgraded is not verified or upgrade fails, then energy storage battery management system aborts upgrade process and restores the firmware file to be upgraded to the version before upgrading, the present application can be widely applied in energy storage technology field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy storage technology, and in particular to a remote encryption upgrade method, an energy storage battery management system, a processing device, and a storage medium. Background Technology

[0002] With the rapid development of renewable energy and energy storage systems, especially the large-scale application of distributed energy systems, battery management systems (BMS) have become an important component in ensuring the safe and efficient operation of energy storage devices. The main responsibility of a BMS is to monitor the voltage, current, temperature, and state health of the battery pack in real time, and to precisely manage the charging and discharging process through intelligent control algorithms to prevent abnormal situations such as overcharging, over-discharging, or short circuits.

[0003] During the long-term operation of energy storage systems, BMS firmware requires continuous updates and optimizations to address new technological demands and system challenges. Traditional firmware updates typically require manual intervention, necessitating on-site technical personnel. This not only increases maintenance costs but also results in low update efficiency in large-scale distributed systems. Furthermore, manual upgrades are prone to human error, impacting system stability and security. Remote firmware upgrade methods effectively solve this problem, allowing maintenance personnel to upgrade and maintain the BMS remotely via network, significantly improving system operation and maintenance efficiency.

[0004] However, during remote upgrades, firmware data is vulnerable to cyberattacks or malicious tampering during transmission. Without effective encryption and verification mechanisms, hackers could tamper with upgrade packages or interrupt transmission, leading to system failure or even crashes. Therefore, ensuring the security of firmware upgrades has become a critical issue that urgently needs to be addressed. Furthermore, many current BMS systems lack secure remote upgrade mechanisms and fail to encrypt firmware data, making them susceptible to attacks or tampering during upgrades and impacting system reliability. Therefore, a remote upgrade solution that can guarantee secure firmware transmission is urgently needed to ensure that the BMS can effectively resist potential security threats during upgrades and has rollback capabilities in case of upgrade failure, ensuring stable system operation. Summary of the Invention

[0005] To address the aforementioned problems, the present invention aims to provide a remote encrypted upgrade method, an energy storage battery management system, a processing device, and a storage medium, which can solve the problems of the limited security and inability to adapt to diverse application scenarios of existing remote upgrade methods for energy storage battery management systems.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, a remote encryption upgrade method is provided for an energy storage battery management system, comprising:

[0007] Choose the encryption upgrade mode based on actual security needs, including light encryption mode, medium encryption mode and high encryption mode; During the remote upgrade process, the cloud server processes the firmware file to be upgraded of the energy storage battery management system according to the selected encryption upgrade mode and transmits it to the energy storage battery management system. The energy storage battery management system verifies the processed firmware file to be upgraded according to the current encryption upgrade mode. Among them, the light encryption mode performs cyclic redundancy check (CRC) calculation and verification on the firmware file to be upgraded; the medium encryption mode performs digital signature and verification based on a fixed asymmetric key on the firmware file to be upgraded; and the high encryption mode performs digital signature and verification based on a public key infrastructure certificate chain on the firmware file to be upgraded. If the firmware file to be upgraded passes verification, the firmware file update will be permitted. If the firmware file to be upgraded fails verification or the upgrade fails, the energy storage battery management system will stop the upgrade process and restore the firmware file to the version before the upgrade.

[0008] Furthermore, when the selected encryption upgrade mode is light encryption mode, the cloud server processes the firmware file to be upgraded of the energy storage battery management system according to the selected encryption upgrade mode and transmits it to the energy storage battery management system. The energy storage battery management system verifies the processed firmware file to be upgraded according to the current encryption upgrade mode, including: The server performs a CRC operation on the firmware file to be upgraded, calculates the CRC check value of the firmware file to be upgraded, and appends it to the end of the firmware file to form an upgrade package. After receiving the upgrade package, the energy storage battery management system recalculates the CRC check value of the upgrade package and compares it with the CRC check value at the end of the firmware file to be upgraded in the upgrade package to complete the verification.

[0009] Furthermore, when the selected encryption upgrade mode is medium encryption mode, the cloud server processes the firmware file to be upgraded of the energy storage battery management system according to the selected encryption upgrade mode and transmits it to the energy storage battery management system. The energy storage battery management system verifies the processed firmware file to be upgraded according to the current encryption upgrade mode, including: The server uses a hash algorithm to calculate the hash digest of the firmware file to be upgraded. The server uses a fixed private key and a digital signature algorithm to sign the hash digest of the firmware file to be upgraded. The signature value is then sent to the energy storage battery management system along with the firmware file to be upgraded. The energy storage battery management system calculates the hash value of the firmware file to be upgraded; The energy storage battery management system uses a pre-set fixed public key to decrypt and verify the received signature.

[0010] Furthermore, when the selected encryption upgrade mode is advanced encryption mode, the cloud server processes the firmware file to be upgraded of the energy storage battery management system according to the selected encryption upgrade mode and transmits it to the energy storage battery management system. The energy storage battery management system verifies the processed firmware file to be upgraded according to the current encryption upgrade mode, including: The root certificate public key is pre-embedded in the bootloader of the energy storage battery management system; The server uses the private key of the intermediate certificate to perform ECDSA signing on the hash value of the firmware file to be upgraded, obtains the upgrade package, and sends it to the energy storage battery management system. The upgrade package includes the firmware file to be upgraded, the ECDSA signature, and the intermediate certificate itself. During verification, the bootloader of the energy storage battery management system uses the built-in root certificate public key to verify the digital signature of the intermediate certificate. Once the verification is successful, the energy storage battery management system extracts the public key from the intermediate certificate and uses the public key to verify the ECDSA signature.

[0011] Furthermore, the step of approving the firmware update if the firmware file to be upgraded passes verification includes: When the selected encryption upgrade mode is light encryption mode, if the recalculated CRC check value is consistent with the CRC check value at the end of the firmware file to be upgraded in the upgrade package, it is determined that the firmware file to be upgraded has been transmitted completely and the firmware file to be upgraded is allowed to be updated. When the selected encryption upgrade mode is medium encryption mode, if the decrypted hash value matches the calculated hash value, the verification is successful and the firmware file to be upgraded is approved. When the selected encryption upgrade mode is advanced encryption mode, if all verifications pass, the firmware file to be upgraded will be allowed to be updated.

[0012] Furthermore, if the firmware file to be upgraded fails verification or the upgrade fails, the energy storage battery management system will suspend the upgrade process and restore the firmware file to the version before the upgrade, including: When the selected encryption upgrade mode is light encryption mode, if the recalculated CRC check value is inconsistent with the CRC check value at the end of the firmware file to be upgraded in the upgrade package, the firmware file to be upgraded will fail the verification. When the selected encryption upgrade mode is light encryption mode, if the decrypted hash value does not match the calculated hash value, the firmware file to be upgraded will fail verification. When the selected encryption upgrade mode is advanced encryption mode, if any step of the verification fails, the firmware file to be upgraded will fail the verification.

[0013] Secondly, an energy storage battery management system is provided, comprising: The Gateway remote module is used to remotely receive the processed firmware file and upgrade package sent by the server in real time, and perform the encryption upgrade operation on the firmware file based on the current encryption upgrade mode. The encryption upgrade modes include light encryption mode, medium encryption mode and high encryption mode. Light encryption mode performs cyclic redundancy check (CRC) calculation and verification on the firmware file to be upgraded. Medium encryption mode performs digital signature and verification on the firmware file to be upgraded based on a fixed asymmetric key. High encryption mode performs digital signature and verification on the firmware file to be upgraded based on a public key infrastructure certificate chain. If the firmware file to be upgraded passes the verification, the firmware file to be upgraded is allowed to be updated. If the firmware file to be upgraded fails the verification or the upgrade fails, the energy storage battery management system stops the upgrade process and restores the firmware file to the version before the upgrade. The battery monitoring module is used to monitor key parameters of the energy storage battery pack in the energy storage battery management system in real time. The BMS main control module is used to process the key parameters monitored by the battery monitoring module and perform charge and discharge management, system protection and communication tasks. The display and control module is used to provide real-time display of system status, as well as system program upgrades and data transmission; The energy management module is used to monitor the battery status and energy status of the energy storage battery pack in the energy storage battery management system, and to perform energy calibration. External control equipment is used to control external devices based on the control commands of the BMS main control module.

[0014] Furthermore, the specific operation of the Gateway remote module includes: If the current encryption upgrade mode is light encryption mode, the CRC check value of the upgrade package is recalculated based on the upgrade package sent by the server, and compared with the CRC check value at the end of the firmware file to be upgraded in the upgrade package to complete the verification. If the current encryption upgrade mode is medium encryption mode, calculate the hash value of the firmware file to be upgraded, and use the preset fixed public key to decrypt and verify the signature of the firmware file to be upgraded. If the current encryption upgrade mode is advanced encryption mode, the root certificate public key is pre-embedded in the bootloader. During verification, the built-in root certificate public key is used to verify the digital signature of the intermediate certificate. After the verification is successful, the public key is extracted from the intermediate certificate and used to verify the ECDSA signature of the firmware file to be upgraded. If the firmware file to be upgraded passes verification, the firmware file update will be permitted. If the firmware file to be upgraded fails verification or the upgrade fails, the energy storage battery management system will stop the upgrade process and restore the firmware file to the version before the upgrade.

[0015] Thirdly, a processing device is provided, including computer program instructions, wherein when the computer program instructions are executed by the processing device, they are used to implement the steps corresponding to the remote encryption upgrade method described above.

[0016] Fourthly, a computer-readable storage medium is provided, wherein computer program instructions are stored on the computer-readable storage medium, wherein the computer program instructions, when executed by a processor, are used to implement the steps corresponding to the above-described remote encryption upgrade method.

[0017] The present invention has the following advantages due to the adoption of the above technical solutions: 1. This invention supports three optional encryption upgrade modes, which users can flexibly choose according to actual security needs through the host computer, comprehensively covering the security needs under different application scenarios.

[0018] 2. The remote encryption upgrade function of the present invention is applicable to energy storage battery management systems of various sizes, especially large-scale distributed photovoltaic power generation energy storage systems. In these scenarios, the maintenance and upgrade of the BMS system becomes particularly important.

[0019] 3. Through the remote encrypted upgrade mechanism of this invention, system administrators can remotely perform firmware upgrades. They can update and optimize the firmware files to be upgraded in the BMS system remotely without on-site operation, reducing the risk of manual intervention and greatly improving the system's operation and maintenance efficiency.

[0020] 4. This invention can remotely encrypt and upgrade firmware, ensuring the security of data transmission and the integrity of firmware, and is applicable to distributed energy storage systems such as photovoltaic energy storage.

[0021] In summary, this invention can be widely applied in the field of energy storage technology. Attached Figure Description

[0022] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. In the drawings: Figure 1 This is a schematic diagram of a method flow provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of an intermediate encryption upgrade process provided in an embodiment of the present invention; Figure 3This is a schematic diagram of an advanced encryption upgrade process provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the system structure provided in an embodiment of the present invention. Detailed Implementation

[0023] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the invention and to fully convey the scope of the invention to those skilled in the art.

[0024] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.

[0025] Although terms such as first, second, third, etc., may be used in this document to describe multiple elements, components, regions, layers, and / or segments, these elements, components, regions, layers, and / or segments should not be limited by these terms. These terms may be used only to distinguish one element, component, region, layer, or segment from another. Unless the context clearly indicates otherwise, terms such as "first," "second," and other numerical terms used herein do not imply order or sequence. Therefore, the first element, component, region, layer, or segment discussed below may be referred to as the second element, component, region, layer, or segment without departing from the teachings of the exemplary embodiments.

[0026] Currently, during remote upgrades, firmware data is vulnerable to cyberattacks or malicious tampering during transmission. Without effective encryption and verification mechanisms, hackers could tamper with upgrade packages or interrupt transmission, leading to system failure or even crashes. Therefore, ensuring the security of firmware upgrades has become a critical issue that urgently needs to be addressed. Furthermore, many BMS systems currently lack secure remote upgrade mechanisms and fail to encrypt firmware data, making them susceptible to attacks or tampering during upgrades and impacting system reliability. Therefore, a remote upgrade solution that can guarantee secure firmware transmission is urgently needed to ensure that the BMS can effectively resist potential security threats during upgrades and has rollback capabilities in case of upgrade failure, ensuring stable system operation. This invention provides a remote encrypted upgrade method for an energy storage battery management system, comprising: selecting an encryption upgrade mode according to actual security requirements, including a light encryption mode, a medium encryption mode, and a high encryption mode; during the remote upgrade process, the cloud server processes the firmware file to be upgraded in the energy storage battery management system according to the selected encryption upgrade mode and transmits it to the energy storage battery management system; the energy storage battery management system verifies the processed firmware file to be upgraded according to the current encryption upgrade mode, wherein the light encryption mode performs cyclic redundancy check (CRC) calculation and verification on the firmware file to be upgraded, the medium encryption mode performs digital signature and verification based on a fixed asymmetric key, and the high encryption mode performs digital signature and verification based on a public key infrastructure (PKI) certificate chain; if the firmware file to be upgraded passes verification, the firmware file update is permitted; if the firmware file to be upgraded fails verification or the upgrade fails, the energy storage battery management system suspends the upgrade process and restores the firmware file to the version before the upgrade. This invention combines modern cryptography and a reliable rollback mechanism to provide three encryption and verification methods: lightweight, intermediate, and advanced. Users can flexibly choose the appropriate method via a host computer to meet firmware upgrade needs under different security levels and resource constraints, ensuring data security, integrity, and continuous stable system operation during the firmware upgrade process.

[0027] Example 1 like Figure 1 As shown, based on the above description, this embodiment provides a remote encryption upgrade method for an energy storage battery management system, including the following steps: 1) Users can select encryption upgrade modes, including light encryption mode, medium encryption mode and high encryption mode, through the host computer of the energy storage battery management system, according to actual security needs, so as to fully cover the security needs of different application scenarios.

[0028] 2) During the remote upgrade process, the cloud-based server processes the firmware file to be upgraded in the energy storage battery management system according to the selected encryption upgrade mode and transmits it to the energy storage battery management system through the communication channel. The energy storage battery management system verifies the processed firmware file according to the current encryption upgrade mode to ensure its integrity and authenticity. Specifically, the light encryption mode performs cyclic redundancy check (CRC) calculation and verification on the firmware file; the intermediate encryption mode performs digital signature and verification based on a fixed asymmetric key; and the advanced encryption mode performs digital signature and verification based on a public key infrastructure (PKI) certificate chain. 2.1) The encryption upgrade mode focuses on data integrity verification with minimal computational overhead. When the selected encryption upgrade mode is the light encryption mode: 2.1.1) The server performs a CRC operation, such as a CRC32 operation, on the firmware file to be upgraded, calculates the CRC check value of the firmware file to be upgraded, and appends it to the end of the firmware file to form an upgrade package.

[0029] 2.1.2) After receiving the upgrade package, the energy storage battery management system recalculates the CRC check value of the upgrade package and compares it with the CRC check value at the end of the firmware file to be upgraded in the upgrade package to complete the verification.

[0030] 2.2) As Figure 1 As shown, the intermediate encryption mode adds identity authentication on top of integrity verification to prevent malicious firmware implantation. When the selected encryption upgrade mode is intermediate encryption mode: 2.2.1) The server uses a hash algorithm, such as SHA-256, to calculate the hash digest of the firmware file to be upgraded.

[0031] 2.2.2) The server uses a fixed private key to sign the hash digest of the firmware file to be upgraded using a digital signature algorithm such as Elliptic Curve Digital Signature Algorithm (ECDSA). The signature value is sent to the energy storage battery management system along with the firmware file to be upgraded.

[0032] 2.2.3) The energy storage battery management system calculates the hash value of the firmware file to be upgraded.

[0033] 2.2.4) The energy storage battery management system uses a pre-set fixed public key to decrypt and verify the received signature.

[0034] 2.3) As Figure 2 As shown, Advanced Encryption mode provides the highest level of security, supports key rotation and management, and addresses the security risks associated with private key leakage in Intermediate mode. When the selected encryption upgrade mode is Advanced Encryption mode: 2.3.1) The energy storage battery management system adopts a two-level certificate system of root certificate (Root CA) and intermediate certificate (Intermediate CA). The root certificate public key is pre-embedded in the bootloader of the energy storage battery management system and is considered to be absolutely trustworthy.

[0035] 2.3.2) The server uses the private key of the intermediate certificate to perform ECDSA signing on the hash value of the firmware file to be upgraded, obtains the upgrade package, and sends it to the energy storage battery management system. The upgrade package includes the firmware file to be upgraded, the ECDSA signature, and the intermediate certificate itself.

[0036] 2.3.3) When verifying, the Bootloader of the energy storage battery management system uses the built-in root certificate public key to verify the digital signature of the intermediate certificate in order to confirm the legality and authenticity of the intermediate certificate.

[0037] 2.3.4) Once the verification is successful, the energy storage battery management system extracts the public key from the intermediate certificate and uses the public key to verify the validity of the ECDSA signature. This chain verification mechanism ensures that even if the private key of an intermediate certificate is leaked, losses can be stopped in time by means of certificate revocation, without having to recall all devices.

[0038] 3) If the firmware file to be upgraded passes verification, the firmware update will be approved, specifically: 3.1) When the selected encryption upgrade mode is light encryption mode, if the recalculated CRC check value is consistent with the CRC check value at the end of the firmware file to be upgraded in the upgrade package, it is determined that the firmware file to be upgraded has been transmitted completely, and the firmware file to be upgraded is allowed to be updated.

[0039] 3.2) When the selected encryption upgrade mode is medium encryption mode, if the decrypted hash value matches the calculated hash value, the verification is successful and the firmware file to be upgraded is allowed to be updated. This mode can effectively verify the authenticity of the firmware source and the integrity of the content.

[0040] 3.3) When the selected encryption upgrade mode is advanced encryption mode, if all verifications pass, the firmware file to be upgraded will be allowed to be updated.

[0041] 4) If the firmware file to be upgraded fails verification or the upgrade fails, the energy storage battery management system will suspend the upgrade process and restore the firmware file to the stable firmware version before the upgrade to ensure stable system operation. Specifically: 4.1) When the selected encryption upgrade mode is light encryption mode, if the recalculated CRC check value is inconsistent with the CRC check value at the end of the firmware file to be upgraded in the upgrade package, the firmware file to be upgraded will fail the verification.

[0042] 4.2) When the selected encryption upgrade mode is light encryption mode, if the decrypted hash value does not match the calculated hash value, the firmware file to be upgraded will fail verification.

[0043] 4.3) When the selected encryption upgrade mode is advanced encryption mode, if any step of the verification fails, the firmware file to be upgraded will fail the verification.

[0044] Specifically, when the firmware file to be upgraded fails to upgrade, the energy storage battery management system retains the original firmware to be upgraded and prevents the new firmware from overwriting it, so as to avoid system crash.

[0045] In all the above steps and modes, communication data is transmitted through encrypted channels and combined with an exception rollback mechanism to form an end-to-end comprehensive security protection system, ensuring the security and reliability of the upgrade process in different application scenarios.

[0046] This invention features a multi-level encryption upgrade mode that balances efficiency and security. It is suitable for resource-constrained embedded environments. Key information such as public keys and root certificates are stored in the device's secure area to prevent unauthorized tampering. It can be widely applied to distributed energy storage devices, supports remote security upgrades, significantly reduces on-site maintenance frequency, and improves operation and maintenance efficiency and system security.

[0047] The remote encryption upgrade method of the present invention will be described in detail below through specific embodiments. The BMS main control chip uses a microcontroller based on the ARM Cortex-M4 core, which has sufficient computing power and storage space to run the above method. I. Preparations and Mode Selection Before Upgrade Server-side preparation: The operations and maintenance personnel use host computer software (running on Windows / Linux system) to compile and generate the new version of the firmware file to be upgraded (Hex or Bin format).

[0048] Mode Selection: In the host computer software interface, the operation and maintenance personnel can select one of the three encryption upgrade modes according to the deployment environment and security requirements of the target device. The selection instruction will be sent to the server deployed in the cloud through a secure communication link (such as HTTPS), and at the same time, the target energy storage battery management system will be notified to enter the corresponding upgrade preparation state through secure communication (such as the MQTT protocol with authentication).

[0049] II. Server-side processing flow under each encryption upgrade mode ① Light encryption mode processing: The server reads the contents of the firmware file to be upgraded, calls the CRC32 algorithm library to calculate the check value of the entire firmware file, converts the check value into 4 bytes of hexadecimal data, and appends it to the end-of-file character (:00000001FF) of the Hex file, or generates a small header containing the CRC value and file length for the Bin file, forming an upgrade package.

[0050] The server sends the processed firmware file to be upgraded to the Gateway remote module of the energy storage battery management system via TCP / IP network.

[0051] ② Intermediate encryption mode processing: The server reads the firmware file to be upgraded and calculates its hash digest using the SHA-256 algorithm.

[0052] The server loads its fixed ECDSA private key (P-256 curve) from the secure key storage module, and uses this private key to sign the hash digest of the firmware file to be upgraded, obtaining a signature value (usually 70-72 bytes of DER encoding).

[0053] The server appends the signature value to the end of the firmware file to be upgraded, or packages it together with the firmware file into a specific upgrade package format (such as adding a length header, mode identifier, etc.), and sends it to the energy storage battery management system.

[0054] ③ Advanced encryption mode processing: The server calculates the SHA-256 hash value of the firmware file.

[0055] The server loads its corresponding intermediate certificate private key (not the root key) and signs the SHA-256 hash value.

[0056] The server packages the firmware file to be upgraded, the ECDSA signature, and the intermediate certificate itself into an upgrade package. The packaging order can be: [firmware file] + [signature] + [intermediate certificate].

[0057] The server will distribute the complete upgrade package to the energy storage battery management system.

[0058] III. Verification and Upgrade Process of Energy Storage Battery Management System under Various Modes (1) After receiving the upgrade start command, the bootloader of the energy storage battery management system enters the upgrade state.

[0059] (2) General Receiving Process: The Gateway remote module of the energy storage battery management system receives the upgrade package via 4G / Ethernet and forwards it to the BMS main control module via CAN or UART. The bootloader writes the data to the temporary storage area of ​​the external Flash.

[0060] (3) Light encryption mode verification: The bootloader reads the firmware file to be upgraded from the temporary storage area and calculates its CRC32 value.

[0061] The bootloader extracts the CRC32 value sent by the server from a predefined position at the end of the file.

[0062] The two are compared. If they are completely consistent, the firmware in the temporary storage area is copied to the application area (AppArea); if they are inconsistent, the temporary files are deleted and the application is reset and entered.

[0063] (4) Intermediate encryption mode verification: The bootloader reads a pre-configured fixed public key from an internal secure storage area (such as OTP or encrypted Flash).

[0064] The bootloader calculates the SHA-256 hash of the received firmware portion.

[0065] The bootloader extracts the signature value from the end of the upgrade package and uses the public key to perform ECDSA verification.

[0066] The verification process involves checking whether the signature can be correctly decrypted by the public key and whether the decrypted hash value matches the calculated hash value.

[0067] If verification is successful, the application will be updated; if it fails, a rollback will be triggered.

[0068] (5) Advanced encryption mode verification: The bootloader parses the intermediate certificate and signature value from the end of the data packet.

[0069] The bootloader reads the public key of the root certificate from the hardened storage area.

[0070] The bootloader uses the root certificate embedded in the storage area to verify the intermediate certificate parsed from the end of the upgrade package and extract the public key from the intermediate certificate. It then uses this public key to parse the signature value at the end of the upgrade package and verify the signature of the firmware to be upgraded (same as the intermediate mode process).

[0071] If all verifications pass, the firmware file update will be approved.

[0072] If any step fails verification, the upgrade will be terminated immediately and the system will be rolled back.

[0073] IV. Specific Implementation of the Rollback Mechanism The rollback mechanism is implemented through the classic "A / B dual system" design, with the Flash memory of the BMS main control module divided into the following areas: Bootloader area: Stores the bootloader that is never updated and contains all the verification logic mentioned above.

[0074] Application Area A: Runs the current stable firmware version.

[0075] Application B area: serves as an update staging area.

[0076] Backup area: Stores important parameters (such as calibration data) of firmware files in area A.

[0077] During an upgrade, the firmware file to be upgraded is downloaded to partition B. After successful verification, the bootloader copies key parameters from partition A to the backup partition, and then overwrites the firmware file from partition B to partition A. Once the update is complete, the system boots from partition A. If booting fails (watchdog reset) or upgrade verification fails, the bootloader automatically writes the parameters from the backup partition back to partition A and forces a boot from partition A, thus achieving a rollback and ensuring the system remains usable at all times.

[0078] Example 2 like Figure 3 As shown, this embodiment provides an energy storage battery management system, including a BMS main control module, a Gateway remote module, a battery monitoring module, a display and control module, an energy management module, and external control equipment.

[0079] The Gateway remote module is used to remotely receive the processed firmware file and upgrade package sent by the server in real time, and to perform the encrypted upgrade operation of the firmware file based on the current encrypted upgrade mode and Bootloader, so as to ensure remote control and maintenance of the system.

[0080] The battery monitoring module is used to monitor key parameters such as voltage, current and temperature of the energy storage battery pack in the energy storage battery management system in real time. This module uses high-precision sensors to ensure accurate acquisition and transmission of battery status.

[0081] The BMS main control module is used to process key parameters monitored by the battery monitoring module and to perform charge / discharge management, system protection, and communication tasks.

[0082] The display and control module is used to provide real-time display of system status, as well as system program upgrades and data transmission.

[0083] The energy management module is used to monitor the SOC (State of Charge) and SOE (State of Energy) of the energy storage battery pack in the energy storage battery management system, and to perform energy calibration, balance the energy of the cells, and ensure the efficient operation of the system.

[0084] External control equipment is used to control external devices, such as heating or cooling devices, based on the control commands of the BMS main control module, to ensure the safe operation of the system in various temperature environments.

[0085] In a preferred embodiment, the specific operation of the Gateway remote module includes: If the current encryption upgrade mode is light encryption mode, the firmware file to be upgraded is calculated and verified using cyclic redundancy check (CRC) based on the upgrade package sent by the server. If the current encryption upgrade mode is medium encryption mode, the firmware file to be upgraded is digitally signed and verified based on a fixed asymmetric key. If the current encryption upgrade mode is high encryption mode based on the upgrade package sent by the server, the firmware file to be upgraded is digitally signed and verified based on a public key infrastructure certificate chain. If the firmware file to be upgraded passes verification, the firmware file update will be permitted. If the firmware file to be upgraded fails verification or the upgrade fails, the energy storage battery management system will stop the upgrade process and restore the firmware file to the version before the upgrade.

[0086] In a preferred embodiment, the display and control module further includes a user interface to facilitate monitoring and management by maintenance personnel.

[0087] In a preferred embodiment, the Gateway remote module supports the CAN bus communication protocol, and the display and control module supports RS485 and CAN protocols.

[0088] In a preferred embodiment, the battery monitoring module uses high-precision sensors to monitor the voltage, current, and temperature parameters of the battery cells in real time.

[0089] In a preferred embodiment, the energy management module has the functions of monitoring, calibrating and balancing the state of the battery (SOC) and state of energy (SOE), and integrates overcharge, over-discharge and short-circuit protection algorithms.

[0090] Example 3 This embodiment provides a processing device corresponding to the remote encryption upgrade method provided in Embodiment 1. The processing device can be applied to the client's processing device, such as a mobile phone, laptop, tablet computer, desktop computer, etc., to execute the method of Embodiment 1.

[0091] The processing device includes a processor, a memory, a communication interface, and a bus. The processor, memory, and communication interface are connected via the bus to enable communication between them. The memory stores computer programs that can run on the processing device. When the processing device runs the computer program, it executes the remote encryption upgrade method provided in Embodiment 1.

[0092] In some implementations, the memory may be high-speed random access memory (RAM), and may also include non-volatile memory, such as at least one disk storage device.

[0093] In other implementations, the processor can be any type of general-purpose processor, such as a central processing unit (CPU) or a digital signal processor (DSP), and there is no limitation here.

[0094] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0095] Those skilled in the art will understand that the structure of the above-described computing device is only a partial structure related to the present invention and does not constitute a limitation on the computing device to which the present invention is applied. A specific computing device may include more or fewer components, or combine certain components, or have different component arrangements.

[0096] Example 4 This embodiment provides a computer program product corresponding to the remote encryption upgrade method provided in Embodiment 1. The computer program product may include a computer-readable storage medium on which computer-readable program instructions for executing the remote encryption upgrade method described in Embodiment 1 are loaded.

[0097] A computer-readable storage medium can be a tangible device that holds and stores instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination thereof.

[0098] The computer-readable storage medium provided in the above embodiments has a similar implementation principle and technical effect to the above method embodiments, and will not be described again here.

[0099] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0100] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0101] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0102] The above embodiments are only used to illustrate the present invention. The structure, connection method and manufacturing process of each component can be varied. All equivalent transformations and improvements made on the basis of the technical solution of the present invention should not be excluded from the protection scope of the present invention.

Claims

1. A remote encrypted upgrade method for an energy storage battery management system, characterized in that, include: Choose the encryption upgrade mode based on actual security needs, including light encryption mode, medium encryption mode and high encryption mode; During the remote upgrade process, the cloud server processes the firmware file to be upgraded of the energy storage battery management system according to the selected encryption upgrade mode and transmits it to the energy storage battery management system. The energy storage battery management system verifies the processed firmware file to be upgraded according to the current encryption upgrade mode. Among them, the light encryption mode performs cyclic redundancy check (CRC) calculation and verification on the firmware file to be upgraded; the medium encryption mode performs digital signature and verification based on a fixed asymmetric key on the firmware file to be upgraded; and the high encryption mode performs digital signature and verification based on a public key infrastructure certificate chain on the firmware file to be upgraded. If the firmware file to be upgraded passes verification, the firmware file update will be permitted. If the firmware file to be upgraded fails verification or the upgrade fails, the energy storage battery management system will stop the upgrade process and restore the firmware file to the version before the upgrade.

2. The remote encryption upgrade method as described in claim 1, characterized in that, When the selected encryption upgrade mode is light encryption mode, the cloud server processes the firmware file to be upgraded in the energy storage battery management system according to the selected encryption upgrade mode and transmits it to the energy storage battery management system. The energy storage battery management system verifies the processed firmware file to be upgraded according to the current encryption upgrade mode, including: The server performs a CRC operation on the firmware file to be upgraded, calculates the CRC check value of the firmware file to be upgraded, and appends it to the end of the firmware file to form an upgrade package. After receiving the upgrade package, the energy storage battery management system recalculates the CRC check value of the upgrade package and compares it with the CRC check value at the end of the firmware file to be upgraded in the upgrade package to complete the verification.

3. The remote encryption upgrade method as described in claim 2, characterized in that, When the selected encryption upgrade mode is medium encryption mode, the cloud server processes the firmware file to be upgraded in the energy storage battery management system according to the selected encryption upgrade mode and transmits it to the energy storage battery management system. The energy storage battery management system verifies the processed firmware file to be upgraded according to the current encryption upgrade mode, including: The server uses a hash algorithm to calculate the hash digest of the firmware file to be upgraded. The server uses a fixed private key and a digital signature algorithm to sign the hash digest of the firmware file to be upgraded. The signature value is then sent to the energy storage battery management system along with the firmware file to be upgraded. The energy storage battery management system calculates the hash value of the firmware file to be upgraded; The energy storage battery management system uses a pre-set fixed public key to decrypt and verify the received signature.

4. The remote encryption upgrade method as described in claim 3, characterized in that, When the selected encryption upgrade mode is advanced encryption mode, the cloud server processes the firmware file to be upgraded in the energy storage battery management system according to the selected encryption upgrade mode and transmits it to the energy storage battery management system. The energy storage battery management system verifies the processed firmware file to be upgraded according to the current encryption upgrade mode, including: The root certificate public key is pre-embedded in the bootloader of the energy storage battery management system; The server uses the private key of the intermediate certificate to perform ECDSA signing on the hash value of the firmware file to be upgraded, obtains the upgrade package, and sends it to the energy storage battery management system. The upgrade package includes the firmware file to be upgraded, the ECDSA signature, and the intermediate certificate itself. During verification, the bootloader of the energy storage battery management system uses the built-in root certificate public key to verify the digital signature of the intermediate certificate. Once the verification is successful, the energy storage battery management system extracts the public key from the intermediate certificate and uses the public key to verify the ECDSA signature.

5. The remote encryption upgrade method as described in claim 4, characterized in that, If the firmware file to be upgraded passes verification, the firmware file update is permitted, including: When the selected encryption upgrade mode is light encryption mode, if the recalculated CRC check value is consistent with the CRC check value at the end of the firmware file to be upgraded in the upgrade package, it is determined that the firmware file to be upgraded has been transmitted completely and the firmware file to be upgraded is allowed to be updated. When the selected encryption upgrade mode is medium encryption mode, if the decrypted hash value matches the calculated hash value, the verification is successful and the firmware file to be upgraded is approved. When the selected encryption upgrade mode is advanced encryption mode, if all verifications pass, the firmware file to be upgraded will be allowed to be updated.

6. The remote encryption upgrade method as described in claim 5, characterized in that, If the firmware file to be upgraded fails verification or the upgrade fails, the energy storage battery management system will suspend the upgrade process and restore the firmware file to the version before the upgrade, including: When the selected encryption upgrade mode is light encryption mode, if the recalculated CRC check value is inconsistent with the CRC check value at the end of the firmware file to be upgraded in the upgrade package, the firmware file to be upgraded will fail the verification. When the selected encryption upgrade mode is light encryption mode, if the decrypted hash value does not match the calculated hash value, the firmware file to be upgraded will fail verification. When the selected encryption upgrade mode is advanced encryption mode, if any step of the verification fails, the firmware file to be upgraded will fail the verification.

7. An energy storage battery management system, characterized in that, include: The Gateway remote module is used to remotely receive the processed firmware file and upgrade package sent by the server in real time, and perform the encryption upgrade operation on the firmware file based on the current encryption upgrade mode. The encryption upgrade modes include light encryption mode, medium encryption mode and high encryption mode. Light encryption mode performs cyclic redundancy check (CRC) calculation and verification on the firmware file to be upgraded. Medium encryption mode performs digital signature and verification on the firmware file to be upgraded based on a fixed asymmetric key. High encryption mode performs digital signature and verification on the firmware file to be upgraded based on a public key infrastructure certificate chain. If the firmware file to be upgraded passes the verification, the firmware file to be upgraded is allowed to be updated. If the firmware file to be upgraded fails the verification or the upgrade fails, the energy storage battery management system stops the upgrade process and restores the firmware file to the version before the upgrade. The battery monitoring module is used to monitor key parameters of the energy storage battery pack in the energy storage battery management system in real time. The BMS main control module is used to process the key parameters monitored by the battery monitoring module and perform charge and discharge management, system protection and communication tasks. The display and control module is used to provide real-time display of system status, as well as system program upgrades and data transmission; The energy management module is used to monitor the battery status and energy status of the energy storage battery pack in the energy storage battery management system, and to perform energy calibration. External control equipment is used to control external devices based on the control commands of the BMS main control module.

8. The energy storage battery management system as described in claim 7, characterized in that, The specific functions of the Gateway remote module include: If the current encryption upgrade mode is light encryption mode, the CRC check value of the upgrade package is recalculated based on the upgrade package sent by the server, and compared with the CRC check value at the end of the firmware file to be upgraded in the upgrade package to complete the verification. If the current encryption upgrade mode is medium encryption mode, calculate the hash value of the firmware file to be upgraded, and use the preset fixed public key to decrypt and verify the signature of the firmware file to be upgraded. If the current encryption upgrade mode is advanced encryption mode, the root certificate public key is pre-embedded in the bootloader. During verification, the built-in root certificate public key is used to verify the digital signature of the intermediate certificate. After the verification is successful, the public key is extracted from the intermediate certificate and used to verify the ECDSA signature of the firmware file to be upgraded. If the firmware file to be upgraded passes verification, the firmware file update will be permitted. If the firmware file to be upgraded fails verification or the upgrade fails, the energy storage battery management system will stop the upgrade process and restore the firmware file to the version before the upgrade.

9. A processing device, characterized in that, It includes computer program instructions, wherein when executed by a processing device, the computer program instructions are used to implement the steps corresponding to the remote encryption upgrade method according to any one of claims 1-6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, wherein when executed by a processor, the computer program instructions are used to implement the steps corresponding to the remote encryption upgrade method according to any one of claims 1-6.