CN114253568A - Application program upgrading method, device and equipment - Google Patents

Application program upgrading method, device and equipment Download PDF

Info

Publication number
CN114253568A
CN114253568A CN202010997128.5A CN202010997128A CN114253568A CN 114253568 A CN114253568 A CN 114253568A CN 202010997128 A CN202010997128 A CN 202010997128A CN 114253568 A CN114253568 A CN 114253568A
Authority
CN
China
Prior art keywords
control unit
application program
upgrading
upgrade
main control
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
CN202010997128.5A
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.)
Beijing Hyperstrong Technology Co Ltd
Original Assignee
Beijing Hyperstrong Technology 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 Beijing Hyperstrong Technology Co Ltd filed Critical Beijing Hyperstrong Technology Co Ltd
Priority to CN202010997128.5A priority Critical patent/CN114253568A/en
Publication of CN114253568A publication Critical patent/CN114253568A/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides an application program upgrading method, device and equipment, which are applied to a battery management system, and the method comprises the following steps: the main control unit receives application program upgrading information sent by upgrading control equipment through a vehicle-mounted diagnosis interface; if the indication information is received, upgrading the application program of the slave control unit through the master control unit; and if the indication information is not received, the main control unit upgrades the application program of the main control unit. The complexity of application program upgrade is reduced.

Description

Application program upgrading method, device and equipment
Technical Field
The embodiment of the invention relates to the field of embedded development, in particular to an application program upgrading method, device and equipment.
Background
A Battery Management System (BMS) is generally provided in a new energy device (e.g., a new energy vehicle), and the BMS may include a master control Unit (BMU) and a slave control Unit (CSC).
The BMU and CSC are connected by an internal Controller Area Network (CAN) bus. Typically, the BMU and the CSC are loaded with applications so that the BMU and the CSC may implement their respective functions, and in some cases, the applications often need to be upgraded. In the existing scheme, a CAN bus between a BMU and a CSC is led out and connected to an upgrade control device, such as an upper computer, a handheld diagnostic terminal and the like, and application program upgrade information is sent to the BMU and the CSC through the upgrade control device to upgrade an application program.
Disclosure of Invention
The embodiment of the invention provides an application program upgrading method, device and equipment, which are used for reducing the complexity of application program upgrading.
In a first aspect, an embodiment of the present invention provides an application program upgrading method, which is applied to a battery management system, where the battery management system includes a master control unit and a slave control unit, the master control unit is connected to the slave control unit through an internal Controller Area Network (CAN) bus, and the master control unit is connected to an upgrade control device through a vehicle-mounted diagnostic interface, and the method includes:
the main control unit receives the application program upgrading information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface;
if the master control unit further receives indication information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface, the master control unit sends the application program upgrading information to the slave control unit through the CAN bus so that the slave control unit upgrades the application program in the slave control unit according to the application program upgrading information;
and if the main control unit does not receive the indication information sent by the upgrading control equipment, the main control unit upgrades the application program in the main control unit according to the application program upgrading information.
In a possible implementation manner, the indication information is received by the main control unit before the application program upgrading information is received.
In a possible implementation manner, before the main control unit receives application program upgrade information sent by an upgrade control device through the on-board diagnosis interface, the method further includes:
the main control unit receives an application program upgrading preparation instruction sent by the upgrading control equipment through the vehicle-mounted diagnosis interface;
if the master control unit further receives the indication information, the master control unit sends the application program upgrading preparation instruction to the slave control unit through the CAN bus so as to enable the slave control unit to execute upgrading preprocessing operation;
and if the main control unit does not receive the indication information, the main control unit executes upgrading pretreatment operation.
In one possible embodiment, the upgrade preprocessing operation includes:
resetting operation, setting the upgrading request flag value to be effective, and emptying the storage area for storing the application program.
In a possible implementation manner, after the master control unit sends the application program upgrade information to the slave control unit through the CAN bus, the method further includes:
the master control unit receives a first check code sent by the slave control unit through the CAN bus;
and the main control unit sends the first check code to the upgrading control equipment through the vehicle-mounted diagnosis interface so that the upgrading control equipment checks the first check code.
In a possible implementation manner, after the main control unit sends the first check code to the upgrade control device through the on-board diagnosis interface, the method further includes:
the main control unit receives first verification passing information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface;
and the master control unit sends the first verification passing information to the slave control unit through the CAN bus so as to enable the slave control unit to set the upgrading request flag value of the slave control unit to be invalid and reset the slave control unit.
In a possible implementation manner, after the main control unit upgrades the application program in the main control unit according to the application program upgrade information, the method further includes:
and the main control unit sends the second check code to the upgrading control equipment through the vehicle-mounted diagnosis interface so that the upgrading control equipment checks the second check code.
In a possible implementation manner, after the upgrade control device verifies the second check code, the method further includes:
the main control unit receives second check passing information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface;
and the main control unit sets the upgrading request flag value of the main control unit to be invalid according to the second check passing information and resets the main control unit.
In a possible implementation manner, the upgrading, by the master control unit, the application program in the master control unit according to the application program upgrading information includes:
and the main control unit stores the application program upgrading information to a storage area which is used for storing the application program and is arranged in the main control unit.
In a second aspect, an embodiment of the present invention provides an application program upgrading apparatus, which is applied to a battery management system, where the battery management system includes a master control unit and a slave control unit, the master control unit is connected to the slave control unit through an internal controller area network CAN bus, and the master control unit is connected to an upgrade control device through a vehicle-mounted diagnostic interface, and the apparatus includes:
the receiving module is used for receiving the application program upgrading information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface;
the sending module is used for sending the application program upgrading information to the slave control unit through the CAN bus if the receiving module receives the indication information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface so that the slave control unit CAN upgrade the application program in the slave control unit according to the application program upgrading information;
and the upgrading module is used for upgrading the application program in the main control unit according to the application program upgrading information if the receiving module does not receive the indication information sent by the upgrading control equipment.
In a possible implementation, the indication information is received by the receiving module before the application upgrade information is received.
In a possible embodiment, the apparatus further comprises a pre-processing module;
the receiving module is further configured to receive an application program upgrade preparation instruction sent by the upgrade control device through the vehicle-mounted diagnosis interface before the receiving module receives application program upgrade information sent by the upgrade control device through the vehicle-mounted diagnosis interface;
the sending module is further configured to send the application program upgrade preparation instruction to the slave control unit through the CAN bus if the master control unit further receives the indication information, so that the slave control unit executes upgrade preprocessing operation;
and the preprocessing module is used for executing upgrading preprocessing operation if the main control unit does not receive the indication information.
In a possible embodiment, the preprocessing module is specifically configured to perform a reset operation, set the upgrade request flag value to valid, and clear the memory area for storing the application program.
In a possible implementation manner, the receiving module is further configured to receive, through the CAN bus, a first check code sent by the slave control unit after the sending module sends the application program upgrade information to the slave control unit through the CAN bus;
the sending module is further configured to send the first check code to the upgrade control device through the vehicle-mounted diagnosis interface, so that the upgrade control device checks the first check code.
In a possible implementation manner, the receiving module is further configured to receive first verification passing information sent by the upgrade control device through the vehicle-mounted diagnosis interface after the sending module sends the first verification code to the upgrade control device through the vehicle-mounted diagnosis interface;
the sending module is further configured to send the first verification passing information to the slave control unit through the CAN bus, so that the slave control unit sets the upgrade request flag value of the slave control unit to be invalid, and resets the slave control unit.
In a possible implementation manner, the sending module is further configured to send the second check code to the upgrade control device through the vehicle-mounted diagnosis interface after the upgrade module upgrades the application program in the main control unit according to the application program upgrade information, so that the upgrade control device checks the second check code.
In a possible embodiment, the apparatus further comprises a setup module;
the receiving module is further configured to receive second verification passing information sent by the upgrade control device through the vehicle-mounted diagnostic interface after the upgrade control device verifies the second verification code;
and the setting module is used for setting the upgrading request flag value of the main control unit to be invalid according to the second check passing information and resetting the main control unit.
In a possible implementation manner, the upgrade module is specifically configured to store the application program upgrade information in a storage area, in the main control unit, for storing an application program.
In a third aspect, an embodiment of the present invention provides an application program upgrading apparatus, including: at least one processor and memory;
the memory is used for storing computer execution instructions;
the at least one processor is configured to execute the computer-executable instructions stored in the memory, so that the at least one processor performs the application program upgrading method according to any one of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the method for upgrading an application program is implemented as in any one of the above first aspects.
According to the application program upgrading method, device and equipment provided by the embodiment of the invention, the main control unit receives the application program upgrading information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface, if the indication information is received, the application program of the slave control unit is upgraded through the main control unit, and if the indication information is not received, the main control unit upgrades the application program of the master control unit. Therefore, the vehicle-mounted diagnosis interface of the vehicle can be directly applied, the additional increase of the interface is avoided, and the complexity of application program upgrading is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present invention;
FIG. 2 is a schematic diagram of a vehicle OBD interface provided by an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating connection relationships among components in a BMS according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of an application program upgrading method according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of another application program upgrading method according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of another application program upgrading method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an application program upgrading apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another application program upgrading apparatus according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a hardware structure of an application program upgrading apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present invention. Referring to fig. 1, a vehicle 101 and an upgrade control apparatus 102 are included.
The BMS is included in the vehicle 101 and includes a master control unit and a slave control unit. As shown in fig. 2. The BMS comprises a main control unit and a plurality of slave control units. Next, referring to fig. 3, the connection relationship between the respective components in the BMS will be described by taking an example in which the BMS includes 3 slave units.
Fig. 3 is a schematic diagram illustrating connection relationships among components in a BMS according to an embodiment of the present invention. Referring to fig. 3, all the slave control units are connected to the master control unit through a CAN bus, and the master control unit is connected to the OBD interface through the CAN bus. The upgrading control device CAN be connected with the OBD interface through the CAN bus to realize the application program upgrading of the master control unit and the slave control unit.
The upgrade control device 102 may be a handheld diagnostic device, an upper computer, or the like.
And if the BMU is upgraded, the upgrade control equipment sends the application program upgrade information to the BMU through the OBD interface, and further the application program upgrade of the BMU is realized. If the CSC is upgraded, the upgrade control equipment sends instruction information and application program upgrade information to the BMU through the OBD interface, and if the BMU also receives the instruction information, the BMU sends the application program upgrade information to the CSC through the CAN bus, so that the application program upgrade of the CSC is realized. Therefore, the upgrading of the application program is realized by transmitting the upgrading information of the application program through the OBD interface, an additional interface is not required, and the complexity of the upgrading of the application program is reduced.
The technical means shown in the present application will be described in detail below with reference to specific examples. It should be noted that the following embodiments may be combined with each other, and the description of the same or similar contents in different embodiments is not repeated.
Fig. 4 is a schematic flowchart of an application program upgrading method according to an embodiment of the present invention, please refer to fig. 4, where the method is applied to a battery management system, and may include:
s401: and the main control unit receives the application program upgrading information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface.
Optionally, the execution main body in the embodiment of the present invention may be a main control unit, and may also be an application program upgrading device disposed in the main control unit. Alternatively, the application program upgrading device may be implemented by software, or may be implemented by a combination of software and hardware.
The upgrade control device is used for controlling the upgrade of the application programs in the main control unit and the slave control unit. For example, the application may be a music playing application, a recorder application, or the like.
The On-Board Diagnostics interface may be an On-Board Diagnostics (OBD) interface onboard the vehicle.
In some cases, the upgrade control device may send application upgrade information to the master control unit through the on-board diagnostics interface. After receiving the application program upgrading information, the master control unit upgrades the application program of the master control unit according to the application program upgrading information, or sends the application program upgrading information to the slave control unit, so that the slave control unit upgrades the application program in the slave control unit according to the application program upgrading information.
S402: and if the master control unit also receives the indication information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface, the master control unit sends the application program upgrading information to the slave control unit through the CAN bus.
The indication information can be in the form of commands, messages and the like. The indication information is used for indicating the master control unit to send the application program upgrading information received from the upgrading control device to the slave control unit.
Specifically, after the master control unit receives the indication information, the master control unit may send the application program upgrade information received from the upgrade control device to the slave control unit, so that the slave control unit executes the upgrade operation according to the application program upgrade information.
Alternatively, the indication information may be received by the main control unit before the application upgrade information is received. That is, the main control unit receives the indication information sent by the upgrade control device first, and then receives the application program upgrade information sent by the upgrade control device.
Optionally, the indication information may be received by the main control unit after receiving the application program upgrade information. That is, the main control unit receives the application program upgrading information sent by the upgrading control device, and then receives the indication information sent by the upgrading control device.
Optionally, the indication information may be a part of the application program upgrade information received by the main control unit. In this case, the master control unit may analyze the application program upgrade information, and if the instruction information is acquired, send the analyzed application program upgrade information to the slave control unit.
S403: and if the main control unit does not receive the indication information sent by the upgrading control equipment, the main control unit upgrades the application program in the main control unit according to the application program upgrading information.
The main control unit can upgrade the application program in the main control unit in the following way: the main control unit stores the application program upgrading information to a storage area used for storing the application program in the main control unit.
In the method for upgrading an application program provided in this embodiment, the master control unit receives, through the vehicle-mounted diagnosis interface, application program upgrading information sent by the upgrade control device, if indication information is also received, the master control unit upgrades the application program of the slave control unit, and if indication information is not received, the master control unit upgrades the application program of the master control unit. Therefore, the vehicle-mounted diagnosis interface of the vehicle can be directly applied, the additional increase of the interface is avoided, and the complexity of application program upgrading is reduced.
On the basis of the above embodiment, the application program upgrading method is explained in detail below.
Fig. 5 is a flowchart illustrating another application program upgrading method according to an embodiment of the present invention. Referring to fig. 5, in this embodiment, if the master control unit receives the indication information sent by the upgrade control unit, the method may include that the master control unit upgrades the application program in the slave control unit, and the method includes:
s501: and the main control unit receives the indication information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface.
The indication information is used for indicating the master control unit to send an application program upgrading preparation instruction, application program upgrading information and the like to the slave control unit.
S502: and the main control unit receives an application program upgrading preparation instruction sent by the upgrading control equipment through the vehicle-mounted diagnosis interface.
The application upgrade preparation instructions may instruct the slave units to perform upgrade preprocessing operations.
Optionally, if the master control unit receives the indication information sent by the upgrade control device and the master control unit receives the application program upgrade preparation instruction sent by the upgrade control device, the master control unit sends the application program upgrade preparation instruction to the slave control unit.
S503: and the master control unit sends an application program upgrading preparation instruction to the slave control unit through the CAN bus.
And the slave control unit receives an application program upgrading preparation instruction sent by the master control unit and executes upgrading pretreatment operation.
The upgrade preprocessing operation may be a reset operation, setting the upgrade request flag value to valid, and clearing a memory area for storing the application program. The setting of the upgrade request flag value to be valid may be setting of an originally invalid upgrade request flag value to be valid. For example, the invalid flag value is 0, the valid flag value is 1, and the upgrade request flag value is set from the invalid flag value 0 to the valid flag value 1. The storage area for storing the application program may be a flash memory.
Before the slave control unit executes the upgrade preprocessing operation, the upgrade control device may perform software and hardware version number verification on the slave control unit. Specifically, the upgrade control device reads the software and hardware version number of the slave control unit through the master control unit, compares the read software and hardware version number with the current software and hardware version number in the upgrade control device, and if the read hardware version number is the same as the current hardware version number in the upgrade control device and the read software version number is smaller than the current software version number in the upgrade control device, the upgrade control device sends an application program upgrade preparation instruction to the slave control unit through the master control unit so that the slave control unit executes upgrade preprocessing operation; otherwise, the upgrade control device reports the information that the verification of the software and hardware version numbers fails.
S504: and the master control unit sends the application program upgrading information to the slave control unit through the CAN bus.
After the slave control unit executes the upgrading preprocessing operation, the master control unit sends application program upgrading information to the slave control unit, the slave control unit receives the application program upgrading information, and upgrading is carried out according to the application program upgrading information.
The application program upgrading information may be upgrading information that the main control unit further receives indication information sent by the upgrading control device and the upgrading control device sends the indication information to the main control unit.
S505: the master control unit receives the first check code sent by the slave control unit through the CAN bus.
The first check code may be a value calculated by the slave control unit by reading the updated application information after the application is updated, and using a hash algorithm based on the application information.
S506: and the main control unit sends a first check code to the upgrading control equipment through the vehicle-mounted diagnosis interface.
After the main control unit sends the first check code to the upgrade control equipment, the upgrade control equipment compares the received first check code with the reference check code, if the first check code is consistent with the reference check code, the check is passed, and first check passing information is sent to the main control unit; and if the verification information is inconsistent with the verification information, reporting verification failure information. The reference check code may be a value calculated by using a hash algorithm based on the transmitted application program upgrade information when the upgrade control device transmits the application program upgrade information to the main control unit.
S507: the main control unit receives first verification passing information sent by the upgrading control device through the vehicle-mounted diagnosis interface.
S508: the master control unit sends first verification passing information to the slave control unit through the CAN bus.
The first check-pass information may be used to instruct the slave control unit to set the upgrade request flag value of the slave control unit to invalid and reset the slave control unit.
After S508, the main control unit detects whether the application program upgrade information sent by the upgrade control device is received within a preset time, and if not, resets and starts the main control unit to make the main control unit enter a normal operating state. Wherein the preset time may be 10 s.
According to the application program upgrading method provided by the embodiment of the invention, the main control unit receives the indication information, the application program upgrading preparation instruction, the application program upgrading information and the like sent by the upgrading control equipment through the vehicle-mounted diagnosis interface, and upgrades the application program of the slave control unit. Therefore, the vehicle-mounted diagnosis interface of the vehicle can be directly applied to upgrade the application program of the slave control unit through the master control unit, the additional increase of the interface is avoided, and the complexity of application program upgrading is reduced.
Fig. 6 is a flowchart illustrating a further method for upgrading an application according to an embodiment of the present invention. Referring to fig. 6, in this embodiment, if the main control unit does not receive the indication information sent by the upgrade control unit, the main control unit upgrades the application program in the main control unit, and the method may include:
s601: and the main control unit receives an application program upgrading preparation instruction sent by the upgrading control equipment through the vehicle-mounted diagnosis interface.
The application upgrade preparation instructions may instruct the master control unit to perform upgrade preprocessing operations.
And if the main control unit does not receive the indication information sent by the upgrading control unit, the main control unit executes upgrading pretreatment operation after receiving the application program upgrading preparation instruction sent by the upgrading control unit.
S602: the main control unit executes an upgrade preprocessing operation.
The operation of the master control unit upgrade preprocessing is similar to that of the slave control unit upgrade preprocessing, which is described in detail in S503 and will not be described herein again.
Before the main control unit executes the upgrade preprocessing operation, the upgrade control device may first perform software and hardware version number verification on the main control unit. Specifically, the upgrade control device reads the software/hardware version number of the main control unit, compares the read software/hardware version number with the current software/hardware version number in the upgrade control device, and if the read hardware version number is the same as the current software/hardware version number in the upgrade control device and the read software version number is smaller than the current software version number in the upgrade control device, the upgrade control device sends an application program upgrade preparation instruction to the main control unit to enable the main control unit to execute upgrade preprocessing operation, otherwise, the upgrade control device reports information that the verification of the software/hardware version number fails.
S603: the main control unit receives the application program upgrading information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface, and the application program in the main control unit is upgraded according to the application program upgrading information.
S604: and the main control unit sends a second check code to the upgrading control equipment through the vehicle-mounted diagnosis interface.
The second check code may be a value calculated by reading application information updated by the main control unit after the main control unit finishes updating the application in the main control unit and using a hash algorithm based on the application information.
S605: and the main control unit receives second check passing information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface, sets the upgrading request flag value as invalid according to the second check passing information, and resets the main control unit.
After the main control unit sends the second check code to the upgrade control equipment, the upgrade control equipment compares the received second check code with the reference check code, if the second check code is consistent with the reference check code, the check is passed, and second check passing information is sent to the main control unit; and if the verification information is inconsistent with the verification information, reporting verification failure information. The reference check code may be calculated by using a hash algorithm based on the sent application program upgrade information when the upgrade control device sends the application program upgrade information to the main control unit.
According to the application program upgrading method provided by the embodiment of the invention, under the condition that the main control unit does not receive the indication information sent by the upgrading control equipment, the main control unit receives the application program upgrading preparation instruction, the application program upgrading information and the like sent by the upgrading control equipment through the vehicle-mounted diagnosis interface, and the application program of the main control unit is upgraded. Therefore, the vehicle-mounted diagnosis interface of the vehicle can be directly applied to upgrade the application program of the main control unit, the additional increase of the interface is avoided, and the complexity of application program upgrading is reduced.
Fig. 7 is a schematic structural diagram of an application program upgrading apparatus according to an embodiment of the present invention. Referring to fig. 7, the application upgrading apparatus is applied to a battery management system including a master control unit, a slave control unit and a vehicle-mounted diagnosis interface, the master control unit is connected with the slave control unit through an internal controller area network CAN bus, the master control unit is connected with an upgrade control device through the vehicle-mounted diagnosis interface, the application upgrading apparatus 10 may include a receiving module 11, a transmitting module 12 and an upgrading module 13, wherein,
the receiving module 11 is configured to receive, through the vehicle-mounted diagnosis interface, application program upgrade information sent by the upgrade control device;
the sending module 12 is configured to, if the receiving module 11 further receives, through the vehicle-mounted diagnostic interface, instruction information sent by the upgrade control device, send, by the master control unit, application program upgrade information to the slave control unit through the CAN bus, so that the slave control unit upgrades the application program in the slave control unit according to the application program upgrade information;
the upgrading module 13 is configured to upgrade the application program in the main control unit according to the application program upgrading information if the receiving module 11 does not receive the indication information sent by the upgrading control device.
The application program upgrading device provided by the embodiment of the invention can execute the technical scheme shown in the method embodiment, the implementation principle and the beneficial effect are similar, and the details are not repeated here.
In one possible implementation, the indication is received prior to receiving the application upgrade information.
Fig. 8 is a schematic structural diagram of another application program upgrading apparatus according to an embodiment of the present invention. In addition to the embodiment shown in fig. 7, referring to fig. 8, the application upgrading apparatus further includes a preprocessing module 14, wherein,
the receiving module 11 is further configured to receive an application program upgrade preparation instruction sent by the upgrade control device through the vehicle-mounted diagnosis interface before the receiving module receives the application program upgrade information sent by the upgrade control device through the vehicle-mounted diagnosis interface;
the sending module 12 is further configured to send an application program upgrade preparation instruction to the slave control unit through the CAN bus if the master control unit further receives the indication information, so that the slave control unit executes upgrade preprocessing operation;
the preprocessing module 14 is configured to execute an upgrade preprocessing operation if the main control unit does not receive the indication information.
In a possible embodiment, the preprocessing module 14 is specifically configured to perform a reset operation, set the upgrade request flag value to valid, and clear the memory area for storing the application program.
In a possible embodiment, the receiving module 11 is further configured to receive, through the CAN bus, the first check code sent by the slave control unit after the sending module sends the application program upgrade information to the slave control unit through the CAN bus;
the sending module 12 is further configured to send the first check code to the upgrade control device through the vehicle-mounted diagnosis interface, so that the upgrade control device checks the first check code.
In a possible implementation manner, the receiving module 11 is further configured to receive first verification passing information sent by the upgrade control device through the vehicle-mounted diagnosis interface after the sending module sends the first verification code to the upgrade control device through the vehicle-mounted diagnosis interface;
the sending module 12 is further configured to send the first verification passing information to the slave control unit through the CAN bus, so that the slave control unit sets the upgrade request flag value of the slave control unit to be invalid, and resets the slave control unit.
In a possible implementation manner, the sending module 12 is further configured to send the second check code to the upgrade control device through the vehicle-mounted diagnosis interface after the upgrading module upgrades the application program in the main control unit according to the application program upgrading information, so that the upgrade control device verifies the second check code.
In a possible embodiment, the device further comprises a setting module 15;
the receiving module 11 is further configured to receive second verification passing information sent by the upgrade control device through the vehicle-mounted diagnosis interface after the upgrade control device verifies the second verification code;
and the setting module 15 is configured to set the upgrade request flag value of the main control unit to be invalid according to the second check passing information, and reset the main control unit.
In a possible implementation manner, the upgrade module 13 is specifically configured to store the application program upgrade information in a storage area of the main control unit, where the storage area is used for storing the application program.
The page display device provided by the embodiment of the invention can execute the technical scheme shown in the method embodiment, the implementation principle and the beneficial effect are similar, and the detailed description is omitted here.
The embodiment of the present invention further provides a schematic diagram of a hardware structure of an application program upgrading apparatus, please refer to fig. 9. The application program upgrading apparatus 20 includes: at least one processor 21 and a memory 22. The processor 21 and the memory 22 are connected by a bus 23.
In a specific implementation, the at least one processor 21 executes computer-executable instructions stored by the memory 22, so that the at least one processor 21 performs the application program upgrade method as described above.
For a specific implementation process of the processor 21, reference may be made to the above method embodiments, which implement similar principles and technical effects, and this embodiment is not described herein again.
The application upgrading apparatus shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer execution instruction is stored in the computer-readable storage medium, and when a processor executes the computer execution instruction, the method for upgrading an application program according to any of the above-mentioned method embodiments is implemented.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention, and are not limited thereto; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the embodiments of the present invention.

Claims (20)

1. An application program upgrading method is applied to a battery management system, the battery management system comprises a main control unit and a slave control unit, the main control unit is connected with the slave control unit through an internal Controller Area Network (CAN) bus, the main control unit is connected with an upgrading control device through a vehicle-mounted diagnosis interface, and the method comprises the following steps:
the main control unit receives the application program upgrading information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface;
if the master control unit further receives indication information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface, the master control unit sends the application program upgrading information to the slave control unit through the CAN bus so that the slave control unit upgrades the application program in the slave control unit according to the application program upgrading information;
and if the main control unit does not receive the indication information sent by the upgrading control equipment, the main control unit upgrades the application program in the main control unit according to the application program upgrading information.
2. The method of claim 1, wherein the indication information is received by the master control unit prior to receiving the application upgrade information.
3. The method according to claim 1 or 2, before the master control unit receives the application program upgrade information sent by the upgrade control device through the on-board diagnosis interface, further comprising:
the main control unit receives an application program upgrading preparation instruction sent by the upgrading control equipment through the vehicle-mounted diagnosis interface;
if the master control unit further receives the indication information, the master control unit sends the application program upgrading preparation instruction to the slave control unit through the CAN bus so as to enable the slave control unit to execute upgrading preprocessing operation;
and if the main control unit does not receive the indication information, the main control unit executes upgrading pretreatment operation.
4. The method of claim 3, wherein the upgrade pre-processing operation comprises:
resetting operation, setting the upgrading request flag value to be effective, and emptying the storage area for storing the application program.
5. The method of claim 1 or 2, further comprising, after the master control unit sending the application upgrade information to the slave control unit over the CAN bus:
the master control unit receives a first check code sent by the slave control unit through the CAN bus;
and the main control unit sends the first check code to the upgrading control equipment through the vehicle-mounted diagnosis interface so that the upgrading control equipment checks the first check code.
6. The method of claim 5, wherein after the master control unit sends the first check code to the upgrade control device through the on-board diagnostic interface, further comprising:
the main control unit receives first verification passing information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface;
and the master control unit sends the first verification passing information to the slave control unit through the CAN bus so as to enable the slave control unit to set the upgrading request flag value of the slave control unit to be invalid and reset the slave control unit.
7. The method according to claim 1 or 2, wherein after the master control unit upgrades the application program in the master control unit according to the application program upgrade information, the method further comprises:
and the main control unit sends a second check code to the upgrading control equipment through the vehicle-mounted diagnosis interface so that the upgrading control equipment checks the second check code.
8. The method according to claim 7, further comprising, after the upgrade control device verifies the second check code:
the main control unit receives second check passing information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface;
and the main control unit sets the upgrading request flag value of the main control unit to be invalid according to the second check passing information and resets the main control unit.
9. The method according to claim 1 or 2, wherein the upgrading of the application program in the main control unit by the main control unit according to the application program upgrading information comprises:
and the main control unit stores the application program upgrading information to a storage area which is used for storing the application program and is arranged in the main control unit.
10. An application program upgrading device is applied to a battery management system, the battery management system comprises a main control unit and a slave control unit, the main control unit is connected with the slave control unit through an internal Controller Area Network (CAN) bus, the main control unit is connected with an upgrading control device through a vehicle-mounted diagnosis interface, and the device comprises:
the receiving module is used for receiving the application program upgrading information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface;
the sending module is used for sending the application program upgrading information to the slave control unit through the CAN bus if the receiving module receives the indication information sent by the upgrading control equipment through the vehicle-mounted diagnosis interface so that the slave control unit CAN upgrade the application program in the slave control unit according to the application program upgrading information;
and the upgrading module is used for upgrading the application program in the main control unit according to the application program upgrading information if the receiving module does not receive the indication information sent by the upgrading control equipment.
11. The apparatus of claim 10, wherein the indication is received by the receiving module before the application upgrade information is received.
12. The apparatus of claim 10 or 11, further comprising a pre-processing module;
the receiving module is further configured to receive an application program upgrade preparation instruction sent by the upgrade control device through the vehicle-mounted diagnosis interface before the receiving module receives application program upgrade information sent by the upgrade control device through the vehicle-mounted diagnosis interface;
the sending module is further configured to send the application program upgrade preparation instruction to the slave control unit through the CAN bus if the receiving module further receives the indication information, so that the slave control unit executes upgrade preprocessing operation;
the preprocessing module is used for executing upgrading preprocessing operation if the receiving module does not receive the indication information.
13. The apparatus of claim 12, wherein the pre-processing module is specifically configured to perform a reset operation, set an upgrade request flag value to valid, and clear a memory area for storing the application program.
14. The apparatus of claim 10 or 11,
the receiving module is further configured to receive a first check code sent by the slave control unit through the CAN bus after the sending module sends the application program upgrade information to the slave control unit through the CAN bus;
the sending module is further configured to send the first check code to the upgrade control device through the vehicle-mounted diagnosis interface, so that the upgrade control device checks the first check code.
15. The apparatus of claim 14,
the receiving module is further configured to receive first verification passing information sent by the upgrade control device through the vehicle-mounted diagnosis interface after the sending module sends the first verification code to the upgrade control device through the vehicle-mounted diagnosis interface;
the sending module is further configured to send the first verification passing information to the slave control unit through the CAN bus, so that the slave control unit sets the upgrade request flag value of the slave control unit to be invalid, and resets the slave control unit.
16. The apparatus of claim 10 or 11,
the sending module is further configured to send a second check code to the upgrade control device through the vehicle-mounted diagnosis interface after the upgrade module upgrades the application program in the main control unit according to the application program upgrade information, so that the upgrade control device checks the second check code.
17. The apparatus of claim 16, further comprising a setup module;
the receiving module is further configured to receive second verification passing information sent by the upgrade control device through the vehicle-mounted diagnostic interface after the upgrade control device verifies the second verification code;
and the setting module is used for setting the upgrading request flag value of the main control unit to be invalid according to the second check passing information and resetting the main control unit.
18. The apparatus according to claim 10 or 11, wherein the upgrade module is specifically configured to store the application upgrade information in a storage area of the main control unit, where the storage area is used for storing an application.
19. An application program upgrade apparatus, comprising: at least one processor and memory;
the memory is used for storing computer execution instructions;
the at least one processor is configured to execute the memory-stored computer-executable instructions to cause the at least one processor to perform the application upgrade method of any one of claims 1-9.
20. A computer-readable storage medium having stored thereon computer-executable instructions which, when executed by a processor, implement the application program upgrade method according to any one of claims 1-9.
CN202010997128.5A 2020-09-21 2020-09-21 Application program upgrading method, device and equipment Pending CN114253568A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010997128.5A CN114253568A (en) 2020-09-21 2020-09-21 Application program upgrading method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010997128.5A CN114253568A (en) 2020-09-21 2020-09-21 Application program upgrading method, device and equipment

Publications (1)

Publication Number Publication Date
CN114253568A true CN114253568A (en) 2022-03-29

Family

ID=80789090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010997128.5A Pending CN114253568A (en) 2020-09-21 2020-09-21 Application program upgrading method, device and equipment

Country Status (1)

Country Link
CN (1) CN114253568A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348172A (en) * 2022-07-28 2022-11-15 鹿马智能科技(上海)有限公司 Method, device and medium for upgrading versions of different parts of edge network device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446762A (en) * 2014-09-28 2016-03-30 比亚迪股份有限公司 Program updating method for battery management system, and program updating system
CN105700919A (en) * 2016-01-04 2016-06-22 惠州市蓝微新源技术有限公司 BMS application rapid update method and update system
CN108874430A (en) * 2018-08-15 2018-11-23 北京车和家信息技术有限公司 Electronic control unit ECU upgrade method, device and battery management system
WO2019212403A1 (en) * 2018-04-30 2019-11-07 华为国际有限公司 Method for upgrading vehicle-mounted device, and related device
CN110851157A (en) * 2019-10-28 2020-02-28 上海旗旌科技有限公司 Method and equipment for updating vehicle-mounted terminal equipment system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446762A (en) * 2014-09-28 2016-03-30 比亚迪股份有限公司 Program updating method for battery management system, and program updating system
CN105700919A (en) * 2016-01-04 2016-06-22 惠州市蓝微新源技术有限公司 BMS application rapid update method and update system
WO2019212403A1 (en) * 2018-04-30 2019-11-07 华为国际有限公司 Method for upgrading vehicle-mounted device, and related device
CN108874430A (en) * 2018-08-15 2018-11-23 北京车和家信息技术有限公司 Electronic control unit ECU upgrade method, device and battery management system
CN110851157A (en) * 2019-10-28 2020-02-28 上海旗旌科技有限公司 Method and equipment for updating vehicle-mounted terminal equipment system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348172A (en) * 2022-07-28 2022-11-15 鹿马智能科技(上海)有限公司 Method, device and medium for upgrading versions of different parts of edge network device
CN115348172B (en) * 2022-07-28 2024-05-14 鹿马智能科技(上海)有限公司 Method, equipment and medium for upgrading versions of different parts of edge network equipment

Similar Documents

Publication Publication Date Title
EP3528118A1 (en) Software update device, software update method, and software update system
CN107066300B (en) Firmware upgrading method of storage device and storage device
CN105278994A (en) Updating method and updating system of vehicle-mounted ECU (Electronic Control Unit) software
CN109976767B (en) Software burning method and device
US10274919B2 (en) Method, device and computer program product for programming a plurality of control units
CN105897461A (en) Multi-system OTA upgrading method and multi-system device
CN113094072A (en) Vehicle upgrading method and device, electronic device and storage medium
CN112698851B (en) Program update system, program transfer device, and program transfer method
CN112099967A (en) Data transmission method, terminal, device, equipment and medium
CN111930406A (en) Vehicle-mounted terminal micro control unit software upgrading method, electronic equipment and storage medium
CN114253568A (en) Application program upgrading method, device and equipment
CN105045671A (en) Method and device for upgrading systems of intelligent terminals
CN109933346A (en) The method and system that a kind of pair of batteries of electric automobile Management Controller program is upgraded
CN111124455B (en) Battery management system upgrading method, device, server and storage medium
CN116466986B (en) Equipment software upgrading method and device of energy storage system, communication module and medium
CN111984287A (en) Equipment upgrading method and system
CN115396248B (en) Remote device control method, device, system, electronic device and storage medium
CN116300780B (en) Component configuration method, device, electronic equipment and storage medium
CN103631611A (en) Method and equipment for updating optical transmitter and receiver
CN116366275A (en) Safety verification method, device, equipment and storage medium based on vehicle controller
CN110134423A (en) Update method, device and the computer readable storage medium of firmware
CN106951276B (en) Multi-controller software upgrading and address conflict detection method and device
US11429375B2 (en) Method for exchanging a first executable program code and a second executable program code, and a control unit
CN114026537A (en) Method for carrying out a dialogue with a computer on a vehicle bus of a vehicle
CN115280280A (en) Updating method and updating device for updating software comprising a physical address towards a memory of an on-board computer of a vehicle

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