Software upgrading method, device, host computer and system for battery management unit

By combining functional addressing and physical addressing through the UDS protocol, simultaneous upgrades of multiple battery management units are achieved, solving the problem of low upgrade efficiency in existing technologies and improving the software upgrade efficiency of battery management units.

CN119576375BActive Publication Date: 2026-01-13CONTEMPORARY AMPEREX TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510143276.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2026-01-13
Estimated Expiration
2045-02-10

AI Technical Summary

Technical Problem

In the existing technology, the UDS protocol only supports point-to-point battery management unit software upgrades, resulting in low efficiency when multiple battery management units need to be upgraded.

Method used

By combining functional addressing and physical addressing through the UDS protocol, upgrade requests are sent to multiple battery management units, enabling simultaneous upgrades of multiple battery management units.

Benefits of technology

It improves the efficiency of software upgrades for multiple battery management units, reduces the CAN bus usage, and allows for earlier detection of problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576375B_ABST
    Figure CN119576375B_ABST
Patent Text Reader

Abstract

The application provides a battery management unit software upgrading method, device, host computer and system, and relates to the technical field of battery management. The method comprises the following steps: sending an upgrading request to a plurality of battery management units based on a UDS protocol, so that the battery management units respond to the upgrading request; after receiving a first UDS response returned by the battery management units, sending a UDS diagnosis service request to the battery management units, so that the battery management units perform diagnosis; and after receiving a second UDS response returned by the battery management units, sending an upgrading code request based on function addressing, so that the battery management units perform code upgrading based on the upgrading code request. According to the application, the function addressing of the UDS protocol can be used to simultaneously upgrade a plurality of battery management units, thereby improving the software upgrading efficiency of the plurality of battery management units.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery management technology, and more specifically, to a software upgrade method, apparatus, host computer, and system for a battery management unit. Background Technology

[0002] A Battery Management System (BMS) is the link between the battery and the user, improving battery utilization, preventing overcharging and over-discharging, extending battery life, and monitoring battery status. However, when the BMS has program defects or version issues, it will directly affect the battery's lifespan and even have serious consequences. This places high demands on the software management of the BMS.

[0003] Unified Diagnostic Services (UDS protocol) is a universal automotive diagnostic protocol. The UDS protocol enables software upgrades of the vehicle's battery management unit (BMU). However, currently, the UDS protocol only supports point-to-point upgrades with the BMU, resulting in low upgrade efficiency for scenarios requiring upgrades to multiple BMUs. Summary of the Invention

[0004] The purpose of this application is to provide a software upgrade method, apparatus, host computer, and system for a battery management unit, so as to improve the upgrade efficiency of multiple battery management units.

[0005] In a first aspect, embodiments of this application provide a software upgrade method for a battery management unit. This method can be applied to upgrade the software of a battery management unit in a battery system. The battery system includes multiple battery cells, each battery cell including a battery management unit, which manages the battery cell. The method includes:

[0006] Based on the UDS protocol, an upgrade request is sent to multiple battery management units to enable them to respond to the upgrade request; after receiving the first UDS response from the battery management units, a UDS diagnostic service request is sent to the multiple battery management units to enable them to perform diagnostics; after receiving the second UDS response from the multiple battery management units, an upgrade code request is sent based on function addressing to enable the multiple battery management units to perform code upgrades based on the upgrade code request.

[0007] This application embodiment uses the functional addressing of the UDS protocol to enable simultaneous upgrades of multiple battery management units, thereby improving the software upgrade efficiency of multiple battery management units.

[0008] In any embodiment, an upgrade request is sent to multiple battery management units based on the UDS protocol, including:

[0009] The upgrade request is generated based on the codes of multiple battery management units. The upgrade request includes the physical address message ID associated with the code of the battery management unit.

[0010] An upgrade request is sent to the corresponding battery management unit based on the physical address message ID.

[0011] In this embodiment, the UDS protocol sends upgrade requests to multiple battery management units in the form of physical addressing messages, causing the battery management units to return response messages and enter the upgrade preparation state. By assigning a unique code to each battery management unit and generating a physical addressing message ID associated with it, each battery management unit that needs to be upgraded can be accurately identified and located.

[0012] In any embodiment, before sending upgrade requests to multiple battery management units based on the UDS protocol, the method further includes:

[0013] The response is triggered by the interactive operation of the battery management unit on the host computer interface;

[0014] The coding of multiple battery management units is determined based on the interactive operation.

[0015] In this embodiment, the interaction with the battery management unit can be achieved by triggering the host computer interface. Based on this interaction, the code of the battery management unit can be determined, and the battery management unit to be upgraded can be accurately located based on the code, making the operation convenient.

[0016] In any embodiment, the UDS diagnostic service request includes the encoded associated physical address message ID of the battery management unit.

[0017] In this embodiment, the UDS diagnostic service request is sent in the form of a physical addressing message. Compared with the function addressing message, the UDS diagnostic service request only requires the corresponding battery management unit to respond, which reduces the response of battery management units that do not need to be upgraded and reduces the occupation of the CAN bus.

[0018] In any embodiment, the method further includes:

[0019] After receiving the third UDS response from the battery management unit, a post-programming diagnostic service is sent to the battery management unit based on physical addressing; the third UDS response is returned by the battery management unit after completing the code upgrade; the post-programming diagnostic service includes the physical address message ID corresponding to the battery management unit.

[0020] This application embodiment can verify whether the battery management unit coding is successful by performing post-programming diagnostic services on the battery management unit, which helps to detect problems early.

[0021] Secondly, embodiments of this application provide another method for upgrading the software of a battery management unit. This method is applied to upgrade the software of the battery management unit of a battery system. The battery system includes multiple battery cells, each battery cell including a battery management unit, which manages the battery cells. The method includes:

[0022] Receive upgrade requests sent by the host computer based on the UDS protocol;

[0023] In response to the upgrade request, a first UDS response is returned to the host computer;

[0024] Receive the UDS diagnostic service request sent by the host computer, perform UDS diagnostic processing based on the UDS diagnostic service request, and send a second UDS response to the host computer after completing the diagnosis.

[0025] Receive upgrade code requests sent by the host computer based on function addressing; the upgrade code request includes the code address and code content;

[0026] The code content is written according to the code address, and a third UDS response is returned to the host computer after the code writing is completed.

[0027] This application embodiment modifies the code inside the battery management unit, enabling the modified battery management unit to respond to received function addressing messages. This allows the host computer to upgrade multiple battery management units simultaneously, improving the efficiency of software upgrades.

[0028] In any embodiment, receiving the upgrade code request sent by the host computer based on function addressing includes:

[0029] If the battery management unit enables the upgrade function based on the upgrade request, it will receive the upgrade code request sent by the host computer based on function addressing.

[0030] This application embodiment broadcasts the upgrade code request via functional addressing, so that all battery management units with the upgrade function enabled can receive and respond to the request, eliminating the need to send an upgrade code request to each battery management unit individually, reducing bandwidth consumption and improving the efficiency of software upgrades.

[0031] In any embodiment, the method further includes:

[0032] Receive post-programming diagnostic services sent by the host computer;

[0033] The corresponding post-processing operations are performed based on the post-programming diagnostic service.

[0034] This application embodiment uses post-programming diagnostic services to verify whether the battery management unit coding is successful and to detect problems early.

[0035] Thirdly, embodiments of this application provide a software upgrade apparatus for a battery management unit. This apparatus is used to upgrade the software of the battery management unit of a battery system. The battery system includes multiple battery cells, each battery cell including a battery management unit, which manages the battery cells. The software upgrade apparatus includes:

[0036] The first request sending module is used to send upgrade requests to multiple battery management units based on the UDS protocol, so that the battery management units can respond to the upgrade requests.

[0037] The second request sending module is used to send a UDS diagnostic service request to the battery management unit after receiving the first UDS response returned by multiple battery management units, so that the multiple battery management units can perform diagnostics.

[0038] The third request sending module is used to send an upgrade code request based on function addressing after receiving the second UDS response returned by multiple battery management units, so that the multiple battery management units can upgrade the code based on the upgrade code request.

[0039] Fourthly, embodiments of this application provide a host computer, including: a processor, a memory, and a bus, wherein,

[0040] The processor and memory communicate with each other via a bus;

[0041] The memory stores program instructions that can be executed by the processor, and the processor can execute the method of the first aspect by calling the program instructions.

[0042] Fifthly, embodiments of this application provide a non-transitory computer-readable storage medium, comprising:

[0043] A non-transitory computer-readable storage medium stores computer instructions that cause the computer to perform the methods of the first aspect.

[0044] In a sixth aspect, embodiments of this application provide a computer program product, including computer program instructions, which, when read and executed by a processor, perform the method of the first aspect.

[0045] In a seventh aspect, embodiments of this application provide a software upgrade system for a battery management unit, including a host computer as described in the fourth aspect and multiple battery management units; the host computer and multiple battery management units are connected via a CAN bus; the battery management units are capable of executing the method described in the second aspect.

[0046] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing embodiments of this application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0047] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 A schematic flowchart illustrating a software upgrade method for a battery management unit provided in an embodiment of this application;

[0049] Figure 2 A schematic flowchart of another software upgrade method for a battery management unit provided in an embodiment of this application;

[0050] Figure 3 Signaling interaction diagram of another software upgrade method for a battery management unit provided in this application embodiment;

[0051] Figure 4 A schematic diagram of a software upgrade device for a battery management unit provided in an embodiment of this application;

[0052] Figure 5 This is a schematic diagram of the physical structure of the host computer provided in an embodiment of this application;

[0053] Figure 6 This is a schematic diagram of a software upgrade system structure for a battery management unit provided in an embodiment of this application. Detailed Implementation

[0054] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.

[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0056] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0057] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0058] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0059] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).

[0060] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.

[0061] The Battery Management Unit (BMS) is a core component of the Battery Management System (BMS). It is responsible for real-time monitoring, control, and protection of the battery pack, ensuring the efficient, safe, and reliable operation of the battery system. This includes acquiring data such as the voltage, temperature, and / or current of battery cells; and controlling the connection, disconnection, and / or equalization management of battery cells. When the BMS has program defects or version issues, a software upgrade is necessary to reduce safety risks during battery use.

[0062] For energy storage batteries, which include multiple battery management units (BMUs), upgrades can currently be performed via In-Application Programming (IAP). IAP upgrades allow user programs to program portions of the User Flash memory during runtime, enabling convenient firmware updates after product release via a pre-defined communication port. While IAP upgrades can simultaneously upgrade multiple BMUs, they lack diagnostic services and cannot diagnose upgrade failures.

[0063] The UDS protocol can be used for diagnostics during battery management unit (BMU) upgrades; however, it currently only supports point-to-point upgrades and cannot upgrade multiple BMUs simultaneously. In scenarios where a battery management system includes multiple BMUs, such as energy storage batteries, using the UDS protocol requires upgrading each BMU individually, resulting in low upgrade efficiency.

[0064] To address the aforementioned technical problems, embodiments of this application provide a software upgrade method, apparatus, host computer, and system for a battery management unit. By modifying the internal code of the battery management unit to enable it to respond to function addressing messages based on the UDS protocol, the software code to be upgraded can be sent to the battery management units that need to be upgraded via function addressing messages. This allows for simultaneous software upgrades of multiple battery management units, improving the efficiency of battery management unit upgrades.

[0065] It should be noted that the software upgrade method for the battery management unit provided in this application embodiment can be applied not only to upgrading multiple battery management units in an energy storage battery, but also to other scenarios where multiple battery management units need to be upgraded simultaneously.

[0066] Figure 1 This is a schematic flowchart illustrating a software upgrade method for a battery management unit provided in an embodiment of this application. Figure 1 As shown, this method is applied to a host computer, which can be a smartphone, tablet, computer, personal digital assistant (PDA), etc.

[0067] The method includes the following steps:

[0068] Step 101: Send upgrade requests to multiple battery management units based on the UDS protocol so that multiple battery management units respond to the upgrade requests.

[0069] Step 102: After receiving the first UDS response from multiple battery management units, send a UDS diagnostic service request to multiple battery management units to enable them to perform diagnostics.

[0070] Step 103: After receiving the second UDS response from multiple battery management units, send an upgrade code request based on function addressing so that the multiple battery management units can upgrade their codes based on the upgrade code request.

[0071] In the specific implementation process, prior to software upgrades, relevant configuration work can be performed in advance. For example, the UDS diagnostic driver function can be implemented using Vector's code package and configuration tools, and multiple coded buttons for battery management units can be configured on the host computer. The number of buttons can be the same as or more than the number of battery management units in the device to be upgraded. The buttons for the battery management units on the host computer interface are then associated with the actual battery management units. Specifically, this can be achieved by reading the NVM value of the battery management unit to obtain its coding information, and then associating the UDS physical addressing messages and response messages with the coding information of the battery management unit. This allows information to be sent to the corresponding physical battery management unit by triggering the buttons on the host computer interface.

[0072] The host computer and the battery management units (BMUs) communicate via a CAN loop. When upgrading certain BMUs is required, the corresponding button on the host computer interface can be triggered. After receiving the coded information from the corresponding button, the host computer generates an upgrade request and sends it to the corresponding BMU based on the UDS protocol. For ease of description, upon receiving an upgrade request, the BMU enters upgrade mode, resets its internal software, and jumps to the Flash Bootloader (FBL) to prepare for the upgrade. BMUs that do not receive an upgrade request will not reset their software; the upgrade request will enter a silent mode and will not interfere with subsequent upgrades.

[0073] After receiving the upgrade request and entering the upgrade state, the battery management unit sends a first UDS response to the host computer. The first UDS response indicates that the battery management unit has received the upgrade request from the host computer and is ready for the upgrade.

[0074] After receiving the first UDS response from the battery management unit (BMU), the host computer sends a UDS diagnostic service request to the BMU. This request is used to perform a diagnostic on the BMU before upgrading it, and may include the following services: 10: Diagnostic Session Control; 11: Reboot Service; 22: Read Data by Identifier; 27: Secure Access Service; 28: Disable and Enable Communication Service; 2e: Write Data by Identifier; 31: Routine Control Service, etc. Upon receiving the UDS diagnostic service request, the BMU performs the diagnostic based on the request and returns a second UDS response to the host computer. The second UDS response characterizes the diagnostic result of the BMU, such as: no fault, or a fault exists, and a fault code, etc.

[0075] After receiving the second UDS response from the battery management unit, the host computer sends an upgrade code request based on function addressing. Since the upgrade code is large and each transmission is small, it needs to be divided into smaller parts, transmitting only a portion at a time. After multiple transmissions, the entire upgrade code is written. For each code transmission, the upgrade code request includes the upgrade code and its corresponding storage address. Upon receiving the upgrade code request, the battery management unit stores the upgrade code according to the storage address. Because there are multiple battery management units, this application uses function addressing to send the upgrade code request. Function addressing is based on function or service; when the host computer sends the upgrade code request, all battery management units supporting that function or service will respond. Therefore, multiple battery management units can receive the upgrade code request, and each battery management unit performs a code upgrade operation upon receiving the request, that is, writing the latest code to the specified address. Existing battery management units cannot respond to function addressing messages. This application embodiment modifies the internal code of the battery management unit to enable it to respond to function addressing messages, thereby allowing multiple battery management units to be upgraded in parallel.

[0076] This application embodiment uses the functional addressing of the UDS protocol to send the latest code to multiple battery management units simultaneously, enabling simultaneous upgrades of multiple battery management units and improving the efficiency of battery management unit software upgrades.

[0077] Based on the above embodiments, upgrade requests are sent to multiple battery management units according to the UDS protocol, including:

[0078] The upgrade request is generated based on the codes of multiple battery management units. The upgrade request includes the physical address message ID associated with the code of the battery management unit.

[0079] An upgrade request is sent to the corresponding battery management unit based on the physical address message ID.

[0080] In practice, physical addressing is based on the physical address of the battery management unit (BMU). If the host computer uses physical addressing, it can communicate with a specific BMU based on the physical addressing message ID. When an upgrade request is received, the host computer can communicate with the BMU using physical addressing. This upgrade request includes the physical addressing message ID corresponding to the BMU.

[0081] The host computer sends upgrade requests using physical addressing, which allows the battery management unit corresponding to the physical address message ID to return a response message after receiving the upgrade request, while other battery management units will not return response messages, thus reducing the load on the CAN bus.

[0082] The CAN bus sends the upgrade request to the corresponding battery management unit based on the physical address message ID. The battery management unit performs a software reset based on the upgrade request and enters the upgrade state.

[0083] In this embodiment, the UDS protocol sends upgrade requests to multiple battery management units in the form of physical addressing messages, causing the battery management units to return response messages and enter the upgrade preparation state. By assigning a unique code to each battery management unit and generating a physical addressing message ID associated with it, each battery management unit that needs to be upgraded can be accurately identified and located.

[0084] Based on the above embodiments, before sending upgrade requests to multiple battery management units based on the UDS protocol, the method further includes:

[0085] The response is triggered by the interactive operation of the battery management unit on the host computer interface;

[0086] The coding of multiple battery management units is determined based on the interactive operation.

[0087] In the specific implementation process, multiple buttons for the battery management units can be pre-set on the host computer. The number of buttons can be the same as or more than the number of battery management units in the actual application scenario. When the number of buttons on the host computer interface is the same as the number of battery management units in the actual application scenario, the buttons on the host computer interface correspond one-to-one with the battery management units in the actual application scenario. When the number of buttons on the host computer interface is greater than the number of battery management units in the actual application scenario, redundant buttons will appear on the host computer interface, and the buttons with the same number as the battery management units in the actual application scenario will be selected to correspond one-to-one with them.

[0088] After setting up the buttons on the host computer interface, associate the button numbers with the unique codes of the corresponding actual battery management units. Thus, when a software upgrade is required for one or more battery management units, it can be achieved by triggering the buttons on the host computer interface. After receiving the user's interaction, the host computer can lock the code of the battery management unit to be upgraded based on the triggered button number.

[0089] It should be noted that the buttons on the host computer interface can be of any form, as long as they can be triggered and associated with the corresponding actual battery management unit.

[0090] In this embodiment, the interaction with the battery management unit can be achieved by triggering the host computer interface. Based on this interaction, the code of the battery management unit can be determined, and the battery management unit to be upgraded can be accurately located based on the code, making the operation convenient.

[0091] Based on the above embodiments, the UDS diagnostic service request includes the encoded associated physical address message ID of the battery management unit.

[0092] In the specific implementation process, the host computer sends a UDS diagnostic service request to the battery management unit via physical addressing. Therefore, the UDS diagnostic service request includes the physical addressing message ID of the battery management unit. After receiving the UDS diagnostic service request, the battery management unit performs UDS diagnostics. After a complete diagnostic, it returns a second UDS response to the host computer; if they are different, no response is given.

[0093] In this embodiment, the UDS diagnostic service request is sent in the form of a physical addressing message. Compared with the function addressing message, the UDS diagnostic service request only requires the corresponding battery management unit to respond, which reduces the response of battery management units that do not need to be upgraded and reduces the occupation of the CAN bus.

[0094] Based on the above embodiments, the method further includes:

[0095] After receiving the third UDS response from the battery management unit, a post-programming diagnostic service is sent to the battery management unit based on physical addressing; the third UDS response is returned by the battery management unit after completing the code upgrade; the post-programming diagnostic service includes the physical address message ID corresponding to the battery management unit.

[0096] In the specific implementation process, after receiving an upgrade code request from the host computer, the battery management unit (BMU) flashes the upgrade code and returns a third UDS response to the host computer. The third UDS response indicates whether the flashing was successful. If the host computer receives a third UDS response indicating a flashing failure, it can send another upgrade code request to the BMU until it receives a third UDS response indicating a successful flash, or sends a preset number of upgrade code requests.

[0097] After receiving the third UDS response from the battery management unit (BMU), the host computer determines whether all upgrade code has been sent to the BMU. If so, it sends a post-programming diagnostic service to the BMU. This service is used for verification, configuration restoration, or system restart after the upgrade code has been written. It typically includes: verifying the new software: After the coding process, the newly written software needs to be verified to ensure its integrity and correctness. This includes verifying data signatures and checksums. Configuration restoration: If certain configuration parameters were changed during the software upgrade, these parameters need to be restored to their correct state during the post-programming diagnostic process. System restart: To make the new software effective, the BMU needs to be restarted, allowing the new software to load and run correctly during system startup.

[0098] This application embodiment can verify whether the battery management unit coding is successful by performing post-programming diagnostic services on the battery management unit, which helps to detect problems early.

[0099] Figure 2 This is a schematic flowchart illustrating another software upgrade method for a battery management unit provided in an embodiment of this application, as shown below. Figure 2 As shown, this method is used to upgrade the software of the battery management unit of a battery system. The battery system includes multiple battery cells, and each battery cell includes a battery management unit for managing the battery cells. The method is applied to the battery management unit and includes:

[0100] Step 201: Receive the upgrade request sent by the host computer based on the UDS protocol;

[0101] Step 202: In response to the upgrade request, return the first UDS response to the host computer;

[0102] Step 203: Receive the UDS diagnostic service request sent by the host computer, perform UDS diagnostic processing based on the UDS diagnostic service request, and send a second UDS response to the host computer after completing the diagnosis.

[0103] Step 204: Receive the upgrade code request sent by the host computer based on function addressing; the upgrade code request includes the code address and code content;

[0104] Step 205: Write the code content according to the code address, and return a third UDS response to the host computer after the code writing is completed.

[0105] In the implementation process, the host computer and the battery management unit (BMU) communicate via a CAN bus. The host computer interface has multiple BMU buttons, each associated with a specific BMU. When a software upgrade is needed for one or more BMUs, the corresponding button is triggered on the host computer interface. The host computer then sends an upgrade request to the corresponding BMU based on the UDS protocol. This upgrade request can be sent using the physical addressing method of the UDS protocol and includes the physical addressing message ID of the corresponding BMU. Upon receiving the upgrade request, the BMU enters upgrade mode, enabling the upgrade function. Subsequently, after the host computer broadcasts an upgrade code request via function addressing, only the BMU with the upgrade function enabled will respond to the upgrade code request and perform the subsequent upgrade operation.

[0106] Upon receiving the upgrade request, the battery management unit responds to the request and returns a first UDS response to the host computer. The battery management unit entering upgrade mode refers to a software reset within the battery management unit, which then jumps to the FlashBootloader.

[0107] It is understandable that physical addressing is based on the physical address of the battery management unit, which is a point-to-point or one-to-one communication method, that is, data packets are sent directly to the battery management unit with a specific physical address.

[0108] After receiving the first UDS response, the host computer sends a UDS diagnostic service request to the battery management unit (BMU) for pre-diagnosis. This UDS diagnostic service request can also be transmitted using physical addressing. The diagnostic services mainly include: Service 10: Diagnostic Session Control; Service 11: Restart Service; Service 22: Read Data by Identifier; Service 27: Secure Access Service; Service 28: Close and Open Communication Service; Service 2e: Write Data by Identifier; Service 31: Routine Control Service, etc. Upon receiving the UDS diagnostic service request, the BMU performs the diagnosis according to the request and returns a second UDS response to the host computer. The second UDS response characterizes the diagnostic result of the BMU, such as: no fault, or a fault exists, and the fault code, etc.

[0109] After receiving the second UDS response from the battery management unit (BMU), the host computer sends an upgrade code request to the BMU based on function addressing. Since the upgrade code is large and each transmission is small, the upgrade code needs to be divided into smaller parts, transmitted only at a time, and the entire upgrade code is written after multiple transmissions. For each code transmission, the upgrade code request includes the upgrade code and its corresponding storage address. Upon receiving the upgrade code request, the BMU stores the upgrade code according to the storage address. Because there are multiple BMUs, this application uses function addressing to send the upgrade code request. Function addressing is based on function or service; when the host computer sends the upgrade code request, all BMUs supporting that function or service will respond. Therefore, multiple BMUs can receive the upgrade code request, and each BMU performs a code upgrade operation upon receiving the request, that is, writing the latest code to the specified address. Then, the battery management unit returns a third UDS response to the host computer to indicate that the current code content has been successfully flashed.

[0110] This application embodiment modifies the code inside the battery management unit, enabling the modified battery management unit to respond to received function addressing messages. This allows the host computer to upgrade multiple battery management units simultaneously, improving the efficiency of software upgrades.

[0111] Based on the above embodiments, after the host computer receives the third UDS response and determines that all code content has been sent to the battery management unit, the method further includes:

[0112] Receive post-programming diagnostic services sent by the host computer;

[0113] The corresponding post-processing operations are performed based on the post-programming diagnostic service.

[0114] In the specific implementation process, after receiving an upgrade code request from the host computer, the battery management unit (BMU) flashes the upgrade code and returns a third UDS response to the host computer. The third UDS response indicates whether the flashing was successful. If the host computer receives a third UDS response indicating a flashing failure, it can send another upgrade code request to the BMU until it receives a third UDS response indicating a successful flash, or sends a preset number of upgrade code requests.

[0115] After receiving the third UDS response from the battery management unit (BMU) indicating successful flashing, the host computer determines whether all upgrade code has been sent to the BMU. If so, it sends a post-programming diagnostic service to the BMU. This service is used for verification, configuration restoration, or system restart after the upgrade code has been flashed. It typically includes: verifying the new software: After the coding process, the newly written software needs to be verified to ensure its integrity and correctness. This includes verifying data signatures and checksums. Configuration restoration: If certain configuration parameters were changed during the software upgrade, these parameters need to be restored to their correct state during post-programming diagnostics. System restart: To make the new software effective, the BMU needs to be restarted. This ensures the new software loads and runs correctly during system startup.

[0116] This application embodiment uses post-programming diagnostic services to verify whether the battery management unit coding is successful and to detect problems early.

[0117] Figure 3 A signaling interaction diagram for another software upgrade method for a battery management unit provided in this application embodiment is shown below. Figure 3 As shown. It should be noted that this software upgrade method involves a host computer and multiple battery management units. For ease of description, this application embodiment only provides the signaling interaction process between the host computer and one battery management unit; the interaction process between other battery management units and the host computer is the same. The method includes:

[0118] Step 301: Determine the battery management unit code; the user can obtain the battery management unit code by triggering the button of the battery management unit to be upgraded on the host computer interface.

[0119] Step 302: Send upgrade request; The host computer sends an upgrade request to the battery management unit via physical addressing.

[0120] Step 303: Enter upgrade state; After receiving the upgrade request, the battery management unit enters the upgrade state.

[0121] Step 304: Send the first UDS response; the battery management unit sends the first UDS response to the host computer.

[0122] Step 305: Send a UDS diagnostic service request; the host computer sends a UDS diagnostic service request to the battery management unit to enable pre-diagnosis of the battery management unit before software upgrade. The UDS diagnostic service request can also be sent using physical addressing.

[0123] Step 306: Perform UDS diagnostic processing; After receiving the UDS diagnostic service request sent by the host computer, the battery management unit performs pre-diagnostics, such as: extended session diagnosis, version number reading diagnosis, key unlocking diagnosis, fingerprint writing diagnosis, etc.

[0124] Step 307: Send the second UDS response; After completing the UDS diagnosis, the battery management unit sends the second UDS response to the host computer.

[0125] Step 308: Send Upgrade Code Request; The host computer sends an upgrade code request to the battery management unit (BMU). The upgrade code request includes the code address and code content. It should be noted that the amount of code to be upgraded is large and cannot be transmitted in one go, requiring multiple transmissions. Furthermore, since there are multiple BMUs, the upgrade code request uses function addressing. The host computer sends the upgrade code request to the BMUs via function addressing. All BMUs in the CAN bus loop can receive the upgrade code request, but only those BMUs in upgrade mode can perform the code writing action. Function addressing allows multiple BMUs to be upgraded in parallel, improving the efficiency of software upgrades.

[0126] Step 309: Flash code; After receiving the upgrade code request, the battery management unit writes the code content to the corresponding code address.

[0127] Step 310: Send the third UDS response; After completing the code flashing, the battery management unit returns the third UDS response to the host computer.

[0128] Step 311: Send post-programming diagnostic service; After the host computer has determined that all upgrade codes have been sent to the battery management unit, it sends the post-programming diagnostic service to the battery management unit.

[0129] Step 312: Perform post-programming processing; After receiving the post-programming diagnostic service, the battery management unit performs post-programming processing. For details of the post-programming processing, please refer to the above embodiment.

[0130] Figure 4 This is a schematic diagram of a software upgrade device for a battery management unit provided in an embodiment of this application. The device can be a module, program segment, or code on an electronic device. It should be understood that this device is similar to the one described above. Figure 1 The method implementation corresponds to this and can be executed. Figure 1 The specific functions of the device involved in the method embodiment can be found in the description above; to avoid repetition, detailed descriptions are omitted here. The device includes: a first request sending module 401, a second request sending module 402, and a third request sending module 403; wherein:

[0131] The first request sending module 401 is used to send an upgrade request to multiple battery management units based on the UDS protocol, so that the multiple battery management units respond to the upgrade request;

[0132] The second request sending module 402 is used to send a UDS diagnostic service request to the battery management unit after receiving the first UDS response returned by the battery management unit, so that the battery management unit can perform diagnostics.

[0133] The third request sending module 403 is used to send an upgrade code request based on function addressing after receiving the second UDS response returned by the battery management unit, so that the battery management unit can perform a code upgrade based on the upgrade code request.

[0134] Based on the above embodiments, the first request sending module 401 is specifically used for:

[0135] Based on the codes of multiple battery management units, corresponding upgrade requests are generated, and the upgrade requests include physical addressing message IDs associated with the codes of the battery management units;

[0136] The upgrade request is sent to the corresponding battery management unit based on the physical address message ID.

[0137] Based on the above embodiments, the device further includes an encoding determination module, used for:

[0138] The response is triggered by the interactive operation of the battery management unit on the host computer interface;

[0139] The codes of the multiple battery management units are determined based on the interactive operation.

[0140] Based on the above embodiments, the UDS diagnostic service request includes the encoded associated physical address message ID of the battery management unit.

[0141] Based on the above embodiments, the device further includes a post-programming module for:

[0142] After receiving the third UDS response returned by the battery management unit, a post-programming diagnostic service is sent to the battery management unit based on physical addressing; the third UDS response is returned by the battery management unit after completing the code upgrade; the post-programming diagnostic service includes the physical addressing message ID corresponding to the battery management unit.

[0143] Figure 5 This is a schematic diagram of the host computer physical structure provided in the embodiments of this application, such as... Figure 5 As shown, the electronic device includes: a processor 501, a memory 502, and a bus 503; wherein,

[0144] The processor 501 and the memory 502 communicate with each other through the bus 503;

[0145] The processor 501 is used to call program instructions in the memory 502 to execute the methods provided in the above-described method embodiments, including, for example, sending upgrade requests to multiple battery management units based on the UDS protocol, so that the multiple battery management units respond to the upgrade requests; after receiving a first UDS response returned by the battery management unit, sending a UDS diagnostic service request to the battery management unit, so that the battery management unit performs diagnostics; and after receiving a second UDS response returned by the battery management unit, sending an upgrade code request based on function addressing, so that the battery management unit performs code upgrades based on the upgrade code request.

[0146] Processor 501 can be an integrated circuit chip with signal processing capabilities. The processor 501 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. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor.

[0147] The memory 502 may include, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0148] This embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can perform the methods provided in the above-described method embodiments, such as: sending an upgrade request to multiple battery management units based on the UDS protocol, so that the multiple battery management units respond to the upgrade request; after receiving a first UDS response returned by the battery management unit, sending a UDS diagnostic service request to the battery management unit, so that the battery management unit performs a diagnosis; and after receiving a second UDS response returned by the battery management unit, sending an upgrade code request based on functional addressing, so that the battery management unit performs a code upgrade based on the upgrade code request.

[0149] This embodiment provides a non-transitory computer-readable storage medium storing computer instructions that cause the computer to execute the methods provided in the above-described method embodiments. These instructions include, for example: sending an upgrade request to multiple battery management units (BMUs) based on the UDS protocol, causing the multiple BMUs to respond to the upgrade request; after receiving a first UDS response from the BMU, sending a UDS diagnostic service request to the BMU to enable the BMU to perform diagnostics; and after receiving a second UDS response from the BMU, sending an upgrade code request based on functional addressing, causing the BMU to perform a code upgrade based on the upgrade code request.

[0150] Figure 6 This application provides a schematic diagram of a battery management unit software upgrade system structure, as shown in the embodiments of this application. Figure 6 As shown, the system includes a host computer and multiple battery management units. The host computer communicates with the multiple battery management units via a CAN bus. The host computer and the multiple battery management units can perform software upgrades on all or part of the multiple battery management units through the methods described above. Specific upgrade methods can be found in the above embodiments and will not be repeated here.

[0151] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0152] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0153] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0154] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.

[0155] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for software upgrade of a battery management unit, characterized in that, The method is applied to software upgrading of a battery management unit of a battery system in an energy storage battery, the battery system comprising a plurality of battery units, each battery unit comprising the battery management unit for managing the battery unit; The battery management unit is in communication connection with the upper computer through a CAN loop; the method comprises: Sending an upgrade request to the plurality of battery management units based on a UDS protocol, so that the plurality of battery management units respond to the upgrade request, reset the internal software, and jump to a Flash Bootloader; the upgrade request is generated by the upper computer after receiving the code information of a button, and the code information of the button is sent by triggering the button corresponding to the battery management unit to be upgraded on the upper computer interface; After receiving a first UDS response returned by the plurality of battery management units, sending a UDS diagnostic service request to the plurality of battery management units, so that the plurality of battery management units perform diagnosis; After receiving a second UDS response returned by the plurality of battery management units, sending an upgrade code request to the plurality of battery management units based on function addressing of the UDS protocol, so that the plurality of battery management units that complete software reset perform code upgrading in parallel based on the upgrade code request; wherein the plurality of battery management units can respond to function addressing messages based on the UDS protocol; The upgrade code request comprises code content and a storage address corresponding to the code content; the code content is obtained after the upgrade code is divided; The method comprises: Based on the codes of the plurality of battery management units, corresponding upgrade requests are generated respectively, and the upgrade request comprises a physical addressing message ID associated with the code of the battery management unit; Based on the physical addressing message ID, the upgrade request is sent to the corresponding battery management unit; Before sending the upgrade request to the plurality of battery management units based on the UDS protocol, the method further comprises: Associating the number of the button on the upper computer interface with the unique code of the corresponding actual battery management unit; Responding to the interactive operation of the button of the battery management unit on the upper computer interface; Determining the codes of the plurality of battery management units according to the interactive operation.

2. The method of claim 1, wherein, The UDS diagnostic service request comprises a physical addressing message ID associated with the code of the battery management unit.

3. The method according to any of claims 1-2, characterized in that, The method further comprises: After receiving a third UDS response returned by the battery management unit, sending a post-programming diagnostic service to the battery management unit based on physical addressing; the third UDS response is returned after the battery management unit completes code upgrading; the post-programming diagnostic service comprises a physical addressing message ID corresponding to the battery management unit.

4. A method for software upgrade of battery management units, the method is applied to upgrade software of battery management units of battery systems in energy storage batteries, the battery system comprises a plurality of battery units, each battery unit comprises the battery management unit, the battery management unit is used to manage the battery unit. The battery management unit is in communication connection with the upper computer through a CAN loop; characterized in that, The method comprises: receive an upgrade request sent by the host computer based on a UDS protocol and a physical addressing message ID; the upgrade request is a corresponding upgrade request generated by the host computer based on the encoding of the plurality of battery management units in the battery system, and the upgrade request includes a physical addressing message ID associated with the encoding of the battery management unit; in response to the upgrade request, reset the internal software and jump to the Flash Bootloader, and return a first UDS response to the host computer; the upgrade request is generated by the host computer after receiving the encoding information of the button, and the encoding information of the button is sent by triggering the button corresponding to the battery management unit to be upgraded on the host computer interface; receive a UDS diagnostic service request sent by the host computer, and perform UDS diagnostic processing based on the UDS diagnostic service request, and send a second UDS response to the host computer after completing the diagnosis; the plurality of battery management units in the battery system simultaneously receive an upgrade code request sent by the host computer based on a UDS protocol function addressing; the upgrade code request includes a code address and a code content; the plurality of battery management units that complete software reset write the code content according to the code address, and return a third UDS response to the host computer after completing the code writing; wherein the plurality of battery management units can respond to the function addressing message based on the UDS protocol; wherein the encoding of the battery management unit is determined by the following method: associate the number of the button on the host computer interface with the unique encoding of the corresponding actual battery management unit; respond to the interactive operation of triggering the button of the battery management unit on the host computer interface; determine the encoding of the plurality of battery management units according to the interactive operation.

5. The method of claim 4, wherein, The receiving of the upgrade code request sent by the host computer based on the function addressing includes: if the battery management unit has started the upgrade function based on the upgrade request, receive the upgrade code request sent by the host computer based on the function addressing.

6. The method according to claim 4 or 5, characterized in that, The method further includes: receive a post-programming diagnostic service sent by the host computer; perform corresponding post-processing operations based on the post-programming diagnostic service.

7. A software upgrade apparatus of a battery management unit, the software upgrade apparatus being used for software upgrading of a battery management unit of a battery system, the battery system comprising a plurality of battery cells, each battery cell comprising the battery management unit, the battery management unit being used for managing the battery cell; The battery management unit is in communication connection with the host computer through a CAN loop; characterized in that, the software upgrade device includes: a first request sending module for sending an upgrade request to a plurality of battery management units based on a UDS protocol, so that the plurality of battery management units respond to the upgrade request, reset the internal software, and jump to the Flash Bootloader; the upgrade request is generated by the host computer after receiving the encoding information of the button, and the encoding information of the button is sent by triggering the button corresponding to the battery management unit to be upgraded on the host computer interface; a second request sending module for sending a UDS diagnostic service request to the plurality of battery management units after receiving the first UDS response returned by the plurality of battery management units, so that the plurality of battery management units perform diagnosis; The third request sending module is configured to, after receiving the second UDS response returned by the plurality of battery management units, send an upgrade code request to the plurality of battery management units based on function addressing of the UDS protocol, so that the plurality of battery management units that complete software reset among the plurality of battery management units perform code upgrade in parallel based on the upgrade code request; wherein the plurality of battery management units can respond to function addressing messages based on the UDS protocol; The upgrade code request comprises code content and a storage address corresponding to the code content; the code content is obtained after the upgrade code is divided; The first request sending module is specifically configured to: generate corresponding upgrade requests based on the codes of the plurality of battery management units, wherein the upgrade requests comprise physical addressing message IDs associated with the codes of the battery management units; send the upgrade requests to the corresponding battery management units based on the physical addressing message IDs; The device further comprises a code determination module configured to: associate the number of the button on the host computer interface with the unique code of the corresponding actual battery management unit; respond to the interactive operation of triggering the button of the battery management unit on the host computer interface; determine the codes of the plurality of battery management units according to the interactive operation.

8. A host computer, characterized by Comprise: a processor, a memory and a bus, wherein the processor and the memory complete communication with each other through the bus; the memory stores program instructions executable by the processor, and the processor calling the program instructions can execute the method of any one of claims 1-3.

9. A non-transitory computer-readable storage medium, comprising: The non-transitory computer readable storage medium stores computer instructions, and the computer instructions are run by the computer to make the computer execute the method of any one of claims 1-3.

10. A computer program product, characterised in that, comprise computer program instructions, which are read and run by the processor and execute the method of any one of claims 1-3.

11. A software upgrade system for a battery management unit, the system comprising: comprise the host computer of claim 8 and the plurality of battery management units; the host computer and the plurality of battery management units are connected through a CAN bus communication; the battery management units can execute the method of any one of claims 4-6.

Citation Information

Patent Citations

  • Data upgrading method and system

    CN113590162A

  • Data processing method and related equipment

    CN114840241A

  • Method and device for flashing LIN (Local Interconnect Network) slave node and electronic equipment

    CN118827274A