Upgrading method and device of energy storage system, energy storage system and storage medium

By using address allocation tables in the energy storage system to process upgrade files, adding target starting address and merging files, the problem of low upgrade efficiency in the existing technology is solved, and efficient microcontroller unit application upgrade is achieved.

CN119201179APending Publication Date: 2024-12-27SHENZHEN HELLO TECH STORED ENERGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411431567.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

During the upgrade process, existing energy storage systems need to manually set the storage address of each upgrade file, and need to send multiple upgrade files to the microcontroller unit, resulting in inefficient upgrades.

Method used

By obtaining the address allocation table, multiple upgrade files are processed, the target start address is added, the target subfile with the target start address is generated, and the target subfile is merged into the target file, which directly completes the multiple applications in the microcontroller unit. upgrade.

Benefits of technology

Improve the upgrade efficiency, reduce the number of transfers of upgrade files and manual setting steps, and realize the upgrade of multiple applications at one time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201179A_ABST
    Figure CN119201179A_ABST
Patent Text Reader

Abstract

The invention discloses an energy storage system upgrading method, an energy storage system upgrading device, an energy storage system and a computer readable storage medium. The method comprises the following steps: acquiring an address allocation table; obtaining a plurality of upgrading files; processing the plurality of upgrading files according to the address allocation table to obtain a plurality of target sub-files with target initial addresses; generating a target file according to the plurality of target sub-files; and upgrading the micro-control unit according to the target file. The upgrading efficiency of the micro-control unit is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of system software upgrade, and more specifically, to an upgrade method of an energy storage system, an upgrade device of an energy storage system, an energy storage system, and a computer-readable storage medium. Background Art

[0002] At present, the energy storage system adopts a modular design to facilitate users to add or reduce modules as needed. The modules are composed of multiple boards, and different boards use different microcontroller units. The energy storage system needs to upgrade the modules from time to time, that is, to upgrade the software application of the microcontroller unit. Usually, the relevant personnel send the upgrade file to the microcontroller unit through a mobile phone, cloud platform or host computer. Since different programs are located in different address areas of the microcontroller unit, the relevant personnel also need to manually set the file address where the upgrade file is stored to ensure that the upgrade file is stored in the corresponding address area. This upgrade method requires manual setting of the storage address of each upgrade file, and multiple upgrade files need to be sent to the microcontroller unit to complete the upgrade process, and the upgrade efficiency is low. Summary of the invention

[0003] Embodiments of the present application provide an energy storage system upgrade method, an energy storage system upgrade device, an energy storage system, and a computer-readable storage medium.

[0004] The upgrade method of the energy storage system of the implementation mode of the present application includes: obtaining an address allocation table; obtaining multiple upgrade files; processing the multiple upgrade files according to the address allocation table to obtain multiple target sub-files with target starting addresses; generating a target file according to the multiple target sub-files; and upgrading the micro control unit according to the target file.

[0005] The upgrade device of the energy storage system of the embodiment of the present application includes an acquisition module and a processing module, wherein the acquisition module is used to acquire an address allocation table and acquire multiple upgrade files. The processing module is used to process multiple upgrade files according to the address allocation table to obtain multiple target sub-files with target start addresses; generate a target file according to the multiple target sub-files; and upgrade the micro control unit according to the target file.

[0006] The energy storage system of the embodiment of the present application includes the upgrade device of the energy storage system in any of the above embodiments, and the upgrade device of the energy storage system includes an acquisition module and a processing module, and the acquisition module is used to acquire an address allocation table and acquire multiple upgrade files. The processing module is used to process multiple upgrade files according to the address allocation table to obtain multiple target sub-files with target start addresses; generate a target file according to the multiple target sub-files; and upgrade the micro control unit according to the target file.

[0007] The computer-readable storage medium of the embodiment of the present application stores a computer program thereon, and when the program is executed by a processor, the following energy storage system upgrade method is implemented: obtaining an address allocation table; obtaining multiple upgrade files; processing the multiple upgrade files according to the address allocation table to obtain multiple target sub-files with target start addresses; generating a target file according to the multiple target sub-files; and upgrading the micro control unit according to the target file.

[0008] In the energy storage system upgrade method, energy storage system upgrade device, energy storage system and computer-readable storage medium provided in the present application, multiple upgrade files acquired are processed according to the acquired address allocation table to obtain multiple target sub-files with target start addresses, and a target file is generated according to the target sub-files, and the micro-control unit is upgraded according to the target file. In the present application, the upgrade file is processed through the address allocation table, so as to add a target start address to each upgrade file, that is, to add a storage address to each upgrade file to ensure that each upgrade file is stored in the corresponding address area, and the upgrade file with the added target start address is used as a target sub-file, thereby generating a target file containing multiple target sub-files, and then completing the upgrade of multiple applications in the micro-control unit at one time according to the target file, thereby improving the upgrade efficiency.

[0009] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0011] Figure 1 is a flow chart of an upgrade method of an energy storage system in some implementation modes of the present application;

[0012] Figure 2 is a schematic diagram of the structure of an upgrade device for an energy storage system in some embodiments of the present application;

[0013] Figure 3 is a schematic diagram of the structure of an energy storage system in some embodiments of the present application;

[0014] Figure 4 It is a schematic diagram of a process for obtaining multiple upgrade files in an upgrade method of an energy storage system in some implementation modes of the present application;

[0015] Figure 5 It is a schematic diagram of the structure of the upgrade file of some implementation methods of the present application;

[0016] Figure 6 is a flowchart of an energy storage system upgrade method according to other embodiments of the present application;

[0017] Figure 7 It is a flowchart of determining whether a microcontroller unit needs to be upgraded according to a program name and a program version code in an upgrade method of an energy storage system in some implementation modes of the present application;

[0018] Figure 8 It is a flowchart of upgrading a micro control unit according to a target file in a method for upgrading an energy storage system in some embodiments of the present application when the micro control unit needs to be upgraded;

[0019] Fig. 9 It is a flowchart of determining whether a first target checksum is valid according to a first calculated checksum and a first target checksum of a first target subfile in an upgrade method of an energy storage system in some embodiments of the present application;

[0020] Fig.10 It is a flowchart of determining whether the second target checksum is valid according to the second calculated checksum and the second target checksum of the next target subfile in the energy storage system upgrade method of some embodiments of the present application;

[0021] Fig.11 It is a flowchart of obtaining an address allocation table in a method for upgrading an energy storage system in some implementation modes of the present application;

[0022] Fig.12 It is a schematic diagram of the connection status of a computer-readable storage medium and a processor in certain embodiments of the present application.

[0023] Description of main component symbols:

[0024] Energy Storage System 100

[0025] An upgrading device 10 for an energy storage system;

[0026] Acquisition module 11; Processing module 12;

[0027] Processor 20;

[0028] Computer readable storage medium 200 ; computer program 202 . DETAILED DESCRIPTION

[0029] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the embodiments of the present application.

[0030] At present, the energy storage system adopts a modular design to facilitate users to add or reduce modules according to their needs. Each module is composed of one or more single boards, and different single boards use different micro control units. The energy storage system needs to perform module upgrades from time to time, that is, to upgrade the software application of the micro control unit. Usually, relevant personnel send upgrade files to the micro control unit through a mobile phone, a cloud platform or a host computer. Since different programs are located in different address areas of the micro control unit, relevant personnel also need to manually set the file address where the upgrade file is stored to ensure that the upgrade file is stored in the corresponding address area. This upgrade method requires sending multiple upgrade files to the micro control unit, and the storage address of each upgrade file needs to be manually set to complete the upgrade process of multiple applications in the same micro control unit. This upgrade method has low upgrade efficiency. How to solve the problem of slow upgrade speed caused by the need to send multiple upgrade files to the micro control unit and the need to manually set the storage address of each upgrade file has become a difficult problem that technical personnel in this field urgently need to solve. In order to solve this problem, the present application provides an upgrade method for an energy storage system (such as Figure 1 As shown), the upgrade device of the energy storage system (such as Figure 2 As shown), energy storage system (such as Figure 3 As shown) and computer readable storage media (such as Fig.12 shown).

[0031] See also Figure 1 , Figure 2 and Figure 3 , the energy storage system upgrade method of the present application embodiment includes:

[0032] 01: Get the address allocation table;

[0033] 02: Get multiple upgrade files;

[0034] 04: Process multiple upgrade files according to the address allocation table to obtain multiple target sub-files with target start addresses;

[0035] 06: Generate a target file based on multiple target sub-files; and

[0036] 08: Upgrade the microcontroller unit according to the target file.

[0037] The above-mentioned energy storage system upgrade method can be applied to the upgrade device 10 of the energy storage system 100. The upgrade device 10 of the energy storage system 100 of the embodiment of the present application includes an acquisition module 11 and a processing module 12. The acquisition module 11 is used to obtain an address allocation table and obtain multiple upgrade files. The processing module 12 is used to process multiple upgrade files according to the address allocation table to obtain multiple target sub-files with target start addresses; generate a target file according to the multiple target sub-files; and upgrade the micro control unit according to the target file.

[0038] The methods in 01 and 02 belong to the methods executed by the acquisition module 11, and the methods in 04, 06 and 08 belong to the methods executed by the processing module 12. Specifically, the acquisition module 11 is used to execute 01 and 02, and the processing module 12 is used to execute 04, 06 and 08. The upgrading device 10 of the energy storage system 100 is a part of the energy storage system 100. The architecture of other parts of the energy storage system 100 is as follows: Figure 3 The following will first describe in detail the architecture of other parts of the energy storage system 100.

[0039] See also Figure 3 The energy storage system 100 is an energy management system composed of multiple modules and having a complex structure. In addition to the upgrade device 10 of the energy storage system 100 provided in this application, Figure 3 The other core components of the energy storage system 100 are shown, including an energy management module (EMS), a power conversion module (PCS) and a battery management system (BMS). Each module is composed of one or more single boards, where EMS is the intelligent control module in the energy storage system 100, responsible for the management and scheduling of the entire energy storage system 100, including data collection, data analysis and energy scheduling, to ensure the energy balance and normal operation of the energy storage system 100. At the same time, EMS will also monitor the status of other modules in the energy storage system 100 (such as PCS, BMS, electric meter module, fire protection module, air conditioning module, etc.) in real time, and intelligently allocate the energy in the energy storage system 100 according to the real-time operating status of the energy storage system 100 and external environmental factors to achieve optimal energy scheduling. Figure 3It can be seen that the EMS can also connect to the application on the mobile phone through Bluetooth or wireless network (WIFI), connect to the cloud platform through the local area network (LAN), wireless network or communication network (such as 4G, 5G, etc.), and connect to the PC host computer through communication networks such as CAN or RS485, so that users can realize remote monitoring and remote control of the energy storage system 100, thereby improving the operation efficiency and stability of the system. PCS is used to convert the DC power output by the battery module into AC power for use by the load, or convert AC power into DC power for battery charging, and control the charging and discharging process of the battery module, that is, to perform AC-DC conversion. BMS is used to monitor the voltage, current, temperature and other parameters of the battery module in real time to ensure that the battery module operates in a safe and efficient state. At the same time, BMS is also used to balance the charge and discharge control of the battery module to extend the service life of the battery module and protect the battery module from abnormal operating conditions such as overcharging, over-discharging, and short circuit. In the case where the energy storage system 100 includes a plurality of battery modules, the energy storage system 100 may also include multiple BMS, that is Figure 3 Each BMS controls one battery module to achieve precise control of all battery modules. The BMS can also be configured so that each BMS controls multiple battery modules to save the construction cost and internal space of the energy storage system 100. In addition, the energy storage system 100 also includes other functional boards. Figure 3 Function A board is used uniformly to represent it.

[0040] Specifically, each single board uses a different microcontroller unit, and different microcontroller units have different sizes of program space and address space. The program space of some microcontroller units is distributed in different address spaces. Taking GD32F470XX (the English abbreviation of a type of microcontroller unit, "XX" indicates that some of the last characters of the English abbreviation of the microcontroller unit are hidden) as an example, GD32F470XX is internally divided into flash memory (Flash Memory, referred to as Flash) and static random access memory (SRAM Memory, referred to as SRAM), wherein the flash memory is a non-volatile memory. The flash memory can store data in the flash memory chip, and the data in the flash memory still exists after the microcontroller unit is powered off. The flash memory is usually used to store various application codes, operating systems and other non-volatile data. For example, in an embedded system, the flash memory is usually a storage chip with a very small physical volume, but the storage capacity of the flash memory is often much larger than that of the static random access memory. The static random access memory is a volatile memory used to store data generated when the application is running. For example, in an embedded system, the static random access memory is usually a large chip-type storage device, and the static random access memory has a very high access speed and can be read and written data. Static random access memory is mainly used to store variables, stacks, heaps and other data generated when the application is running. The flash memory contains a fast-running Code area and a slow-running Data area. The running speed of the non-zero wait flash memory in the Data area is 2 orders of magnitude lower than that of the Code area. Since the Data area runs slowly, the Data area can be used to store some infrequently accessed data, constants, macros, historical data, upgrade data, and backup data. Users can also choose the storage area of ​​the application according to their own needs. Taking GD32F470ZGT6 (the English abbreviation of a microcontroller unit) as an example, please refer to the flash memory partition table of GD32F470ZGT6 below:

[0041] Table 1 Flash partition table of GD32F470ZGT6

[0042] Serial number Partition name Address range Size (bytes) Remark 1 Code Area 0x0800 0000-0x080B FFFF 768K 2 Data Area 0x0810 0000-0x0813 FFFF 256K

[0043] The address range indicates the address of the program code that can be stored in the corresponding partition, and the size of the partition is in bytes. Taking Table 1 above as an example, the starting address of the program code stored in the Code area is 0x0800 0000, and the ending address is 0x080B FFFF. The starting address of the program code stored in the Data area is 0x0810 0000, and the ending address is 0x0813 FFFF.

[0044] The upgrade device 10 of the energy storage system 100 is a device that can greatly speed up the upgrade speed of the energy storage system 100. The upgrade device 10 of the energy storage system 100 can process the received multiple upgrade files according to the received address allocation table, so that each upgrade file adds a target start address on the original basis, thereby obtaining multiple target sub-files with target start addresses, and further generating a target file through these target sub-files with target start addresses. As can be seen from the above, the upgrade device 10 of the energy storage system 100 can generate a target file containing multiple target sub-files, and directly complete the upgrade of all application programs that need to be upgraded in the corresponding micro-control unit according to the target file. Each module in the energy storage system 100 is composed of a single board, and different single boards use different micro-control units. Each micro-control unit usually contains multiple application programs to realize the multiple functions required by the micro-control unit. Therefore, after sending the target file to the corresponding micro-control unit, the upgrade device 10 of the energy storage system 100 provided in the present application can determine the storage location of the target program code in each target sub-file according to the target starting address of the target sub-file in the target file, thereby upgrading multiple applications on the micro-control unit by transmitting the target file once.

[0045] The upgrade device 10 of the energy storage system 100 includes an acquisition module 11 and a processing module 12. The acquisition module 11 can realize information exchange through a variety of communication technologies, thereby acquiring an address allocation table and multiple upgrade files. The processing module 12 can process each upgrade file according to the address allocation table to obtain multiple target sub-files with target start addresses, and generate a target file based on the multiple target sub-files, and then upgrade the microcontroller unit according to the target file. Specifically, the file format of the upgrade file is usually in BIN format, that is, a file with the suffix .bin. However, the file length of the upgrade file in BIN format is relatively small, so the upgrade file in BIN format does not carry a storage address. In the present application, the processing module 12 adds a target start address to the upgrade file in BIN format through the address allocation table as the starting address for storing the target program code. The address allocation table is shown in Table 2 below:

[0046] Table 2 Upgrade file address allocation table

[0047]

[0048]

[0049] More specifically, in 04, the processing module 12 processes multiple upgrade files according to the address allocation table to obtain multiple target sub-files with target start addresses, so that the upgrade file adds the target start address on the original basis. Taking Table 2 above as an example, the processing module 12 adds 0x0800 0000 as the target start address on the original basis of the upgrade file 1.bin, adds 0x0801 0000 as the target start address on the original basis of the upgrade file 2.bin, and adds 0x08100000 as the target start address on the original basis of the upgrade file 3.bin. In 06 and 08, the processing module 12 can process multiple target sub-files with target start addresses to generate a target file, which contains multiple target sub-files with target start addresses. Thereby, the processing module 12 can directly upgrade the micro control unit according to the target file, that is, upgrade all the applications that need to be upgraded in the micro control unit.

[0050] In some embodiments, the energy storage system 100 can be a household energy storage system or a balcony photovoltaic energy storage system. Compared with the balcony photovoltaic energy storage system, the household energy storage power supply system is usually relatively large, and its position after installation is relatively fixed and cannot be moved. The power capacity is relatively large, and the power provided is relatively large. Compared with the household energy storage power supply system, the balcony photovoltaic energy storage system is relatively small, easy to carry and move, and can be moved according to the user's electricity demand, such as from the balcony to the garage or even outdoors. At the same time, the capacity of the balcony photovoltaic energy storage system is relatively small, and the power provided is also relatively small.

[0051] In certain embodiments, see Figure 2 , Figure 4 and Figure 5 , 02: Get the upgrade file, including:

[0052] 021: Get the preset header allocation table;

[0053] 023: Generate initial files according to the preset software development tools; and

[0054] 025: The initial file is processed according to the preset header allocation table to obtain an upgrade file, and the upgrade file has a preset program identification header.

[0055] The above-mentioned energy storage system upgrade method can be applied to the upgrade device 10 of the energy storage system 100. The acquisition module 11 of the embodiment of the present application is also used to: obtain a preset header allocation table; generate an initial file according to a preset software development tool; and process the initial file according to the preset header allocation table to obtain an upgrade file. The upgrade file has a preset program identification header.

[0056] Specifically, the preset software development tools mainly include various compilation tools, development environment tools, debugging tools, and version control construction tools for generating upgrade programs. The acquisition module 11 generates an initial file according to the preset software development tools, and processes the initial file according to the acquired preset header allocation table in 025 to obtain an upgrade file with a preset program identification header. Among them, the structure of the preset header allocation table is similar to Table 2 (upgrade file address allocation table). The acquisition module 11 adds a preset program identification header in front of the program code of the initial file according to the preset header allocation table, thereby obtaining an upgrade file. The specific composition of the preset program identification header will be described in detail below.

[0057] Please combine Figure 2 , Figure 5 as well as Figure 6 In some implementations, 04: multiple upgrade files are processed according to the address allocation table to obtain multiple target sub-files with target start addresses, including:

[0058] 041: According to the address allocation table, the target start address is added to the preset program identification header of each upgrade file to obtain the target sub-file.

[0059] The above energy storage system upgrade method can be applied to the upgrade device 10 of the energy storage system 100. The processing module 12 of the embodiment of the present application is also used to: according to the address allocation table, add the target starting address in the preset program identification header of each upgrade file to obtain the target subfile.

[0060] It is understandable that, in the process of reading or processing the upgrade file, the processing module 12 reads the upgrade file from the beginning in the order of the program code, so the preset program identification header needs to be set before the program code for upgrading, that is, Figure 5 In addition, the code that needs to be used before the program upgrade should also be placed in the preset program identification header. Therefore, the target start address needs to be added to the preset program identification header so that the processing module 12 can determine the storage location of the program code for the upgrade according to the target start address, that is, Figure 5 Since there are multiple upgrade files, the processing module 12 determines the upgrade file with the target start address added as the target sub-file, and merges the multiple target sub-files in 06 to obtain a target file containing multiple target sub-files. During the merging process, the processing module 12 merges the preset program identification headers with the target start address added to the multiple target sub-files to obtain the target program identification header.

[0061] Specifically, the content in the target program identification table header is shown in Table 3 below:

[0062] Table 3. Contents of the target program identification header of the target file

[0063]

[0064]

[0065] Since multiple target sub-files will be processed and merged into one target file by the processing module 12, it is necessary to delete the redundant program names and program version codes in the original multiple preset program identification headers. As can be seen from Table 3, the processing module 12 will delete the redundant program names and program version codes in the preset program identification headers of the original multiple target sub-files in the process of merging the target sub-files to obtain the target file. In the target program identification header of the obtained target file, the processing module 12 only retains the program name and program version code once at the beginning of the target program identification header to ensure that the target file is transmitted to the corresponding micro-control unit and that the micro-control unit has the application program that needs to be upgraded.

[0066] See also Figure 2 , Table 3, Figure 3 , Figure 5 and Figure 6 In some implementations, the target file includes a target program identification header, the target program identification header includes a program name and a program version code, and the upgrade method further includes:

[0067] 07: Determine whether the microcontroller unit needs to be upgraded based on the program name and program version code;

[0068] 08: Upgrade the microcontroller unit according to the target file, including:

[0069] 081: When the microcontroller unit needs to be upgraded, the microcontroller unit is upgraded according to the target file.

[0070] The above-mentioned energy storage system upgrade method can be applied to the upgrade device 10 of the energy storage system 100. The processing module 12 of the embodiment of the present application is also used to: determine whether the micro control unit needs to be upgraded according to the program name and program version code; and if the micro control unit needs to be upgraded, upgrade the micro control unit according to the target file.

[0071] Specifically, after the processing module 12 determines that the microcontroller unit needs to be upgraded according to the program name and the program version code, it upgrades the microcontroller unit according to the target file. If the microcontroller unit cannot be upgraded, the processing module 12 sends an upgrade failure message to the user's mobile phone, cloud platform, and PC host computer to prompt the user that the target file cannot be used for this upgrade. How to determine whether the microcontroller unit can be upgraded will be explained in detail in the following explanation.

[0072] See also Figure 2 , Table 3 and Figure 7 In some embodiments, the microcontroller unit stores a software version code. 07: Determine whether the microcontroller unit needs to be upgraded according to the program name and the program version code, including:

[0073] 071: Check whether the program name is consistent with the name of the microcontroller unit;

[0074] 073: If the program name is consistent with the name of the microcontroller unit, check whether the program version code is higher than the software version code;

[0075] 075: When the program version code is higher than the software version code, determining that the micro control unit needs to be upgraded; and

[0076] 077: When the program name is inconsistent with the name of the micro control unit, or when the program version code is lower than or equal to the software version code, it is determined that the micro control unit does not need to be upgraded.

[0077] The above-mentioned energy storage system upgrade method can be applied to the upgrade device 10 of the energy storage system 100. The processing module 12 of the embodiment of the present application is also used to: check whether the program name is consistent with the name of the micro control unit; when the program name is consistent with the name of the micro control unit, check whether the program version code is higher than the software version code; when the program version code is higher than the software version code, determine that the micro control unit needs to be upgraded; and when the program name is inconsistent with the name of the micro control unit, or when the program version code is lower than or equal to the software version code, determine that the micro control unit does not need to be upgraded.

[0078] Specifically, the processing module 12 needs to first check whether the program name is consistent with the name of the micro control unit. For example, when the name of the micro control unit is PCS, the processing module 12 reads the ASCII code string of the program name in the target program identification table header, and determines that the program name is also PCS, then determines that the program name is consistent with the name of the micro control unit. The processing module 12 will also check whether the program version code is higher than the software version code. When the program version code is higher than the software version code, it is determined that the micro control unit can be upgraded. For example, the program version code is V1.2.6 and the software version code is V1.2.5, then the processing module 12 determines that the program version code is higher than the software version code. For another example, the program version code is V1.9.1 and the software version code is V1.8.9, then the processing module 12 determines that the program version code is higher than the software version code. For another example, the program version code is V2.1.1 and the software version code is V1.9.6, then the processing module 12 still determines that the program version code is higher than the software version code. In the case where the program version code is lower than the software version code, or the program version code is the same as the software version code, or the program name is inconsistent with the name of the micro control unit, the processing module 12 determines that the target program code in the target file cannot be upgraded for the micro control unit, that is, it is determined that the micro control unit cannot be upgraded or does not need to be upgraded. In the case where the micro control unit cannot be upgraded, the processing module 12 sends an upgrade failure message to the user's mobile phone, cloud platform and PC host computer to prompt the user that the target file cannot be used for this upgrade, and prompts the user to reconfirm the program name and program version code of the target file.

[0079] See also Figure 2 , Table 3 and Figure 8 In some embodiments, the target subfile includes a target subroutine code and a target checksum. 081: Upgrading the microcontroller unit according to the target file includes:

[0080] 0811: Obtain a first calculated checksum of the first target subfile according to a preset checksum algorithm and the first target subfile;

[0081] 0812: Determine whether the first target checksum is valid according to the first calculated checksum and the first target checksum of the first target subfile; and

[0082] 0813: When the first target checksum is valid, the micro control unit is upgraded according to the first target starting address and the first target subroutine code.

[0083] The upgrade method of the energy storage system mentioned above can be applied to the upgrade device 10 of the energy storage system 100. The processing module 12 of the embodiment of the present application is also used to: obtain a first calculation checksum of the first target subfile according to a preset checksum algorithm and the first target subfile; determine whether the first target checksum is valid according to the first calculation checksum and the first target checksum of the first target subfile; and when the first target checksum is valid, upgrade the microcontroller unit according to the first target starting address and the first target subroutine code.

[0084] Specifically, the checksum is an error detection method, which generates a short fixed-length checksum by processing the data with a specific algorithm, and is attached to the end of the data. The receiving party processes the data with the same algorithm and compares it with the attached checksum to detect whether the data has errors during transmission. In the present application, the first target checksum of the first target subfile is also located in the target program identification table header of the target file, that is, as shown in Table 3, the processing module 12 processes the first target subfile according to the preset checksum algorithm, obtains the first calculated checksum of the first target subfile, and compares the first calculated checksum with the first target checksum to determine whether the first target checksum is valid. Since the calculation process of the checksum requires the use of the corresponding target subfile, the processing module 12 can determine whether the first target subfile is complete by comparing the first calculated checksum with the first target checksum. If the first target subfile is complete, that is, if the first target checksum is valid, the processing module 12 upgrades the microcontroller unit according to the first part of the target program code corresponding to the first target subfile. More specifically, in the microcontroller unit, the processing module 12 deletes the code of the same length (LEN1) according to the length LEN1 of the first target subfile, starting from the target start address of the first target subfile, and stores the first part of the target program code to the target start address of the first target subfile in the microcontroller unit, thereby completing the replacement of the old code and realizing the upgrade of the microcontroller unit. If the first target subfile is incomplete, that is, if the first target checksum is invalid, the processing module 12 sends an upgrade failure message to the user's mobile phone, cloud platform and PC host computer to prompt the user that the target file cannot be used for this upgrade, and prompts the user to send the repaired or regenerated complete target file as soon as possible.

[0085] More specifically, the target file includes multiple target sub-files. In the process of processing and merging multiple target sub-files to obtain the target file by the processing module 12, the codes for upgrading the micro-control unit corresponding to each target sub-file are also combined together, that is, combined into the target program code in the target file. The target program code includes multiple parts, each of which has a corresponding target sub-file, for example, as shown in the following Table 4:

[0086] Table 4 Target program code table of target file

[0087]

[0088] As can be seen from Tables 3 and 4, the size occupied by each target sub-file in the target program identification table header is 12 (the total space occupied by the target start address, the length of the target sub-file, and the target checksum), so the start address of the first part in the target file in Table 4 is 2+M+N+P*12. The first part is the first part of the target program code corresponding to the first target sub-file mentioned above.

[0089] See also Figure 2 and Fig. 9 In some implementations, 0812: determining whether the first target checksum is valid based on the first calculated checksum and the first target checksum of the first target subfile includes:

[0090] 08121: if the first calculated checksum and the first target checksum are consistent, determining that the first target checksum is valid; and

[0091] 08123: When the first calculated checksum and the first target checksum are inconsistent, determine that the first target checksum is invalid. The above-mentioned energy storage system upgrade method can be applied to the upgrade device 10 of the energy storage system 100, and the processing module 12 of the embodiment of the present application is also used to: when the first calculated checksum and the first target checksum are consistent, determine that the first target checksum is valid; and when the first calculated checksum and the first target checksum are inconsistent, determine that the first target checksum is invalid.

[0092] According to the calculation principle of the checksum in the above text, only when the first calculated checksum and the first target checksum are completely consistent, can it be determined that the first target sub-file is complete, that is, the first target checksum is determined to be valid. In the case that the first calculated checksum and the first target checksum are different, the processing module 12 determines that the first target checksum is invalid, that is, it is determined that the first target sub-file is incomplete.

[0093] See also Figure 2 , Table 3 and Figure 8 In some embodiments, the upgrading method further comprises:

[0094] 0814: Obtain a second calculated checksum of the next target subfile according to a preset checksum algorithm and the next target subfile;

[0095] 0815: Determine whether the second target checksum is valid according to the second calculated checksum and the second target checksum of the next target subfile;

[0096] 0816: When the second target checksum is valid, the microcontroller unit is upgraded according to the target start address and the target subroutine code;

[0097] 0817: Repeat the process according to the preset checksum algorithm and the next target subfile to obtain the second calculated checksum of the next target subfile, until the microcontroller unit is upgraded according to the target start address and the target subprogram code, and the upgrade times of the microcontroller unit are calculated, until the number of the target subfiles is equal to the upgrade times of the microcontroller unit; and

[0098] 0818: When the number of target sub-files is equal to the upgrade times of the micro control unit, an upgrade success message is sent.

[0099] The upgrade method of the energy storage system mentioned above can be applied to the upgrade device 10 of the energy storage system 100. The processing module 12 of the embodiment of the present application is also used for: obtaining a second calculated checksum of the next target subfile according to a preset checksum algorithm and the next target subfile; determining whether the second target checksum is valid according to the second calculated checksum and the second target checksum of the next target subfile; upgrading the microcontroller unit according to the target starting address and the target subroutine code when the second target checksum is valid; repeatedly executing the steps of obtaining the second calculated checksum of the next target subfile according to the preset checksum algorithm and the next target subfile until the microcontroller unit is upgraded according to the target starting address and the target subroutine code, and calculating the number of upgrades of the microcontroller unit until the number of target subfiles is equal to the number of upgrades of the microcontroller unit; and sending an upgrade success message when the number of target subfiles is equal to the number of upgrades of the microcontroller unit.

[0100] It is understandable that, in the case where the target file contains multiple target sub-files, after completing the inspection of the first target checksum corresponding to the first target sub-file and upgrading the micro-control unit according to the first part of the target program code corresponding to the first target sub-file, the processing module 12 will also obtain the second calculation checksum of the next target sub-file according to the preset checksum algorithm and the next target sub-file, and process the second calculation checksum, the second target checksum of the next target sub-file and the second part of the target program code. The processing process is similar to the above, that is, the processing module 12 upgrades the micro-control unit according to the second part of the target program code corresponding to the next target sub-file when determining that the second calculation checksum is the same as the second target checksum. More specifically, in the micro-control unit, the processing module 12 deletes the code of the same length (LEN2) according to the length LEN2 of the next target sub-file, starting from the target start address of the next target sub-file, and stores the second part of the target program code to the target start address of the next target sub-file in the micro-control unit, thereby completing the replacement of the old code and realizing the upgrading of the micro-control unit. The processing module 12 will repeatedly execute the process of obtaining the second calculated checksum of the next target subfile according to the preset checksum algorithm and the next target subfile, and upgrading the microcontroller unit according to the target starting address and the target subprogram code, until the number of upgrades of the microcontroller unit is equal to the number of target subfiles. When the number of upgrades of the microcontroller unit is equal to the number of target subfiles, an upgrade success message is sent to prompt the user that the upgrade is completed.

[0101] See also Figure 2 and Fig.10 In some embodiments, 0815: determining whether the second target checksum is valid based on the second calculated checksum and the second target checksum of the next target subfile includes:

[0102] 08151: if the second calculated checksum and the second target checksum are consistent, determine that the second target checksum is valid; and

[0103] 08153: When the second calculated checksum and the second target checksum are inconsistent, determine that the second target checksum is invalid.

[0104] The above-mentioned energy storage system upgrade method can be applied to the upgrade device 10 of the energy storage system 100. The processing module 12 of the embodiment of the present application is also used to: determine that the second target checksum is valid when the second calculated checksum and the second target checksum are consistent; and determine that the second target checksum is invalid when the second calculated checksum and the second target checksum are inconsistent.

[0105] According to the calculation principle of the checksum in the above text, only when the second calculated checksum and the second target checksum are completely consistent, can it be determined that the next target subfile is complete, that is, the second target checksum is determined to be valid. In the case that the second calculated checksum and the second target checksum are different, the processing module 12 determines that the second target checksum is invalid, that is, it is determined that the next target subfile is incomplete.

[0106] See also Figure 2 and Fig.11 In some embodiments, the microcontroller unit includes a boot program and at least one application program. 01: Obtaining a name allocation table, including:

[0107] 011: directly read the preset name allocation table; or,

[0108] 013: Get the address allocation table based on the address range of the boot program and the application.

[0109] The above energy storage system upgrade method can be applied to the upgrade device 10 of the energy storage system 100. The processing module 12 of the embodiment of the present application is also used to: directly read a preset name allocation table; or, obtain an address allocation table according to the address range of the boot program and the application program.

[0110] It is understandable that the boot program is a program in the microcontroller unit used to start the entire microcontroller unit and put the entire microcontroller unit into operation. In addition to the application corresponding to the software, the boot program of the microcontroller unit itself also needs to be upgraded from time to time. Therefore, the upgrade files in the name allocation table include upgrade files for boot program upgrades in addition to upgrade files for application program upgrades. The name allocation table can be preset, that is, directly obtained, or generated according to the address range of the boot program and the application program.

[0111] In summary, in the upgrade method of the energy storage system provided in the present application, the acquired multiple upgrade files are processed according to the acquired address allocation table to obtain multiple target sub-files with target start addresses, and a target file is generated according to the target sub-files, and the micro-control unit is upgraded according to the target file. In the present application, the upgrade file is processed through the address allocation table, so as to add a target start address to each upgrade file, that is, to add a storage address to each upgrade file to ensure that each upgrade file is stored in the corresponding address area, and the upgrade file with the added target start address is used as a target sub-file, thereby generating a target file containing multiple target sub-files, and then completing the upgrade of multiple applications in the micro-control unit at one time according to the target file, thereby improving the upgrade efficiency.

[0112] See also Figure 2 and Figure 3In certain embodiments, the present application further provides an energy storage system 100, and the energy storage system 100 includes an upgrading device 10 of the energy storage system 100 in any of the above embodiments.

[0113] See also Figure 2 and Fig.12 In some embodiments, the present application further provides a computer-readable storage medium 200 on which a computer program 202 is stored, and when the program is executed by a processor, the method in any of the above embodiments is implemented.

[0114] For example, when the computer program 202 is executed by the processor 20, the following method is implemented:

[0115] 01: Get the address allocation table;

[0116] 02: Get multiple upgrade files;

[0117] 04: Process multiple upgrade files according to the address allocation table to obtain multiple target sub-files with target start addresses;

[0118] 06: Generate a target file based on multiple target sub-files; and

[0119] 08: Upgrade the microcontroller unit according to the target file.

[0120] For another example, when the computer program 202 is executed by the processor 20, the following method is implemented:

[0121] 021: Get the preset header allocation table;

[0122] 023: Generate initial files according to the preset software development tools; and

[0123] 025: The initial file is processed according to the preset header allocation table to obtain an upgrade file, and the upgrade file has a preset program identification header.

[0124] For another example, when computer program 202 is executed by processor 20, it can also implement the methods in 011, 013, 041, 07, 071, 073, 075, 077, 08, 081, 0811, 0812, 08121, 08123, 0813, 0814, 0815, 08151, 08153, 0816, 0817 and 0818.

[0125] In the computer-readable storage medium 200 in the present application, the acquired multiple upgrade files are processed according to the acquired address allocation table to obtain multiple target sub-files with target start addresses, and a target file is generated according to the target sub-files, and the micro-control unit is upgraded according to the target file. In the present application, the upgrade file is processed through the address allocation table, so as to add a target start address to each upgrade file, that is, to add a storage address to each upgrade file to ensure that each upgrade file is stored in the corresponding address area, and the upgrade file with the added target start address is used as a target sub-file, thereby generating a target file containing multiple target sub-files, and then completing the upgrade of multiple application programs in the micro-control unit at one time according to the target file, thereby improving the upgrade efficiency.

[0126] In the description of this specification, the descriptions with reference to the terms "certain embodiments", "in an example", "exemplarily", etc., mean that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0127] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0128] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for upgrading an energy storage system, characterized in that: The energy storage system includes a plurality of micro control units, and the upgrading method includes: Get the address allocation table; Get multiple upgrade files; Processing the plurality of upgrade files according to the address allocation table to obtain a plurality of target sub-files with target start addresses; Generate a target file according to the plurality of target sub-files; and The micro control unit is upgraded according to the target file.

2. The upgrading method according to claim 1, characterized in that: The obtaining of multiple upgrade files includes: Get the preset header allocation table; Generate initial files according to the preset software development tools; and The initial file is processed according to the preset header allocation table to obtain the upgrade file, wherein the upgrade file has a preset program identification header.

3. The upgrading method according to claim 2, characterized in that: The plurality of upgrade files are processed according to the address allocation table to obtain a plurality of target sub-files with target start addresses, including: According to the address allocation table, the target start address is added to the preset program identification header of each upgrade file to obtain the target sub-file.

4. The upgrading method according to claim 1, characterized in that: The target file includes a target program identification header, and the target program identification header includes a program name and a program version code. Before upgrading the micro control unit according to the target file, the upgrading method further includes: Determining whether the micro control unit needs to be upgraded according to the program name and the program version code; The step of upgrading the micro control unit according to the target file comprises: When the micro control unit needs to be upgraded, the micro control unit is upgraded according to the target file.

5. The upgrading method according to claim 4, characterized in that: The micro control unit stores a software version code, and determining whether the micro control unit needs to be upgraded according to the program name and the program version code includes: Check whether the program name is consistent with the name of the microcontroller unit; In the case where the program name is consistent with the name of the micro control unit, checking whether the program version code is higher than the software version code; In the case where the program version code is higher than the software version code, determining that the micro control unit needs to be upgraded; and In the case that the program name is inconsistent with the name of the micro control unit, or in the case that the program version code is lower than or equal to the software version code, it is determined that the micro control unit does not need to be upgraded.

6. The upgrading method according to claim 4, characterized in that: The target subfile includes a target subprogram code and a target checksum, and the step of upgrading the microcontroller unit according to the target file includes: Obtaining a first calculated checksum of the first target subfile according to a preset checksum algorithm and the first target subfile; determining whether the first target checksum is valid based on the first calculated checksum and the first target checksum of the first target subfile; and In the case where the first target checksum is valid, the micro control unit is upgraded according to the first target start address and the first target subroutine code.

7. The upgrading method according to claim 6, characterized in that: The determining whether the first target checksum is valid according to the first calculated checksum and the first target checksum of the first target subfile includes: If the first calculated checksum and the first target checksum are consistent, determining that the first target checksum is valid; and In the event that the first calculated checksum and the first target checksum are inconsistent, the first target checksum is determined to be invalid.

8. The upgrading method according to claim 6, characterized in that: After upgrading the micro control unit according to the first target starting address and the first target subroutine code, the upgrading method further comprises: Obtaining a second calculated checksum of the next target subfile according to the preset checksum algorithm and the next target subfile; Determining whether the second target checksum is valid according to the second calculated checksum and a second target checksum of the next target subfile; If the second target checksum is valid, upgrading the micro control unit according to the target start address and the target subroutine code; Repeating the step of performing the checksum algorithm according to the preset checksum algorithm and the next target subfile to obtain a second calculated checksum of the next target subfile, to upgrading the microcontroller unit according to the target starting address and the target subprogram code, and calculating the number of upgrades of the microcontroller unit, until the number of the target subfiles is equal to the number of upgrades of the microcontroller unit; and When the number of the target sub-files is equal to the upgrade times of the micro control unit, an upgrade success message is sent.

9. The upgrading method according to claim 8, characterized in that: The determining whether the second target checksum is valid according to the second calculated checksum and the second target checksum of the next target subfile includes: If the second calculated checksum and the second target checksum are consistent, determining that the second target checksum is valid; and In the event that the second calculated checksum and the second target checksum do not match, the second target checksum is determined to be invalid.

10. The upgrading method according to claim 1, characterized in that: The micro control unit includes a boot program and at least one application program, and the acquiring of the address allocation table includes: The address allocation table is obtained according to the address ranges of the boot program and the application program.

11. An upgrade device for an energy storage system, characterized in that: The upgrading device comprises: Acquisition module: used to obtain the address allocation table and multiple upgrade files; Processing module: used for processing the multiple upgrade files according to the address allocation table to obtain multiple target sub-files with target start addresses; generating a target file according to the multiple target sub-files; and upgrading the micro control unit according to the target file.

12. The upgrading device according to claim 11, characterized in that: The processing module is also used to: According to the address allocation table, the target start address is added to the preset program identification header of each upgrade file to obtain the target sub-file.

13. An energy storage system, characterized in that: The energy storage system comprises the upgrading device according to any one of claims 11-12.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the upgrading method described in any one of claims 1 to 10 is implemented.

Citation Information

Cited By

  • Household energy storage system WIFI control panel

    CN119814746A

  • Industrial and commercial storage system master-slave parallel upgrading method and system

    CN120872382A