Method and system for upgrading PCS firmware through collector
Through the cooperation of the collector and PCS cloud upgrade service platform, the remote upgrade of photovoltaic inverter (PCS) firmware has been achieved, solving the problems of high costs and long development cycle in the existing technology, and simplifying maintenance and after-sales service.
Patent Information
- Application Number
- CN202510954674.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-07-11
AI Technical Summary
In the prior art, the photovoltaic inverter (PCS) upgrade method is costly and has a long development cycle, and the collector needs to develop different firmware for each PCS, resulting in difficulty in maintenance and after-sales service.
Through the cooperation of the collector and the PCS cloud upgrade service platform, we write an upgrade program and send an upgrade command, and use the upgrade program interpreter to run it on the collector to realize remote upgrade of the PCS firmware and avoid updating the collector firmware.
Reduces development cycle and collector firmware code, simplifies maintenance and after-sales service, and reduces costs.
Smart Images

Figure CN120447935A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of firmware upgrade, and in particular to a method and system for upgrading PCS firmware through a collector. Background Art
[0002] Photovoltaic inverters (PCSs) contain an embedded software system that frequently requires software upgrades, whether for maintenance or to add new features. The typical inverter upgrade process includes starting the upgrade, downloading the firmware, message exchange during the upgrade, error handling, data verification, and finally completing the upgrade.
[0003] The main methods for upgrading PCS are: on-site upgrade, downloading and upgrading the new version by connecting to the physical upgrade interface of PCS. This method requires maintenance personnel to go to the equipment site, which is costly and has high requirements for maintenance personnel; remote upgrading of PCS through a collector connected to PCS, but this method has relatively high requirements for the collector, because there are many types of PCS on the market, and even the same manufacturer may have multiple PCSs, with different upgrade processes, communication protocols, etc. The collector needs to develop different firmware for each PCS, with a long development cycle, multiple versions, and difficult maintenance and after-sales service. Moreover, if multiple PCS upgrades are to be supported at the same time, the firmware code of the collector will inevitably increase, making it more difficult or even impossible to add functions or add new PCS upgrade functions in the future. Summary of the Invention
[0004] In view of the above-mentioned deficiencies in the current field of firmware upgrade technology, the present invention provides a method and system for upgrading PCS firmware through a collector, which can quickly develop a PCS firmware upgrade program without updating the collector firmware, and complete the remote upgrade of PCS through the cooperation of the collector and the PCS cloud upgrade service platform, thereby reducing a large amount of development cycle and collector firmware code, making maintenance and after-sales service simpler.
[0005] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions: A method for upgrading PCS firmware through a collector includes a PCS cloud upgrade service platform and a collector connected thereto, wherein the PCS cloud upgrade service platform includes a PCS firmware management module, and the collector includes an upgrade program interpreter and a firmware upgrade control module, and further includes the following steps: S1: Obtain the PCS upgrade agreement document and write the upgrade program on the PCS cloud upgrade service platform according to the upgrade agreement document; S2: Upload the PCS firmware to the PCS cloud upgrade service platform through the PCS firmware management module and specify the upgrade program to be used; S3: Send the upgrade command to the collector through the PCS cloud upgrade service platform; S4: Download the PCS firmware and upgrade program to the local storage space of the collector through the firmware upgrade control module, and run the upgrade program using the upgrade program interpreter through the upgrade command; S5: The PCS firmware upgrade is completed and the collector exits the upgrade process.
[0006] According to one aspect of the present invention, the upgrade agreement document of the PCS is obtained, and the upgrade program is written on the PCS cloud upgrade service platform according to the upgrade agreement document. The development of the upgrade program is carried out in the background to form an upgrade program for the same type of PCS, and is uniformly managed on the PCS cloud upgrade service platform.
[0007] According to one aspect of the present invention, the PCS firmware is uploaded to the PCS cloud upgrade service platform through the PCS firmware management module, and the number of devices to be upgraded in the upgrade program to be used is specified to be one or more.
[0008] According to one aspect of the present invention, the upgrade command is sent to the collector via the PCS cloud upgrade service platform, and the upgrade command at least includes the download address of the PCS firmware and the upgrade program.
[0009] According to one aspect of the present invention, the PCS firmware and upgrade program are downloaded to the local storage space of the collector through the firmware upgrade control module, and the upgrade program is run using the upgrade program interpreter through the upgrade command. The collector sets the interface parameters, divides the upgrade program into several data blocks, and encapsulates the data blocks and adds necessary information. At the same time, the PCS is notified to enter the upgrade mode. The necessary information includes the burning position and length of the data block, the offset or serial number in the upgrade program, and the verification information of the data.
[0010] According to one aspect of the present invention, after the PCS firmware upgrade is completed, the collector exits the upgrade process, and the PCS restarts after the firmware upgrade is completed and returns to the normal operation mode from the upgrade mode.
[0011] According to one aspect of the present invention, the PCS firmware and upgrade program are downloaded to the local storage space of the collector through the firmware upgrade control module, and the upgrade program is run using the upgrade program interpreter through the upgrade command. The collector's work content is: interacting with the upgrade program in the PCS to complete the block transmission of the PCS firmware, data verification, data error retransmission and interrupt upgrade.
[0012] According to one aspect of the present invention, the PCS firmware and upgrade program are downloaded to the local storage space of the collector through the firmware upgrade control module, and the upgrade program is run using the upgrade program interpreter through the upgrade command. The collector's work content also includes network speed measurement, download progress reporting, upgrade progress reporting and upgrade result reporting.
[0013] According to one aspect of the present invention, the upgrade results include upgrade success, upgrade failure and upgrade warning.
[0014] A system for upgrading PCS firmware through a collector includes a PCS cloud upgrade service platform and a collector connected thereto. The PCS cloud upgrade service platform includes a PCS firmware management module for uploading user-provided inverter firmware. The collector includes an upgrade program interpreter module for analyzing upgrade scripts, setting global variables, starting a clock, and running scripts line by line. The system also includes: Upgrade management module, used to obtain PCS upgrade agreement documents and write upgrade programs; The firmware upgrade control module is used for the collector to download the PCS firmware and upgrade program to the local storage space, and run the upgrade program through the upgrade program interpreter module.
[0015] The advantages of the implementation of the present invention are as follows: obtaining the upgrade agreement document of PCS, and writing the upgrade program on the PCS cloud upgrade service platform according to the upgrade agreement document; uploading the PCS firmware to the PCS cloud upgrade service platform through the PCS firmware management module, and specifying the upgrade program to be used; sending the upgrade command to the collector through the PCS cloud upgrade service platform; downloading the PCS firmware and the upgrade program to the local storage space of the collector through the firmware upgrade control module, and running the upgrade program using the upgrade program interpreter through the upgrade command; completing the PCS firmware upgrade, the collector exits the upgrade process, and quickly develops the PCS firmware upgrade program without updating the collector firmware, and through the cooperation of the collector and the PCS cloud upgrade service platform, jointly completing the remote upgrade of PCS, reducing a large amount of development cycle and collector firmware code, making maintenance and after-sales service simpler. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 The present invention provides a method and system for upgrading PCS firmware through a collector. DETAILED DESCRIPTION
[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0019] Example 1
[0020] A method for upgrading PCS firmware via a data collector is presented. Based on extensive research into PCS upgrade processes and data interactions, the present invention summarizes the common characteristics of PCS upgrades and breaks down the upgrade process into multiple steps: preparing the upgrade environment, downloading the firmware, partitioning the firmware, sending and responding to data, handling errors, verifying data, and completing the upgrade. The method then extracts a set of interpretive programming languages. By combining statements according to syntax, a text-based program is generated that fully describes the entire upgrade process. This allows the collector's firmware to simply include an interpreter for the upgrade program, restore the firmware upgrade program, and run it to complete the PCS firmware upgrade.
[0021] Due to functional and cost constraints, data collectors typically use resource-limited microcontrollers (MCUs) as their central processing units (CPUs). These programs are often programmed in the C language. Compiled programs have fixed functionality and cannot be modified online to meet actual needs, requiring only recompilation and firmware upgrades. These programs do not support more advanced and flexible programming languages, such as JavaScript or Python. This method develops an interpretive programming language for PCS upgrades. Similar to a scripting language (hereafter referred to as a script), programs are in text format and can be written offline for different PCS upgrade protocols. These programs are then downloaded to the data collector, where an upgrade program interpreter written in C interprets and executes the scripts, completing the upgrade process. This scripting language is highly targeted, simple to use, and both the script and the interpreter occupy very little space, making it suitable for running on resource-limited MCUs. In addition to common syntax for defining variables, numerical operations, and loop statements, this programming language mainly defines the following primitives for inverter upgrade applications: FLASH (non-volatile memory) read primitive, used to read upgrade files from FLASH; serial port send primitive, used to send serial port data; serial port read primitive, when the interpreter reads this primitive, it will use it as a callback entry. After the program receives the serial port data, it will pass the serial port data to the script for processing through this entry; multiple data verification methods, calling specified methods can generate data verification codes; timing primitive, can define single and cyclic clocks to complete timing, timeout and other processing; upgrade status reporting primitive, used to report the status of the upgrade process, such as upgrade success, failure, upgrade stage, upgrade completion percentage, etc.
[0022] The method for upgrading PCS firmware via a collector includes setting up a PCS cloud-based upgrade service platform and a collector connected thereto, connecting the PCS to a host computer / collector via a serial port. This serial port normally serves as an interface for data acquisition, and during the PCS upgrade process, serves as an interface for transmitting the upgraded firmware and controlling the upgrade process. The method also includes setting up an upgrade management module, a PCS firmware management module, and an upgrade script management module running on the PCS cloud-based upgrade service platform, as well as an upgrade script module, an upgrade program interpreter module, and a firmware upgrade control module running on the collector. The method also includes the following steps: S1: Obtain the PCS upgrade agreement document and write the upgrade program on the PCS cloud upgrade service platform according to the upgrade agreement document.
[0023] According to the inverter upgrade protocol document provided by the user, an upgrade script program is written, and the written program is uploaded to the PCS cloud upgrade service platform through the upgrade script management module, and a secure network address for downloading is generated for the program. The development of the upgrade program is carried out in the background, and an upgrade program can be formed only for a certain type of PCS. It is centrally managed on the PCS cloud upgrade service platform and can be deployed and released according to user requirements. The user is equipped with and uses a universal version of the collector, which includes an upgrade program interpreter, connects to the PCS cloud upgrade service platform and works normally. The upgrade process is initiated by the host computer / collector. PCS defines special commands, including setting serial port parameters and starting and stopping upgrades. The host computer / collector initiates the upgrade through the serial port according to the user-defined process.
[0024] S2: Upload the PCS firmware to the PCS cloud upgrade service platform through the PCS firmware management module and specify the upgrade program to be used.
[0025] The user specifies one or more devices to be upgraded through the PCS Cloud Upgrade Service Platform and prepares for the upgrade. The PCS Firmware Management Module uploads the user-provided inverter firmware to the PCS Cloud Upgrade Service Platform and generates a secure network address for downloading the firmware. The host computer / collector divides the upgrade file into several small data blocks, encapsulates each block, and adds necessary information, including but not limited to the data block's burn location, length, offset or sequence number within the upgrade file, and data verification information.
[0026] S3: Send the upgrade command to the collector through the PCS cloud upgrade service platform.
[0027] The user starts the upgrade management module based on the PCS cloud upgrade service platform, searches for the collector that needs to be upgraded, sends the upgrade command to the collector, which includes the download address of the PCS firmware and upgrade program, and starts and monitors the upgrade process.
[0028] S4: Download the PCS firmware and upgrade program to the local storage space of the collector through the firmware upgrade control module, and use the upgrade program interpreter to run the upgrade program through the upgrade command.
[0029] The firmware upgrade control module on the data collector sequentially downloads the upgrade program to the local script storage area, downloads the PCS firmware to the upgrade firmware storage area, and launches the upgrade program interpreter module. The data collector runs the upgrade program, interacting with the upgrade program in the PCS to complete processes such as block transfer of the PCS firmware, data verification, retransmission in case of data errors, and upgrade interruption. The upgrade program interpreter analyzes the upgrade script, sets global variables, starts the clock, and executes the script line by line. The data collector first sets local serial port parameters, such as the baud rate, sends serial port data to the PCS, and notifies the PCS to enter upgrade mode. The data collector monitors the input data of the inverter serial port and passes the received serial port data to the script for processing. The data collector can also perform network speed testing, download progress reporting, upgrade progress reporting, and upgrade result reporting. If the network speed is too low during the network speed test, the user will be prompted to adjust it. Upgrade results include upgrade success, upgrade failure, and upgrade warning. The host computer / collector sends the divided data blocks to the PCS in sequence through the configured serial port. Each time a message is sent, it waits for a response message from the PCS, such as whether the received data is complete, whether the verification is passed, and whether the programming is normal.
[0030] The upgrade script reads some inverter firmware data from the FLSAH and formats the data, including adding the burn address and offset, and calculating and adding a checksum. The script then generates data and sends it to the PCS via the serial port. The script waits for a response from the PCS on the serial port and repeats this process. If the script encounters an error in processing data and requires retransmission, the upgrade process is aborted. The script reports the upgrade progress and results using reporting primitives. Upon receiving this report, the firmware upgrade control module transmits it, along with other upgrade information, such as network speed measurements, to the cloud-based upgrade management module.
[0031] S5: The PCS firmware upgrade is completed and the collector exits the upgrade process.
[0032] If all data has been transmitted correctly, the host computer / collector notifies the PCS that the upgrade is complete. Typically, the PCS restarts and uses the new firmware. At the end of the upgrade process, the upgrade program interpreter module and the firmware upgrade control module exit, and the collector resumes normal operation. The upgrade management module reports and records the upgrade results. After the firmware upgrade is complete, the PCS returns from upgrade mode to normal operation.
[0033] The advantages of the implementation of the present invention are as follows: obtaining the upgrade agreement document of PCS, and writing the upgrade program on the PCS cloud upgrade service platform according to the upgrade agreement document; uploading the PCS firmware to the PCS cloud upgrade service platform through the PCS firmware management module, and specifying the upgrade program to be used; sending the upgrade command to the collector through the PCS cloud upgrade service platform; downloading the PCS firmware and the upgrade program to the local storage space of the collector through the firmware upgrade control module, and running the upgrade program using the upgrade program interpreter through the upgrade command; completing the PCS firmware upgrade, the collector exits the upgrade process, and quickly develops the PCS firmware upgrade program without updating the collector firmware, and through the cooperation of the collector and the PCS cloud upgrade service platform, jointly completing the remote upgrade of PCS, reducing a large amount of development cycle and collector firmware code, making maintenance and after-sales service simpler.
[0034] Example 2
[0035] A system for upgrading PCS firmware via a collector is implemented based on a method for upgrading PCS firmware via a collector as described in Example 1, and includes a PCS cloud upgrade service platform and a collector connected thereto, for rapidly developing a PCS firmware upgrade program without updating the collector firmware. Based on a study of numerous PCS upgrade processes and data interactions, the present invention summarizes the common characteristics of PCS upgrades, breaking the upgrade into multiple steps, including preparing the upgrade environment, downloading firmware, segmenting the firmware, sending and responding to data, error handling, data verification, and terminating the upgrade. A set of interpretive programming languages is then extracted, which, through the combination of statements according to grammar, generates a text-based program that can fully describe the entire upgrade process. Thus, by simply adding an interpreter for the upgrade program to the collector's firmware, the firmware upgrade program can be restored, and running the program can complete the PCS firmware upgrade.
[0036] This embodiment includes: The upgrade management module is used to search for the collector that needs to be upgraded, send the download address of the upgrade program and the download address of the inverter firmware to the collector, start the upgrade process, and monitor the upgrade process.
[0037] The PCS firmware management module is used to upload the inverter firmware provided by the user.
[0038] The upgrade script management module uploads the prepared upgrade script program to the PCS cloud upgrade service platform and generates a downloadable secure network address for the program.
[0039] The upgrade program interpreter module is used to analyze the upgrade script, set global variables, start the clock, and run the script line by line.
[0040] The firmware upgrade control module is used to download the upgrade program to the local script storage area and download the inverter firmware to the upgrade firmware storage area.
[0041] The upgrade script module reads some inverter firmware data from the FLASH, formats the data, adds the programming address and offset, calculates and adds a data checksum, and then sends the generated data to the inverter via the serial port and waits for the inverter to respond. The above process is repeated.
[0042] The advantages of the implementation of the present invention are as follows: obtaining the upgrade agreement document of PCS, and writing the upgrade program on the PCS cloud upgrade service platform according to the upgrade agreement document; uploading the PCS firmware to the PCS cloud upgrade service platform through the PCS firmware management module, and specifying the upgrade program to be used; sending the upgrade command to the collector through the PCS cloud upgrade service platform; downloading the PCS firmware and the upgrade program to the local storage space of the collector through the firmware upgrade control module, and running the upgrade program using the upgrade program interpreter through the upgrade command; completing the PCS firmware upgrade, the collector exits the upgrade process, and quickly develops the PCS firmware upgrade program without updating the collector firmware, and through the cooperation of the collector and the PCS cloud upgrade service platform, jointly completing the remote upgrade of PCS, reducing a large amount of development cycle and collector firmware code, making maintenance and after-sales service simpler.
[0043] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for upgrading PCS firmware through a collector, comprising a PCS cloud upgrade service platform and a collector connected thereto, wherein the PCS cloud upgrade service platform includes a PCS firmware management module, characterized in that: The collector includes an upgrade program interpreter and a firmware upgrade control module, and further includes the following steps: Obtain the PCS upgrade agreement document and write the upgrade program on the PCS cloud upgrade service platform according to the upgrade agreement document; Upload the PCS firmware to the PCS cloud upgrade service platform through the PCS firmware management module and specify the upgrade program to be used; Send the upgrade command to the collector through the PCS cloud upgrade service platform; Download the PCS firmware and upgrade program to the local storage space of the collector through the firmware upgrade control module, and run the upgrade program using the upgrade program interpreter through the upgrade command; The PCS firmware upgrade is completed and the collector exits the upgrade process.
2. The method for upgrading PCS firmware through a collector according to claim 1, characterized in that: The upgrade agreement document of the PCS is obtained, and the upgrade program is written on the PCS cloud upgrade service platform according to the upgrade agreement document. The development of the upgrade program is carried out in the background to form an upgrade program for the same type of PCS, and is uniformly managed on the PCS cloud upgrade service platform.
3. The method for upgrading PCS firmware through a collector according to claim 1, characterized in that: The PCS firmware is uploaded to the PCS cloud upgrade service platform through the PCS firmware management module, and the number of devices to be upgraded in the upgrade program to be used is specified to be one or more.
4. The method for upgrading PCS firmware through a collector according to claim 1, characterized in that: The upgrade command is sent to the collector through the PCS cloud upgrade service platform, and the upgrade command at least includes the download address of the PCS firmware and the upgrade program.
5. The method for upgrading PCS firmware through a collector according to claim 1, characterized in that: The PCS firmware and upgrade program are downloaded to the local storage space of the collector through the firmware upgrade control module, and the upgrade program is run using the upgrade program interpreter through the upgrade command. The collector sets the interface parameters, divides the upgrade program into several data blocks, and encapsulates the data blocks and adds necessary information. At the same time, it notifies the PCS to enter the upgrade mode. The necessary information includes the burning position and length of the data block, the offset or serial number in the upgrade program, and the verification information of the data.
6. The method for upgrading PCS firmware through a collector according to claim 5, characterized in that: The PCS firmware upgrade is completed, the collector exits the upgrade process, and the PCS restarts after the firmware upgrade is completed and recovers from the upgrade mode to the normal operating mode.
7. The method for upgrading PCS firmware through a collector according to any one of claims 1 to 6, characterized in that: The PCS firmware and upgrade program are downloaded to the local storage space of the collector through the firmware upgrade control module, and the upgrade program is run using the upgrade program interpreter through the upgrade command. The collector's work content is: interacting with the upgrade program in the PCS to complete the block transmission of the PCS firmware, data verification, data error retransmission and interrupt upgrade.
8. The method for upgrading PCS firmware through a collector according to claim 7, characterized in that: The firmware upgrade control module downloads the PCS firmware and upgrade program to the local storage space of the collector, and the upgrade program is run using the upgrade program interpreter through the upgrade command. The collector's work content also includes network speed testing, download progress reporting, upgrade progress reporting and upgrade result reporting.
9. The method for upgrading PCS firmware through a collector according to claim 8, characterized in that: The upgrade results include upgrade success, upgrade failure and upgrade warning.
10. A system for upgrading PCS firmware through a collector, comprising a PCS cloud upgrade service platform and a collector connected thereto, characterized in that: The PCS cloud upgrade service platform includes a PCS firmware management module for uploading the inverter firmware provided by the user. The collector includes an upgrade program interpreter module for analyzing the upgrade script, setting global variables, starting the clock, and running the script line by line. It also includes: Upgrade management module, used to obtain PCS upgrade agreement documents and write upgrade programs; The firmware upgrade control module is used for the collector to download the PCS firmware and upgrade program to the local storage space, and run the upgrade program through the upgrade program interpreter module.
Citation Information
Patent Citations
Self-upgrade method for equipment in remote online monitoring system
CN102314369A
Module upgrading method and system
CN114201202A
Photovoltaic inverter firmware updating method, device and system and storage medium
CN115469910A
OTA upgrade control script making method, operation system and vehicle
CN117555564A
Remote upgrading method and device for energy storage system and medium
CN118473929A
Cited By
A Sub-device Upgrade Method Based on a Multi-Protocol Gateway
CN122547386A