Updating method for batch updating control program of combiner box
By adopting energy management control units and the Xmodem protocol in new energy power systems, combined with SN code and CRC verification, batch and stable program updates of combiner box controllers have been achieved, solving the problems of long time consumption and high operation and maintenance costs in existing technologies, and improving the operation efficiency and equipment stability of new energy power plants.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XINJIANG HUADIAN TIANSHAN POWER GENERATION CO LTD
- Filing Date
- 2026-03-20
- Publication Date
- 2026-07-21
AI Technical Summary
The program updates for combiner box controllers in existing new energy power systems suffer from problems such as long processing time, high operation and maintenance costs, susceptibility to interference, lack of batch processing capabilities and unified management mechanisms, resulting in low power plant operating efficiency and poor equipment stability.
An energy management control unit is used to connect multiple combiner box controllers via an RS485 bus. Communication addresses are dynamically allocated using SN codes, and the connectivity status is detected in real time through polling. Batch upgrades are performed based on a queuing upgrade mechanism and the Xmodem protocol. Combined with CRC check and breakpoint resume mechanism, program updates are achieved.
It enables batch, stable, and real-time program updates, reduces operation and maintenance costs, improves upgrade efficiency, avoids data loss and equipment failure, and ensures system stability and reliability.
Smart Images

Figure CN122431693A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of energy storage device program control technology, specifically to an update method for batch updating the combiner box controller program. Background Technology
[0002] In new energy power systems equipped with photovoltaic power plants, energy storage stations, and other equipment, the combiner box controller is a core device responsible for key functions such as maximum power point tracking, power collection, and status monitoring. The stability and timeliness of its program directly affect the power generation efficiency and operational safety of the entire new energy power system. With the rapid development of the new energy industry, the number of combiner box controllers in a single power plant often reaches dozens or even hundreds, and they are mostly distributed outdoors or in remote areas, making program updates and maintenance extremely inconvenient.
[0003] Currently, the program updates for combiner box controllers in traditional new energy power systems mainly suffer from the following problems: First, traditional methods require on-site connection operations for each combiner box controller. When there are many devices, a single upgrade can take several hours or even days, severely impacting the operational efficiency of the power plant. Some remote upgrade solutions only support single-device operation and lack batch processing capabilities, failing to meet the maintenance needs of large-scale power plants. Second, combiner box controllers are mostly connected via RS485 bus. If upgrade commands are initiated for multiple devices simultaneously, it can easily lead to bus data conflicts, causing problems such as data packet loss and verification failures. Furthermore, troubleshooting requires manual inspection of each device, resulting in high maintenance costs. Third, data packet transmission is susceptible to electromagnetic interference in the industrial environment. Existing technologies often employ simple verification mechanisms, which are difficult to handle complex interference scenarios, leading to a high rate of upgrade packet corruption and even risks such as device crashes and functional abnormalities. Fourth, the lack of real-time progress feedback during the upgrade process makes it impossible to intuitively judge the device upgrade status. When anomalies occur, timely intervention is difficult, requiring post-event log backtracking, which increases the fault handling cycle. Fifth, the upgrade protocols and address allocation methods of different models of combiner box controllers are different. Existing solutions are mostly customized for specific models and lack a unified device management mechanism. When adding new devices, it is necessary to redevelop the adaptation module, which results in high adaptation costs.
[0004] Therefore, in order to address the above problems, there is an urgent need for an update method that can achieve batch, stable, and real-time monitoring to overcome the shortcomings of existing technologies. Summary of the Invention
[0005] To overcome the shortcomings of the prior art, this application provides an update method for batch updating of combiner box controller programs, specifically adopting the following technical solution:
[0006] A method for batch updating the program of combiner box controllers, the method being used to update the program of an update device consisting of multiple combiner box controllers connected via an RS485 bus with an energy management control unit as the main control node, the method comprising: The energy management control unit acquires the device information and target upgrade package of the connected combiner box controller; the device information includes the device name, serial number, and bound serial port. The energy management control unit uses an SN code dynamic allocation method to assign communication addresses to the connected combiner box controller and polls the combiner box controller in real time to detect its connectivity status; the connectivity status includes offline status and online status; The energy management control unit performs batch upgrade scheduling and establishes communication for the first combiner box controller cluster based on a queuing upgrade mechanism; the first combiner box controller cluster is a collection of combiner box controllers that are online and awaiting upgrade. When the energy management control unit and the combiner box controller establish communication, the energy management control unit transmits the target upgrade package to the combiner box controller based on the Xmodem protocol.
[0007] Optionally: When the energy management control unit obtains the device information of the connected combiner box controller, it adds the device information of the combiner box controller to the device list of the energy management control unit by manual input or importing from an Excel template.
[0008] Optionally: The energy management control unit uses a dynamic SN code allocation method to assign communication addresses to the connected combiner box controller, including: The energy management control unit sends allocation information, including the SN code and the corresponding address, to the RS485 bus via a broadcast command; The combiner box controller matches the SN code based on the allocation information and automatically updates the communication address.
[0009] Optionally: The energy management control unit continuously polls and detects the connectivity status of the combiner box controller, including: The energy management control unit detects the connectivity status of the combiner box controller by address polling at preset time intervals; The combiner box controller that returns a response frame within a preset time is marked as online; If a combiner box controller does not return a response frame within a preset time, the connectivity status of the combiner box controller will be repeatedly checked. When the number of repeated detections reaches a preset threshold, the corresponding combiner box controller is marked as offline. The device list of the energy management control unit is updated based on the detected connectivity status of the combiner box controller.
[0010] Optionally: When the energy management control unit performs batch upgrade scheduling of the first combiner box controller cluster based on the queuing upgrade mechanism, the energy management control unit simultaneously publishes the target upgrade package to the RS485 bus. At the same time, only one combiner box controller is allowed to occupy the corresponding RS485 bus for upgrade data transmission among the combiner box controllers connected to a single RS485 bus. And when the previous combiner box controller has been upgraded, the next combiner box controller is started according to the preset interval.
[0011] Optionally: The energy management control unit transmits the target upgrade package to the combiner box controller based on the Xmodem protocol, including: The energy management control unit sends an upgrade command to the target combiner controller of the first combiner controller cluster; Upon receiving the upgrade command, the combiner box controller enters the boot loading mode, and simultaneously sends a CRC verification request to the energy management control unit. If the CRC check passes, the energy management control unit divides the target upgrade package into several sub-upgrade packages with a preset byte length; each sub-upgrade package includes an SOH header, a package sequence number, a sequence number complement, a data area, and a CRC check bit; The energy management control unit sequentially transmits the sub-upgrade package to the combiner box controller.
[0012] Furthermore: After each sub-upgrade package is transmitted, the combiner box controller performs a first verification process on the sub-upgrade package: if the current sub-upgrade package is successfully verified, the transmission of the next sub-upgrade package is started; if the current sub-upgrade package fails to be verified, the current sub-upgrade package is retransmitted, and when the number of retransmissions reaches a preset threshold, the upgrade process of the combiner box controller is terminated and marked as upgrade failure.
[0013] Furthermore: After all the sub-upgrade packages have been transmitted, a second verification process is also included: The energy management control unit sends a first control character to the combiner box controller, the first control character being used to send a transmission end signal to the combiner box controller; After receiving the first control character, the combiner box controller will return a second control character to the energy management control unit. The second control character is used to confirm that the combiner box controller has finished receiving the control character. The combiner box controller performs a full packet verification on all received sub-upgrade packets: if the full packet verification is successful, the combiner box controller exits the bootloader mode; if the full packet verification fails, the combiner box controller returns an error frame to the energy management control unit.
[0014] Furthermore: when the energy management control unit sequentially transmits the sub-upgrade package to the combiner box controller, it also includes a breakpoint resume mechanism: When the transmission of the target data packet is interrupted, the combiner box controller automatically saves the received sub-upgrade packets and identifies the identification information of the latest received sub-upgrade packet. The identification information includes at least the SOH header, packet sequence number, and sequence number complement. In the event that the target data packet transmission is restored, the energy management control unit determines the subsequent sub-upgrade packet based on the identification information of the received sub-upgrade packet; The energy management control unit sequentially transmits subsequent sub-upgrade packages to the combiner box controller.
[0015] Furthermore: The energy management control unit is equipped with a visual interface, which is used to update and display the upgrade progress of different combiner box controllers in real time in the form of percentage. The visual interface includes at least the device name, SN code, upgrade status and progress bar. The upgrade status includes waiting for upgrade, upgrading in progress, upgrade successful and upgrade failed.
[0016] The technical solution of this application achieves the following beneficial effects: The update method described in this application can add device information in batches and, in conjunction with a dynamic address allocation mechanism based on serial number (SN) codes, eliminates the tedious manual configuration of each device. Furthermore, it employs a queuing upgrade mechanism for devices connected to the same RS485 bus, ensuring orderly upgrades and effectively avoiding bus communication conflicts. This significantly reduces the time required for batch updates of multiple devices, adapting to the operation and maintenance needs of large-scale new energy power plants. Based on the Xmodem protocol, this method divides upgrade packets into several sub-upgrade packages with a fixed byte length. Combined with CRC verification, retransmission mechanisms, and breakpoint resumption functionality, it effectively resists electromagnetic interference in industrial environments, preventing data packet loss or corruption. Simultaneously, a three-level verification process—data packet CRC verification, whole packet verification, and write-readback verification—further ensures the integrity of the upgrade package, significantly reducing the upgrade failure rate and eliminating risks such as device crashes and malfunctions. Attached Figure Description
[0017] Figure 1 This is a flowchart of the update method for batch updating the combiner box controller program in an embodiment of this application.
[0018] Figure 2 This is a schematic diagram of the system deployment and hardware connection of the updating device in the embodiments of this application.
[0019] Figure 3 This is a schematic diagram illustrating the batch addition and management of devices in an embodiment of this application.
[0020] Figure 4 This is a schematic diagram of the upgrade package configuration in an embodiment of this application.
[0021] Figure 5 This is a schematic diagram illustrating the upgrade release and execution process in the embodiments of this application. Detailed Implementation
[0022] The present application will now be further described with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present application and should not be construed as limiting the scope of protection of the present application. It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present application.
[0023] Specifically, such as Figure 1 As shown, this embodiment discloses an update method for batch updating the program of a combiner box controller. This method is used by an update device formed by the energy management control unit and the combiner box controller to perform program updates, such as... Figure 2 As shown, this update device uses an energy management control unit as the main control node and multiple combiner box controllers as controlled devices. Each combiner box controller has a unique serial number (SN), and the multiple combiner box controllers are connected to the energy management control unit via an RS485 bus. For example, the hardware parameters of the energy management control unit used in this embodiment are as follows: it adopts an ARM core platform, has 512MB of DDR4 memory and 32GB of eMMC storage, and has 10 isolated RS485 interfaces and 4 Ethernet interfaces, and supports AC 220V and DC 9-36V power supply.
[0024] The energy management control unit connects to the host computer via Ethernet communication. For example, the Ethernet interface of the energy management control unit can be connected to a router via a network cable. The host computer is preferably a computer connected to the same router network, and the computer's IP address is ensured to be on the same network segment as the energy management control unit.
[0025] Specifically, the method described above in this embodiment includes: First, the energy management control unit needs to obtain the device information and target upgrade package of the connected combiner box controller.
[0026] When obtaining device information for the connected combiner box controller, the device information can be added to the device list of the energy management control unit by manual input or importing from an Excel template. This device information includes the device name, serial number (SN), and bound serial port. The SN is typically 8-16 characters long and is stored in the combiner box controller.
[0027] As one implementation method, combined with Figure 3As shown, in this embodiment, the IP address of the corresponding energy management control unit can be entered into the browser of a computer, and the background operation interface of the corresponding energy management control unit can be logged in. The device information of each combiner box controller can be imported by manually entering the device information of each combiner box controller in the device list and saving it. At this time, the device list displays the device information of the newly added combiner box controller, and the initial state is offline.
[0028] As another implementation method, combined with Figure 3 As shown, in this embodiment, the device information of each combiner box controller is first filled into an Excel template file according to the prescribed format. Then, the IP address of the corresponding energy management control unit is entered into the computer's browser, and the background operation interface of the corresponding energy management control unit is logged in. The filled Excel template file is then uploaded to the energy management control unit. At this time, the energy management control unit will automatically import the device information of each combiner box controller according to the Excel template file. The device list displays the device information of the newly added combiner box controllers, and the initial status is also offline. In this process, the device information is imported in batches through the Excel template, which can save the tedious operation of manually entering it one by one.
[0029] Furthermore, such as Figure 4 As shown, in this embodiment, the target upgrade package obtained by the energy management control unit can be uploaded through the upgrade management module of the energy management control unit. Generally, the target upgrade package is imported into the upgrade management module of the energy management control unit via a computer. During the import process, upgrade package information can be filled in, including name, upgrade content, version number, and the corresponding upgrade package file can be selected. After successful upload, the target upgrade package will be displayed in the upgrade list of the upgrade management module. In this embodiment, the target upgrade package preferably adopts the bin format, which contains program image, version information (major version, minor version, revision number) and the entire package SHA256 checksum, and the size is ≤32MB to adapt to the storage unit of the energy management control unit, such as a 32GBeMMC storage area, which supports the retention of historical versions for more than 3 months.
[0030] Subsequently, in this embodiment, the energy management control unit uses the SN code dynamic allocation method to assign communication addresses to the connected combiner box controller and polls the combiner box controller in real time to detect the connectivity status; wherein the connectivity status includes offline status and online status.
[0031] Specifically, the process of allocating a communication address to the combiner box controller using the SN code dynamic allocation method in this embodiment includes: The energy management control unit assigns a communication address to each combiner box controller based on its unique serial number (SN) code, and then generates a broadcast command, such as address 0xFF and function code 0x03, which sends the assignment information containing the SN code and the corresponding address to the RS485 bus.
[0032] The combiner box controller automatically matches the SN code and updates the communication address based on the allocation information transmitted by the RS485 bus. The communication address range is 0x01-0xFE, which can solve the problem of address conflicts between multiple devices.
[0033] Based on the dynamic address allocation mechanism of the aforementioned SN code, this embodiment can support the mixed connection of different models of combiner box controllers in the same system without the need to customize an adaptation scheme for a specific model. The system can be quickly connected through the batch import function, reducing the technical threshold and cost of system expansion.
[0034] Furthermore, in combination Figure 3 As shown, the energy management control unit in this embodiment will poll and detect the connectivity status of the combiner box controller in real time. The process includes: The energy management control unit checks the connectivity status of the combiner box controller by polling the address at preset time intervals; for example, in this embodiment, the energy management control unit sends function code 0x01 every 5 seconds to the corresponding communication address of the combiner box controller stored in the device list.
[0035] Generally, within a preset time, the combiner box controller should return a response frame. The energy management control unit will mark the combiner box controller that returns a response frame as online. If the combiner box controller does not return a response frame within the preset time, the energy management control unit will repeatedly check the connectivity status of the combiner box controller. Once the number of repeated checks reaches a preset threshold, for example, if there is no response for 3 consecutive times in this embodiment, the corresponding combiner box controller will be marked as offline.
[0036] Based on the above process, the device list of the energy management control unit is updated in real time according to the connectivity status of the detected combiner box controllers. When updating the device list, the energy management control unit records the current status of each combiner box controller in detail, including whether it is online or offline, and its corresponding communication address. This real-time synchronization mechanism ensures the accuracy and timeliness of the device list, allowing the energy management control unit to monitor the operating status of all combiner box controllers in real time, thus ensuring successful batch upgrades in the future.
[0037] Next, in this embodiment, the energy management control unit will perform batch upgrade scheduling and establish communication for the first combiner box controller cluster based on a queuing upgrade mechanism; wherein the first combiner box controller cluster is a collection of combiner box controllers that meet the online status requirements and are to be upgraded. In this embodiment, when the energy management control unit needs to issue upgrade packages to multiple combiner box controllers in batches, it can first select the target upgrade package and filter the combiner box controllers to be upgraded according to their online status or serial port grouping, etc., to form the first combiner box controller cluster.
[0038] Furthermore, when the energy management control unit of this embodiment performs batch upgrade scheduling for the first combiner box controller cluster, the energy management control unit simultaneously publishes the target upgrade package to the RS485 bus. At any given time, only one combiner box controller connected to a single RS485 bus is allowed to occupy the corresponding RS485 bus for upgrade data transmission. Moreover, after the previous combiner box controller completes its upgrade, the upgrade process of the next combiner box controller is started according to a preset interval. For example, through a bus lock control mechanism, only one combiner box controller occupies the bus at any given time, and after the previous device completes its transmission, the next combiner box controller is started for upgrade data transmission after an interval of 500ms.
[0039] The above method effectively avoids data conflicts caused by multiple combiner box controllers simultaneously occupying the RS485 bus, prevents communication congestion caused by simultaneous upgrades, reduces unnecessary waiting time, significantly improves upgrade efficiency in multi-device scenarios, and ensures the stability and reliability of the upgrade process. At the same time, the preset interval setting provides the system with sufficient buffer time to cope with possible abnormal situations, thereby further improving the stability of the upgrade process.
[0040] Finally, based on the above-described batch upgrade scheduling process, this embodiment enables the energy management control unit and the online combiner box controller to establish communication respectively. With the energy management control unit and the combiner box controller having established communication, the energy management control unit transmits the target upgrade package to the combiner box controller respectively based on the Xmodem protocol.
[0041] Specifically, such as Figure 5 As shown, the specific transmission process of the Xmodem protocol in this embodiment is as follows: The energy management control unit first sends an upgrade command to the combiner controller to be upgraded in the first combiner controller cluster. For example, the upgrade command is address 0xFF + function code 0x02.
[0042] Upon receiving the upgrade command, the combiner box controller will enter the bootloader mode, and simultaneously send a CRC check request to the energy management control unit.
[0043] After the CRC check passes, the energy management control unit will divide the target upgrade package into several sub-upgrade packages. Each sub-upgrade package includes a SOH header, packet sequence number, sequence number complement, data area, and CRC check bits. Each sub-upgrade package uses a preset byte length. For example, in this embodiment, data packets are transmitted in units of 128 bytes. At this time, the structure of a single sub-upgrade package is: 1 byte SOH (0x01) + 1 byte packet sequence number (cyclically from 0x01) + 1 byte sequence number complement (0xFF - packet sequence number) + 128 bytes of data + 2 bytes of CRC16 check bits (calculated using polynomials, for example...). ).
[0044] Finally, the energy management control unit will transmit all sub-upgrade packages of the target upgrade package to the combiner box controller in sequence.
[0045] In a preferred embodiment, after each sub-upgrade package is transmitted, the energy management control unit waits for a response, for example, a response time of 10 seconds. Within 10 seconds, the combiner box controller returns a verification result. At this time, the corresponding combiner box controller performs a first verification process on each received sub-upgrade package. This first verification process ensures the integrity and accuracy of each sub-upgrade package during transmission, guaranteeing that each sub-upgrade package is transmitted correctly to the combiner box controller, laying a reliable foundation for subsequent upgrade operations. Specifically, this first verification process is as follows: If the current sub-upgrade package verification is successful, the combiner box controller will return an ACK control character (acknowledgment acknowledgment character) to the energy management control unit, indicating that the sub-upgrade package has been successfully verified and the transmission of the next sub-upgrade package can begin. If the current sub-upgrade package verification fails, the combiner box controller will return a NAK control character (negative acknowledgment character) to the energy management control unit, indicating that the sub-upgrade package verification has failed and the current sub-upgrade package needs to be retransmitted. Furthermore, in this embodiment, if the number of retransmissions reaches a preset threshold in the event of a sub-upgrade package verification failure, the combiner box controller's upgrade process will be terminated and marked as an upgrade failure. For example, if a maximum of 10 transmissions fail to verify successfully, the current combiner box controller upgrade will be terminated. At this time, the energy management control unit will mark the corresponding combiner box controller as an upgrade failure and record the error code.
[0046] Furthermore, in this embodiment, after all sub-upgrade packages have been transmitted, a second verification process is required. This second verification process ensures the overall integrity and accuracy of all sub-upgrade packages in the target upgrade package, preventing errors in the target upgrade package as a whole during transmission, thereby ensuring that the entire upgrade package can be used completely and correctly for upgrading the combiner box controller. Specifically, the second verification process involves the combiner box controller combining all received sub-upgrade packages according to preset rules and comparing them with the complete upgrade package verification code pre-stored in the controller. If the comparison results match, the second verification is successful, and the combiner box controller can officially enter the upgrade operation phase; if the comparison results do not match, the second verification fails, and the energy management control unit needs to restart the sub-upgrade package transmission process and re-transmit all sub-upgrade packages and perform subsequent verification operations. Specifically, the second verification process is as follows: First, the energy management control unit sends a first control character to the combiner box controller, which is used to send a transmission end signal to the combiner box controller.
[0047] After receiving the first control character, the combiner box controller will return a second control character to the energy management control unit. This second control character is used to confirm that the combiner box controller has finished receiving the data.
[0048] The combiner box controller then performs a full packet verification on all received sub-upgrade packets, such as a full packet SHA256 verification. If the full packet verification is successful, the combiner box controller exits the bootloader mode and jumps to the user program; if the full packet verification fails, the combiner box controller returns an error frame to the energy management control unit.
[0049] In this embodiment, the Xmodem protocol is used for program packet transmission, and combined with CRC check and retransmission mechanism, errors in the data transmission process can be effectively identified and corrected. Furthermore, this embodiment forms a three-level verification guarantee by using the first verification process to verify individual sub-upgrade packages, using the second verification process to verify the entire package, and combining the controller's own Flash write-back verification process. This further ensures the integrity of the program packet, reduces the risk of upgrade failure due to data corruption, and ensures stable controller upgrades.
[0050] Furthermore, in this embodiment, the energy management control unit also has a breakpoint resume mechanism when sequentially transmitting the sub-upgrade package to the combiner box controller. The process is as follows: When the transmission of the target data packet is interrupted, such as in the event of communication interruption or power failure, the combiner box controller will automatically save the received sub-upgrade packets. After the combiner box controller restarts, it will automatically identify the identification information of the latest received sub-upgrade packet, which includes at least the SOH header, packet sequence number, and sequence number complement.
[0051] When the target data packet transmission is restored, the energy management control unit can determine the sub-upgrade packet that the combiner box controller has received based on the identification information of the received sub-upgrade packet, and continue to transmit from the next subsequent sub-upgrade packet.
[0052] At this point, the energy management control unit can continue to transmit subsequent sub-upgrade packages sequentially to the combiner box controller without having to resend them from the beginning, which can greatly improve transmission efficiency and ensure that the upgrade process is fast and stable.
[0053] Furthermore, in this embodiment, a visualization interface is configured in the energy management control unit. The visualization interface is used to update and display the upgrade progress of different combiner box controllers in real time in the form of percentages. The visualization interface includes at least the device name, SN code, upgrade status and progress bar, and the upgrade status includes waiting for upgrade, upgrading in progress, upgrade successful and upgrade failed.
[0054] It should be noted that in this embodiment, abnormal situations such as verification failure or transmission failure can be displayed intuitively through a visual interface. For example, if the upgrade of a combiner box controller fails, the upgrade details page of the visual interface will display the "upgrade failed" status. At this time, the corresponding combiner box controller can be found through the visual interface, and the "retry" button on the interface can be clicked. The energy management control unit will restart the upgrade process of the combiner box controller and continue to transmit data based on the Xmodem protocol.
[0055] This embodiment allows for real-time monitoring of the device's online status, upgrade progress, and upgrade results through the aforementioned visual interface. This enables maintenance personnel to intuitively grasp the upgrade situation, promptly identify and handle anomalies, and supports one-click retry after an upgrade failure through the visual interface, eliminating the need to reconfigure parameters and reducing manual intervention costs and operational complexity.
[0056] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0057] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0058] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components may be combined, or integrated into another device, or some features may be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0059] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0060] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0061] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0062] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a device (which may be a terminal or platform, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0063] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for batch updating the combiner box controller program, characterized in that, The method is used to update the program of an update device formed by connecting multiple combiner box controllers via an RS485 bus with an energy management control unit as the main control node. The method includes: The energy management control unit acquires the device information and target upgrade package of the connected combiner box controller; the device information includes the device name, serial number, and bound serial port. The energy management control unit uses an SN code dynamic allocation method to assign communication addresses to the connected combiner box controller and polls the combiner box controller in real time to detect its connectivity status; the connectivity status includes offline status and online status; The energy management control unit performs batch upgrade scheduling and establishes communication for the first combiner box controller cluster based on a queuing upgrade mechanism; the first combiner box controller cluster is a collection of combiner box controllers that are online and awaiting upgrade. When the energy management control unit and the combiner box controller establish communication, the energy management control unit transmits the target upgrade package to the combiner box controller based on the Xmodem protocol.
2. The update method for batch updating the combiner box controller program according to claim 1, characterized in that, When the energy management control unit obtains the device information of the connected combiner box controller, it adds the device information of the combiner box controller to the device list of the energy management control unit by manual input or importing from an Excel template.
3. The update method for batch updating the combiner box controller program according to claim 1, characterized in that, The energy management control unit uses a dynamic SN code allocation method to assign communication addresses to the connected combiner box controller, including: The energy management control unit sends allocation information, including the SN code and the corresponding address, to the RS485 bus via a broadcast command; The combiner box controller matches the SN code based on the allocation information and automatically updates the communication address.
4. The update method for batch updating the combiner box controller program according to claim 1, characterized in that, The energy management control unit continuously polls and monitors the connectivity status of the combiner box controller, including: The energy management control unit detects the connectivity status of the combiner box controller by address polling at preset time intervals; The combiner box controller that returns a response frame within a preset time is marked as online; If a combiner box controller does not return a response frame within a preset time, the connectivity status of the combiner box controller will be repeatedly checked. When the number of repeated detections reaches a preset threshold, the corresponding combiner box controller is marked as offline. The device list of the energy management control unit is updated based on the detected connectivity status of the combiner box controller.
5. The update method for batch updating the combiner box controller program according to claim 1, characterized in that, When the energy management control unit performs batch upgrade scheduling of the first combiner box controller cluster based on the queuing upgrade mechanism, the energy management control unit simultaneously publishes the target upgrade package to the RS485 bus. At the same time, only one combiner box controller connected to a single RS485 bus is allowed to occupy the corresponding RS485 bus for upgrade data transmission. And when the previous combiner box controller has been upgraded, the next combiner box controller is started according to the preset interval.
6. The update method for batch updating the combiner box controller program according to claim 1, characterized in that, The energy management control unit transmits the target upgrade package to the combiner box controller based on the Xmodem protocol, including: The energy management control unit sends an upgrade command to the target combiner controller of the first combiner controller cluster; Upon receiving the upgrade command, the combiner box controller enters the boot loading mode, and simultaneously sends a CRC verification request to the energy management control unit. If the CRC check passes, the energy management control unit divides the target upgrade package into several sub-upgrade packages with a preset byte length; each sub-upgrade package includes an SOH header, a package sequence number, a sequence number complement, a data area, and a CRC check bit; The energy management control unit sequentially transmits the sub-upgrade package to the combiner box controller.
7. The update method for batch updating the combiner box controller program according to claim 6, characterized in that, After each sub-upgrade package is transmitted, the combiner box controller performs a first verification process on the sub-upgrade package: if the current sub-upgrade package is successfully verified, the transmission of the next sub-upgrade package is started; if the current sub-upgrade package fails to be verified, the current sub-upgrade package is retransmitted, and when the number of retransmissions reaches a preset threshold, the upgrade process of the combiner box controller is terminated and marked as upgrade failure.
8. The update method for batch updating the combiner box controller program according to claim 7, characterized in that, After all the sub-upgrade packages have been transmitted, a second verification process is also included: The energy management control unit sends a first control character to the combiner box controller, the first control character being used to send a transmission end signal to the combiner box controller; After receiving the first control character, the combiner box controller will return a second control character to the energy management control unit. The second control character is used to confirm that the combiner box controller has finished receiving the control character. The combiner box controller performs a full packet verification on all received sub-upgrade packets: if the full packet verification is successful, the combiner box controller exits the bootloader mode; if the full packet verification fails, the combiner box controller returns an error frame to the energy management control unit.
9. The update method for batch updating the combiner box controller program according to claim 8, characterized in that, When the energy management control unit sequentially transmits the sub-upgrade package to the combiner box controller, it also includes a breakpoint resume mechanism: When the transmission of the target data packet is interrupted, the combiner box controller automatically saves the received sub-upgrade packets and identifies the identification information of the latest received sub-upgrade packet. The identification information includes at least the SOH header, packet sequence number, and sequence number complement. In the event that the target data packet transmission is restored, the energy management control unit determines the subsequent sub-upgrade packet based on the identification information of the received sub-upgrade packet; The energy management control unit sequentially transmits subsequent sub-upgrade packages to the combiner box controller.
10. The update method for batch updating the combiner box controller program according to claim 1, characterized in that, The energy management control unit is equipped with a visual interface, which is used to update and display the upgrade progress of different combiner box controllers in real time in the form of percentages. The visual interface includes at least the device name, SN code, upgrade status and progress bar. The upgrade status includes waiting for upgrade, upgrading in progress, upgrade successful and upgrade failed.