Battery management system program upgrade method, device, electronic device and storage medium

By obtaining the target communication channel and baud rate in the battery management system and initializing it, and combining with the underlying boot program to upgrade the program, the problem of low efficiency and inability to upgrade the battery management system program is solved, and efficient program upgrade and compatibility improvement is achieved .

CN117519748BActive Publication Date: 2024-12-03ROYPOW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311492076.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2024-12-03
Estimated Expiration
2043-11-10

AI Technical Summary

Technical Problem

The existing battery management system program upgrade efficiency is inefficient, and the program cannot be upgraded due to inconsistent program baud rate and underlying boot program baud rate.

Method used

In the microcontroller unit of the battery management system, after receiving the upgrade request through the application layer program, the target communication channel and communication baud rate are obtained, and the communication channel is initialized according to the baud rate, and the content upgrade instructions are obtained through the underlying boot program for program upgrade. When no application layer program exists, all communication channels are initialized and the default baud rate is set to receive upgrade instructions.

Benefits of technology

It improves the efficiency of program upgrades, avoids the problem of program failure caused by inconsistent baud rate, and enhances the convenience and compatibility of program upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117519748B_ABST
    Figure CN117519748B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, electronic device and storage medium for upgrading a battery management system program. The method for upgrading a battery management system program provided by the present invention comprises: when an application layer program exists in a microcontroller unit of the battery management system, after the application layer program receives an upgrade request instruction, obtaining a target communication channel and a communication baud rate of the application layer program, wherein the target communication channel includes a communication channel that receives the upgrade request instruction; after the microcontroller unit is started, the target communication channel is initialized according to the communication baud rate to obtain an initialized communication channel; the content upgrade instruction of the application layer program is obtained from the initialized communication channel through an underlying boot program, and the program is upgraded according to the content upgrade instruction. The method for upgrading a battery management system program of the present invention improves the efficiency of program upgrades and can avoid the problem of program failure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of battery management systems, and in particular to a battery management system program upgrade method, device, electronic equipment and storage medium. Background Art

[0002] The battery management system (BMS) is an important component of the battery pack, which is used to monitor the status of the battery, as well as intelligently manage and maintain each battery unit to extend the battery life. The battery management system includes a program for implementing control functions. In order to improve functions, fix vulnerabilities and enhance stability, the battery management system program needs to be iteratively upgraded. In the current battery pack, when upgrading the battery management system program, only a fixed communication channel can be used. When the battery pack output mode is different or the fixed communication channel is occupied, the underlying boot program needs to be modified, resulting in low efficiency of program upgrade. In addition, when the baud rate of the program is different from the baud rate of the underlying boot program, the program cannot be upgraded. Summary of the invention

[0003] The object of the present invention is to provide a battery management system program upgrade method, device, electronic device and storage medium to solve the technical problems of low program upgrade efficiency and program inability to upgrade in the prior art.

[0004] The technical solution of the present invention is as follows, which provides a battery management system program upgrade method, comprising:

[0005] When there is an application layer program in the microcontroller unit of the battery management system, after the application layer program receives the upgrade request instruction, a target communication channel and a communication baud rate of the application layer program are acquired, wherein the target communication channel includes the communication channel that receives the upgrade request instruction;

[0006] After the micro control unit is started, the target communication channel is initialized according to the communication baud rate to obtain an initialized communication channel;

[0007] The content upgrade instruction of the application layer program is obtained from the communication channel after the initialization through the bottom layer boot program, and the program is upgraded according to the content upgrade instruction.

[0008] Furthermore, after the application layer program receives the upgrade request instruction, it also includes setting a program upgrade flag; accordingly, initializing the target communication channel according to the communication baud rate, including initializing the target communication channel according to the communication baud rate after reading the program upgrade flag.

[0009] Furthermore, after acquiring the target communication channel and the communication baud rate of the program and setting the program upgrade flag, the method further includes saving the target communication channel, the communication baud rate and the program upgrade flag into a memory;

[0010] Correspondingly, after reading the program upgrade flag, the target communication channel is initialized according to the communication baud rate, including: reading the program upgrade flag from the memory, after reading the program upgrade flag, reading the target communication channel and the communication baud rate from the memory, and initializing the target communication channel according to the communication baud rate.

[0011] Further, the program upgrade flag is read from the memory, and after the program upgrade flag is read, the target communication channel and the communication baud rate are read from the memory, and the target communication channel is initialized according to the communication baud rate, including:

[0012] The bottom-level boot program is made to read the program upgrade flag from the memory. After reading the program upgrade flag, the bottom-level boot program is made to read the target communication channel and the communication baud rate from the memory, and initialize the target communication channel according to the communication baud rate.

[0013] Furthermore, after the target communication channel is initialized according to the communication baud rate, the method further includes placing non-target communication channels in a de-initialization state, wherein the non-target communication channels include communication channels that have not received the upgrade request instruction.

[0014] Furthermore, the battery management system program upgrade method further includes:

[0015] When the application layer program does not exist in the microcontroller unit of the battery management system, all communication channels are initialized and the baud rates of all communication channels are set to default values. If any communication channel receives the upgrade request instruction, the content upgrade instruction is received through the target communication channel, and the program is written according to the content upgrade instruction.

[0016] Further, all communication channels are initialized, the baud rates of all communication channels are set to default values, and if any communication channel receives the upgrade request instruction, the content upgrade instruction is received through the target communication channel, including:

[0017] Initialize all communication channels, set the baud rates of all communication channels to default values, poll all communication channels at a preset period, and if it is known that any communication channel has received the upgrade request instruction, put the non-target communication channel in a de-initialization state, and receive the content upgrade instruction through the target communication channel, wherein the non-target communication channel includes a communication channel that has not received the upgrade request instruction.

[0018] Another technical solution of the present invention is as follows: a battery management system program upgrade device is provided, including an information acquisition module, an initialization module and an upgrade module;

[0019] The information acquisition module is used to obtain a target communication channel and a communication baud rate of the application layer program after the application layer program receives an upgrade request instruction when there is an application layer program in the micro control unit of the battery management system, wherein the target communication channel includes a communication channel that receives the upgrade request instruction;

[0020] The initialization module is used to initialize the target communication channel according to the communication baud rate after the micro control unit is started to obtain the initialized communication channel;

[0021] The upgrade module is used to obtain the content upgrade instruction of the application layer program from the initial communication channel through the bottom layer boot program, and perform program upgrade according to the content upgrade instruction.

[0022] Another technical solution of the present invention is as follows: an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the battery management system program upgrade method as described in any of the above technical solutions is implemented.

[0023] Another technical solution of the present invention is as follows: a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the battery management system program upgrade method as described in any of the above technical solutions is implemented.

[0024] The beneficial effects of the present invention are as follows: when there is an application layer program in the microcontroller unit of the battery management system, after the application layer program receives an upgrade request instruction, a target communication channel and a communication baud rate of the application layer program are obtained, wherein the target communication channel includes the communication channel that receives the upgrade request instruction; after the microcontroller unit is started, the target communication channel is initialized according to the communication baud rate to obtain the initialized communication channel; the content upgrade instruction of the application layer program is obtained from the initialized communication channel through the underlying boot program, and the program is upgraded according to the content upgrade instruction; through the above technical scheme, the program upgrade of the battery management system can be realized, the efficiency of the program upgrade is improved, and the problem of the program being unable to be upgraded due to the inconsistency between the baud rate of the program and the baud rate of the underlying boot program can be avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A flowchart of a method for upgrading a battery management system program provided by an embodiment of the present invention;

[0026] Figure 2 A schematic diagram of the structure of a battery management system program upgrade device provided by an embodiment of the present invention;

[0027] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0030] Figure 1 FIG. 1 is a flow chart of a method for upgrading a battery management system program according to an embodiment of the present invention. It should be noted that the method for upgrading a battery management system program according to the present invention is not limited to the method for upgrading a battery management system program according to an embodiment of the present invention if the results are substantially the same. Figure 1 The process sequence shown is limited. Figure 1As shown, the battery management system program upgrade method mainly includes the following steps:

[0031] S101, when there is an application layer program in the microcontroller unit of the battery management system, after the application layer program receives an upgrade request instruction, obtaining a target communication channel and a communication baud rate of the application layer program, wherein the target communication channel includes a communication channel that receives the upgrade request instruction;

[0032] It should be noted that the application layer program is app (application), which is a proprietary program of the battery management system and is used to implement control functions; the battery pack may lead out (outgoing) multiple communication channels, which may be CAN bus channels or RS485 bus channels, and the micro control unit is MCU (Micro Control Unit).

[0033] S102, after the micro control unit is started, initializing the target communication channel according to the communication baud rate to obtain an initialized communication channel;

[0034] S103, obtaining a content upgrade instruction of the application layer program from the initial communication channel through the bottom layer boot program, and performing program upgrade according to the content upgrade instruction.

[0035] In an embodiment of the present invention, when an application layer program exists in the microcontroller unit of the battery management system, after the application layer program receives an upgrade request instruction, a target communication channel and a communication baud rate of the application layer program are obtained, wherein the target communication channel includes the communication channel that receives the upgrade request instruction; after the microcontroller unit is started, the target communication channel is initialized according to the communication baud rate to obtain the initialized communication channel; the content upgrade instruction of the application layer program is obtained from the initialized communication channel through the underlying boot program, and the program is upgraded according to the content upgrade instruction; the program upgrade of the battery management system can be realized, the efficiency of the program upgrade is improved, and the problem of the program being unable to be upgraded due to the inconsistency between the baud rate of the program and the baud rate of the underlying boot program can be avoided.

[0036] In some embodiments, after the application layer program receives the upgrade request instruction, it also includes setting a program upgrade flag; accordingly, initializing the target communication channel according to the communication baud rate, including initializing the target communication channel according to the communication baud rate after reading the program upgrade flag.

[0037] In the embodiment of the present invention, after the application layer program receives the upgrade request instruction, a program upgrade flag is set to initialize the target communication channel, and the program upgrade flag is first read. If the program upgrade flag is read, the target communication channel is initialized, thereby ensuring the accuracy of the program upgrade.

[0038] In a specific embodiment, when there is an application layer program in the microcontroller unit of the battery management system, the microcontroller unit includes an application layer program and a bottom-level bootloader. The bottom-level bootloader can be used to receive and program programs from a host computer. After the application layer program receives an upgrade request instruction, it obtains the target communication channel and the communication baud rate of the application layer program, and sets a program upgrade flag, indicating that this program upgrade jumps from the application layer program to the bottom-level bootloader. The program upgrade flag can be set to 1, and the program upgrade flag is read first. After the program upgrade flag is read, the target communication channel is initialized according to the communication baud rate.

[0039] In some embodiments, after acquiring the target communication channel and the communication baud rate of the program and setting the program upgrade flag, the method further includes saving the target communication channel, the communication baud rate and the program upgrade flag to a memory;

[0040] Correspondingly, after reading the program upgrade flag, the target communication channel is initialized according to the communication baud rate, including: reading the program upgrade flag from the memory, after reading the program upgrade flag, reading the target communication channel and the communication baud rate from the memory, and initializing the target communication channel according to the communication baud rate.

[0041] In a specific embodiment, after the target communication channel, the communication baud rate and the program upgrade flag are saved in a memory, the entire microcontroller unit is reset, wherein the memory may be a non-volatile memory to avoid information loss.

[0042] In some embodiments, the program upgrade flag is read from the memory, and after the program upgrade flag is read, the target communication channel and the communication baud rate are read from the memory, and the target communication channel is initialized according to the communication baud rate, including:

[0043] The bottom-level boot program is made to read the program upgrade flag from the memory. After reading the program upgrade flag, the bottom-level boot program is made to read the target communication channel and the communication baud rate from the memory, and initialize the target communication channel according to the communication baud rate.

[0044] In a specific embodiment, after the microcontroller unit is started, the bottom-level boot program starts to run, so that the bottom-level boot program reads the program upgrade flag from the memory. After the bottom-level boot program reads the program upgrade flag from the memory, the bottom-level boot program reads the target communication channel and the communication baud rate from the memory, and initializes the target communication channel according to the communication baud rate. After that, the bottom-level boot program only reads from the target communication channel whether a content upgrade instruction is received, wherein the content upgrade instruction may include an instruction to start the upgrade and the upgraded content (data).

[0045] In some embodiments, after the target communication channel is initialized according to the communication baud rate, the method further includes placing non-target communication channels in a de-initialization state, wherein the non-target communication channels include communication channels that have not received the upgrade request instruction.

[0046] The embodiment of the present invention puts the non-target communication channel in a deinitialization state so that the non-target communication channel does not receive data, thereby ensuring that the content upgrade instruction is only transmitted from the target communication channel, and avoiding interference of different communication channels on the upgrade.

[0047] In some embodiments, the battery management system program upgrade method further includes:

[0048] When the application layer program does not exist in the microcontroller unit of the battery management system, all communication channels are initialized and the baud rates of all communication channels are set to default values. If any communication channel receives the upgrade request instruction, the content upgrade instruction is received through the target communication channel, and the program is written according to the content upgrade instruction.

[0049] In a specific embodiment, when the application layer program does not exist in the microcontroller unit of the battery management system, the program is not upgraded from the application layer program at this time, all communication channels are initialized, and the baud rates of all communication channels are set to a default value, for example, the default value may be 250kbps. If any communication channel receives the upgrade request instruction (write request command), the content upgrade instruction (including the instruction to start writing and the content to be written) is received through the target communication channel, and the program is written according to the content upgrade instruction, wherein, because the application layer program does not currently exist in the microcontroller unit of the battery management system, the program is upgraded according to the content upgrade instruction at this time, and the program can also be written (burned) according to the content upgrade instruction. The above-mentioned program upgrade can be a program upgrade when the application layer program exists in the microcontroller unit or a program write when the application layer program does not exist in the microcontroller unit.

[0050] In some embodiments, initializing all communication channels, setting the baud rates of all communication channels to default values, and if any communication channel receives the upgrade request instruction, receiving the content upgrade instruction through the target communication channel includes:

[0051] Initialize all communication channels, set the baud rates of all communication channels to default values, poll all communication channels at a preset period, and if it is known that any communication channel has received the upgrade request instruction, put the non-target communication channel in a de-initialization state, and receive the content upgrade instruction through the target communication channel, wherein the non-target communication channel includes a communication channel that has not received the upgrade request instruction.

[0052] In a specific embodiment, the preset period can be set according to actual conditions, for example, it can be 5s, and all the communication channels are polled at a preset period. All the communication channels are polled once every preset period. If it is known that any communication channel among all the communication channels has received the upgrade request instruction, the non-target communication channel is put into a de-initialization state, and subsequently only the content upgrade instruction can be received through the target communication channel. The non-target communication channel in the de-initialization state does not receive any data; wherein all the communication channels can be all the communication channels led out of the battery pack, the target communication channel includes the communication channel that has received the upgrade request instruction, and the non-target communication channel includes the communication channel that has not received the upgrade request instruction.

[0053] In a specific embodiment, if the battery pack leads to a debugging CAN bus channel CAN1, a charging CAN bus channel CAN2, a vehicle CAN bus channel CAN3 and an RS485 bus channel, then when one of the above bus channels receives an upgrade request instruction, a program upgrade flag (for example, 1) is set, the bus channel (target communication channel) that currently receives the upgrade request instruction and the communication baud rate of the current application layer program are recorded, the microcontroller unit is reset, and the process jumps to the underlying boot program. After the underlying boot program obtains the program upgrade flag, it obtains the target communication channel (one of the CAN1, CAN2, CAN3 and RS485 bus channels) and the communication baud rate of the current application layer program, initializes the target communication channel according to the communication baud rate of the current application layer program, deinitializes the non-target communication channel, and then receives the content upgrade instruction from the target communication channel. If the underlying boot program does not obtain the program upgrade flag, that is, the application layer program does not exist in the microcontroller unit, all communication channels (CAN1, CAN2, CAN3 and RS485 bus channels) are initialized, and when it is determined which communication channel receives the upgrade request instruction, the communication channel is used as the target communication channel, and other communication channels are non-target communication channels, and the content upgrade instruction is received through the target communication channel.

[0054] The battery management system program upgrade method provided by the embodiment of the present invention, when there is an application layer program in the microcontroller unit of the battery management system, obtains the target communication channel and the communication baud rate of the application layer program after the application layer program receives the upgrade request instruction, wherein the target communication channel includes the communication channel that receives the upgrade request instruction; after the microcontroller unit is started, the target communication channel is initialized according to the communication baud rate to obtain the initialized communication channel; obtains the content upgrade instruction of the application layer program from the initialized communication channel through the underlying boot program, and performs program upgrade according to the content upgrade instruction; the program upgrade of the battery management system can be realized, the efficiency of the program upgrade is improved, and the problem of the program being unable to be upgraded due to the inconsistency between the baud rate of the program and the baud rate of the underlying boot program can be avoided.

[0055] The battery management system program upgrade method provided by the embodiment of the present invention solves the compatibility problem of the underlying boot program. Without modifying the underlying boot program, the application layer program cooperates with the underlying boot program to realize program upgrade from one of the multiple CAN bus channels or RS485 bus communication, and the baud rate of the target communication channel can be automatically adjusted according to the baud rate of the current application layer program, so that when the communication baud rate of the application layer program is inconsistent with the communication baud rate of the underlying boot program, the application layer program can also be upgraded normally, which improves the convenience of program upgrade and the efficiency of program upgrade. The battery management system program upgrade method provided by the embodiment of the present invention increases the versatility of the underlying boot program, and the battery pack can use multiple communication channels for program upgrade.

[0056] Figure 2 is a schematic diagram of the structure of a battery management system program upgrade device according to an embodiment of the present invention. Figure 2 As shown, the battery management system program upgrade device 20 includes an information acquisition module 21, an initialization module 22 and an upgrade module 23;

[0057] The information acquisition module 21 is used for acquiring a target communication channel and a communication baud rate of the application layer program after the application layer program receives an upgrade request instruction when there is an application layer program in the micro control unit of the battery management system, wherein the target communication channel includes the communication channel that receives the upgrade request instruction;

[0058] The initialization module 22 is used to initialize the target communication channel according to the communication baud rate after the micro control unit is started to obtain the initialized communication channel;

[0059] The upgrade module 23 is used to obtain the content upgrade instruction of the application layer program from the initial communication channel through the bottom layer boot program, and perform program upgrade according to the content upgrade instruction.

[0060] Figure 3 Schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 3 As shown, the electronic device 30 includes a processor 31 and a memory 32 that is communicatively connected to the processor 31 .

[0061] The memory 32 stores program instructions for implementing the battery management system program upgrade method of any of the above embodiments.

[0062] The processor 31 is used to execute program instructions stored in the memory 32 to upgrade the battery management system program.

[0063] The processor 31 may also be referred to as a CPU (Central Processing Unit). The processor 31 may be an integrated circuit chip having signal processing capabilities. The processor 31 may also be a general-purpose processor, 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, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0064] An embodiment of the present invention provides a storage medium, and the storage medium of the embodiment of the present invention stores program instructions that can implement all the above methods, and the storage medium can be non-volatile or volatile. Among them, the program instructions can be stored in the above storage medium in the form of a software product, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program codes, or terminal devices such as computers, servers, mobile phones, tablets, etc.

[0065] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0066] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software functional unit. The above is only an implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the specification and drawings of the present invention, or directly or indirectly used in other related technical fields, is also included in the patent protection scope of the present invention.

[0067] The above description is only an implementation mode of the present invention. It should be pointed out that, for ordinary technicians in this field, improvements can be made without departing from the creative concept of the present invention, but these all belong to the protection scope of the present invention.

Claims

1. A method for upgrading a battery management system program, characterized in that: include: When there is an application layer program in the microcontroller unit of the battery management system, after the application layer program receives the upgrade request instruction, the target communication channel and the communication baud rate of the application layer program are obtained, and a program upgrade flag is set, and the target communication channel, the communication baud rate and the program upgrade flag are saved in the memory, wherein the target communication channel includes the communication channel that receives the upgrade request instruction; After the microcontroller unit is started, the bottom-level boot program is enabled to read the program upgrade flag from the memory, and after reading the program upgrade flag, the bottom-level boot program is enabled to read the target communication channel and the communication baud rate from the memory, initialize the target communication channel according to the communication baud rate to obtain the initialized communication channel, and put the non-target communication channel in a de-initialization state, wherein the non-target communication channel includes the communication channel that has not received the upgrade request instruction; The bottom layer boot program obtains the content upgrade instruction of the application layer program from the initial communication channel, and performs program upgrade according to the content upgrade instruction.

2. The method for upgrading the battery management system program according to claim 1, characterized in that: The battery management system program upgrade method further includes: When the application layer program does not exist in the microcontroller unit of the battery management system, all communication channels are initialized and the baud rates of all communication channels are set to default values. If any communication channel receives the upgrade request instruction, the content upgrade instruction is received through the target communication channel, and the program is written according to the content upgrade instruction.

3. The method for upgrading the battery management system program according to claim 2, characterized in that: Initializing all communication channels, setting the baud rates of all communication channels to default values, and if any communication channel receives the upgrade request instruction, receiving the content upgrade instruction through the target communication channel, including: Initialize all communication channels, set the baud rates of all communication channels to default values, poll all communication channels at a preset period, and if it is known that any communication channel has received the upgrade request instruction, put the non-target communication channel in a de-initialization state, and receive the content upgrade instruction through the target communication channel, wherein the non-target communication channel includes a communication channel that has not received the upgrade request instruction.

4. A battery management system program upgrade device, characterized in that: Including information acquisition module, initialization module and upgrade module; The information acquisition module is used for, when there is an application layer program in the microcontroller unit of the battery management system, obtaining a target communication channel and a communication baud rate of the application layer program after the application layer program receives an upgrade request instruction, setting a program upgrade flag, and saving the target communication channel, the communication baud rate, and the program upgrade flag in a memory, wherein the target communication channel includes the communication channel that receives the upgrade request instruction; The initialization module is used to enable the bottom-level boot program to read the program upgrade flag from the memory after the micro control unit is started, and after reading the program upgrade flag, enable the bottom-level boot program to read the target communication channel and the communication baud rate from the memory, initialize the target communication channel according to the communication baud rate to obtain the initialized communication channel, and put the non-target communication channel in a de-initialization state, wherein the non-target communication channel includes the communication channel that has not received the upgrade request instruction; The upgrade module is used to obtain the content upgrade instruction of the application layer program from the initial communication channel through the bottom layer boot program, and perform program upgrade according to the content upgrade instruction.

5. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable by the processor, wherein: When the processor executes the computer program, the battery management system program upgrade method according to any one of claims 1 to 3 is implemented.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the battery management system program upgrade method according to any one of claims 1 to 3 is implemented.