A method and system for upgrading an energy storage system
Patent Information
- Application Number
- CN202611507351.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-28
- Publication Date
- 2026-10-30
AI Technical Summary
1、由于集装箱网络隔离,维护人员只能逐一进入各集装箱局域网,本地接入能量交换机逐台升级设备,全站升级工作量大、耗时长;
(1)通过数据交换网关的全站局域网和文件传输服务并行下发程序,解决了集装箱局域网隔离导致能量交换机及其下挂设备无法获取升级程序的问题,实现全站统一升级;
Smart Images

Figure CN123011294A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of energy storage technology for new energy power systems, and in particular to a method and system for upgrading an entire energy storage system. Background Technology
[0002] Energy storage stations typically consist of multiple shipping containers, each containing multiple energy switches. Each energy switch connects to multiple energy hubs, and each energy hub connects to multiple energy network interface cards (NICs) and energy acquisition units. Additionally, each energy switch connects to one energy adapter. The energy switches, energy hubs, energy NICs, energy acquisition units, and energy adapters together constitute the data acquisition and control network of the energy storage system. Their embedded programs require upgrades and maintenance during operation and maintenance.
[0003] For network security reasons, the network between the energy switches in each container is an independent local area network, isolated from the overall station network. The energy switches and their downstream devices cannot directly access the overall station local area network or the external network. Only the upper-level data exchange gateway is located on the overall station local area network and can connect to the external network.
[0004] The existing methods for upgrading the software of energy storage system equipment have the following drawbacks: 1. Due to the isolation of the container network, maintenance personnel can only access the local area network of each container one by one and upgrade the equipment one by one by the local access energy switch, which is a large workload and time-consuming for upgrading the entire station. 2. There are many types of equipment, and the upgrade protocols, data frame formats and packet sizes of different types of equipment are different. Manual upgrades are prone to selecting the wrong program and sending the wrong command. 3. The upgrade program is serially distributed to each device from the maintenance terminal, which cannot utilize the parallel capabilities of the entire network, resulting in low upgrade efficiency.
[0005] Based on this, the present invention provides a method and system for upgrading an entire energy storage system. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides a method and system for upgrading an entire energy storage system. The upgrade program is distributed in parallel to the energy switches of each container via the FTP service of the data exchange gateway. The energy switches automatically identify the program type and issue the corresponding upgrade command to the downstream devices, thereby achieving automatic upgrade of all types of devices across the entire system.
[0007] The technical solution of the present invention to solve the above-mentioned technical problems is as follows: A method for upgrading an entire energy storage system includes the following steps: S1. The data exchange gateway downloads the upgrade program corresponding to each container in parallel to the upgrade file directory of the energy switch of the corresponding container through the file transfer service. S2. The energy exchange performs an upgrade pre-check, scans the upgrade file directory, matches and identifies the upgrade type according to the preset file naming rules, extracts version information from the file name to generate an upgrade version number, and reads the upgrade file to calculate the entire file check value and the total number of data frames. S3, the energy exchanger has entered upgrade mode; S4. The energy switch issues upgrade commands according to the upgrade type, including: If the upgrade type is an energy switch local upgrade, the energy switch will move the upgrade files to the corresponding system directory and restart itself; If the upgrade type is a slave device upgrade, the energy switch generates a three-stage upgrade frame sequence containing a start frame, a data frame, and an end frame according to the protocol corresponding to the device type, and broadcasts it to the slave device via the container LAN; wherein the slave device includes at least one of an energy hub, an energy adapter, an energy network card, or an energy harvesting unit; S5. The start frame carries the upgrade version number, total file length, full file checksum and packet size. After receiving the start frame, the device restarts and enters the boot state. The energy switch divides the upgrade file into frames according to the packet size and sends data frames in sequence according to the sequence number. After all data frames have been sent, the end frame is sent. The device verifies the entire file and then burns it to complete the upgrade. S6. After the equipment upgrade is completed, the energy exchange restarts itself to complete the full station upgrade.
[0008] Furthermore, in S1, the maintenance terminal uploads the upgrade program corresponding to each container to the file transfer service directory of the data exchange gateway. The data exchange gateway establishes a file transfer service connection with the energy switch of each container and downloads the program in parallel. The upgrade file directories of the energy switches of each container are independent of each other. If the upgrade file directory does not exist, the energy switch creates the upgrade file directory.
[0009] Furthermore, the preset file naming rules are as follows: the filename of the energy hub upgrade file includes the hub device type code, date, and version number; the filename of the energy adapter upgrade file includes the model, date, and version number; the filenames of the energy network card upgrade file and the energy acquisition unit upgrade file both include the date and version number; the energy switch upgrade file is an upgrade script file; and the switch configuration upgrade file is a configuration file.
[0010] Furthermore, generating the upgrade version number includes: encoding at least one of the device type identifier, device type code, date, and version number extracted from the file name bit by bit according to the byte length corresponding to the upgrade type to generate the upgrade version number; wherein the byte lengths corresponding to different upgrade types are different.
[0011] Furthermore, the packet size corresponding to the slave device type is set according to the slave device type, and the packet size corresponding to different slave device types satisfies that the packet size of the energy hub is greater than the packet size of the energy acquisition unit.
[0012] Furthermore, the start frame, data frame, and end frame all include a broadcast frame header, a length field, a command field, and a check field; different device types use different command identifiers; the start frame and end frame use the same command identifier and are distinguished by an upgrade flag value; the data frame uses a different data frame command identifier than the start frame.
[0013] Furthermore, after the energy switch sends the start frame, it delays and waits for the device to restart; and for the energy hub, the energy switch retransmits the start frame once during the delay period and extends the delay period for the energy hub; the transmission interval between two adjacent data frames is adjustable.
[0014] Furthermore, the upgrade pre-check includes: prohibiting upgrades and reporting fault codes when the system is in online direct connection operation state; the total number of frames is the total file length divided by the packet size, and if it is not divisible, the quotient is incremented by one; during the data frame transmission process, the upgrade progress is calculated in real time according to the ratio of the number of frames sent to the total number of frames and reported.
[0015] Furthermore, the method also includes fault handling: when the upgrade file cannot be opened, the file type is not supported, or there is no response to the start frame / data frame / end frame, the energy switch sets the corresponding fault code, ends the upgrade, and returns to the idle state; The upgrade file directory is cleared after the upgrade file is read.
[0016] A system for upgrading an entire energy storage system, and a method for upgrading an entire energy storage system as described above, includes a data exchange gateway and multiple containers. Each container is equipped with an energy exchanger, and each energy exchanger has slave devices connected to it. The slave devices include at least one of an energy hub, an energy network card, an energy acquisition unit, and an energy adapter. The network between the energy exchanges in the same container is an independent local area network and is isolated from the overall system network. The data exchange gateway is located in the overall system local area network and is connected to the energy exchanges in each container. The data exchange gateway is used to download the upgrade program corresponding to each container in parallel to the upgrade file directory of the energy switch of the corresponding container through file transfer service, and the download channels of each container are independent of each other. The energy switch is used to scan the upgrade file directory, match upgrade files according to preset file naming rules, determine the upgrade type and generate an upgrade version number based on the file name of the matched upgrade file, and read the upgrade file to calculate the full file checksum and the total number of data frames; enter upgrade mode; issue upgrade commands according to the upgrade type; and restart itself after the upgrade of the slave device is completed.
[0017] In summary, compared with the prior art, the beneficial effects of the above technical solution are: (1) By distributing the program in parallel through the whole-site LAN and file transfer service of the data exchange gateway, the problem that the energy switch and its downstream equipment could not obtain the upgrade program due to the isolation of the container LAN was solved, and the whole-site unified upgrade was realized; (2) The energy exchange automatically identifies the upgrade type and automatically issues the corresponding upgrade command according to the file naming rules, which solves the problem of easy errors when manually upgrading one unit at a time; (3) The three-stage broadcast upgrade frame sequence and whole file CRC check mechanism solves the problems of data errors and missed detections during the upgrade process; (4) Parallel downloading and in-container broadcasting upgrades are performed simultaneously, greatly shortening the overall upgrade time; (5) Using the data exchange gateway as the only external channel, the upgrade files of each container are downloaded in parallel to the local directory of each energy switch via the FTP protocol. Then, within the container LAN, the energy switch acts as an upgrade agent, automatically identifies the device type based on the file name and maps the corresponding frame format and packet size. It sends the "start-data-end" three-stage upgrade frame sequence to the downstream devices via broadcast. The integrity of the data is ensured by using the whole file CRC check, thereby realizing unmanned batch parallel upgrade of all station equipment. Attached Figure Description
[0018] Figure 1 A schematic diagram of the overall architecture of the energy storage system's full-site upgrade system.
[0019] Figure 2 This diagram illustrates the parallel download of upgrade programs for the FTP service of a data exchange gateway.
[0020] Figure 3 This is a schematic diagram illustrating the overall process of the site-wide upgrade method.
[0021] Figure 4 This is a schematic diagram illustrating the specific upgrade instruction frame format and upgrade timing for the three-stage broadcast upgrade. Detailed Implementation
[0022] The principles and features of the present invention are described below with reference to all the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0023] Reference Figures 1-4 This invention discloses a method and system for upgrading an entire energy storage system.
[0024] For ease of description and understanding below, the following terms are explained in this embodiment: Slave devices: These refer to devices connected to the energy switch, including energy hubs, energy network interface cards (NICs), energy harvesting units, and energy adapters. The energy adapters and energy switches have a primary master-slave relationship, meaning the energy adapters are directly connected to the energy switch. The energy NICs and energy harvesting units have a secondary master-slave relationship with the energy switch, meaning they are connected to the energy hub and their data is aggregated and then connected to the energy switch.
[0025] Upgrade type: refers to the category of the object to be upgraded, indicated by the file name of the upgrade file, including switch program, switch configuration, energy hub program, energy adapter program, energy network card program, and energy harvesting unit program.
[0026] Upgrade version number: refers to the version identifier generated by the energy switch after extracting the version information from the file name of the upgrade file and encoding it according to the byte length corresponding to the upgrade type. It is used to announce the upgrade to slave devices during the broadcast upgrade process.
[0027] Online direct connection operation status: This refers to the state where the energy switch has established a direct connection session with the upper-level monitoring or platform, and this session is in the process of real-time data interaction. In this state, the energy switch needs to continuously interact with the upper layer according to real-time control commands. If this is interrupted and the system switches to upgrade mode, real-time control commands will be lost or data acquisition will be interrupted. In this application, the state can be determined by reading the session flag bit in the energy switch that represents the activity of the direct connection session; when the session flag bit is valid and the most recent interaction time has not exceeded a preset active duration threshold, it is determined to be in the online direct connection operation status.
[0028] In a first aspect, embodiments of the present invention disclose a method for upgrading an entire energy storage system, comprising the following steps: S1. The data exchange gateway downloads the upgrade program corresponding to each container in parallel to the upgrade file directory of the energy switch of the corresponding container through the file transfer service. S2. The energy exchange performs an upgrade pre-inspection, scans the upgrade file directory, matches and identifies the upgrade type according to the preset file naming rules, extracts version information from the file name to generate an upgrade version number, and reads the upgrade file to calculate the CRC check value of the entire file and the total number of data frames. S3, the energy exchanger has entered upgrade mode; S4. The energy switch issues upgrade commands according to the upgrade type, including: If the upgrade type is an energy switch local upgrade, the energy switch will move the upgrade files to the corresponding system directory and restart itself; If the upgrade type is a slave device upgrade, the energy switch generates a three-stage upgrade frame sequence containing a start frame, a data frame, and an end frame according to the protocol corresponding to the device type, and broadcasts it to the slave device via the container LAN; wherein the slave device includes at least one of an energy hub, an energy adapter, an energy network card, or an energy harvesting unit; S5. The start frame carries the upgrade version number, total file length, full file checksum and packet size. After receiving the start frame, the device restarts and enters the boot state. The energy switch divides the upgrade file into frames according to the packet size and sends data frames in sequence according to the sequence number. After all data frames have been sent, the end frame is sent. The device verifies the entire file and then burns it to complete the upgrade. S6. After the equipment upgrade is completed, the energy exchange restarts itself to complete the full station upgrade.
[0029] This embodiment utilizes a data exchange gateway located on the local area network of the entire station as the aggregation and distribution node for the upgrade program. Through its file transfer service, the upgrade program corresponding to each container is downloaded in parallel to the energy switch of the corresponding container. The energy switch automatically identifies the upgrade type and generates an upgrade version number based on the file name of the upgrade file, without relying on the pre-set mapping relationship between the device model and the program file on the upper-layer platform. Then, the energy switch generates a three-stage upgrade frame sequence of start frame, data frame, and end frame for the slave device according to the protocol corresponding to the type, and broadcasts it through the container local area network. The slave device completes the upgrade by burning the file after the entire file is verified.
[0030] The following is a detailed explanation of each of the above steps: S1. Upgrade Program Preparation and Parallel Download: The data exchange gateway downloads the upgrade program corresponding to each container in parallel to the upgrade file directory of the corresponding container's energy switch through the file transfer service. Multiple containers download in parallel without affecting each other.
[0031] Specifically, the maintenance terminal uploads the upgrade program corresponding to each container to the file transfer service directory of the data exchange gateway. The data exchange gateway establishes a file transfer connection with the energy switch of each container and downloads the program in parallel. The upgrade file directories of the energy switches of each container are independent of each other. If the upgrade file directory does not exist, the energy switch creates the upgrade file directory.
[0032] The data exchange gateway establishes file transfer connections with the energy switches of each container. In this embodiment, FTP connections are used to download the upgrade programs corresponding to each container in parallel to the upgrade file directory / OTA (Over-The-Air) of the energy switch. Each container has an independent download channel, and the upgrade file directories of the energy switches in each container are independent of each other. Multiple containers can download in parallel without affecting each other, and the download time is independent of the number of containers in the station.
[0033] In one implementation, the data exchange gateway establishes FTP connections with the energy switches of each container in a multi-threaded concurrent manner. The upper limit of the number of concurrent connections can be set according to the outbound bandwidth and FTP service capacity of the data exchange gateway. When the number of containers exceeds the upper limit of the number of concurrent connections, the containers that have not obtained a connection are queued in a preset order, and connections are established in sequence after the existing connections are released.
[0034] If the upgrade file directory does not exist, the energy switch will automatically create it.
[0035] The data exchange gateway runs an FTP (File Transfer Protocol) service, and its FTP service directory is used to aggregate the upgrade programs for each container.
[0036] S2. Upgrade Pre-inspection and File Recognition: The energy switch performs upgrade pre-inspection, scans the upgrade file directory, matches and identifies the upgrade type according to the preset file naming rules, extracts version information from the file name to generate the upgrade version number, and reads the upgrade file to calculate the CRC check value of the entire file and the total number of data frames.
[0037] Specifically, the default file naming rules are as follows: the filename of the energy hub upgrade file includes the hub device type code, date, and version number; the filename of the energy adapter upgrade file includes the model, date, and version number; the filenames of the energy network card upgrade file and the energy acquisition unit upgrade file both include the date and version number; the energy switch upgrade file is an upgrade script file; and the switch configuration upgrade file is a configuration file.
[0038] For example, the file naming rules are as follows: The power hub upgrade file is named "CN_HUB_Device Type Code_Date_Version Number.bin"; The power adapter upgrade file is named "CN_ADP-Model-Date-Version Number.bin"; The power network card upgrade file is named "CN-NIC-date-V version number.bin"; The energy harvesting unit upgrade file is named "CN-TU-date-V version number.bin"; The energy switch upgrade file is the ota.sh script file; The switch configuration upgrade file is the config.ini configuration file.
[0039] S3. The energy exchanger enters upgrade mode. After successful entry, the system working mode will be switched to OTA upgrade mode.
[0040] S4. The energy switch issues upgrade commands according to the upgrade type, including: If the upgrade type is an energy switch local upgrade, the energy switch will move the upgrade files to the corresponding system directory and restart itself; If the upgrade type is a slave device upgrade, the energy switch generates a three-stage upgrade frame sequence containing a start frame, a data frame, and an end frame according to the protocol corresponding to the device type, and broadcasts it to the slave device via the container LAN; wherein the slave device includes at least one of an energy hub, an energy adapter, an energy network card, or an energy acquisition unit.
[0041] Based on the byte length corresponding to the upgrade type, at least one of the device type identifier, device type code, date, and version number extracted from the file name is encoded bitwise to generate the upgrade version number; wherein the byte lengths corresponding to different upgrade types are different.
[0042] The start frame, data frame, and end frame all include a broadcast frame header, length field, command field, and check field; different device types use different command identifiers; the start frame and end frame use the same command identifier and are distinguished by an upgrade flag value; the data frame uses a different data frame command identifier than the start frame.
[0043] S5, Three-stage broadcast upgrade: The start frame carries the upgrade version number, total file length, CRC check value of the entire file, and packet size. After receiving the start frame, the slave device restarts and enters the boot state. The energy exchange divides the upgrade file into frames according to the packet size and sends data frames in sequence according to the sequence number. After all data frames have been sent, the end frame is sent. The slave device checks the CRC of the entire file and then burns it to complete the upgrade.
[0044] Specifically, the packet sizes for each slave device type are different: the packet size for an energy hub is 256 bytes; the packet size for an energy adapter is 200 bytes; the packet size for an energy network card is 256 bytes; and the packet size for an energy harvesting unit is 128 bytes. As can be seen from these values, the packet size for an energy hub is larger than that for an energy harvesting unit. In this embodiment, the packet size is set according to the slave device type, and its value is adapted to the processing capability and the length of a single frame of data that can be received by each slave device type.
[0045] The energy switch sends a start frame and waits for the slave device to restart; for the energy hub, the energy switch retransmits the start frame once during the delay period and extends the delay period for the energy hub; the transmission interval between two adjacent data frames is adjustable.
[0046] The command fields of the start and end frames begin with the device type command identifier, followed by the upgrade flag st, version number VER, file length FLEN, and CRC checksum. st is 0 for the start frame and 1 for the end frame. The number of bytes for the version number and file length for each device type is set according to its protocol: energy hub version number 6 bytes, file length 3 bytes, and a packet length field; energy adapter version number 1 byte, file length 4 bytes; energy network card and energy acquisition unit version number 2 bytes, file length 3 bytes, and a packet size parameter.
[0047] The command field of a data frame begins with the device type data frame command identifier, followed by a 2-byte sequence number SEQ and upgrade data segmented by packet size; the length of the upgrade data for each type of data frame is its packet size; the sequence number SEQ increments from 0, and the length of the last frame data is the remainder of the file length divided by the packet size.
[0048] Other upgrade commands include: hub restart command, used to restart the energy hub; switch program upgrade command, which moves the upgrade script to the system upgrade directory, stores it synchronously, and then writes a restart flag to restart; switch configuration upgrade command, which moves the configuration file to the configuration directory, stores it synchronously, and then writes a restart flag to restart.
[0049] The upgrade sequence is as follows: The energy switch first sends a start frame with st=0, and the slave device restarts and enters the boot state; after a delay, it waits for the device to restart, and the energy hub needs to resend the start frame once before delaying again; then, data frames are sent sequentially according to their sequence numbers, with inter-frame delays; after all data frames have been sent, an end frame with st=1 is sent, and the slave device performs a CRC check on the entire file and burns it after it passes the check; after the energy network card or energy acquisition unit upgrade is completed, a hub restart command is sent to restart the energy hub, and finally, the energy switch is restarted.
[0050] In this embodiment, the three-stage broadcast upgrade process is as follows: First, the general structure of the upgrade command frame is explained. The start frame, data frame, and end frame all adopt a unified frame structure, consisting of a broadcast frame header, a length field, a command field, and a CRC check field. The broadcast frame header is a fixed byte sequence used to identify the broadcast upgrade frame; in this embodiment, it is 5 bytes long. The length field indicates the length of the command field; in this embodiment, it is 2 bytes. The CRC check field calculates the check value against the command field; in this embodiment, it is 2 bytes.
[0051] The command field begins with a command identifier corresponding to the device type. Different device types use different command identifiers; the start and end frames of the same device type use the same command identifier and are distinguished by an escalation flag value st (st = 0 for start frame, st = 1 for end frame); data frames use different command identifiers than the start and end frames.
[0052] (1) Sending the start frame.
[0053] The energy switch sends a start frame. The command field of the start frame begins with the command identifier for the device type, followed by the upgrade flag st (set to 0), the upgrade version number VER, the total file length FLEN, and the CRC checksum of the entire file, along with the packet size parameter. The number of bytes for the version number and the number of bytes for the file length for each device type are set according to their respective protocols: the upgrade version number for the energy hub is 6 bytes, the total file length is 3 bytes, and it carries a packet length field (256 bytes in this embodiment); the upgrade version number for the energy adapter is 1 byte, and the total file length is 4 bytes; the upgrade version number for both the energy network card and the energy acquisition unit is 2 bytes, the total file length is 3 bytes, and it carries a packet size parameter.
[0054] After receiving the start frame, the device restarts and enters the boot state, waiting to receive upgrade data. The energy switch sends the start frame but delays while waiting for the device to complete its restart. It should be noted that, compared to energy adapters, energy network cards, and energy harvesting units, energy hubs perform more functions, have a longer startup process, and require more time to restart and enter the boot state; therefore, for energy hubs, the energy switch retransmits the start frame once during the delay period and extends the delay time for the energy hub.
[0055] In this embodiment, the delay time is 1.5 seconds for the energy adapter, energy network card, and energy acquisition unit; for the energy hub, the start frame is retransmitted after a 1-second interval, and the delay time is extended to 3 seconds. The specific values mentioned above can be adjusted according to the actual startup characteristics of the device.
[0056] (2) Sending data frames.
[0057] The energy switch sends data frames sequentially. The command field of a data frame begins with the data frame command identifier for that device type, followed by a 2-byte frame sequence number (SEQ) and upgrade data segmented by packet size; the length of the upgrade data for each type of data frame is its packet size. The frame sequence number (SEQ) increments from 0; the length of the last data frame is the remainder when the total file length is divided by the packet size.
[0058] Upgrades are prohibited and fault codes are reported when the system is in online direct connection operation; the total number of frames is the total file length divided by the packet size, and the quotient is incremented by one if it is not divisible; during data frame transmission, the upgrade progress is calculated in real time according to the ratio of the number of frames sent to the total number of frames and reported.
[0059] The transmission interval between two adjacent frames is preset to be adjustable. In this embodiment, the default value is 20 milliseconds, and the adjustable range is from 10 milliseconds to 100 milliseconds.
[0060] For each frame sent, the energy switch calculates and updates the upgrade progress according to the ratio of the number of frames sent to the total number of data frames, and periodically reports the upgrade progress.
[0061] (3) Sending and burning the end frame.
[0062] After all data frames have been sent, the energy switch sends an end frame. The command field of the end frame begins with the same device type command identifier as the start frame, the upgrade flag st is set to 1, followed by the same upgrade version number VER, total file length FLEN, and CRC checksum of the entire file as the start frame.
[0063] After receiving the end frame from the device, perform a full file CRC check on the received complete upgrade file; if the check passes, burn the upgrade file to its program storage area to complete the upgrade.
[0064] S6. After the equipment upgrade is completed, the energy exchange restarts itself to complete the full station upgrade.
[0065] Specifically, after the end frame is sent, the energy exchange delays and waits for the slave device to complete the programming.
[0066] If the upgrade type is an energy network interface card (NIC) or energy harvesting unit, the energy switch sends a hub restart command to restart the energy hub, causing it to reload the new programs for its connected NICs and energy harvesting units. In other words, when the upgrade target is a device connected to the energy hub, the energy hub must be restarted first, followed by the energy switch itself. However, when the upgrade target is the energy hub itself, the energy adapter, the switch program, or the switch configuration, a hub restart command is not required; the energy switch can directly restart itself. Afterward, the energy switch writes a restart flag and restarts itself, completing the entire upgrade and setting the upgrade progress to "complete."
[0067] S7. Troubleshooting.
[0068] If, at any stage, the upgrade file cannot be opened or read, the file type of the upgrade file is not supported, or there is no response to any of the start frame, data frame, or end frame, the energy switch sets the corresponding fault code, terminates the upgrade, and returns to the idle state, waiting for the next upgrade task.
[0069] Secondly, this embodiment also provides a system for upgrading an entire energy storage system, used to implement the method for upgrading an entire energy storage system as described in the first aspect.
[0070] A system for upgrading an entire energy storage system includes a data exchange gateway and multiple containers. Each container is equipped with an energy exchanger, and each energy exchanger has slave devices connected to it. The slave devices include at least one of an energy hub, an energy network card, an energy acquisition unit, and an energy adapter. The network between the energy exchanges in the same container is an independent local area network and is isolated from the overall system network. The data exchange gateway is located in the overall system local area network and is connected to the energy exchanges in each container. The data exchange gateway is used to: download the upgrade program corresponding to each container in parallel to the upgrade file directory of the energy switch of the corresponding container through a file transfer service, with the download channels of each container being independent of each other; The energy switch is used to: scan the upgrade file directory, match upgrade files according to preset file naming rules, determine the upgrade type and generate an upgrade version number based on the file name of the matched upgrade file, and read the upgrade file to calculate the full file checksum and the total number of data frames; enter upgrade mode; issue upgrade commands according to the upgrade type; and restart itself after the upgrade of the slave device is completed.
[0071] Among them, issuing upgrade commands according to upgrade type includes: In response to upgrade types of switch program or switch configuration, the energy switch will move the upgrade files to the corresponding system directory and then restart itself. In response to an upgrade type of slave device, the energy switch divides the upgrade file into multiple data frames according to the packet size corresponding to that slave device type, and generates a three-stage upgrade frame sequence including a start frame, multiple data frames, and an end frame according to the command identifier corresponding to that slave device type, and broadcasts it to the slave device via the local area network of the container to which it belongs. The start frame carries the upgrade version number, the total length of the upgrade file, the full file checksum, and the packet size. After receiving the start frame, the slave device restarts and enters the boot state. Multiple data frames are sent sequentially according to their frame numbers, and the slave device writes them sequentially according to their frame numbers. After all data frames have been sent, the energy exchange sends an end frame. The slave device performs a full file check on the received complete upgrade file. If the check passes, the file is burned to complete the upgrade. Different slave device types correspond to different command identifiers. The start frame and the end frame use the same command identifier and are distinguished by different upgrade flag values. The data frame uses a command identifier that is different from the start frame and the end frame.
[0072] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for upgrading an entire energy storage system, characterized in that, Includes the following steps: S1. The data exchange gateway downloads the upgrade program corresponding to each container in parallel to the upgrade file directory of the energy switch of the corresponding container through the file transfer service. S2. The energy exchange performs an upgrade pre-check, scans the upgrade file directory, matches and identifies the upgrade type according to the preset file naming rules, extracts version information from the file name to generate an upgrade version number, and reads the upgrade file to calculate the entire file check value and the total number of data frames. S3, the energy exchanger has entered upgrade mode; S4. The energy exchange issues upgrade commands according to the upgrade type, including: If the upgrade type is an energy switch local upgrade, the energy switch will move the upgrade files to the corresponding system directory and restart itself; If the upgrade type is a slave device upgrade, the energy switch generates a three-stage upgrade frame sequence containing a start frame, a data frame, and an end frame according to the protocol corresponding to the device type, and broadcasts it to the slave device via the container LAN; wherein the slave device includes at least one of an energy hub, an energy adapter, an energy network card, or an energy harvesting unit; S5. The start frame carries the upgrade version number, total file length, full file checksum and packet size. After receiving the start frame, the device restarts and enters the boot state. The energy switch divides the upgrade file into frames according to the packet size and sends data frames in sequence according to the sequence number. After all data frames have been sent, the end frame is sent. The device verifies the full file checksum and then burns the upgrade to complete the upgrade. S6. After the equipment upgrade is completed, the energy exchange restarts itself to complete the full station upgrade.
2. The method for upgrading an entire energy storage system according to claim 1, characterized in that: In S1, the maintenance terminal uploads the upgrade program corresponding to each container to the file transfer service directory of the data exchange gateway. The data exchange gateway establishes a file transfer service connection with the energy switch of each container and downloads the program in parallel. The upgrade file directories of the energy switches of each container are independent of each other. If the upgrade file directory does not exist, the energy switch creates the upgrade file directory.
3. The method for upgrading an entire energy storage system according to claim 1, characterized in that, The preset file naming rule is as follows: the file name of the energy hub upgrade file includes the hub device type code, date, and version number; The filenames of energy adapter upgrade files include the model number, date, and version number; the filenames of energy network card upgrade files and energy acquisition unit upgrade files both include the date and version number; energy switch upgrade files are upgrade script files; and switch configuration upgrade files are configuration files.
4. The method for upgrading an entire energy storage system according to claim 1, characterized in that: The process of generating the upgrade version number includes: encoding at least one of the device type identifier, device type code, date, and version number extracted from the file name according to the byte length corresponding to the upgrade type, and generating the upgrade version number; wherein the byte lengths corresponding to different upgrade types are different.
5. The method for upgrading an entire energy storage system according to claim 1, characterized in that: The packet size corresponding to the slave device type is set according to the slave device type, and the packet size corresponding to different slave device types satisfies the following condition: the packet size of the energy hub is greater than the packet size of the energy harvesting unit.
6. The method for upgrading an entire energy storage system according to claim 1, characterized in that: The start frame, data frame, and end frame all include a broadcast frame header, a length field, a command field, and a check field; different device types use different command identifiers; the start frame and end frame use the same command identifier and are distinguished by an upgrade flag value; the data frame uses a different data frame command identifier than the start frame.
7. The method for upgrading an entire energy storage system according to claim 1, characterized in that: After the energy switch sends the start frame, it delays and waits for the device to restart; and for the energy hub, the energy switch retransmits the start frame once during the delay period and extends the delay period for the energy hub; the transmission interval between two adjacent data frames is adjustable.
8. A method for upgrading an entire energy storage system according to claim 1, characterized in that, The upgrade pre-check includes: prohibiting upgrades and reporting fault codes when the system is in online direct connection operation state; the total number of frames is the total file length divided by the packet size, and if it is not divisible, the quotient is incremented by one; during the data frame transmission process, the upgrade progress is calculated in real time according to the ratio of the number of frames sent to the total number of frames and reported.
9. A method for upgrading an entire energy storage system according to claim 1, characterized in that: The method also includes fault handling: when the upgrade file cannot be opened, the file type is not supported, or there is no response to the start frame / data frame / end frame, the energy switch sets the corresponding fault code, ends the upgrade and returns to the idle state. The upgrade file directory is cleared after the upgrade file is read.
10. A system for upgrading an entire energy storage system, used to implement a method for upgrading an entire energy storage system as described in any one of claims 1-9, characterized in that, The system includes a data exchange gateway and multiple containers. Each container is equipped with an energy exchanger. Each energy exchanger has slave devices connected to it. The slave devices include at least one of an energy hub, an energy network card, an energy acquisition unit, and an energy adapter. The network between the energy exchanges in the same container is an independent local area network and is isolated from the overall station network. The data exchange gateway is located in the overall station local area network and connects to the energy exchanges in each container. The data exchange gateway is used to download the upgrade program corresponding to each container in parallel to the upgrade file directory of the energy switch of the corresponding container through file transfer service, and the download channels of each container are independent of each other. The energy exchange is used to scan the upgrade file directory, match upgrade files according to preset file naming rules, determine the upgrade type and generate an upgrade version number based on the file name of the matched upgrade file, and read the upgrade file to calculate the full file check value and the total number of data frames. Enter upgrade mode; Issue upgrade commands according to upgrade type; And, it will restart itself after the device upgrade is complete.
