CN115098138A - Function upgrading method and device of battery management system, electronic equipment and medium - Google Patents

Function upgrading method and device of battery management system, electronic equipment and medium Download PDF

Info

Publication number
CN115098138A
CN115098138A CN202210799136.8A CN202210799136A CN115098138A CN 115098138 A CN115098138 A CN 115098138A CN 202210799136 A CN202210799136 A CN 202210799136A CN 115098138 A CN115098138 A CN 115098138A
Authority
CN
China
Prior art keywords
management system
upgraded
battery management
upgrading
functional module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210799136.8A
Other languages
Chinese (zh)
Inventor
杨俊杰
陈殿锋
刘谊
梁洪平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Cosmx Power Co Ltd
Original Assignee
Zhuhai Cosmx Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Cosmx Power Co Ltd filed Critical Zhuhai Cosmx Power Co Ltd
Priority to CN202210799136.8A priority Critical patent/CN115098138A/en
Publication of CN115098138A publication Critical patent/CN115098138A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/53Decompilation; Disassembly

Abstract

The application provides a function upgrading method and device of a battery management system, electronic equipment and a medium, and relates to the technical field of battery management systems. The method comprises the following steps: receiving an upgrading instruction sent by an upper computer; responding to the upgrading instruction, and acquiring an upgrading file sent by an upper computer, wherein the upgrading file comprises identification information of the functional module to be upgraded and corresponding upgrading data; determining the current functional module to be upgraded according to the identification information of the functional module to be upgraded; and upgrading the current functional module to be upgraded according to the upgrading data so as to obtain the upgraded functional module. The method can improve the efficiency of upgrading the battery management system.

Description

Function upgrading method and device of battery management system, electronic equipment and medium
Technical Field
The present disclosure relates to battery management system technologies, and in particular, to a method and an apparatus for upgrading functions of a battery management system, an electronic device, and a medium.
Background
With the development of battery management system technology and in order to improve the service life of terminal products, a method for upgrading the functions of the battery management system is provided. Currently, when a certain function of a battery management system is upgraded, the whole battery management system is upgraded.
However, when only one or a few functions need to be upgraded, the upgrading efficiency of the battery management system is reduced to a certain extent by the method that the whole battery management system needs to be upgraded.
Disclosure of Invention
The application provides a function upgrading method and device of a battery management system, electronic equipment and a medium, which are used for solving the technical problem that the upgrading efficiency of the battery management system is reduced in the prior art.
In a first aspect, the present application provides a method for upgrading functions of a battery management system, where the battery management system includes a plurality of packaged functional modules, and the method includes:
receiving an upgrading instruction sent by an upper computer;
responding to the upgrading instruction, and acquiring an upgrading file sent by an upper computer, wherein the upgrading file comprises identification information of a functional module to be upgraded and corresponding upgrading data;
determining the current functional module to be upgraded according to the identification information of the functional module to be upgraded;
and upgrading the current functional module to be upgraded according to the upgrading data so as to obtain the upgraded functional module.
In a second aspect, the present application provides a method for upgrading functions of a battery management system, which is applied to an upper computer, wherein the battery management system includes a plurality of packaged functional modules, and the method includes:
acquiring a functional module to be upgraded determined by a user;
sending an upgrading instruction to a battery management system according to the functional module to be upgraded;
if the battery management system is determined to respond to the upgrading instruction, sending an upgrading file to the battery management system so that the battery management system can upgrade the current functional module to be upgraded according to the upgrading file to obtain the upgraded functional module;
the upgrading file comprises identification information of the functional module to be upgraded and corresponding upgrading data.
In a third aspect, the present application provides a function upgrading apparatus for a battery management system, which is located in the battery management system, where the battery management system includes a plurality of packaged functional modules, and includes:
the instruction acquisition module is used for receiving an upgrading instruction sent by the upper computer;
the upgrading file acquisition module is used for responding to the upgrading instruction and acquiring an upgrading file sent by an upper computer, wherein the upgrading file comprises identification information of the functional module to be upgraded and corresponding upgrading data;
the function module determining module is used for determining the current function module to be upgraded according to the identification information of the function module to be upgraded;
and the result acquisition module is used for upgrading the current functional module to be upgraded according to the upgrading data so as to obtain the upgraded functional module.
In a fourth aspect, the present application provides a battery management system's function upgrading device, is located the host computer, and battery management system is including a plurality of functional module that have been packaged, the device includes:
the module acquisition module is used for acquiring a functional module to be upgraded determined by a user;
the instruction sending module is used for sending an upgrading instruction to the battery management system according to the functional module to be upgraded;
the upgrade file sending module is used for sending an upgrade file to the battery management system if the battery management system is determined to respond to the upgrade instruction, so that the battery management system can upgrade the current functional module to be upgraded according to the upgrade file to obtain the upgraded functional module; the upgrading file comprises identification information of the functional module to be upgraded and corresponding upgrading data.
In a fifth aspect, the present application provides a battery management system, comprising: a processor, a transceiver, and a memory communicatively coupled to the processor;
the memory stores computer execution instructions;
the transceiver is used for carrying out data transmission with an upper computer;
the processor executes computer-executable instructions stored by the memory to implement the method of the first aspect.
In a sixth aspect, the present application provides a host computer, including: a processor, a transceiver, and a memory communicatively coupled to the processor;
the memory stores computer execution instructions;
the transceiver is used for carrying out data transmission with the battery management system;
the processor executes computer-executable instructions stored by the memory to implement the method of the second aspect.
In a seventh aspect, the present application provides a computer-readable storage medium having stored thereon computer-executable instructions for implementing the method according to the first and second aspects when executed by a processor.
According to the function upgrading method, device, electronic equipment and medium of the battery management system, the upgrading instruction sent by the upper computer is received; responding to the upgrading instruction, and acquiring an upgrading file sent by an upper computer, wherein the upgrading file comprises identification information of the functional module to be upgraded and corresponding upgrading data; determining the current functional module to be upgraded according to the identification information of the functional module to be upgraded; and upgrading the current functional module to be upgraded according to the upgrading data so as to obtain the upgraded functional module. Because the battery management system is packaged with a plurality of functional modules in advance, when a certain function needs to be upgraded, the functional module corresponding to the function only needs to be upgraded, and at the moment, the battery management system responds to an upgrade instruction sent by the upper computer, finds the functional module to be upgraded currently and upgrades the functional module according to an upgrade file acquired from the upper computer, so that the upgrading of the function can be realized. Compared with the mode of upgrading the whole battery management system, the upgrading method aiming at the specific functional module can improve the efficiency of upgrading the battery management system to a certain extent.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is an application scenario diagram for implementing a function upgrading method of a battery management system according to an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating a method for implementing function upgrade of a battery management system according to an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating a method for implementing a function upgrade of a battery management system according to another embodiment of the present application;
fig. 4 is a schematic flowchart illustrating a method for implementing function upgrade of a battery management system according to another embodiment of the present application;
fig. 5 is a schematic flowchart illustrating a method for implementing function upgrade of a battery management system according to yet another embodiment of the present application;
fig. 6 is a schematic structural diagram illustrating a method for implementing a function upgrade of a battery management system according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a method for implementing function upgrade of a battery management system in another embodiment of the present application;
fig. 8 is a schematic structural diagram of a battery management system used for implementing a function upgrading method of the battery management system;
fig. 9 is a schematic structural diagram of an upper computer in the function upgrading method for implementing the battery management system.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terms referred to in the present application are explained first:
a battery management system: that is, the BMS, commonly called a battery caregiver or a battery manager, is mainly used to intelligently manage and maintain the respective battery cells, prevent overcharge and overdischarge of the battery, prolong the service life of the battery, and monitor the state of the battery.
For a clear understanding of the technical solutions of the present application, a detailed description of the prior art solutions is first provided.
In a conventional manner, when a certain function of the battery management system is upgraded, the whole battery management system is upgraded. However, when only one or a few functions need to be upgraded, the upgrading efficiency of the battery management system is reduced to a certain extent by the method that the whole battery management system needs to be upgraded.
Therefore, in the face of the technical problems of the prior art, the inventor finds out through creative research to solve the technical problem of reducing the upgrading efficiency of the battery management system in the prior art. Therefore, the battery management system is packaged into a plurality of functional modules in advance, when a certain function needs to be upgraded, only the functional module corresponding to the function needs to be upgraded, at the moment, the battery management system responds to an upgrade instruction sent by the upper computer, finds the functional module to be upgraded currently according to the identification information of the functional module to be upgraded in the upgrade file according to the upgrade file acquired from the upper computer, and upgrades the functional module according to the corresponding upgrade data, so that the function can be upgraded. Compared with the mode of upgrading the whole battery management system, the mode of specifically upgrading one or more specific functional modules can improve the efficiency of upgrading the battery management system to a certain extent.
As shown in fig. 1, an application scenario of the function upgrading method for a battery management system provided in the embodiment of the present application includes, in a corresponding network architecture in the application scenario: the battery management system 20 and the upper computer 10 are connected in communication, and the battery management system 20 and the upper computer 10 are connected in communication. If the upper computer 10 acquires the functional module to be upgraded, which is determined by the user (step 1 in fig. 1), the upper computer 10 first sends an upgrade instruction to the battery management system 20 (step 2 in fig. 1) to instruct the battery management system 20 to upgrade the functional module. If the battery management system 20 responds to the upgrade instruction (step 3 in fig. 1), the upper computer 10 sends an upgrade file to the battery management (step 4 in fig. 1), where the upgrade file includes identification information of the functional module to be upgraded and corresponding upgrade data. The battery management system 20 may determine the current functional module to be upgraded according to the identification information of the functional module to be upgraded; according to the upgrade data, the current functional module to be upgraded is upgraded, so that the upgraded functional module can be obtained, and the corresponding function in the battery management system 20 is upgraded (step 5 in fig. 1).
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
In the battery management system, the functional modules include at least: the device comprises a temperature data processing module, a voltage module, a current module, a terminal product communication module, a balance module and the like.
Fig. 2 is a function upgrade method of a battery management system according to an embodiment of the present application, and as shown in fig. 2, an execution main body of the function upgrade method of the battery management system according to the embodiment is the battery management system, where the battery management system includes a plurality of packaged functional modules, and the function upgrade method of the battery management system according to the embodiment includes the following steps:
step 101, receiving an upgrade instruction sent by an upper computer.
And the upgrading instruction is sent by the upper computer and is used for indicating the battery management system to upgrade.
Specifically, the upper computer may send the upgrade instruction periodically in a set period, or may send the upgrade instruction to the battery management system when triggered by the user. If the periodic sending mode is set, the user is prompted to store the upgrade file into the upper computer, and then the battery management system is upgraded according to the upgrade file. If the battery management system is in the user triggering mode, the user can temporarily store the upgrade file into the upper computer and then upgrade the battery management system.
In a possible implementation mode, before an upgrading instruction sent by an upper computer is received, when a battery management system detects that the upper computer is accessed, the address and the ID number of the upper computer are read, and if the address and the ID number of the upper computer are consistent with those stored in the battery management system, the step of receiving the upgrading instruction sent by the upper computer is executed, so that the upper computer of an original factory is used when the battery management system is upgraded, and the reliability of the upgrading process is better guaranteed.
And 102, responding to an upgrading instruction, and acquiring an upgrading file sent by an upper computer, wherein the upgrading file comprises identification information of a functional module to be upgraded and corresponding upgrading data.
After the battery management system responds to the upgrading instruction, a field effect transistor (MOS) which is charged/discharged is closed, a boot upgrading mode is entered, and data related to upgrading, namely upgrading files, are waited to be received. The upgrade file includes identification information of the functional module to be upgraded and corresponding upgrade data.
The identification information of the functional module to be upgraded is information that can be used to identify the functional module to be upgraded, and may be, for example, a serial number or a name. The upgrade data is data for upgrading the functional module to be upgraded. If there are multiple function modules to be upgraded at the same time, the upgrade file may include identification information of the multiple function modules to be upgraded and corresponding upgrade data.
The mode of obtaining the upgrade file sent by the upper computer may be that after responding to the upgrade instruction, the battery management system obtains the upgrade file from the upper computer.
And 103, determining the current functional module to be upgraded according to the identification information of the functional module to be upgraded.
The method comprises the steps of determining a unique functional module to be upgraded according to identification information of the functional module to be upgraded, and determining the current functional module to be upgraded according to the identification information of the functional module to be upgraded. When a certain function of the battery management system needs to be upgraded, the function module corresponding to the function is upgraded. Therefore, the functional module to be upgraded is determined based on the identification information of the functional module to be upgraded.
And 104, upgrading the current functional module to be upgraded according to the upgrading data to obtain the upgraded functional module.
Specifically, after the functional module to be upgraded is determined, the functional module to be upgraded can be upgraded according to the upgrade data in the upgrade file, so that the upgraded functional module is obtained.
According to the function upgrading method of the battery management system, the upgrading instruction sent by the upper computer is received; in response to an upgrading instruction, acquiring an upgrading file sent by an upper computer, wherein the upgrading file comprises identification information of a functional module to be upgraded and corresponding upgrading data; determining the current functional module to be upgraded according to the identification information of the functional module to be upgraded; and upgrading the current functional module to be upgraded according to the upgrading data to obtain the upgraded functional module. Because the battery management system is packaged with a plurality of functional modules in advance, when a certain function needs to be upgraded, the functional module corresponding to the function only needs to be upgraded, and at the moment, the battery management system responds to an upgrade instruction sent by the upper computer, finds the functional module to be upgraded currently and upgrades the functional module according to an upgrade file acquired from the upper computer, so that the upgrading of the function can be realized. Compared with the mode of upgrading the whole battery management system, the upgrading method aiming at the specific functional module can improve the efficiency of upgrading the battery management system to a certain extent.
As an alternative embodiment, the upgrade file includes: first frame data and a plurality of intermediate frame data; the identification information of the functional module to be upgraded is positioned in the first frame data, and the upgrading data corresponding to the functional module to be upgraded is positioned in each intermediate frame data; the intermediate frame data is the frame data of any frame except the first frame data in the upgrade file.
The upgrade file is a file composed of a plurality of frame data, the first frame data is frame data located in a first frame, and the middle frame data is frame data located in any frame except the first frame.
When receiving the upgrade file, the battery management system receives the upgrade file frame by frame starting from the first frame data. The identification information of the functional module to be upgraded is located in the first frame of data, so that the battery management system can immediately jump into the corresponding functional module to be upgraded according to the identification information of the functional module to be upgraded in the first frame of data after receiving the first frame of data, and the upgrading data in each intermediate frame of data can be sequentially written into the functional module to be upgraded subsequently.
In this embodiment, the upgrade file is written into the battery management system in a frame data form, so that the functional module to be upgraded can be conveniently and accurately found in time, and the functional module to be upgraded can be quickly upgraded.
As an alternative implementation, as shown in fig. 3, in this embodiment, step 104 includes the following steps:
step 201, for each intermediate frame data of the upgrade file, a first check value corresponding to each intermediate frame data is obtained.
As mentioned above, the upgrade file includes the first frame data and a plurality of intermediate frame data, and for each intermediate frame data of the upgrade file, a corresponding first check value may be calculated according to a set policy. The set strategy is a preset calculation method for calculating the first check value.
When the battery management system acquires the intermediate frame data frame by frame, the corresponding first check value is calculated according to a set strategy every time one intermediate frame data is received.
Step 202, comparing each first check value with a second check value carried by corresponding intermediate frame data to determine whether each intermediate frame data passes the check.
The second check value is a check value carried by each intermediate frame data, and the carrying of the second check value can be calculated according to the above setting strategy.
Data loss may occur when the upper computer transmits each intermediate frame data frame by frame, and the data loss can be understood as data loss existing in the intermediate frame data. Therefore, in order to determine whether data loss occurs in each intermediate frame data, when receiving each intermediate frame data, the battery management system compares the first check value of the intermediate frame data with the second check value of the corresponding intermediate frame data, and if the first check value of the intermediate frame data is consistent with the second check value of the corresponding intermediate frame data, it indicates that data loss does not occur in the intermediate frame data, and thus the intermediate frame data passes the check.
And step 203, upgrading the current functional module to be upgraded according to the verified intermediate frame data.
The intermediate frame data passing the verification can be used for upgrading the functional module to be upgraded. Here, the intermediate frame data that passes the verification should be understood as that there is no intermediate frame data that fails the verification, that is, all intermediate frame data pass the verification, and the functional module to be upgraded is upgraded frame by frame.
In the embodiment, a first check value corresponding to each intermediate frame data is obtained by aiming at each intermediate frame data of the upgrade file; comparing each first check value with a second check value carried by corresponding intermediate frame data to determine whether each intermediate frame data passes the check; and upgrading the current functional module to be upgraded according to the middle frame data passing the verification. When the functional module to be upgraded is upgraded, the first check value and the second check value of each intermediate frame data are compared, so that whether the intermediate frame data are lost or not can be monitored in time, and the functional module to be upgraded is favorably upgraded smoothly.
As an alternative implementation manner, in this embodiment, each intermediate frame data includes multiple bit data; step 202, more specifically comprising: and for each intermediate frame data, calculating each data except the second check value in each intermediate frame data to obtain a first check value corresponding to each intermediate frame data.
And the second check value carried by each intermediate frame data is a bit data at the rearmost of the intermediate frame data.
Specifically, for each intermediate frame data, each piece of data except for the second check value in each intermediate frame data is calculated according to a set policy. In an example one, each piece of data except the second check value in each intermediate frame data is accumulated and then averaged to obtain a corresponding first check value. In example two, the variance of each bit of data in the intermediate frame data except for the second check value is calculated to obtain the corresponding first check value. The present invention is not limited to the first example and the second example, as long as the policy is set to satisfy the discovery of data loss.
As an optional implementation manner, in this embodiment, in step 202, when determining whether each intermediate frame data passes the verification, further includes step 301, if any intermediate frame data does not pass the verification, sending a data retransmission request to the upper computer to obtain the intermediate frame data.
In the process of transmitting the intermediate frame data frame by frame, if any intermediate frame data fails to pass the verification, the battery management system sends a data retransmission request to the upper computer to acquire the intermediate frame data. If the data is lost caused by the transmission process, a data retransmission request is sent, and the intermediate frame data can be acquired under the condition of no transmission problem. If the upgrade file is a problem of the upgrade file itself, the correct upgrade file needs to be imported into the upper computer again.
After the intermediate frame data is acquired, acquiring a first check value corresponding to the intermediate frame data according to the process, comparing the first check value with a second check value of the corresponding intermediate frame data, and if the first check value passes the check, upgrading the functional module to be upgraded by using the intermediate frame data.
In this embodiment, if any intermediate frame data fails to pass the verification, a data retransmission request is sent to the upper computer to obtain the intermediate frame data. Because any intermediate frame data is required to be obtained again after the data of any intermediate frame data is not verified, the functional module to be upgraded can be ensured to be accurately upgraded.
Fig. 4 is a functional upgrade method of a battery management system according to an embodiment of the present application, and as shown in fig. 4, an execution main body of the functional upgrade method of the battery management system according to the embodiment is an upper computer. The method for upgrading the function of the battery management system provided by the embodiment includes the following steps:
step 401, obtaining a functional module to be upgraded determined by a user.
The upper computer is provided with a GUI (graphical user interface) capable of being displayed to a user, and the user can select one or more functional modules to be upgraded from the GUI for upgrading. When the user determines the functional module to be upgraded, the upper computer can acquire the identification information of the functional module to be upgraded and determine the functional module to be upgraded based on the identification information.
Step 402, according to the functional module to be upgraded, sending an upgrade instruction to the battery management system.
Specifically, the mode of sending the upgrade instruction to the battery management system may be that after the functional module to be upgraded is determined, the functional module is used as a trigger time for sending the upgrade instruction, and only the upgrade instruction is sent to the battery management system first, so that the battery management system is informed of preparing to enter a boot upgrade mode.
Step 403, if it is determined that the battery management system responds to the upgrade instruction, sending an upgrade file to the battery management system, so that the battery management system upgrades the current functional module to be upgraded according to the upgrade file, and obtaining an upgraded functional module; the upgrading file comprises identification information of the functional module to be upgraded and corresponding upgrading data.
After the upgrade instruction is sent out, if the battery management system successfully responds to the upgrade instruction, a response success instruction is sent to the upper computer, the upper computer is enabled to determine that the battery management system successfully responds to the upgrade instruction, and the upgrade file can be sent. At this time, the upper computer sends an upgrade file to the battery management system, so that the battery management system upgrades the current functional module to be upgraded according to the upgrade file to obtain the upgraded functional module. For the upgrade process of the battery management system, the definitions of the foregoing embodiments may be referred to.
According to the function upgrading method of the battery management system, the function module to be upgraded determined by a user is obtained; sending an upgrading instruction to a battery management system according to the functional module to be upgraded; if the battery management system is determined to respond to the upgrading instruction, sending an upgrading file to the battery management system so that the battery management system can upgrade the current functional module to be upgraded according to the upgrading file to obtain an upgraded functional module; the upgrading file comprises identification information of the functional module to be upgraded and corresponding upgrading data. Because the battery management system is packaged with a plurality of functional modules in advance, when a certain function needs to be upgraded, only the functional module corresponding to the function needs to be upgraded, and the upgrading aiming at the specific functional module can improve the upgrading efficiency of the battery management system to a certain extent compared with the upgrading mode aiming at the whole battery management system.
As an alternative embodiment, as shown in fig. 5, step 403, sending an upgrade file to the battery management system, includes the following steps:
step 501, compiling each functional module in the battery management system separately to obtain a corresponding single compiled file.
The independent compiling of each functional module means that, for each functional module, the compiling is performed by a compiler of an upper computer, so as to obtain a corresponding compiled file (i.e., a hex file, also called a recordable file). The single compilation file is a compilation file obtained by independently compiling each functional module.
Before compiling each functional module, after the battery management system responds to the upgrading instruction, the upper computer acquires each functional module from the battery management system.
And 502, compiling the whole functional module to obtain a whole compiled file.
The compiling of the whole functional modules means that all the functional modules are compiled as a whole through a compiler of an upper computer, so that a compiled file is obtained. The whole compiling file is a compiling file obtained by compiling the whole of each functional module.
Step 503, analyzing the whole compiled file by a disassembling technology to obtain the initial address of each functional module.
The disassembling technology can convert the object code into an assembly code, and related disassembling software is installed in the upper computer, namely the disassembling technology can be used for analyzing the whole compiling file to obtain the initial address of each functional module.
Step 504, determining the end address of the functional module to be upgraded according to the initial address of the functional module to be upgraded and the corresponding single compiled file.
Wherein, the single compiled file comprises the codes of the functional modules and the byte number of the global constant. The encoding of the functional module and the number of bytes of the global constant can be used to represent the specification size of the functional module. Therefore, after the initial address of each functional module is obtained, the tail address of the functional module to be upgraded can be determined according to the initial address of the functional module to be upgraded and the specification size of the functional module to be upgraded represented by the single compiled file.
And 505, sending an upgrade file to the battery management system according to the initial address and the tail address of the functional module to be upgraded.
Specifically, after the upper computer determines the initial address and the tail address of the functional module to be upgraded, each frame data of the upgrade file is written from the initial address of the functional module to be upgraded to the tail address of the functional module to be upgraded.
In this embodiment, each functional module in the battery management system is separately compiled to obtain a corresponding single compiled file; compiling all the functional modules integrally to obtain an integral compiling file; analyzing the whole compiled file through a disassembling technology to obtain initial addresses of the functional modules; determining the tail address of the functional module to be upgraded according to the initial address of the functional module to be upgraded and the corresponding single compiled file; and sending an upgrade file to the battery management system according to the initial address and the tail address of the functional module to be upgraded. By compiling each single compiling file independently, obtaining a whole compiling file through whole compiling, and combining with a disassembling technology, the upper computer can accurately know the address of the functional module to be upgraded so as to accurately write the upgrading file into the battery management system.
As an optional implementation manner, when sending the upgrade file to the controller of the battery management system, the method further includes step 601, setting a second check value for each intermediate frame data in the upgrade file, so that the battery management system upgrades the current functional module to be upgraded according to each intermediate frame data passing the check.
And the second check value is obtained by calculating the data of each intermediate frame data except the second check value according to a set strategy by the upper computer.
In this embodiment, when the functional module to be upgraded is upgraded, the second check value is further set for each intermediate frame data, so that the battery management system compares the first check value of each intermediate data frame with the corresponding second check value, and thus, whether data loss occurs in the intermediate frame data can be timely monitored, and it is favorable for ensuring that the functional module to be upgraded is upgraded smoothly.
As an optional implementation manner, the method for upgrading functions of a battery management system further includes step 701, if a data retransmission request sent by a controller of the battery management system is received, sending the intermediate frame data that fails to pass the verification to the battery management system.
Here, if any intermediate frame data fails to be verified, the upper computer receives a corresponding data retransmission request, where the data retransmission request includes information of the intermediate frame data that fails to be verified, and may be used to determine which intermediate frame data fails to be verified, so as to conveniently and accurately send the intermediate frame data that fails to be verified to the battery management system.
In this embodiment, if a data retransmission request sent by a controller of the battery management system is received, the intermediate frame data that fails the verification is sent to the battery management system. Because any intermediate frame data is required to be obtained again after the data of any intermediate frame data is not verified, the functional module to be upgraded can be ensured to be accurately upgraded.
As an optional implementation manner, if the speed of writing the upgrade data into the processor (i.e., MCU) of the battery management system is slow, the data ring buffer may be adopted, and the upgrade data is read by using the data ring buffer, so that the processor is only responsible for the work of writing the upgrade data, thereby performing the writing and reading of the upgrade data separately, and improving the efficiency of upgrading the functional module to be upgraded.
As an optional implementation manner, after the upgrade data is completed, the battery management system exits from the boot upgrade mode, and in the initial operation process after the upgrade, the upgraded functional module of the battery management system is verified to determine whether the upgrade is successful.
Specifically, the upper computer obtains identification information of the upgraded functional module, runs the upgraded functional module, determines that the upgrade fails if the running result does not meet an expected result, and reoccurs an upgrade instruction to the battery management system so that the battery management system enters a boot upgrade mode again, and upgrades the upgraded functional module which fails to be upgraded so as to obtain the functional module which is successfully upgraded.
Here, the identification information of the same functional module does not change before and after upgrading.
Fig. 6 is a schematic structural diagram of a function upgrade apparatus of a battery management system according to an embodiment of the present application, and as shown in fig. 6, a function upgrade apparatus 60 of the battery management system according to the present embodiment is located in the battery management system, where the battery management system includes a plurality of packaged functional modules, and then the function upgrade apparatus 60 of the battery management system according to the present embodiment includes: an instruction obtaining module 61, an upgrade file obtaining module 62, a function module determining module 63, and a result obtaining module 64.
The instruction acquisition module 61 is used for receiving an upgrading instruction sent by an upper computer; an upgrade file obtaining module 62, configured to obtain, in response to an upgrade instruction, an upgrade file sent by an upper computer, where the upgrade file includes identification information of a functional module to be upgraded and corresponding upgrade data; a function module determining module 63, configured to determine a current function module to be upgraded according to the identification information of the function module to be upgraded; and the result obtaining module 64 is configured to upgrade the current functional module to be upgraded according to the upgrade data, so as to obtain an upgraded functional module.
Optionally, the upgrade file comprises: first frame data and a plurality of intermediate frame data; the identification information of the functional module to be upgraded is positioned in the first frame of data, and the upgrading data corresponding to the functional module to be upgraded is positioned in each intermediate frame of data; the intermediate frame data is the frame data of any frame except the first frame data in the upgrade file.
Optionally, the result obtaining module 64 is configured to, according to the upgrade data, upgrade the current functional module to be upgraded to obtain an upgraded functional module, and specifically configured to: aiming at each intermediate frame data of the upgrade file, acquiring a first check value corresponding to each intermediate frame data; comparing each first check value with a second check value carried by corresponding intermediate frame data to determine whether each intermediate frame data passes the check; and upgrading the current functional module to be upgraded according to the middle frame data passing the verification.
Optionally, when the result obtaining module 64 obtains the first check value corresponding to each intermediate frame data, the result obtaining module is specifically configured to: for each intermediate frame data, calculating each data except the second check value in each intermediate frame data to obtain a first check value corresponding to each intermediate frame data; and the second check value carried by each intermediate frame data is a bit data at the rearmost of the intermediate frame data.
Optionally, when determining whether the check of each intermediate frame data is passed, the result obtaining module 64 is further specifically configured to: and if any intermediate frame data does not pass the verification, requesting the upper computer to send the intermediate frame data which does not pass the verification.
Fig. 7 is a schematic structural diagram of a function upgrade apparatus of a battery management system according to an embodiment of the present application, and as shown in fig. 7, a function upgrade apparatus 70 of the battery management system according to the present embodiment is located in an upper computer, where the battery management system includes a plurality of packaged functional modules, and then the function upgrade apparatus 70 of the battery management system according to the present embodiment includes: a module acquiring module 71, an instruction sending module 72 and an upgrade file sending module 73.
The module obtaining module 71 is configured to obtain a function module to be upgraded, which is determined by a user; the instruction sending module 72 is used for sending an upgrading instruction to the battery management system according to the functional module to be upgraded; an upgrade file sending module 73, configured to send an upgrade file to the battery management system if it is determined that the battery management system responds to the upgrade instruction, so that the battery management system upgrades the current functional module to be upgraded according to the upgrade file, and obtains the upgraded functional module; the upgrading file comprises identification information of the functional module to be upgraded and corresponding upgrading data.
Optionally, the upgrade file sending module 73 is configured to send the upgrade file to the battery management system, and is specifically configured to: compiling each functional module in the battery management system respectively and independently to obtain a corresponding single compiled file; compiling all the functional modules integrally to obtain an integral compiling file; analyzing the whole compiled file through a disassembling technology to obtain initial addresses of the functional modules; determining the tail address of the functional module to be upgraded according to the initial address of the functional module to be upgraded and the corresponding single compiled file; and sending an upgrade file to the battery management system according to the initial address and the tail address of the functional module to be upgraded.
Optionally, a single compiled file, comprising: the code of the functional module and the byte number of the global constant.
Optionally, the function upgrading apparatus 70 of the battery management system further includes a check value setting module, and when sending the upgrade file to the controller of the battery management system, the check value setting module is specifically configured to: and respectively setting a second check value for each intermediate frame data in the upgrade file, so that the controller of the battery management system upgrades the current functional module to be upgraded according to each intermediate frame data passing the check.
Optionally, the function upgrading apparatus 70 of the battery management system further includes a retransmission request obtaining module, which is specifically configured to: and if a data retransmission request sent by a controller of the battery management system is received, transmitting the intermediate frame data which is not verified to the battery management system.
Fig. 8 is a block diagram illustrating a battery management system according to an exemplary embodiment, which may be as illustrated in fig. 8, including: a memory 81, a processor 82 and a transceiver 83; memory 81 is a memory for storing processor-executable instructions; the processor 82 is used to run a computer program or instructions to implement the method for upgrading the functions of the battery management system provided by any of the above embodiments.
The memory 81 stores a program. In particular, the program may include program code comprising computer operating instructions. The memory 81 may comprise a high-speed RAM memory, and may further comprise a non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 82 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement the embodiments of the present disclosure.
The transceiver 83 is used for data transmission with an upper computer, such as upgrading a file.
Alternatively, in a specific implementation, if the memory 81, the processor 82 and the transceiver 83 are implemented independently, the memory 81, the processor 82 and the transceiver 83 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 8, but that does not indicate only one bus or one type of bus.
Alternatively, in a specific implementation, if the memory 81, the processor 82 and the transceiver 83 are integrated on a chip, the memory 81, the processor 82 and the transceiver 83 may complete the same communication through an internal interface.
Fig. 9 is a block diagram illustrating an upper computer according to an exemplary embodiment, where the upper computer may be as shown in fig. 9, and includes: a memory 91, a processor 92 and a transceiver 93; memory 91 is a memory for storing processor-executable instructions; the processor 92 is used for running a computer program or instructions to implement the function upgrading method of the battery management system provided by any of the above embodiments.
The memory 91 stores a program. In particular, the program may include program code including computer operating instructions. The memory 91 may comprise a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 92 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement the embodiments of the present disclosure.
The transceiver 93 is used for data transmission with the battery management system, such as upgrading files.
Alternatively, in a specific implementation, if the memory 91, the processor 92 and the transceiver 93 are implemented independently, the memory 91, the processor 92 and the transceiver 93 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 9, but this does not indicate only one bus or one type of bus.
Optionally, in a specific implementation, if the memory 91, the processor 92 and the transceiver 93 are integrated on a chip, the memory 91, the processor 92 and the transceiver 93 may complete the same communication through an internal interface.
A non-transitory computer-readable storage medium, instructions in which, when executed by a processor of a battery management system, enable a terminal device to perform a method of upgrading a function of the battery management system of the above-described battery management system.
A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an upper computer, enable a terminal device to execute a function upgrade method of a battery management system of the upper computer.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (15)

1. A function upgrading method of a battery management system is applied to the battery management system, the battery management system comprises a plurality of packaged functional modules, and the method is characterized by comprising the following steps:
receiving an upgrading instruction sent by an upper computer;
responding to the upgrading instruction, and acquiring an upgrading file sent by an upper computer, wherein the upgrading file comprises identification information of a functional module to be upgraded and corresponding upgrading data;
determining the current functional module to be upgraded according to the identification information of the functional module to be upgraded;
and upgrading the current functional module to be upgraded according to the upgrading data so as to obtain the upgraded functional module.
2. The method of claim 1, wherein the upgrade file comprises: first frame data and a plurality of intermediate frame data;
the identification information of the functional module to be upgraded is located in the first frame data, and the upgrading data corresponding to the functional module to be upgraded is located in each intermediate frame data; the intermediate frame data is frame data of any frame except the first frame data in the upgrade file.
3. The method according to claim 2, wherein upgrading the current functional module to be upgraded according to the upgrade data comprises:
aiming at each intermediate frame data of the upgrade file, acquiring a first check value corresponding to each intermediate frame data;
comparing each first check value with a second check value carried by the corresponding intermediate frame data to determine whether each intermediate frame data passes the check;
and upgrading the current functional module to be upgraded according to the middle frame data passing the verification.
4. The method of claim 3, wherein each inter frame data comprises a plurality of bits of data; acquiring a first check value corresponding to each intermediate frame data, including:
calculating each data in the intermediate frame data except the second check value to obtain a first check value corresponding to each intermediate frame data;
and the second check value carried by each intermediate frame data is a bit data at the rearmost of the intermediate frame data.
5. The method of claim 3, wherein determining whether each of the intermediate frame data checks, further comprises:
and if any intermediate frame data does not pass the verification, sending a data retransmission request to the upper computer to acquire the intermediate frame data.
6. A function upgrading method of a battery management system is applied to an upper computer, the battery management system comprises a plurality of packaged functional modules, and the method is characterized by comprising the following steps:
acquiring a functional module to be upgraded determined by a user;
sending an upgrading instruction to a battery management system according to the functional module to be upgraded;
if the battery management system is determined to respond to the upgrading instruction, sending an upgrading file to the battery management system so that the battery management system can upgrade the current functional module to be upgraded according to the upgrading file to obtain the upgraded functional module;
the upgrading file comprises identification information of the functional module to be upgraded and corresponding upgrading data.
7. The method of claim 6, wherein sending an upgrade file to the battery management system comprises:
compiling each functional module in the battery management system respectively and independently to obtain a corresponding single compiled file;
compiling the whole of each functional module to obtain a whole compiled file;
analyzing the whole compiled file through a disassembling technology to obtain initial addresses of the functional modules;
determining the tail address of the functional module to be upgraded according to the initial address of the functional module to be upgraded and the corresponding single compiled file;
and sending an upgrade file to the battery management system according to the initial address and the tail address of the functional module to be upgraded.
8. The method of claim 7, wherein the single compiled file comprises: the code of the functional module and the byte number of the global constant.
9. The method of claim 6, wherein when sending the upgrade file to the controller of the battery management system, further comprising:
and respectively setting a second check value for each intermediate frame data in the upgrade file, so that the battery management system can upgrade the current functional module to be upgraded according to each intermediate frame data passing the check.
10. The method of claim 6, further comprising:
and if a data retransmission request sent by a controller of the battery management system is received, sending the intermediate frame data which does not pass the verification to the battery management system.
11. A function upgrading apparatus for a battery management system, located in the battery management system, the battery management system including a plurality of packaged functional modules, the apparatus comprising:
the instruction acquisition module is used for receiving an upgrading instruction sent by the upper computer;
the upgrading file acquisition module is used for responding to the upgrading instruction and acquiring an upgrading file sent by an upper computer, wherein the upgrading file comprises identification information of the functional module to be upgraded and corresponding upgrading data;
the function module determining module is used for determining the current function module to be upgraded according to the identification information of the function module to be upgraded;
and the result acquisition module is used for upgrading the current functional module to be upgraded according to the upgrading data so as to obtain the upgraded functional module.
12. The utility model provides a battery management system's function upgrading device, is located the host computer, and battery management system is including a plurality of functional module that have packaged, its characterized in that, the device includes:
the module acquisition module is used for acquiring a functional module to be upgraded determined by a user;
the instruction sending module is used for sending an upgrading instruction to the battery management system according to the functional module to be upgraded;
the upgrade file sending module is used for sending an upgrade file to the battery management system if the battery management system is determined to respond to the upgrade instruction, so that the battery management system can upgrade the current functional module to be upgraded according to the upgrade file to obtain the upgraded functional module; the upgrading file comprises identification information of the functional module to be upgraded and corresponding upgrading data.
13. A battery management system, comprising: a processor, a transceiver, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the transceiver is used for carrying out data transmission with an upper computer;
the processor executes computer-executable instructions stored by the memory to implement the method of any of claims 1-5.
14. An upper computer, comprising: a processor, a transceiver, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the transceiver is used for carrying out data transmission with the battery management system;
the processor executes computer-executable instructions stored by the memory to implement the method of any of claims 6-10.
15. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, perform the method of any one of claims 1-10.
CN202210799136.8A 2022-07-08 2022-07-08 Function upgrading method and device of battery management system, electronic equipment and medium Pending CN115098138A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210799136.8A CN115098138A (en) 2022-07-08 2022-07-08 Function upgrading method and device of battery management system, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210799136.8A CN115098138A (en) 2022-07-08 2022-07-08 Function upgrading method and device of battery management system, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN115098138A true CN115098138A (en) 2022-09-23

Family

ID=83297053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210799136.8A Pending CN115098138A (en) 2022-07-08 2022-07-08 Function upgrading method and device of battery management system, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN115098138A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116009925A (en) * 2023-03-24 2023-04-25 合肥力高动力科技有限公司 Sub-battery management unit program refreshing method of battery management system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116009925A (en) * 2023-03-24 2023-04-25 合肥力高动力科技有限公司 Sub-battery management unit program refreshing method of battery management system

Similar Documents

Publication Publication Date Title
CN104750510A (en) Chip start method and multi-core processor chip
CN102945173B (en) User program online upgrade system and upgrade method
CN111737173B (en) I2C bus communication control method, device, system and readable storage medium
CN110618903A (en) Electronic equipment testing method and device
US10216550B2 (en) Technologies for fast boot with adaptive memory pre-training
US10274919B2 (en) Method, device and computer program product for programming a plurality of control units
CN101295255B (en) Firmware updating system and method
CN111930406A (en) Vehicle-mounted terminal micro control unit software upgrading method, electronic equipment and storage medium
CN115098138A (en) Function upgrading method and device of battery management system, electronic equipment and medium
CN108647131B (en) Output system of running log
CN115269544A (en) Database cluster upgrading method and device, electronic equipment and storage medium
CN112698857A (en) Data flashing method and device
CN110209605B (en) Register read-write method of PCIE bus network card and computing equipment
CN112787886B (en) Processing method, device driver, readable storage medium and computer for real-time system network device auto-negotiation
CN112559349B (en) Program running method and running device
CN111371799B (en) Method, device and equipment for controlling data receiving and transmitting of MCTP (Multi-channel media Port) controller
CN112068860A (en) WIFI-based tire pressure diagnostic instrument upgrading method, device, equipment and medium
CN108037942B (en) Adaptive data recovery and update method and device for embedded equipment
CN111352764A (en) Chip repairing method, device, equipment and storage medium
CN117170704B (en) Remote upgrading method and device based on hardware IIC
CN112000579B (en) Software interface testing method, system, equipment and medium
CN116915712A (en) Data transmission method, device and system
CN114924850A (en) Software monitoring recovery method, electronic equipment and storage medium
CN114064221A (en) Interrupt processing method, device, system, equipment and storage medium
CN116909599A (en) Method, device, equipment and storage medium for upgrading engine offline software

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination