Firmware upgrading method, upper computer and energy storage system

By generating the target upgrade file and sending it to the energy storage system all at once, the problem of multiple interactive operations during the firmware upgrade process of the energy storage system is solved, enabling simultaneous upgrades of multiple sub-devices, improving fault tolerance and upgrade efficiency, and enhancing user experience.

CN121934858APending Publication Date: 2026-04-28GUANGDONG SOFAR SMART SOLAR TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG SOFAR SMART SOLAR TECH CO LTD
Filing Date
2025-11-24
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

The firmware upgrade process for existing energy storage systems requires multiple interactive operations, resulting in a high failure rate, long time, poor user experience, and high dependence on the network.

Method used

The host computer generates a target upgrade file. Based on the device identifiers and firmware identifiers of multiple sub-devices, a target upgrade file containing multiple firmware upgrade files is generated and sent to the energy storage system at once through a communication connection, so as to achieve simultaneous upgrade of multiple sub-devices.

Benefits of technology

It simplifies the remote upgrade process of energy storage systems, improves fault tolerance, reduces failure rate, significantly reduces upgrade time, and enhances user experience and upgrade efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121934858A_ABST
    Figure CN121934858A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of energy storage systems, in particular to a firmware upgrading method, an upper computer and an energy storage system, the method is used for the upper computer, the upper computer is in communication connection with the energy storage system, and the energy storage system comprises a plurality of sub-devices. According to the embodiment of the invention, the target upgrading file is generated according to the device identifiers of the plurality of sub-devices of the energy storage system and the firmware identifiers of the candidate firmware in the sub-devices, and the target upgrading file is sent to the energy storage system based on the communication connection, so that the energy storage system upgrades the candidate firmware in the plurality of sub-devices according to the target upgrading file. The candidate firmware of multiple sub-devices is upgraded at a time, the remote upgrading process of the energy storage system is simplified, the fault-tolerant rate is high, the failure rate is reduced, the upgrading reliability is improved, the upgrading time is greatly shortened, and the upgrading efficiency and the user experience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy storage system technology, and in particular to a firmware upgrade method, a host computer, and an energy storage system. Background Technology

[0002] Energy storage systems typically consist of multiple sub-devices (such as PCS, energy storage batteries, and DC-DC converters). Some sub-devices contain multiple chips; for example, a PCS (Power Conversion System) includes sub-chips such as an ARM communication board and a DSP power control board. As product requirements are constantly evolving and software functionality is continuously improving, software upgrades are a crucial aspect. After products are sold and widely distributed across various regions, remote software upgrades are particularly necessary. Remote upgrades are highly dependent on the network; therefore, the upgrade process should be simplified to improve the stability of remote firmware upgrades for the entire energy storage system.

[0003] In related technologies, upgrading an energy storage system through a monitoring platform or terminal device can only transmit one bin upgrade file to the energy storage system at a time. Upgrading the firmware of the entire energy storage system requires multiple upgrade interaction operations on the monitoring platform or terminal device. This involves many manual intervention steps, has low fault tolerance, resulting in a high upgrade failure rate, long upgrade time, and poor user experience. Summary of the Invention

[0004] In view of this, one objective of the embodiments of the present invention is to provide a firmware upgrade method, a host computer, and an energy storage system to improve the long firmware upgrade operation time of energy storage systems in related technologies.

[0005] To address the aforementioned technical problems, the embodiments of the present invention provide the following technical solutions: In a first aspect, embodiments of the present invention provide a firmware upgrade method for a host computer, the host computer being communicatively connected to an energy storage system, the energy storage system including multiple sub-devices, the firmware upgrade method comprising: Obtain upgrade information, which includes candidate device identifier and candidate firmware identifier corresponding to the candidate device identifier. The candidate device identifier is the device identifier of the candidate sub-device. The candidate sub-device is the sub-device among multiple sub-devices that needs firmware upgrade. The candidate firmware identifier is the firmware identifier of the candidate firmware. The candidate firmware is the firmware to be upgraded among the candidate sub-devices. A target upgrade file is generated based on multiple sets of upgrade information. The target upgrade file includes multiple firmware upgrade files, and each firmware upgrade file corresponds to a candidate sub-device. Send the target upgrade file to the energy storage system so that the energy storage system can upgrade the candidate firmware in the candidate sub-devices according to the target upgrade file after receiving it.

[0006] In some embodiments, generating a target upgrade file based on multiple sets of upgrade information includes: Based on the candidate device identifier and the corresponding candidate firmware identifier, a firmware upgrade file for each candidate sub-device is compiled and generated. The firmware upgrade file includes valid byte data and first signature data. The first signature data includes the checksum of the valid byte data, the candidate device identifier, and the candidate firmware identifier. The valid byte data includes multiple valid bytes related to the upgrade candidate firmware. The firmware upgrade files of all candidate sub-devices are concatenated and packaged to obtain the target upgrade file. The target upgrade file includes multiple firmware upgrade files and second signature data. The second signature data includes the checksum of the target upgrade file and the starting offset address and data length of each firmware upgrade file.

[0007] In some embodiments, sending a target upgrade file to the energy storage system includes: The target upgrade file is compressed using a preset compression algorithm to obtain the target compressed package; Send the target compressed package to the energy storage system.

[0008] Secondly, embodiments of the present invention provide a firmware upgrade method for an energy storage system. The energy storage system is communicatively connected to a host computer, and the energy storage system includes multiple sub-devices. The firmware upgrade method includes: Receive the target upgrade file sent by the host computer. The target upgrade file includes multiple firmware upgrade files. Each firmware upgrade file corresponds to a candidate sub-device. The candidate sub-device is the sub-device that needs to upgrade its firmware among the multiple sub-devices. According to the target upgrade document, upgrade the candidate firmware in the candidate sub-device. The candidate firmware is the firmware to be upgraded in the candidate sub-device.

[0009] In some embodiments, the target upgrade file further includes second signature data, and upgrading the candidate firmware in the candidate sub-device according to the target upgrade file includes: Parse the target upgrade file to extract the second signature data in the target upgrade file. The second signature data includes the check code of the target upgrade file and the starting offset address and data length of each firmware upgrade file. Verify the target upgrade file based on its checksum. If the target upgrade file verification passes, extract the firmware upgrade file from the target upgrade file based on the starting offset address and data length of each firmware upgrade file, resulting in multiple firmware upgrade files; Firmware upgrades are performed on candidate sub-devices based on multiple firmware upgrade files.

[0010] In some embodiments, the firmware upgrade file includes valid byte data and first signature data. The first signature data includes a checksum of the valid byte data, a candidate device identifier, and a candidate firmware identifier corresponding to the candidate device identifier. The candidate device identifier is the device identifier of the candidate sub-device, the candidate firmware identifier is the firmware identifier of the candidate firmware, and the candidate firmware is the firmware to be upgraded in the candidate sub-device. The valid byte data includes multiple valid bytes related to the upgrade candidate firmware. Firmware upgrades are performed on candidate sub-devices based on multiple firmware upgrade files, including: The first signature data in the reference upgrade file is parsed, and the candidate device identifier and candidate firmware identifier in the first signature data are extracted as the reference device identifier and reference firmware identifier. The reference upgrade file is any one of the multiple firmware upgrade files. Identify the candidate sub-device corresponding to the reference device identifier as the reference sub-device; Send a reference upgrade file to the reference sub-device so that the reference sub-device can upgrade the reference firmware corresponding to the reference firmware identifier according to the reference upgrade file.

[0011] In some embodiments, a reference upgrade file is sent to a reference sub-device, so that the reference sub-device upgrades the reference firmware corresponding to the reference firmware identifier according to the reference upgrade file, including: Send the reference upgrade file to the reference sub-device; In response to the reference sub-device receiving the reference upgrade file, an upgrade start command is sent to the reference sub-device. After receiving the upgrade start command, the reference sub-device parses the reference upgrade file to extract the valid byte data in the reference upgrade file as reference byte data. After verifying the validity of the reference byte data according to the checksum of the reference byte data, the reference firmware is upgraded according to the reference byte data.

[0012] In some embodiments, after upgrading the candidate firmware in the candidate sub-device according to the target upgrade file, the method further includes: Obtain the firmware upgrade result of the candidate sub-device, where the firmware upgrade result indicates whether the candidate firmware in the candidate sub-device was successfully upgraded or failed. Send the firmware upgrade result to the host computer.

[0013] Thirdly, embodiments of the present invention provide a host computer, comprising: A first processor and a first memory communicatively connected to the first processor; The first memory stores computer program instructions executable by the first processor, which, when executed by the first processor, cause the host computer to perform any of the firmware upgrade methods proposed in the first aspect.

[0014] Fourthly, embodiments of the present invention provide an energy storage system, comprising: The controller and multiple sub-devices, all of which are communicatively connected to the controller; The controller includes: A second processor and a second memory communicatively connected to the second processor; The second memory stores computer program instructions executable by the second processor, which, when executed by the second processor, cause the controller to perform any of the firmware upgrade methods proposed in the second aspect.

[0015] The embodiments of the present invention have the following beneficial effects: Unlike related technologies, the firmware upgrade method provided in these embodiments is applied to a host computer, which is communicatively connected to an energy storage system. The energy storage system includes multiple sub-devices. The method includes: acquiring upgrade information, wherein the upgrade information includes candidate device identifiers and candidate firmware identifiers corresponding to the candidate device identifiers; the candidate device identifier is the device identifier of a candidate sub-device; the candidate sub-device is the sub-device among multiple sub-devices whose firmware needs to be upgraded; the candidate firmware identifier is the firmware identifier of a candidate firmware; and the candidate firmware is the firmware to be upgraded among the candidate sub-devices; generating a target upgrade file based on multiple sets of upgrade information, wherein the target upgrade file includes multiple firmware upgrade files, each firmware upgrade file corresponding to a candidate sub-device; and sending the target upgrade file to the energy storage system, so that after receiving the target upgrade file, the energy storage system upgrades the candidate firmware in the candidate sub-devices according to the target upgrade file.

[0016] This invention generates a target upgrade file based on the device identifiers of multiple sub-devices in an energy storage system and the firmware identifiers of candidate firmware in those sub-devices. The target upgrade file is then sent to the energy storage system via a communication connection, enabling the system to simultaneously upgrade the candidate firmware in multiple sub-devices. This achieves a one-time upgrade of candidate firmware for multiple sub-devices, simplifying the remote upgrade process for the energy storage system, increasing fault tolerance, reducing failure rate, improving upgrade reliability, significantly reducing upgrade time, and enhancing upgrade efficiency and user experience. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the accompanying drawings used in the description of the related technologies or embodiments will be briefly introduced below. Obviously, the drawings described below only show some embodiments of the present invention and should not be considered as limiting the scope of protection. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1aThese are schematic diagrams illustrating application scenarios of the firmware upgrade method provided in some embodiments of the present invention; Figure 1b This is a schematic diagram of the interaction between the host computer and the energy storage system provided in some embodiments of the present invention; Figure 2 These are schematic diagrams of the host computer structure provided in some embodiments of the present invention; Figure 3 This is a schematic diagram of the controller in an energy storage system provided in some embodiments of the present invention; Figure 4 This is a flowchart illustrating a firmware upgrade method provided in some embodiments of the present invention, wherein the firmware upgrade method is applied to a host computer; Figure 5a This is a schematic diagram of a firmware upgrade file in some embodiments of the present invention; Figure 5b This is a schematic diagram of the target upgrade file in some embodiments of the present invention; Figure 6 This is a flowchart illustrating a firmware upgrade method provided in some embodiments of the present invention, wherein the firmware upgrade method is applied to an energy storage system. Detailed Implementation

[0019] To make the objectives and advantages of the embodiments of the present invention more readily understood, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. The detailed description of the embodiments of the present invention in the accompanying drawings is not intended to limit the scope of protection claimed by the present invention, but only to illustrate selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] It should be noted that, unless there is a conflict, the various technical features involved in the embodiments of the present invention described below can be combined with each other, and all are within the protection scope of the present invention. Furthermore, although functional modules are divided in the device or structural schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. In addition, the terms "first," "second," "third," and other similar expressions used herein do not limit the data or execution order, but are only for illustrative purposes and to distinguish identical or similar items with substantially the same function and effect, and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features.

[0021] Unless otherwise defined, the technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. It should be understood that the term "and / or" as used herein includes any and all combinations of one or more of the listed items.

[0022] Energy storage systems typically consist of multiple sub-devices (such as PCS, energy storage batteries, and DC-DC converters). Some sub-devices contain multiple chips; for example, a PCS (Power Conversion System) includes sub-chips such as an ARM communication board and a DSP power control board. As product requirements are constantly evolving and software functionality is continuously improving, software upgrades are a crucial aspect. After products are sold and widely distributed across various regions, remote software upgrades are particularly necessary. Remote upgrades are highly dependent on the network; therefore, the upgrade process should be simplified to improve the stability of remote firmware upgrades for the entire energy storage system.

[0023] In related technologies, energy storage systems are upgraded through monitoring platforms or terminal devices. Only one bin upgrade file can be transmitted to the energy storage system at a time. The inventors found that upgrading the firmware of the entire energy storage system requires multiple upgrade interaction operations on the monitoring platform or terminal device. There are many manual intervention steps, low fault tolerance, resulting in a high upgrade failure rate, long upgrade time, and poor user experience.

[0024] In view of this, embodiments of the present invention provide a firmware upgrade method, which generates a target upgrade file based on the device identifiers of multiple sub-devices of an energy storage system and the firmware identifiers of candidate firmware in the sub-devices, and sends the target upgrade file to the energy storage system based on a communication connection, so that the energy storage system upgrades the candidate firmware in multiple sub-devices according to the target upgrade file. In this way, the candidate firmware of multiple sub-devices can be upgraded at one time, simplifying the remote upgrade process of the energy storage system, with high fault tolerance, low failure rate, improved reliability of firmware upgrade, significantly reduced upgrade time, and improved upgrade efficiency and user experience.

[0025] Please see Figure 1a and Figure 1b , Figure 1a The illustrations depict application scenarios of the firmware upgrade methods provided in some embodiments of the present invention. Figure 1b The diagram illustrates the interaction between the host computer and the energy storage system in some embodiments of the present invention.

[0026] See Figure 1aAs shown, the application scenario includes a host computer 100 and an energy storage system 200. The host computer 100 communicates with the energy storage system 200 through a network. It is easy to understand that examples of networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0027] As is easily understood, the energy storage system 200 includes a controller 210 and multiple sub-devices, each of which is communicatively connected to the controller 210, for example... Figure 1a As shown, multiple sub-devices include a first sub-device 221, a second sub-device 222, and a third sub-device 223, all of which are communicatively connected to the controller 210. Exemplarily, in some embodiments, the controller 210 is a microcontroller, the first sub-device 221 is an arc-fault circuit breaker (AFCI), the second sub-device 222 is an energy storage battery module, and the third sub-device 223 is a power conversion system (PCS). Some of these sub-devices may include multiple chips; for example, the power conversion system may include sub-chips such as an ARM communication board and a DSP power control board.

[0028] Firmware, as we understand it, refers to dedicated software embedded in a hardware device. Essentially, it's a program permanently embedded in the hardware. Firmware sits between pure hardware (such as chips or circuit boards) and the operating system (such as Windows or Android), serving as the "basic instruction set" that enables the hardware device to function properly, essentially acting as the hardware's underlying operating system. For example, in this embodiment of the invention, the software embedded in the first sub-device 221 is the first firmware, the software embedded in the second sub-device 222 is the second firmware, and the software embedded in the third sub-device 223 is the third firmware, and so on. It is understood that the software embedded in each sub-device (i.e., the firmware of each sub-device) includes one or more components, with each firmware corresponding to a chip or component.

[0029] For example, the host computer 100 executes steps S11 to S13, obtains upgrade information from the energy storage system 200 via the network, generates a target upgrade file based on multiple sets of upgrade information, and sends the target upgrade file to the energy storage system 200. When the energy storage system 200 detects that there is firmware to be upgraded in a sub-device, it determines that the sub-device is a candidate sub-device, and generates a set of upgrade information corresponding to the candidate sub-device based on the firmware identifier of the firmware to be upgraded (i.e., candidate firmware) in the candidate sub-device and the device identifier of the candidate sub-device. The energy storage system 200 transmits the upgrade information corresponding to each candidate sub-device to the host computer 100 via the network.

[0030] For example, if both the first sub-device 221 and the second sub-device 222 have firmware to be upgraded, then both the first sub-device 221 and the second sub-device 222 are candidate sub-devices. Based on the firmware identifier of the firmware to be upgraded in the first sub-device 221 and the device identifier of the first sub-device 221, a set of upgrade information corresponding to the first sub-device 221 is generated. Similarly, based on the firmware identifier of the firmware to be upgraded in the second sub-device 222 and the device identifier of the second sub-device 222, a set of upgrade information corresponding to the second sub-device 222 is generated. The energy storage system transmits the upgrade information corresponding to the first sub-device 221 and the second sub-device 222 to the host computer 100.

[0031] Specifically, the energy storage system 200 executes steps S14 and S15, receives the target upgrade file transmitted by the host computer 100, parses the target upgrade file, extracts the firmware upgrade file corresponding to the candidate sub-device, and upgrades the firmware (i.e. candidate firmware) in the candidate sub-device according to the firmware upgrade file.

[0032] It should be understood that Figure 1a and Figure 1b This is merely an illustrative example of how the host computer 100 and the energy storage system 200 work together to upgrade the firmware of the sub-devices in the energy storage system 200. It does not impose any limitations on the structure, type, or quantity of the host computer 100 and the energy storage system 200 in other application scenarios or embodiments.

[0033] It is understood that the controller 210 can be any suitable type of electronic component such as a microcontroller, single-chip microcomputer, or FPGA chip, and the host computer 100 can be any suitable type of device or apparatus such as a tablet computer, laptop computer, monitoring platform, desktop computer, terminal equipment, or server.

[0034] To facilitate understanding of the firmware upgrade method provided in the embodiments of the present invention, the host computer and energy storage system provided in the embodiments of the present invention will be described in detail first.

[0035] Please see Figure 2 , Figure 2 The schematic diagram illustrates the structure of the host computer provided in some embodiments of the present invention.

[0036] like Figure 2 As shown, the host computer 100 includes at least one first processor 110 and a first memory 120 connected by communication. Figure 2Taking a bus system 130 and a first processor 110 as an example, the various components of the host computer 100 are coupled together through the bus system 130, which is used to realize the connection and communication between the various components. It is easy to understand that the bus system 130, in addition to the data bus, may also include a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity and brevity, in... Figure 2 The general labels all buses as Bus System 130. This is understandable. Figure 2 The structures shown in the embodiments are merely illustrative and do not limit the structure of the host computer described above. For example, the host computer may also include components that are larger than... Figure 2 The structure shown has more or fewer components, or has the same Figure 2 The diagram shows different configurations of the structure.

[0037] Specifically, the first processor 110 is configured to provide computing and control capabilities to support the host computer 100 in executing corresponding business logic and functions. For example, it supports the host computer 100 in executing any firmware upgrade method provided in the first aspect of the present invention, or in executing the steps in any possible implementation of any firmware upgrade method provided in the first aspect of the present invention. Those skilled in the art will understand that the first processor 110 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0038] The first memory 120, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, instructions, and modules, such as the programs, instructions, and modules corresponding to the firmware upgrade method provided in the first aspect of the present invention. In some embodiments, the first memory 120 may include a program storage area and a data storage area. The program storage area may store an operating system and an application program required for at least one function, while the data storage area may store data created according to the use of the first processor 110. The first processor 110 executes various functional applications and data processing of the host computer 100 by running the non-transitory software programs, instructions, and modules stored in the first memory 120, thereby implementing any firmware upgrade method provided in the first aspect of the present invention, or executing the steps in any possible implementation of any firmware upgrade method provided in the first aspect of the present invention. In some embodiments, the first memory 120 may include high-speed random access memory and may also include non-transitory memory. For example, at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the first memory 120 may also include memories remotely located relative to the first processor 110, which can be connected to the first processor 110 via a communication network. It is understood that examples of the aforementioned communication networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0039] Please see Figure 3 , Figure 3 The schematic diagram illustrates the structure of the controller in the energy storage system provided by some embodiments of the present invention.

[0040] like Figure 3 As shown, the controller 210 includes at least one second processor 211 and a second memory 212 that are communicatively connected. Figure 3 Taking a bus system 213 and a second processor 211 as an example, the various components of the controller 210 are coupled together through the bus system 213, which is used to realize the connection and communication between the various components. It is easy to understand that the bus system 213, in addition to the data bus, may also include a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity and brevity, in... Figure 3 The general labels all buses as Bus System 213. This is understandable. Figure 3 The structures shown in the embodiments are merely illustrative and do not limit the structure of the controller described above. For example, the controller may also include components that are more... Figure 3 The structure shown has more or fewer components, or has the same Figure 3 The diagram shows different configurations of the structure.

[0041] Specifically, the second processor 211 is configured to provide computational and control capabilities to support the controller 210 in executing corresponding business logic and functions. For example, it supports the controller 210 in executing any firmware upgrade method provided in the second aspect of the present invention, or in executing the steps in any possible implementation of any firmware upgrade method provided in the second aspect of the present invention. Those skilled in the art will understand that the second processor 211 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0042] The second memory 212, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, instructions, and modules, such as the programs, instructions, and modules corresponding to the firmware upgrade method provided in the second aspect of the present invention. In some embodiments, the second memory 212 may include a program storage area and a data storage area. The program storage area may store an operating system, an application program required for at least one function, and the data storage area may store data created according to the use of the second processor 211. The second processor 211 executes various functional applications and data processing of the controller 210 by running the non-transitory software programs, instructions, and modules stored in the second memory 212, thereby implementing any firmware upgrade method provided in the second aspect of the present invention, or executing the steps in any possible implementation of any firmware upgrade method provided in the second aspect of the present invention. In some embodiments, the second memory 212 may include high-speed random access memory and may also include non-transitory memory. For example, at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the second memory 212 may also include memory remotely located relative to the second processor 211, and these remotely located memories may be connected to the second processor 211 through a communication network. It is understood that examples of the aforementioned communication networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0043] As can be understood from the above, the implementing entity of any firmware upgrade method provided in the embodiments of the present invention can be any suitable type of host computer and controller with certain computing and control capabilities, such as the host computer 100 and the controller 210 of the energy storage system 200. In some feasible implementations, any firmware upgrade method provided in the embodiments of the present invention can be implemented by a processor executing computer program instructions stored in memory.

[0044] The firmware upgrade method provided in this invention will be described in detail below, taking into account exemplary applications and implementations of the host computer and energy storage system provided in the embodiments of this invention.

[0045] The firmware upgrade method provided in the first aspect of the embodiments of the present invention will be described below.

[0046] Please see Figure 4 , Figure 4 The schematic diagram illustrates a flowchart of a firmware upgrade method provided in some embodiments of the present invention.

[0047] Understandably, the firmware upgrade method provided in the first aspect of the present invention can be applied to the aforementioned host computer (e.g., host computer 100). Specifically, the execution subject of the firmware upgrade method is one or at least two first processors of the host computer.

[0048] See Figure 4 As shown, the firmware upgrade method provided by the first aspect of the present invention includes, but is not limited to, the following steps S41-S43: S41: Get upgrade information.

[0049] The upgrade information includes a candidate device identifier and a corresponding candidate firmware identifier. The candidate device identifier is the device identifier of a candidate sub-device, and the candidate sub-device is the sub-device among multiple sub-devices that requires firmware upgrade. The candidate device identifier is used to identify the candidate sub-device among multiple sub-devices that needs firmware upgrade. The candidate firmware identifier is the firmware identifier of a candidate firmware, and the candidate firmware is the firmware to be upgraded in the candidate sub-device. The candidate firmware identifier is used to identify the candidate firmware to be upgraded in the candidate sub-device.

[0050] In some embodiments, when the energy storage system detects that there is firmware to be upgraded in a sub-device, it determines that the sub-device is a candidate sub-device. Based on the firmware identifier of the firmware to be upgraded (i.e., candidate firmware) in the candidate sub-device and the device identifier of the candidate sub-device, it generates a set of upgrade information corresponding to the candidate sub-device. The energy storage system transmits the upgrade information corresponding to each candidate sub-device to the host computer through the network, thereby obtaining multiple sets of upgrade information in this embodiment of the invention.

[0051] In some embodiments, when engineers or users actively upgrade the firmware of a sub-device, this embodiment of the invention obtains the candidate device identifier and the candidate firmware identifier corresponding to the candidate device identifier input by the engineer or user, and combines the candidate device identifier and the candidate firmware identifier corresponding to the candidate device identifier into a set of upgrade information. When the engineer or user inputs multiple sets of candidate device identifiers and the candidate firmware identifiers corresponding to the candidate device identifiers, this embodiment of the invention obtains multiple sets of upgrade information.

[0052] S42: Generate the target upgrade file based on multiple sets of upgrade information.

[0053] The target upgrade file includes multiple firmware upgrade files, and each firmware upgrade file corresponds to a candidate sub-device.

[0054] Specifically, in this embodiment of the invention, upgrade information is grouped according to candidate device identifiers in multiple sets of upgrade information to ensure that each candidate sub-device corresponds to a set of firmware information that needs to be upgraded. For example, for each candidate sub-device, a corresponding firmware upgrade data set is established to record candidate firmware and its attributes (version number, firmware size, type, etc.).

[0055] In this embodiment of the invention, a separate firmware upgrade file is generated based on the firmware upgrade data set of each candidate sub-device. The firmware upgrade file includes, but is not limited to: the device identifier of the candidate sub-device (i.e., candidate device identifier), the identifier of the firmware to be upgraded (i.e., candidate firmware identifier), the firmware data content, the upgrade attributes corresponding to the candidate firmware (e.g., version number, upgrade file size, verification information), and upgrade control parameters (e.g., write address, operating mode, and security identifier). This method ensures that each candidate sub-device has an independent and individually identifiable firmware upgrade file.

[0056] For example, in this embodiment of the invention, each firmware upgrade file is encapsulated into a structured data format according to the unified upgrade protocol supported by the energy storage system, such as header information (file type, length, device identifier, number of firmware, etc.), firmware data segment, and check segment (CRC, HASH, signature information, etc.) to ensure that the energy storage system can correctly parse and execute the upgrade process.

[0057] For example, in this embodiment of the invention, the firmware upgrade files corresponding to all candidate sub-devices are packaged according to a predetermined format to form a target upgrade file. The target upgrade file supports sequential parsing and execution, parallel verification and scheduling, and delivery to each device within the energy storage system. The target upgrade file itself may also include: a header information for identifying the file type and number of files, and index information for each sub-file (i.e., the firmware upgrade file), so that the energy storage system can quickly locate the firmware upgrade file corresponding to each candidate sub-device.

[0058] In some embodiments, the present invention adds integrity and security protection to the target upgrade file, such as performing CRC / HASH verification, digital signature, encryption processing, version compatibility checks, etc., to ensure that the firmware upgrade file has not been tampered with and is compatible with the target sub-device.

[0059] S43: Send the target upgrade file to the energy storage system so that the energy storage system can upgrade the candidate firmware in the candidate sub-device according to the target upgrade file after receiving it.

[0060] Specifically, the host computer and the energy storage system establish a usable communication connection through a predetermined communication link. Communication methods include, but are not limited to, serial communication, CAN / RS485, TCP / IP network communication, and wireless communication (e.g., Wi-Fi, 4G / 5G). In this embodiment, the target upgrade file is sent to the energy storage system based on this communication connection. For example, this embodiment sends the target upgrade file in packets according to a preset communication protocol. Each data packet includes: packet sequence number, data length, data content, CRC / HASH checksum, etc. The energy storage system verifies each data packet upon receipt and returns a success confirmation or requests retransmission. After transmission is complete, the energy storage system reassembles the complete target upgrade file internally.

[0061] For example, after receiving the target upgrade file in its entirety, the energy storage system parses the header of the main file to determine the number of firmware upgrade files. It then parses each firmware upgrade file one by one, including the corresponding device identifier (device identifier of the candidate sub-device), candidate firmware identifier, firmware content, verification and execution parameters, etc. Based on the device identifier, the energy storage system allocates each firmware upgrade file to the corresponding sub-device.

[0062] In this embodiment of the invention, the energy storage system distributes the firmware upgrade file from the target upgrade file to the corresponding candidate sub-devices. The candidate sub-devices then complete the firmware upgrade process (e.g., firmware storage, Flash writing, Boot area replacement, and version update registration) according to the firmware upgrade file to upgrade the candidate firmware. During the upgrade process, the candidate sub-devices perform address validity checks, CRC or HASH checks during the writing process, and program integrity verification to ensure the reliability and effectiveness of the written firmware.

[0063] In some embodiments, after all candidate sub-devices have completed firmware writing, the energy storage system returns upgrade status information (including upgrade success, upgrade failure (including error codes), upgrade status statistics (such as a list of successful / failed devices)) to the host computer. If necessary, the host computer can also instruct the energy storage system to restart, switch running firmware, report new firmware version information, etc., to complete the closed loop of the entire upgrade operation.

[0064] This invention generates a target upgrade file based on the device identifiers of multiple sub-devices in an energy storage system and the firmware identifiers of candidate firmware in those sub-devices. The target upgrade file is then sent to the energy storage system via a communication connection, enabling the system to simultaneously upgrade the candidate firmware in multiple sub-devices. This achieves a one-time upgrade of candidate firmware for multiple sub-devices, simplifying the remote upgrade process for the energy storage system. It offers high fault tolerance, reduced failure rate, improved firmware upgrade reliability, significantly reduced upgrade time, and enhanced upgrade efficiency and user experience.

[0065] For example, in some embodiments, a target upgrade file is generated based on multiple sets of upgrade information, specifically including but not limited to the following steps S421-S422: S421: Based on the candidate device identifier and the candidate firmware identifier corresponding to the candidate device identifier, compile and generate the firmware upgrade file for each candidate sub-device.

[0066] In this embodiment, the firmware upgrade file includes valid byte data and first signature data. The first signature data is used to ensure the integrity and identifiability of the firmware upgrade file. The first signature data includes a checksum of the valid byte data, a candidate device identifier, and a candidate firmware identifier. The valid byte data includes multiple valid bytes related to the candidate firmware to be upgraded; that is, the valid byte data is used to represent multiple valid bytes of the candidate firmware to be upgraded.

[0067] For example, in this embodiment of the invention, based on the candidate device identifier and the corresponding candidate firmware identifier in each set of upgrade information, a firmware upgrade file is compiled and generated for each candidate sub-device, so that each firmware upgrade file can be independently parsed and its firmware identity verified. For example, please refer to... Figure 5a , Figure 5a A schematic diagram of a firmware upgrade file is shown in some embodiments of the present invention.

[0068] In some embodiments, the present invention obtains the original firmware code or firmware image and firmware attribute information (e.g., firmware type, version number, compatible model, partition address, etc.) of the candidate firmware from a preset firmware resource library based on the candidate device identifier and the corresponding candidate firmware identifier. The obtained firmware resources are then compiled or built to form intermediate results for flashing. For example, code compilation based on the target MCU or module, linking of binary blocks, section merging, and generation of a firmware image (which can be in bin, hex, img, etc. format) are performed to obtain firmware data that can be directly written to the sub-device's Flash or firmware storage area. The compiled or built firmware image is then standardized, such as removing debug segments, redundant segments, invalid padding segments, and rearranging data according to the candidate sub-device's operating rules (e.g., starting address, segment offset, byte alignment, etc.), to generate valid byte data in the firmware upgrade file. This valid byte data is the firmware content actually written and run in the firmware upgrade file.

[0069] This invention generates first signature data for a firmware upgrade file based on valid byte data to ensure that the firmware is verifiable, locatable, and traceable. The checksum of the valid byte data can be CRC, HASH, or MD5, used to detect whether the firmware content has been tampered with or corrupted during transmission. A candidate device identifier is used to determine which sub-device in the energy storage system the firmware belongs to for the upgrade. The candidate firmware identifier indicates the firmware type, version, module identity, etc., enabling firmware identification and matching. In some embodiments, the first signature data also includes firmware version number, compilation timestamp, firmware size, firmware operating parameters, security key, or digital signature.

[0070] For example, in this embodiment of the invention, valid byte data and first signature data are encapsulated according to a preset data structure to form a firmware upgrade file. The firmware upgrade file includes a file header (such as firmware type, device model, length, etc.), valid byte data segments, and a first signature data segment. After receiving the firmware upgrade file, the energy storage system can identify the firmware source, verify firmware integrity, and write it to Flash or firmware storage area in a specified manner, improving the independence and reliability of firmware management and laying the foundation for subsequently packaging multiple firmware upgrade files to form a target upgrade file.

[0071] S422: Combine and package the firmware upgrade files of all candidate sub-devices to obtain the target upgrade file.

[0072] In this embodiment, the target upgrade file includes multiple firmware upgrade files and second signature data. The second signature data includes a checksum of the target upgrade file, as well as the starting offset address and data length of each firmware upgrade file. The second signature data is used to verify and locate the entire target upgrade file. The starting offset address refers to the offset address of the firmware upgrade file within the target upgrade file.

[0073] For example, the firmware upgrade files corresponding to all candidate sub-devices are concatenated and packaged according to a preset structure to construct a unified target upgrade file. For instance, please refer to... Figure 5b , Figure 5b The diagram shows a target upgrade file in some embodiments of the present invention. Figure 5b The target upgrade file includes M firmware upgrade files, namely firmware upgrade file A1, firmware upgrade file A2, ..., firmware upgrade file Am. Using the second signature data, after receiving the target upgrade file, the energy storage system can quickly parse the storage location of each firmware upgrade file and perform integrity verification. This provides an index for subsequently distributing firmware upgrade files to each candidate sub-device, thereby accurately, locally, and independently completing firmware upgrades for multiple candidate sub-devices.

[0074] In some embodiments, the target upgrade file is sent to the energy storage system, specifically including but not limited to the following steps S431-S432: S431: Compress the target upgrade file using a preset compression algorithm to obtain the target compressed package.

[0075] The preset compression algorithms include, but are not limited to: lossless compression algorithms (such as LZ4, GZIP, ZSTD, and LZMA), binary data compression algorithms based on block compression, and custom fixed-length or variable-length compression encoding methods compatible with energy storage systems. This embodiment of the invention utilizes preset compression algorithms to compress the target upgrade file, generating a target compressed package, reducing data transmission volume, shortening transmission time, reducing communication link bandwidth usage, and improving the reliability of the upgrade process. The target compressed package carries compression header information, including file size, byte length before and after compression, algorithm type identifier, compression verification information, etc., to facilitate the energy storage system in correctly restoring the firmware upgrade data upon decompression after receiving the data.

[0076] S432: Send the target compressed package to the energy storage system.

[0077] For example, in this embodiment of the invention, the compressed target package is sent to the energy storage system via a communication link. The communication methods include, but are not limited to, wired communication (e.g., RS485, CAN, Ethernet), wireless communication (e.g., Wi-Fi, 4G / 5G), serial communication, or bus communication. During transmission, this embodiment of the invention fragments the target compressed package. Each data fragment may carry a data sequence number, fragment length, and a verification field. After receiving the data, the energy storage system caches the fragmented data sequentially and performs fragment verification, file integrity checks, and other operations to ensure that the target compressed package is transmitted to the energy storage system completely and without errors. After receiving the target compressed package, the energy storage system can perform integrity verification, data decompression, and restoration of the target upgrade file based on the compression algorithm identifier and verification information it carries. This provides a data foundation for subsequently parsing multiple firmware upgrade files and performing firmware upgrade operations. After receiving and decompressing, the energy storage system can directly parse and perform firmware upgrades based on the internal structure of the target upgrade file, improving the reliability, real-time performance, and stability of the entire energy storage system firmware upgrade process.

[0078] The firmware upgrade method provided in the first aspect of the present invention generates a target upgrade file based on the device identifiers of multiple sub-devices of an energy storage system and the firmware identifiers of candidate firmware in the sub-devices. The target upgrade file is then sent to the energy storage system via a communication connection, enabling the energy storage system to simultaneously upgrade the candidate firmware in multiple sub-devices according to the target upgrade file. This achieves a one-time upgrade of the candidate firmware of multiple sub-devices, simplifies the remote upgrade process of the energy storage system, has a high fault tolerance rate, a low failure rate, improves the reliability of firmware upgrades, significantly reduces upgrade time, and enhances upgrade efficiency and user experience.

[0079] The firmware upgrade method provided in the second aspect of the embodiments of the present invention will be described below.

[0080] Please see Figure 6 , Figure 6 The schematic diagram illustrates a flowchart of a firmware upgrade method provided in some embodiments of the present invention.

[0081] Understandably, the firmware upgrade method provided in the second aspect of the present invention can be applied to the controller of the energy storage system described above (e.g., controller 210 of energy storage system 200). Specifically, the execution subject of the firmware upgrade method is one or at least two second processors of the controller in the energy storage system.

[0082] See Figure 6 As shown, the firmware upgrade method provided in the second aspect of the present invention includes, but is not limited to, the following steps S51-S52: S51: Receives the target upgrade file sent by the host computer.

[0083] The target upgrade file includes multiple firmware upgrade files, each firmware upgrade file corresponds to a candidate sub-device, and the candidate sub-device is the sub-device that needs to be upgraded among the multiple sub-devices.

[0084] For example, the energy storage system receives a target upgrade file sent by a host computer, which generates the target upgrade file based on multiple sets of upgrade information. During the process of receiving the target upgrade file, the energy storage system performs operations such as data packet caching, packet order verification, data integrity verification (such as CRC and Hash verification), file reassembly and recovery, etc. After confirming that the target upgrade file is complete and valid, it enters the upgrade execution phase.

[0085] S52: Upgrade the candidate firmware in the candidate sub-devices according to the target upgrade file.

[0086] In this embodiment, the candidate firmware is the firmware to be upgraded in the candidate sub-device.

[0087] For example, the energy storage system parses the header information, starting offset address, data length, and first signature data of each firmware upgrade file from the target upgrade file. Based on this information, it locates each firmware upgrade file and determines its corresponding candidate sub-device. The energy storage system distributes each firmware upgrade file to its corresponding candidate sub-device based on the device identifier obtained from the parsing, and performs operations such as checksum detection, data segmentation writing, error retries, and retransmissions to ensure that the firmware upgrade file is accurately transmitted to each candidate sub-device. Upon receiving the firmware upgrade file, the candidate sub-device can store, cache, or write the firmware and execute the upgrade process. The candidate sub-device performs a firmware upgrade, which includes: firmware integrity verification, erasing / writing to Flash or firmware storage, firmware writing, secondary verification after successful writing, replacing the old firmware version, and updating firmware version records or operating parameters. After the candidate sub-device completes the upgrade of the candidate firmware, the energy storage system can report the upgrade status information to the host computer, including upgrade success, upgrade failure (with error code or fault reason), list of sub-devices that have completed the upgrade, list of sub-devices that have not completed the upgrade, new firmware version information, etc. The host computer can confirm, record, generate logs or perform secondary scheduling based on the upgrade status information.

[0088] Through the above method, the energy storage system can automatically receive and parse the target upgrade file packaged and generated by the host computer. Each candidate sub-device obtains an independent firmware upgrade file, realizing device-by-device upgrades. The structured information built into the file enables the upgrade process to be automatically identified, verified and executed without additional external instructions, improving the automation, reliability and controllability of the firmware upgrade process. It is suitable for remote or batch firmware updates of multi-module, large-scale energy storage systems.

[0089] In this embodiment of the invention, after receiving the target upgrade file sent by the host computer via a communication connection, the energy storage system upgrades the candidate firmware in multiple sub-devices according to the target upgrade file. In this way, the candidate firmware of multiple sub-devices can be upgraded at one time, simplifying the remote upgrade process, with high fault tolerance, reduced failure rate, improved upgrade reliability, significantly reduced upgrade time, and improved upgrade efficiency and user experience.

[0090] For example, in some embodiments, the candidate firmware in the candidate sub-device is upgraded according to the target upgrade file, specifically including but not limited to the following steps S521-S524: S521: Parse the target upgrade file to extract the second signature data from the target upgrade file.

[0091] S522: Verify the target upgrade file based on the checksum of the target upgrade file.

[0092] S523: The target upgrade file verification is successful. Based on the starting offset address and data length of each firmware upgrade file, the firmware upgrade file in the target upgrade file is extracted, resulting in multiple firmware upgrade files.

[0093] S524: Perform firmware upgrades on candidate sub-devices based on multiple firmware upgrade files.

[0094] In this embodiment, the target upgrade file also includes second signature data. The second signature data includes a checksum of the target upgrade file, the starting offset address of each firmware upgrade file, and its data length. The second signature data is used to verify and locate the entire target upgrade file. The starting offset address refers to the offset address of the firmware upgrade file within the target upgrade file.

[0095] For example, in this embodiment of the invention, the received target upgrade file is parsed, and second signature data is extracted from it. The second signature data indicates the position and spatial range of the firmware upgrade file within the target upgrade file, providing a basis for accurate subsequent sub-file splitting. Based on the checksum of the target upgrade file in the second signature data, the target upgrade file is verified. Verification methods include, but are not limited to, CRC checksum, HASH checksum, digital fingerprint comparison, and digital signature verification. If verification fails, error handling, requesting the host computer to resend the file, and interrupting the upgrade process are performed. If verification passes, the energy storage system locates and extracts the corresponding firmware upgrade file from the target upgrade file based on the starting offset address and data length of each firmware upgrade file in the second signature data, resulting in multiple independent firmware upgrade files. During the extraction process, operations such as file segmentation reading, length verification, structural validity checking, and internal first signature verification (e.g., checksum, device identifier, firmware identifier) ​​are performed to ensure that each firmware upgrade file can be completely recovered.

[0096] Specifically, based on the extracted firmware upgrade files, the embodiments of the present invention perform firmware upgrade operations on the corresponding candidate sub-devices. The upgrade operation process includes, but is not limited to: sending firmware data to the corresponding candidate sub-devices, the candidate sub-devices performing integrity verification on the firmware content, erasing and writing firmware storage areas (such as Flash), writing firmware data, performing secondary verification after writing, replacing old firmware, and updating device-side firmware version records or operating parameters, which significantly improves the reliability, security and automation of batch firmware upgrades for multiple sub-devices.

[0097] For example, in some embodiments, the candidate sub-device is upgraded with firmware based on multiple firmware upgrade files, specifically including but not limited to the following steps S5241-S5243: S5241: Parse the first signature data in the reference upgrade file and extract the candidate device identifier and candidate firmware identifier from the first signature data as the reference device identifier and reference firmware identifier.

[0098] S5242: Determine the candidate sub-device corresponding to the reference device identifier as the reference sub-device.

[0099] S5243: Send a reference upgrade file to the reference sub-device so that the reference sub-device can upgrade the reference firmware corresponding to the reference firmware identifier according to the reference upgrade file.

[0100] The reference upgrade file is any one of the multiple firmware upgrade files.

[0101] In this embodiment, the firmware upgrade file includes valid byte data and first signature data. The first signature data includes a checksum of the valid byte data, a candidate device identifier, and a candidate firmware identifier corresponding to the candidate device identifier. The candidate device identifier is the device identifier of the candidate sub-device, the candidate firmware identifier is the firmware identifier of the candidate firmware, and the candidate firmware is the firmware to be upgraded in the candidate sub-device. The valid byte data includes multiple valid bytes related to the upgrade candidate firmware.

[0102] For example, any one firmware upgrade file is selected from multiple firmware upgrade files as a reference upgrade file. The first signature data in the reference upgrade file is parsed, and the candidate device identifier and candidate firmware identifier are extracted and used as the reference device identifier and reference firmware identifier, respectively. Next, based on the reference device identifier, a corresponding candidate sub-device is determined, and this candidate sub-device is used as the reference sub-device. The reference upgrade file is sent to the reference sub-device, enabling the reference sub-device to complete the upgrade operation based on the information in the reference upgrade file; that is, the reference sub-device identifies and upgrades the corresponding reference firmware based on the reference firmware identifier. Through the above process, multiple firmware upgrade files are executed repeatedly to complete the firmware upgrade of multiple candidate sub-devices, achieving independent secure upgrades for each device and each firmware.

[0103] For example, in some embodiments, a reference upgrade file is sent to a reference sub-device so that the reference sub-device upgrades the reference firmware corresponding to the reference firmware identifier according to the reference upgrade file, specifically including but not limited to the following steps S52431-S52432: S52431: Send reference upgrade files to the reference sub-device.

[0104] S52432: In response to the reference sub-device receiving the reference upgrade file, an upgrade start command is sent to the reference sub-device, so that after receiving the upgrade start command, the reference sub-device parses the reference upgrade file to extract the valid byte data in the reference upgrade file as reference byte data, and after verifying the validity of the reference byte data according to the checksum of the reference byte data, it upgrades the reference firmware according to the reference byte data.

[0105] For example, in this embodiment of the invention, a reference upgrade file is sent to a reference sub-device, enabling the reference sub-device to receive firmware data for upgrade. After confirming that the reference sub-device has completed the reference upgrade file, an upgrade start command is sent to the reference sub-device in response to the completion of receiving the reference upgrade file. Upon receiving the upgrade start command, the reference sub-device parses the reference upgrade file, extracts valid byte data as reference byte data, and performs integrity verification on the reference byte data based on its checksum. If the verification passes (i.e., the reference byte data is valid), the reference firmware corresponding to the reference firmware identifier is upgraded according to the content of the reference byte data. Through this process, the reference sub-device performs the upgrade operation only if the data is complete and the verification passes, thereby improving the reliability and security of the upgrade process.

[0106] For example, in some embodiments, after upgrading the candidate firmware in the candidate sub-device according to the target upgrade file, the firmware upgrade method further includes, but is not limited to, the following steps S53-S54: S53: Obtain the firmware upgrade results of candidate sub-devices.

[0107] S54: Send firmware upgrade results to the host computer.

[0108] Among them, the firmware upgrade result indicates whether the candidate firmware in the candidate sub-device was successfully upgraded or failed.

[0109] For example, the energy storage system acquires the firmware upgrade results of each candidate sub-device to characterize the upgrade status of the candidate firmware. The firmware upgrade results include, but are not limited to, upgrade success, upgrade failure, failure reason, or error code. The firmware upgrade results can be fed back by the candidate sub-device after the upgrade is completed, or generated by the energy storage system based on the status and verification results during the upgrade process. The energy storage system sends the firmware upgrade results to the host computer so that the host computer can confirm the upgrade completion status, record the upgrade log, and perform subsequent processing based on the upgrade results (e.g., retrying failed firmware upgrades, generating reports or alarm information, triggering version management or system maintenance operations). Through this method, the host computer can obtain the upgrade status of each candidate sub-device in real time, realizing closed-loop management of the entire energy storage system firmware upgrade process and ensuring upgrade reliability and traceability.

[0110] The firmware upgrade method provided in the second aspect of the present invention involves the energy storage system simultaneously upgrading candidate firmware in multiple sub-devices based on the target upgrade file sent by the host computer after receiving the target upgrade file through a communication connection. This enables the simultaneous upgrade of candidate firmware in multiple sub-devices, simplifies the remote upgrade process, increases fault tolerance, reduces failure rate, improves upgrade reliability, significantly reduces upgrade time, and enhances upgrade efficiency and user experience.

[0111] This invention provides a computer-readable storage medium storing processor-executable computer program instructions. When executed by a processor, the computer program instructions cause a computer to perform any firmware upgrade method provided in this invention, or to perform steps in any possible implementation of any firmware upgrade method provided in this invention.

[0112] In some embodiments, the storage medium may be a flash memory, a hard disk, an optical disk, a register, a magnetic surface memory, a removable disk, a CD-ROM, a random access memory (RAM), a read-only memory (ROM), an electrically programmable ROM, and an electrically erasable programmable ROM, or any other form of storage medium known in the art, or various devices including one or any combination of the above storage media.

[0113] In some embodiments, computer program instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0114] As an example, computer program instructions may, but do not necessarily, correspond to files in a file system, and may be stored as part of a file that holds other programs or data, for example, in one or more scripts in an HTML (Hypertext Markup Language) document, or in a single file dedicated to the program in question, or in multiple collaborative files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0115] As an example, computer program instructions can be deployed to execute on a single computing device (including devices such as smart terminals and servers), or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network. It is readily understood that all or part of the steps of the methods described in the embodiments of the present invention above can be implemented directly using electronic hardware or processor-executable computer program instructions, or a combination of both.

[0116] Those skilled in the art will understand that the embodiments provided by this invention are merely illustrative. The order in which the steps in the methods of the embodiments are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The order can be adjusted, merged, and deleted according to actual needs. Modules or sub-modules, units or sub-units in the apparatus or system of the embodiments can be merged, divided, and deleted according to actual needs. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.

[0117] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, and of course, it can also be implemented using hardware. Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. It should be understood that the storage medium can be flash memory, hard disk, optical disk, register, magnetic surface memory, removable disk, CD-ROM, random access memory (RAM), read-only memory (ROM), electrically programmable ROM, and electrically erasable programmable ROM, etc.

[0118] It should be noted that the above embodiments are for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. Those skilled in the art can understand that all or part of the processes of the above embodiments can be implemented by modifying the technical solutions described in the embodiments of the present invention, or by making equivalent substitutions for some of the technical features. It is understood that these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and should be considered as equivalent changes and modifications made based on the embodiments of the present invention, all of which should fall within the scope of the claims of the present invention.

Claims

1. A firmware upgrade method for a host computer, characterized in that, The host computer is communicatively connected to the energy storage system, which includes multiple sub-devices. The firmware upgrade method includes: Obtain upgrade information, wherein the upgrade information includes a candidate device identifier and a candidate firmware identifier corresponding to the candidate device identifier, the candidate device identifier is the device identifier of a candidate sub-device, the candidate sub-device is the sub-device among the plurality of sub-devices that needs firmware upgrade, the candidate firmware identifier is the firmware identifier of a candidate firmware, and the candidate firmware is the firmware to be upgraded among the candidate sub-devices; A target upgrade file is generated based on multiple sets of upgrade information, wherein the target upgrade file includes multiple firmware upgrade files, and each firmware upgrade file corresponds to one candidate sub-device; The target upgrade file is sent to the energy storage system so that, upon receiving the target upgrade file, the energy storage system upgrades the candidate firmware in the candidate sub-device according to the target upgrade file.

2. The firmware upgrade method according to claim 1, characterized in that, The generation of the target upgrade file based on multiple sets of upgrade information includes: Based on the candidate device identifier and the candidate firmware identifier corresponding to the candidate device identifier, a firmware upgrade file for each candidate sub-device is compiled and generated. The firmware upgrade file includes valid byte data and first signature data. The first signature data includes a checksum of the valid byte data, the candidate device identifier, and the candidate firmware identifier. The valid byte data includes multiple valid bytes related to upgrading the candidate firmware. The firmware upgrade files of all the candidate sub-devices are concatenated and packaged to obtain the target upgrade file. The target upgrade file includes multiple firmware upgrade files and second signature data. The second signature data includes the checksum of the target upgrade file and the starting offset address and data length of each firmware upgrade file.

3. The firmware upgrade method according to claim 1, characterized in that, Sending the target upgrade file to the energy storage system includes: The target upgrade file is compressed using a preset compression algorithm to obtain a target compressed package; The target compressed package is sent to the energy storage system.

4. A firmware upgrade method for an energy storage system, characterized in that, The energy storage system is communicatively connected to a host computer, and the energy storage system includes multiple sub-devices. The firmware upgrade method includes: The host computer sends a target upgrade file, wherein the target upgrade file includes multiple firmware upgrade files, each firmware upgrade file corresponds to a candidate sub-device, and the candidate sub-device is the sub-device among the multiple sub-devices that needs firmware upgrade; According to the target upgrade file, the candidate firmware in the candidate sub-device is upgraded, and the candidate firmware is the firmware to be upgraded in the candidate sub-device.

5. The firmware upgrade method according to claim 4, characterized in that, The target upgrade file also includes second signature data, and the step of upgrading the candidate firmware in the candidate sub-device according to the target upgrade file includes: The target upgrade file is parsed to extract the second signature data from the target upgrade file. The second signature data includes the checksum of the target upgrade file and the starting offset address and data length of each firmware upgrade file. The target upgrade file is verified based on its checksum. In response to the successful verification of the target upgrade file, the firmware upgrade file is extracted from the target upgrade file according to the starting offset address and data length of each firmware upgrade file, resulting in multiple firmware upgrade files; The candidate sub-devices are upgraded with firmware based on multiple firmware upgrade files.

6. The firmware upgrade method according to claim 5, characterized in that, The firmware upgrade file includes valid byte data and first signature data. The first signature data includes a checksum of the valid byte data, a candidate device identifier, and a candidate firmware identifier corresponding to the candidate device identifier. The candidate device identifier is the device identifier of the candidate sub-device, and the candidate firmware identifier is the firmware identifier of the candidate firmware. The candidate firmware is the firmware to be upgraded in the candidate sub-device. The valid byte data includes multiple valid bytes related to upgrading the candidate firmware. The firmware upgrade of the candidate sub-device based on multiple firmware upgrade files includes: The first signature data in the reference upgrade file is parsed, and the candidate device identifier and the candidate firmware identifier in the first signature data are extracted as the reference device identifier and the reference firmware identifier. The reference upgrade file is any one of the multiple firmware upgrade files. The candidate sub-device corresponding to the reference device identifier is determined as the reference sub-device; The reference upgrade file is sent to the reference sub-device so that the reference sub-device upgrades the reference firmware corresponding to the reference firmware identifier according to the reference upgrade file.

7. The firmware upgrade method according to claim 6, characterized in that, Sending the reference upgrade file to the reference sub-device, so that the reference sub-device upgrades the reference firmware corresponding to the reference firmware identifier according to the reference upgrade file, includes: Send the reference upgrade file to the reference sub-device; In response to the reference sub-device receiving the reference upgrade file, an upgrade start command is sent to the reference sub-device, so that after receiving the upgrade start command, the reference sub-device parses the reference upgrade file to extract the valid byte data in the reference upgrade file as reference byte data, verifies the validity of the reference byte data according to the checksum of the reference byte data, and then upgrades the reference firmware according to the reference byte data.

8. The firmware upgrade method according to any one of claims 4-7, characterized in that, After upgrading the candidate firmware in the candidate sub-device according to the target upgrade file, the method further includes: Obtain the firmware upgrade result of the candidate sub-device, wherein the firmware upgrade result indicates whether the candidate firmware in the candidate sub-device was successfully upgraded or failed; The firmware upgrade result is sent to the host computer.

9. A host computer, characterized in that, include: A first processor and a first memory communicatively connected to the first processor; The first memory stores computer program instructions executable by the first processor, which, when executed by the first processor, cause the host computer to perform the firmware upgrade method as described in any one of claims 1-3.

10. An energy storage system, characterized in that, include: The controller and multiple sub-devices, all of which are communicatively connected to the controller; The controller includes: A second processor and a second memory communicatively connected to the second processor; The second memory stores computer program instructions executable by the second processor, which, when executed by the second processor, cause the controller to perform the firmware upgrade method as described in any one of claims 4-8.