Battery pack firmware upgrading method and device, terminal equipment and program product

By determining the key information of the battery pack when the firmware upgrade instruction is detected and firmware upgrade is performed when the total number of battery packs is equal to the number of online battery packs, the problem of inefficient firmware upgrade of the battery pack is solved, and efficient firmware upgrade and resource conservation is achieved.

CN120447936AInactive Publication Date: 2025-08-08ROYPOW TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510961773.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2025-08-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, battery pack firmware upgrades are inefficient and require a large amount of transmission resources.

Method used

When the firmware upgrade instruction is detected, the key information of the battery pack to be upgraded is determined, including the target project code, the total number of battery packs to be upgraded, and the number of online battery packs. When the total number of battery packs to be upgraded is equal to the number of online battery packs, the key information is sent to the server, the firmware package is received, and the battery management system can be upgraded firmware.

Benefits of technology

It improves the efficiency of battery pack firmware upgrade, reduces the use of transmission resources, and ensures the consistency of battery pack firmware information and the normal operation of the battery pack.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120447936A_ABST
    Figure CN120447936A_ABST
Patent Text Reader

Abstract

The invention provides a battery pack firmware upgrading method and device, terminal equipment and a program product, and the method comprises the steps: determining key information of a to-be-upgraded battery pack when a firmware upgrading instruction is detected; the key information comprises a target project code, and the total number of to-be-upgraded battery packs and the number of to-be-upgraded online battery packs corresponding to the target project code; determining whether the total number of the to-be-upgraded battery packs is equal to the number of the to-be-upgraded online battery packs; if the total number of the to-be-upgraded battery packs is equal to the number of the to-be-upgraded online battery packs, key information is sent to a server, and a firmware package sent by the server is received; and sending the firmware package to the battery management system, so that the battery management system performs firmware upgrading on each to-be-upgraded battery pack by using the firmware package. According to the method, firmware upgrading is carried out on a plurality of to-be-upgraded battery packs in the same batch, so that the firmware upgrading efficiency of the battery packs is improved; and the number of times of transmitting the firmware packet is reduced, so that the occupation of transmission resources is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of firmware upgrade technology, and in particular to a battery pack firmware upgrade method, apparatus, terminal device, and program product. Background Art

[0002] With the widespread use of battery packs, firmware upgrades for battery packs are required for optimizing the scheduling of industrial energy storage systems, improving the range of electric vehicles, and managing the power consumption of smart devices. Current technical solutions generally adopt a serial upgrade mechanism for single-cell battery packs. Specifically, the client determines the battery packs to be upgraded in the Battery Management System (BMS), and for each battery pack to be upgraded, obtains the firmware package corresponding to the battery pack to be upgraded from the server. The firmware package is then sent to the BMS, so that the BMS can use the firmware package to upgrade the firmware of the corresponding battery pack to be upgraded. However, according to this technical solution, when there are multiple firmware packages to be upgraded, the firmware upgrade efficiency is low and requires a large amount of transmission resources.

[0003] Therefore, how to improve the efficiency of firmware upgrades for battery packs and reduce the occupancy of transmission resources is a technical problem that those skilled in the art currently need to solve. Summary of the Invention

[0004] The purpose of this application is to provide a battery pack firmware upgrade method, device, terminal device, computer-readable storage medium and computer program product, aiming to improve the efficiency of battery pack firmware upgrades and reduce the occupation of transmission resources.

[0005] In a first aspect, the present application provides a method for upgrading battery pack firmware. The method comprises: When a firmware upgrade instruction is detected, key information of the battery pack to be upgraded is determined; the key information includes a target project code, and the total number of battery packs to be upgraded and the number of online battery packs to be upgraded corresponding to the target project code; Determining whether the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded; If the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded, sending the key information to the server and receiving the firmware package sent by the server; The firmware package is sent to a battery management system, so that the battery management system uses the firmware package to perform firmware upgrade on each battery pack to be upgraded.

[0006] In one embodiment, the key information further includes the current status corresponding to each battery pack to be upgraded; After sending the key information to the server and receiving the firmware package sent by the server, the method further includes: Determining whether each of the battery packs to be upgraded meets the firmware upgrade conditions; If each of the battery packs to be upgraded meets the firmware upgrade condition, the step of sending the firmware package to a battery management system is performed, so that the battery management system uses the firmware package to upgrade the firmware of each of the battery packs to be upgraded.

[0007] In one embodiment, sending the firmware package to a battery management system so that the battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded includes: Determining a firmware upgrade order for each battery pack to be upgraded according to each current state; The firmware package is sent to the battery management systems corresponding to the battery packs to be upgraded according to the firmware upgrade sequence, so that each battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded.

[0008] In one embodiment, sending the key information to a server and receiving a firmware package sent by the server includes: Sending the key information to a server, and receiving a target firmware package index corresponding to the key information returned by the server; the target firmware package index is a firmware package index corresponding to the target project code found by the server based on a preset mapping relationship table between project codes and firmware package indexes; A firmware acquisition request is determined according to the target firmware package index, the firmware acquisition request is sent to the server, and a firmware package returned by the server is received.

[0009] In one embodiment, sending the key information to a server and receiving a target firmware package index corresponding to the key information returned by the server includes: The key information is sent to the server. When the server determines that the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded, the target firmware package index corresponding to the target engineering code is searched based on the preset mapping relationship between the engineering code and the firmware package index; and the target firmware package index corresponding to the key information returned by the server is received.

[0010] In one embodiment, after sending the key information to the server and receiving the firmware package sent by the server, the method further includes: The firmware package is subjected to integrity check and legality check. After both checks pass, the step of sending the firmware package to the battery management system is executed so that the battery management system uses the firmware package to perform firmware upgrade on each battery pack to be upgraded.

[0011] In one embodiment, when a firmware upgrade instruction is detected, determining key information of the battery pack to be upgraded includes: When a firmware upgrade instruction is detected, a target project code is determined; based on a global mapping table of project codes and battery pack device IDs, a target battery pack device ID corresponding to the target project code is screened out, and the number of the screened target battery pack device IDs is counted to obtain the total number of battery packs to be upgraded; Send a detection instruction to the battery management system of the battery pack to be upgraded corresponding to the target project code, receive response information sent by each battery management system, and determine the number of online battery packs to be upgraded based on the number of received response information.

[0012] In a second aspect, the present application also provides a battery pack firmware upgrade device. The device includes: An information determination module is configured to determine key information of the battery pack to be upgraded when a firmware upgrade instruction is detected; the key information includes a target project code, a total number of battery packs to be upgraded corresponding to the target project code, and a number of online battery packs to be upgraded; a judgment module, configured to determine whether the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded; if the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded, calling a sending module; The sending module is used to send the key information to the server and receive the firmware package sent by the server; The execution module is used to send the firmware package to the battery management system, so that the battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded.

[0013] In a third aspect, the present application further provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0014] In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, which implements the steps of the above method when executed by a processor.

[0015] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0016] The present application provides a battery pack firmware upgrade method. When a firmware upgrade instruction is detected, key information of the battery pack to be upgraded is first obtained from the battery management system; the key information includes at least the target project code of the battery pack to be upgraded, the total number of battery packs to be upgraded corresponding to the code of the target project, and the number of online battery packs to be upgraded. Therefore, multiple battery packs to be upgraded that are to undergo firmware upgrade in the same batch can be determined based on the target project code; and when it is determined that the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded, firmware upgrades are performed on multiple battery packs to be upgraded in the same batch, thereby improving the efficiency of firmware upgrades for the battery packs; and for multiple battery packs to be upgraded, the server only needs to send a firmware package to the terminal device once to implement firmware upgrades for multiple battery packs to be upgraded in the same batch, which can reduce the number of times firmware packages are transmitted, thereby reducing the occupancy of transmission resources.

[0017] It can be understood that the battery pack firmware upgrade device, terminal equipment, computer-readable storage medium and computer program product provided in the embodiments of the present application have the same beneficial effects as the above-mentioned battery pack firmware upgrade method, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the description of the prior art. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0019] Figure 1 A flowchart of a battery pack firmware upgrade method provided in an embodiment of the present application; Figure 2 A timing diagram of a battery pack firmware upgrade method provided in an embodiment of the present application; Figure 3 A schematic structural diagram of a battery pack firmware upgrade device provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0021] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0022] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0023] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0024] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0025] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of the present application include a particular feature, structure, or characteristic described in conjunction with that embodiment. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized. "Multiple" means "two or more."

[0026] The embodiment of the present application provides a battery pack firmware upgrade method that can be executed by a processor of a terminal device when running a corresponding computer program. The terminal device can be an Energy Management System (EMS).

[0027] Figure 1 This is a flowchart of a battery pack firmware upgrade method provided in an embodiment of the present application. For ease of illustration, only the portion related to this embodiment is shown. The method provided in this embodiment includes the following steps: S100: When a firmware upgrade instruction is detected, key information of the battery pack to be upgraded is determined; the key information includes the target project code, the total number of battery packs to be upgraded corresponding to the target project code, and the number of online battery packs to be upgraded.

[0028] The firmware upgrade instruction refers to an instruction that determines that a firmware upgrade is currently required for the battery pack. In practical applications, the corresponding firmware upgrade instruction may be automatically generated upon detecting the existence of an updated firmware package on the server, or the corresponding firmware upgrade instruction may be generated in response to the user clicking a button on the energy management system's interactive interface when the updated firmware package is detected on the server.

[0029] The process of checking whether the updated firmware package exists in the server is as follows: After the management end uploads a new firmware package to the server, the server will update the mapping relationship table between the firmware package information and the project code; the terminal device will send a mapping relationship query request to the server after being timed or triggered; the server determines the incremental mapping table based on the time of two adjacent queries, and returns the incremental mapping table to the terminal device; or the server directly returns the updated mapping relationship table to the terminal device; the terminal device determines that there is an updated firmware package in the server based on the incremental mapping table; or compares the mapping relationship tables received twice adjacently. If there is new firmware package information in the mapping relationship tables received twice adjacently, it is determined that there is an updated firmware package in the server.

[0030] In a specific example, the terminal device determines the updated firmware package information based on the incremental mapping table and determines the project code corresponding to the updated firmware package information, that is, the target project code. The target project code refers to the project code corresponding to the updated firmware package; the project code is used to identify the battery pack type (Type) and generation (Generation / Version).

[0031] For example, suppose a new firmware package is added to the server, and the corresponding firmware package information is P1. The firmware package is suitable for the battery pack with project code 0x55; therefore, the mapping relationship table is updated according to the firmware package information and the project code; the terminal device determines the updated firmware package information according to the incremental mapping table or the updated mapping relationship table, and determines the target project code as 0x55 based on the updated firmware package information P1.

[0032] The total number of battery packs to be upgraded refers to the total number of battery packs corresponding to the target project code. Firmware upgrades must be performed on all battery packs to be upgraded under the same target project code. The number of online battery packs to be upgraded refers to the number of battery packs to be upgraded that are connected to the corresponding battery management system, and the battery management system is connected to the terminal device.

[0033] S200: Determine whether the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded; if so, execute S300; if not, terminate the process.

[0034] This step ensures that all battery packs to be upgraded are currently online and communicating properly. Specifically, it determines whether the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded. This means that each battery pack to be upgraded is in communication with its corresponding battery management system, and that the battery management system is in communication with the terminal device.

[0035] After determining the total number of battery packs to be upgraded and the number of online battery packs to be upgraded, determine whether the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded; if they are equal, execute S300: send key information to the server, and receive the firmware package sent by the server; if they are not equal, it means that there is a battery pack to be upgraded that is offline. If the firmware package upgrade operation is performed at this time, that is, the firmware upgrade operation is only performed on the currently online battery pack to be upgraded, the firmware information of the battery packs with the same project code will be inconsistent, which may affect the normal operation of the battery pack group, so the process is terminated.

[0036] S300: Send key information to the server and receive the firmware package sent by the server.

[0037] Specifically, after the terminal device determines that the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded, it sends a data packet containing key information such as the target project code, the total number of battery packs to be upgraded, and the number of online battery packs to be upgraded to the server via its built-in communication module based on the MQTT communication protocol. The communication module can be a mobile communication module, such as a 4G / 5G communication module, or a wireless communication module, such as WiFi.

[0038] After receiving the data packet, the server parses it to obtain key information. Then, based on its own mapping table of project codes and firmware package indices, it searches for the target firmware package index corresponding to the target project code. This means matching the index information of the firmware package corresponding to the target project code. The server then searches for the corresponding firmware package based on the target firmware package index. The server then sends the found firmware package to the terminal device using a communication protocol such as HTTP / HTTPS or FTP. The terminal device then receives the firmware package sent by the server.

[0039] S400: Send the firmware package to the battery management system, so that the battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded.

[0040] Specifically, after the terminal device obtains the firmware package from the server, it transmits the firmware package to the battery management system of the battery pack to be upgraded via the CAN bus. The battery management system is the main control unit responsible for monitoring the battery pack status and executing the upgrade instructions.

[0041] After receiving the firmware package, the battery management system writes it to the battery pack's memory, such as flash memory or other non-volatile storage devices, in a specific format and sequence. During the write process, the battery management system adheres to a specified write method and speed to ensure accurate data write and avoid damage to the battery pack's hardware. After the firmware package is completely written to the battery pack to be upgraded, the upgraded battery pack performs the firmware upgrade based on the written firmware package.

[0042] Based on the above embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment, the key information also includes the current status corresponding to each battery pack to be upgraded; After sending the key information to the server and receiving the firmware package sent by the server, the method further includes: Determine whether all battery packs to be upgraded meet the firmware upgrade conditions; If each battery pack to be upgraded meets the firmware upgrade condition, the step of sending the firmware package to the battery management system is executed, so that the battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded.

[0043] The current status of the battery pack to be upgraded includes parameters such as power level, temperature, and voltage. Specifically, the terminal device sends a status acquisition request to the battery management system corresponding to the battery pack to be upgraded. The battery management system obtains the current status of each corresponding battery pack to be upgraded and sends the current status to the terminal device. The terminal device then determines whether each battery pack to be upgraded meets the firmware upgrade requirements based on the current status.

[0044] The firmware upgrade condition is satisfied when the current state of the battery pack to be upgraded is within a corresponding preset range. For example, the battery pack's charge level is greater than a preset charge threshold, the battery pack's temperature is lower than a preset temperature threshold, and the battery pack's voltage is within a preset voltage range.

[0045] When it is determined that each battery pack to be upgraded meets the firmware upgrade condition, step S400 is executed: sending the firmware package to the battery management system, so that the battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded.

[0046] If any battery pack to be upgraded does not meet the firmware upgrade conditions, the process is terminated. Here, the firmware upgrade is not performed on any battery pack to be upgraded to ensure that the firmware information of each battery pack to be upgraded is consistent.

[0047] According to the method of this embodiment, before performing a firmware upgrade on the battery pack to be upgraded, it is first determined whether each battery pack to be upgraded meets the firmware upgrade conditions. Only when it is determined that each battery pack to be upgraded meets the firmware upgrade conditions will the firmware upgrade operation for each battery pack to be upgraded be performed. This can increase the probability of successful firmware upgrade of each battery pack to be upgraded and improve the efficiency of the firmware upgrade.

[0048] Based on the above embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment, sending the firmware package to the battery management system so that the battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded includes: Determine the firmware upgrade order of each battery pack to be upgraded according to each current status; The firmware package is sent to the battery management systems corresponding to the battery packs to be upgraded in the firmware upgrade sequence, so that each battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded.

[0049] Specifically, after obtaining the current status of each battery pack to be upgraded, the firmware upgrade order for each battery pack to be upgraded is determined based on the current status. The battery packs to be upgraded are arranged in order of power from low to high, and this order is used to determine the firmware upgrade order, indicating that battery packs with lower power levels will receive priority for firmware upgrade.

[0050] In some embodiments, the current status also includes the priority of the battery pack to be upgraded; therefore, the priority order corresponding to each battery pack to be upgraded can be determined according to each priority, and the firmware upgrade order can be determined in descending order of priority, indicating that the battery pack to be upgraded with a higher priority needs to be upgraded with firmware first.

[0051] Specifically, after determining the firmware upgrade sequence, the firmware packages are sent to the battery management systems corresponding to the battery packs to be upgraded in sequence according to the firmware upgrade sequence, so that each battery management system uses the firmware packages to upgrade the firmware of each battery pack to be upgraded.

[0052] As can be seen, according to the method of this embodiment, the firmware upgrade order can be determined based on the current status of the battery pack to be upgraded, and the firmware packages can be sent to the corresponding battery management system in sequence according to the firmware upgrade order, thereby achieving the firmware upgrade of each battery pack to be upgraded. This method can accurately determine the firmware upgrade order of each battery pack to be upgraded.

[0053] Figure 2 A timing diagram of a battery pack firmware upgrade method provided in an embodiment of the present application. Figure 2 As shown, based on the above embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment, sending key information to the server and receiving the firmware package sent by the server include: Send the key information to the server and receive the firmware package index corresponding to the key information returned by the server; the firmware package index is the firmware package index corresponding to the target project code found by the server based on the preset mapping relationship table between project code and firmware package index; Determine a firmware acquisition request based on the target firmware package index, send the firmware acquisition request to the server, and receive the firmware package returned by the server.

[0054] In this embodiment, after the terminal device sends a data packet containing key information to the server, the server parses the data packet after receiving it to obtain key information: target project code, total number of battery packs to be upgraded, and online battery packs to be upgraded.

[0055] The server pre-maintains a mapping relationship table between project codes and firmware package indexes. After obtaining key information, the server searches for the target firmware package index corresponding to the target project code based on the mapping relationship table to determine the latest version or specified version of the firmware package index corresponding to the batch of battery packs to be upgraded.

[0056] In actual applications, the server can also maintain a mapping table between battery pack type, generation, and firmware package index. After obtaining the target project code, the server determines the corresponding target battery pack type and target generation based on the target project code, and then searches for the target firmware package index corresponding to the target battery pack type and target generation based on the mapping table.

[0057] The target firmware package index is sent to the terminal device via the MQTT communication protocol. The firmware package index refers to information that can accurately find the corresponding firmware package from the server, such as the firmware package ID, firmware package download URL, etc., which is not limited in this embodiment.

[0058] After receiving the target firmware package index, the terminal device determines a firmware acquisition request based on the target firmware package index and sends the firmware acquisition request to the server; the server then searches for the firmware package corresponding to the target firmware index from its pre-stored firmware packages based on the firmware acquisition request and the target firmware index in the firmware acquisition request, and then sends the found firmware package to the terminal device based on a communication protocol such as HTTP / HTTPS or FTP; correspondingly, the terminal device receives the firmware package sent by the server.

[0059] In this embodiment, after obtaining the key information, the server first returns the target firmware package index to the terminal device. When the terminal device sends a firmware acquisition request to the server, that is, when the terminal device actively requests it, the server returns the corresponding firmware package to the terminal device, thereby reducing unnecessary firmware package transmission and saving transmission resources.

[0060] Based on the above embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment, key information is sent to the server, and a firmware package index corresponding to the key information is received from the server, including: Send the key information to the server. When the server determines that the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded, search for the target firmware package index corresponding to the target project code based on the preset mapping relationship between the project code and the firmware package index; receive the target firmware package index corresponding to the key information returned by the server.

[0061] In this embodiment, after the terminal device sends a data packet containing key information to the server, the server parses the data packet after receiving it to obtain key information: target project code, total number of battery packs to be upgraded, and online battery packs to be upgraded.

[0062] The server compares again whether the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded; if the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded, then based on the preset mapping relationship between the project code and the firmware package index, the server searches for the target firmware package index corresponding to the target project code, and returns the target firmware package index corresponding to the key information to the terminal device; correspondingly, the terminal device receives the target firmware package index returned by the server.

[0063] That is to say, in this embodiment, the server re-checks whether the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded. Through double verification by the terminal device and the server, it is ensured that the firmware of the batch of battery packs to be upgraded is only upgraded when the total number of battery packs to be upgraded is the same as the number of online battery packs to be upgraded, thereby further ensuring the success rate of the firmware upgrade.

[0064] Based on the above embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment, after sending the key information to the server and receiving the firmware package sent by the server, the method further includes: The firmware package is checked for integrity and validity. After passing both checks, the firmware package is sent to the battery management system so that the battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded.

[0065] Among them, integrity verification refers to the process of checking whether the firmware package has been damaged, lost or tampered with during transmission, storage or update.

[0066] It should be noted that when the firmware package developer releases the firmware package, they generate a corresponding checksum based on the package. The checksum can be a hash value, such as MD5 or SHA-1, or a CRC checksum. The checksum is appended to the end of the firmware package file or stored separately in a separate file. After receiving the firmware package, the terminal device recalculates the firmware package using the same algorithm to obtain the corresponding checksum, which is then compared with the checksum included in the firmware package. If the two match, the firmware package has not been tampered with during transmission, and the firmware package integrity check passes. Otherwise, the firmware package may have been modified or damaged during transmission, and the firmware package integrity check fails.

[0067] In this embodiment, if both the integrity check and the validity check of the firmware package pass, S400 is executed: the firmware package is sent to the battery management system, so that the battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded. If the integrity check or the validity check fails, key information or a firmware acquisition request can be sent to the server again, so that the server can send the corresponding firmware package to the terminal device again.

[0068] Among them, legitimacy verification refers to the process of verifying whether the source of the firmware package is legal, whether it is authorized, and whether it complies with the system's security policy.

[0069] It should be noted that when a firmware package developer releases a firmware package, they use their private key to encrypt the package's hash value to generate a digital signature. Upon receiving the firmware package, the terminal device first extracts the digital signature from the package and then decrypts it using the developer's public key to obtain the plaintext hash value. The device then compares the plaintext hash value with the hash value it calculated for the firmware package. If the two match, the digital signature verification is successful. In practical applications, in addition to verifying the digital signature itself, the terminal device can also verify the legitimacy of the developer's signing certificate. This includes checking whether the certificate is issued by a trusted certificate authority (CA), is within its validity period, and has been revoked. If verification passes, the firmware package is legitimate; otherwise, it indicates that the source is illegitimate, potentially indicating that the package was released by an unknown or untrusted source.

[0070] It can be seen that according to the method of this embodiment, the firmware package is sent to the battery management system only when the integrity and legitimacy of the firmware package are guaranteed, and the firmware of the corresponding battery pack to be upgraded is upgraded through the battery management system, thereby improving the efficiency and safety of the battery pack firmware upgrade.

[0071] Based on the above embodiment, this embodiment further illustrates and optimizes the technical solution. Specifically, in this embodiment, when a firmware upgrade instruction is detected, key information of the battery pack to be upgraded is determined, including: When a firmware upgrade instruction is detected, the target project code is determined; based on the global mapping table of project codes and battery pack device IDs, the target battery pack device ID corresponding to the target project code is screened out, and the number of screened target battery pack device IDs is counted to obtain the total number of battery packs to be upgraded; Send a detection instruction to the battery management system of the battery pack to be upgraded corresponding to the target project code, receive response information sent by each battery management system, and determine the number of online battery packs to be upgraded based on the number of received response information.

[0072] Specifically, the process for the terminal device to determine the total number of battery packs to be upgraded and the number of online battery packs to be upgraded is as follows: During daily operation, the terminal device sends a message request to the battery management system via the CAN bus based on trigger conditions or timing. Each battery management system on the CAN bus feeds back its own engineering code and battery pack device ID to the terminal device. The terminal device establishes and updates a global mapping table of engineering codes and battery pack device IDs based on the received information. Among them, the engineering codes of different battery packs may be the same.

[0073] After determining the target project code, the target battery pack device ID corresponding to the target project code (i.e., the battery pack device ID corresponding to the battery pack to be upgraded) is filtered out based on the global mapping table. The number of filtered target battery pack device IDs is counted to obtain the total number of battery packs to be upgraded. The terminal device sends a test command to the battery management system of the battery pack to be upgraded corresponding to the target project code. After receiving the test command, each battery management system sends a response message to the terminal device. Based on the number of received response messages, the terminal device determines the number of battery packs corresponding to the target project code, that is, the number of online battery packs to be upgraded.

[0074] According to the method of this embodiment, the total number of battery packs to be upgraded and the number of online battery packs to be upgraded can be determined efficiently and accurately.

[0075] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0076] It should be noted that the information collection process (such as the facial image collection process, fingerprint information collection process, etc.) / feature extraction process involved in this application is performed with the user's knowledge and permission, that is, the information collection process / feature extraction process complies with the requirements of laws and regulations and does not constitute an act that harms the public interest.

[0077] Figure 3 The figure shows a schematic diagram of the structure of a battery pack firmware upgrade device provided by an embodiment of the present application. Figure 3 As shown, the battery pack firmware upgrade device of this embodiment includes an information determination module 310, a judgment module 320, a sending module 330 and an execution module 340; wherein, The information determination module 310 is configured to determine key information of the battery pack to be upgraded when a firmware upgrade instruction is detected; the key information includes the target project code, the total number of battery packs to be upgraded corresponding to the target project code, and the number of online battery packs to be upgraded; The judgment module 320 is used to determine whether the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded; if the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded, the sending module is called; The sending module 330 is used to send key information to the server and receive the firmware package sent by the server; The execution module 340 is configured to send the firmware package to the battery management system, so that the battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded.

[0078] A battery pack firmware upgrade device provided in an embodiment of the present application has the same beneficial effects as the above-mentioned battery pack firmware upgrade method.

[0079] In one embodiment, the key information also includes the current status corresponding to each battery pack to be upgraded; A battery pack firmware upgrade device also includes: The condition judgment module is used to determine whether each battery pack to be upgraded meets the firmware upgrade condition; if each battery pack to be upgraded meets the firmware upgrade condition, the execution module 340 is called.

[0080] In one embodiment, the execution module 340 includes: An upgrade sequence determination submodule, used to determine the firmware upgrade sequence of each battery pack to be upgraded based on each current status; The sequential sending submodule is used to send the firmware package to the battery management system corresponding to each battery pack to be upgraded in the firmware upgrade sequence, so that each battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded.

[0081] In one embodiment, the sending module 330 includes: The key information sending submodule is used to send the key information to the server and receive the target firmware package index corresponding to the key information returned by the server; the target firmware package index is the firmware package index corresponding to the target project code found by the server based on the preset mapping relationship table between project code and firmware package index; The firmware acquisition request sending submodule is used to determine the firmware acquisition request according to the target firmware package index, send the firmware acquisition request to the server, and receive the firmware package returned by the server.

[0082] In one embodiment, the key information sending submodule includes: The key information sending unit is used to send key information to the server. When the server determines that the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded, the server searches for the target firmware package index corresponding to the target project code based on the preset mapping relationship between the project code and the firmware package index; and receives the target firmware package index corresponding to the key information returned by the server.

[0083] In one embodiment, a battery pack firmware upgrade device further includes: The verification module is used to perform integrity verification and legality verification on the firmware package. After the verification passes, the firmware package is sent to the battery management system so that the battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded.

[0084] In one embodiment, the information determination module 310 includes: The target project code determination submodule is used to determine the target project code when a firmware upgrade instruction is detected; based on the global mapping table of project codes and battery pack device IDs, the target battery pack device ID corresponding to the target project code is screened out, and the number of screened target battery pack device IDs is counted to obtain the total number of battery packs to be upgraded; The detection instruction sending submodule is used to send detection instructions to the battery management systems of the battery packs to be upgraded corresponding to the target project code, receive response information sent by each battery management system, and determine the number of online battery packs to be upgraded based on the number of received response information.

[0085] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.

[0086] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0087] Figure 4 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. Figure 4 As shown, the terminal device 400 of this embodiment includes a memory 410, a processor 420, and a computer program 430 stored in the memory 410 and executable on the processor 420; when the processor 420 executes the computer program 430, the steps in the above-mentioned battery pack firmware upgrade method embodiments are implemented; or when the processor 420 executes the computer program 430, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0088] Exemplarily, the computer program 430 may be divided into one or more modules / units, one or more of which are stored in the memory 410 and executed by the processor 420 to implement the method of the embodiment of the present application. One or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 430 in the terminal device 400. For example, the computer program 430 may be divided into an information determination module, a judgment module, a sending module, and an execution module, and the specific functions of each module are as follows: An information determination module is used to determine key information of the battery pack to be upgraded when a firmware upgrade instruction is detected; the key information includes a target project code, a total number of battery packs to be upgraded corresponding to the target project code, and a number of online battery packs to be upgraded; A judgment module is used to determine whether the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded; if the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded, the sending module is called; The sending module is used to send key information to the server and receive the firmware package sent by the server; The execution module is used to send the firmware package to the battery management system, so that the battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded.

[0089] In application, the terminal device 400 may be a computing device such as an energy management system, a host computer or an inverter. The terminal device 400 may include but is not limited to a memory 410 and a processor 420. It will be understood by those skilled in the art that Figure 4 It is only an example of a terminal device and does not constitute a limitation of the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.; among them, the input and output devices may include cameras, audio acquisition / playback devices, display screens, etc.; the network access device may include a communication module for wireless communication with external devices.

[0090] In applications, the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0091] In applications, memory can be an internal storage unit of a terminal device, such as a hard drive or memory; it can also be an external storage device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. It can also include both internal and external storage units. Memory is used to store operating systems, applications, boot loaders, data, and other programs, such as computer program code. Memory can also be used to temporarily store data that has been output or is about to be output.

[0092] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0093] The present application implements all or part of the process steps in the above-described method embodiments by instructing the relevant hardware through a computer program. The computer program may be stored in a computer-readable storage medium. When executed by a processor, the computer program may implement the steps of each of the above-described method embodiments. The computer program includes computer program code, which may be in source code form, object code form, an executable file, or some intermediate form. Computer-readable media may include at least: any entity or device capable of carrying computer program code to a terminal device, a recording medium, computer memory, read-only memory (ROM), random access memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Examples include a USB flash drive, a removable hard drive, a magnetic disk, or an optical disk.

[0094] A computer-readable storage medium provided in an embodiment of the present application has the same beneficial effects as the above-mentioned battery pack firmware upgrade method.

[0095] An embodiment of the present application further provides a computer program product, including a computer program, which can implement the steps in the above-mentioned method embodiments when executed by a processor.

[0096] A computer program product provided in an embodiment of the present application has the same beneficial effects as the above-mentioned battery pack firmware upgrade method.

[0097] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0098] Those skilled in the art will appreciate that the devices and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0099] In the embodiments provided herein, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are merely illustrative. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interface, or the devices may be indirectly coupled or communicated in some manner, whether electrical, mechanical, or other.

[0100] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A battery pack firmware upgrade method, characterized in that: The method comprises: When a firmware upgrade instruction is detected, key information of the battery pack to be upgraded is determined; the key information includes a target project code, and the total number of battery packs to be upgraded and the number of online battery packs to be upgraded corresponding to the target project code; Determining whether the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded; If the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded, sending the key information to the server and receiving the firmware package sent by the server; The firmware package is sent to a battery management system, so that the battery management system uses the firmware package to perform firmware upgrade on each battery pack to be upgraded.

2. The method according to claim 1, characterized in that The key information also includes the current status corresponding to each battery pack to be upgraded; After sending the key information to the server and receiving the firmware package sent by the server, the method further includes: Determining whether each of the battery packs to be upgraded meets the firmware upgrade conditions; If each of the battery packs to be upgraded meets the firmware upgrade condition, the step of sending the firmware package to a battery management system is performed, so that the battery management system uses the firmware package to upgrade the firmware of each of the battery packs to be upgraded.

3. The method according to claim 2, characterized in that The step of sending the firmware package to a battery management system so that the battery management system uses the firmware package to perform a firmware upgrade on each battery pack to be upgraded includes: Determining a firmware upgrade order for each battery pack to be upgraded according to each current state; The firmware package is sent to the battery management systems corresponding to the battery packs to be upgraded according to the firmware upgrade sequence, so that each battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded.

4. The method according to claim 1, wherein The step of sending the key information to a server and receiving a firmware package sent by the server includes: Sending the key information to a server, and receiving a target firmware package index corresponding to the key information returned by the server; the target firmware package index is a firmware package index corresponding to the target project code found by the server based on a preset mapping relationship table between project codes and firmware package indexes; A firmware acquisition request is determined according to the target firmware package index, the firmware acquisition request is sent to the server, and a firmware package returned by the server is received.

5. The method according to claim 4, characterized in that The sending of the key information to the server and receiving a target firmware package index corresponding to the key information returned by the server include: The key information is sent to the server. When the server determines that the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded, the target firmware package index corresponding to the target engineering code is searched based on the preset mapping relationship between the engineering code and the firmware package index; and the target firmware package index corresponding to the key information returned by the server is received.

6. The method according to claim 1, characterized in that After sending the key information to the server and receiving the firmware package sent by the server, the method further includes: The firmware package is subjected to integrity check and legality check. After both checks pass, the step of sending the firmware package to the battery management system is executed so that the battery management system uses the firmware package to perform firmware upgrade on each battery pack to be upgraded.

7. The method according to any one of claims 1 to 6, characterized in that When a firmware upgrade instruction is detected, key information of the battery pack to be upgraded is determined, including: When a firmware upgrade instruction is detected, a target project code is determined; based on a global mapping table of project codes and battery pack device IDs, a target battery pack device ID corresponding to the target project code is screened out, and the number of the screened target battery pack device IDs is counted to obtain the total number of battery packs to be upgraded; Send a detection instruction to the battery management system of the battery pack to be upgraded corresponding to the target project code, receive response information sent by each battery management system, and determine the number of online battery packs to be upgraded based on the number of received response information.

8. A battery pack firmware upgrade device, characterized in that: The device comprises: An information determination module is configured to determine key information of the battery pack to be upgraded when a firmware upgrade instruction is detected; the key information includes a target project code, a total number of battery packs to be upgraded corresponding to the target project code, and a number of online battery packs to be upgraded; a judgment module, configured to determine whether the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded; if the total number of battery packs to be upgraded is equal to the number of online battery packs to be upgraded, calling a sending module; The sending module is used to send the key information to the server and receive the firmware package sent by the server; The execution module is used to send the firmware package to the battery management system, so that the battery management system uses the firmware package to upgrade the firmware of each battery pack to be upgraded.

9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Vehicle end part upgrading method and device, electronic equipment and storage medium

    CN117992087A

  • Inverter firmware remote upgrading method

    CN119127261A

  • Battery management system upgrading method and electronic equipment

    CN119271244A

  • Equipment batch upgrading method and system of household energy storage system

    CN119356704A

  • Method and apparatus for remotely updating firmware in batches, and computer-readable storage medium

    US20230185562A1