Firmware encryption upgrade method, host computer monitoring terminal and readable storage medium

CN122945982APending Publication Date: 2026-10-20SHENZHEN LUXPOWER TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611180209.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-05
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0002]现有光伏设备固件升级过程中,安全性不足的问题已成为光伏系统长期面临的突出隐患,且该问题贯穿于固件升级的全流程,未得到有效解决

Benefits of technology

[0017]在一种可能的实现方式中,所述全局升级进度信息通过整机LCD 同步输出,以全局升级进度条形式呈现。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This application discloses a firmware encryption upgrade method, a host computer monitoring terminal, and a readable storage medium. The method is applied to a firmware encryption system, which includes a host computer monitoring terminal and a photovoltaic inverter. The method includes: the host computer monitoring terminal generating a first firmware file and a second firmware file in a standard format; performing hash operations on the first and second firmware files respectively to obtain corresponding data digests; encrypting the data digests to generate digital signatures; concatenating each digital signature to the end of the firmware file to form a first signed firmware file and a second signed firmware file, which are then sent to the photovoltaic inverter. The photovoltaic inverter then verifies the first and second signed firmware files based on the root public key stored in its internal Flash memory. If the verification passes, the inverter controls the computing chip and the main control chip to complete the download and update of its own firmware. Implementing this application can improve the security of the firmware upgrade process for photovoltaic equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of firmware upgrade technology, specifically to a firmware encryption upgrade method, a host computer monitoring terminal, and a readable storage medium. Background Technology

[0002] Inadequate security during existing photovoltaic (PV) equipment firmware upgrades has become a prominent and long-standing hidden danger for PV systems. This problem persists throughout the entire firmware upgrade process and remains unresolved. During firmware transmission, traditional upgrade solutions lack an effective security protection system tailored to the complex network environment of PV power plants. Firmware files are left unprotected during transmission, vulnerable to illegal interception, malicious tampering, or hijacking. External attacks can directly affect the transmitted firmware data, compromising its integrity. Therefore, ensuring the security of PV equipment firmware upgrades is a critical technical issue that urgently needs to be addressed by those skilled in the art. Summary of the Invention

[0003] This application discloses a firmware encryption upgrade method, a host computer monitoring terminal, and a readable storage medium, which can improve the security of the firmware upgrade process for photovoltaic equipment.

[0004] In a first aspect, this application discloses a firmware encryption upgrade method, which is applied to a firmware encryption system. The firmware encryption system includes a host computer monitoring terminal and a photovoltaic inverter. The photovoltaic inverter includes a main control chip, a computing chip, and internal Flash memory. The internal Flash memory has a reserved secure storage partition for storing the root public key. The method includes: The host computer monitoring terminal processes the data of the first original firmware corresponding to the main control chip and the second original firmware corresponding to the computing chip to generate a first firmware file and a second firmware file in standard format. The host computer monitoring terminal performs hash operations on the first firmware file and the second firmware file respectively to obtain corresponding data digests, and uses the private key of the encryption algorithm to encrypt the data digests to generate digital signatures. Each digital signature is concatenated to the end of the corresponding firmware file to form the first signed firmware file and the second signed firmware file. The host computer monitoring terminal sends the first signed firmware file and the second signed firmware file to the photovoltaic inverter, so that the photovoltaic inverter verifies the first signed firmware file and the second signed firmware file based on the root public key stored in the internal Flash. If the verification is successful, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware.

[0005] Implementing this embodiment involves processing the first original firmware corresponding to the main control chip to generate a first firmware file in a standard format, and processing the second original firmware corresponding to the computing chip to generate a second firmware file in a standard format. Then, hash operations are performed on the first and second firmware files respectively to obtain corresponding data digests. The data digests are then encrypted using a private key of an encryption algorithm to generate digital signatures. These digital signatures are concatenated to the end of their respective firmware files to form a first signed firmware file and a second signed firmware file. For the photovoltaic inverter, the first and second signed firmware files can be verified based on the root public key stored in its internal Flash memory. If the verification passes, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware. This method improves the security of the photovoltaic equipment firmware upgrade process.

[0006] Secondly, this application discloses a host computer monitoring terminal, which is applied to a firmware encryption system. The firmware encryption system further includes a photovoltaic inverter. The photovoltaic inverter includes a main control chip, a computing chip, and internal Flash memory. The internal Flash memory has a reserved secure storage partition for storing the root public key. The host computer monitoring terminal includes a processing module and a communication module. The processing module is used to process the first original firmware corresponding to the main control chip and the second original firmware corresponding to the computing chip respectively to generate a first firmware file and a second firmware file in standard format; perform hash operation on the first firmware file and the second firmware file respectively to obtain the corresponding data digest, encrypt the data digest with the private key of the encryption algorithm to generate a number front, and concatenate each digital signature to the end of the corresponding firmware file to form a first signed firmware file and a second signed firmware file. The communication module is used to send the first signed firmware file and the second signed firmware file to the photovoltaic inverter, so that the photovoltaic inverter can verify the first signed firmware file and the second signed firmware file based on the root public key stored in the internal Flash. If the verification is successful, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware.

[0007] Thirdly, this application discloses a host computer monitoring terminal, including a processor and a memory, which are interconnected. The memory is used to store a computer program, which includes program instructions. The processor is configured to call the program instructions and execute the method described in any of the first aspects above.

[0008] Fourthly, this application discloses a computer-readable storage medium, characterized in that the computer storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the method described in any of the first aspects above.

[0009] Fifthly, this application discloses a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method described in any of the first aspects above.

[0010] In one possible implementation, the first original firmware is M3 HEX firmware. The host computer monitoring terminal performs data processing on the first original firmware corresponding to the main control chip, including: removing redundant address verification data and filling blank segments to generate a first firmware file in standard BIN format.

[0011] In one possible implementation, the second original firmware is DSP HEX firmware. The host computer monitoring terminal performs data processing on the second original firmware corresponding to the computing chip, including: removing redundant data and adding dedicated function codes, and converting it into a second firmware file in BIN format.

[0012] By implementing the embodiments of this application, the two HEX firmwares are differentiated and organized into BIN files, which can solve the firmware format incompatibility problem and ensure smooth burning.

[0013] In one possible implementation, the photovoltaic inverter further includes an external Flash memory; the external Flash memory is divided into an independent first compressed firmware storage area and a second compressed firmware storage area, respectively used to store the compressed firmware of the main control chip and the computing chip; after concatenating each digital signature to the end of the corresponding firmware file to form a first signed firmware file and a second signed firmware file, the implementation further includes: The host computer monitoring terminal uses a compression algorithm to compress the first signed firmware file and the second signed firmware file into blocks to obtain a first compressed firmware package and a second compressed firmware package. The host computer monitoring terminal appends file identification information to the end of the first compressed firmware package and the second compressed firmware package. The file identification information is used to distinguish between purely encrypted files and encrypted compressed mixed files. The host computer monitoring terminal sends the first signed firmware file and the second signed firmware file to the photovoltaic inverter, including: The host computer monitoring terminal sends the first compressed firmware package and the second compressed firmware package to the photovoltaic inverter. The photovoltaic inverter stores the first compressed firmware package and the second compressed firmware package in the first compressed firmware storage area and the second compressed firmware storage area, respectively, so that the photovoltaic inverter performs a block decompression operation adapted to the compression algorithm on the first compressed firmware and the second compressed firmware. Based on the root public key stored in the internal Flash, the photovoltaic inverter verifies the decompressed first signed firmware file and the second signed firmware file, respectively. If the verification is successful, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware.

[0014] In implementing the embodiments of this application, after encrypting the first firmware file and the second firmware file to obtain the first signed firmware file and the second signed firmware file, a compression algorithm can be used to perform block compression on the first signed firmware file and the second signed firmware file to obtain the first compressed firmware package and the second compressed firmware package. These are then sent to the photovoltaic inverter. The photovoltaic inverter performs block decompression operations on the first compressed firmware file and the second compressed firmware file, adapted to the compression algorithm, and verifies the decompressed first signed firmware file and the second signed firmware file based on the root public key stored in its internal Flash memory. If the verification passes, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware. On the one hand, firmware block compression can reduce the transmission volume and improve the efficiency of dual-chip firmware upgrades; on the other hand, encryption of the firmware can improve the security of the firmware upgrade process.

[0015] In one possible implementation, upon successful verification, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of their own firmware, including: The photovoltaic inverter controls the computing chip to first complete the download and burning of its own firmware. After the computing chip has completed the burning, it sends an upgrade completion flag to the main control chip. After receiving the upgrade completion flag, the main control chip resets and enters the bootloader to complete the download and update of its own compressed firmware, and simultaneously outputs global upgrade progress information.

[0016] Implementing the embodiments of this application, a proactive collaborative feedback mechanism is designed for the upgrade process. After the computing chip completes firmware download and burning, it proactively reports an upgrade completion flag to the main control chip, enabling the main control chip to complete its own firmware download and burning. Compared to the passive delay waiting scheme in the prior art (where the host computer blindly waits), this can improve the efficiency of dual-chip firmware upgrades.

[0017] In one possible implementation, the global upgrade progress information is synchronously output through the entire device's LCD and presented in the form of a global upgrade progress bar.

[0018] By implementing the embodiments of this application, the global progress bar on the LCD is displayed visually, making it easy for users to intuitively obtain the global upgrade progress and improving the fault tolerance of the upgrade process.

[0019] In one possible implementation, the compression algorithm is the Fastlz algorithm; the fixed block length for block compression is 4K; and the header of each block encapsulates the plaintext length and the compressed data length.

[0020] By implementing the embodiments of this application, Fastlz uses fixed 4K block compression and encapsulation of plaintext length, and the compressed data length information reduces the probability of decompression failure caused by data packet corruption.

[0021] In one possible implementation, the main control chip is an M3 main control chip, whose firmware is written to the corresponding Flash storage area in BIN format during firmware burning. The computing chip is a DSP computing chip, and its firmware is converted to HEX format and written to the corresponding Flash storage area during the burning process.

[0022] By implementing the embodiments of this application, differentiated BIN / HEX format programming of dual chips can be achieved. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application or the background art will be described below.

[0024] Figure 1 This application provides a schematic diagram of the architecture of a firmware encryption system. Figure 2 A flowchart illustrating a firmware encryption upgrade method provided in this application embodiment; Figure 3 A flowchart illustrating a firmware encryption upgrade method provided in this application embodiment; Figure 4 This is a schematic diagram of the structure of a host computer monitoring terminal provided in an embodiment of this application; Figure 5 This is a schematic diagram of another host computer monitoring terminal provided in an embodiment of this application. Detailed Implementation

[0025] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0026] First, let me introduce the relevant technical terms used in this application.

[0027] (1) Photovoltaic inverter As the core equipment for power conversion in a photovoltaic power generation system, the photovoltaic inverter is responsible for converting the DC power output from the photovoltaic array into AC power that can be used in grid connection. Generally speaking, the whole machine adopts a dual-core architecture of M3 main control chip and DSP (DigitalSignal Processor) computing chip. The two chips communicate with each other and have a clear division of functions.

[0028] Under normal grid-connected operation of the photovoltaic inverter, the M3 main control chip serves as the central hub for overall system scheduling and management, undertaking all logic control, peripheral device driving, external communication, and status aggregation. The M3 main control chip collects multiple analog and digital signals in real time, including photovoltaic side voltage, grid side voltage, internal temperature, and circuit breaker status. After threshold judgment and logic processing of the collected data, it sends control commands such as target output power, grid-connected voltage parameters, power regulation limits, and fault protection thresholds to the DSP computing chip via the onboard internal bus. The DSP computing chip is a high-speed real-time computing unit specifically designed for high-real-time, high-precision algorithm calculations in power electronics. Upon receiving control commands from the M3, it completes complex floating-point calculations such as MPPT (Maximum Power Point Tracking), SPWM (Sinusoidal Pulse Width Modulation), grid-connected current closed-loop control, harmonic suppression, and islanding detection within milliseconds. It then directly drives the power devices to complete the DC-to-AC inverter output, ensuring stable grid connection of photovoltaic power.

[0029] During continuous computation, the DSP computing chip transmits real-time operational data, including actual bus voltage, output current, real-time power generation, power device temperature, and algorithm running status, back to the M3 main control chip. The M3 main control chip performs a comprehensive fault assessment on the transmitted data. If abnormal conditions such as overvoltage, overcurrent, overload, or overheating are detected, it immediately issues a power-lock shutdown command to the DSP computing chip, cutting off the inverter output for hardware protection. Simultaneously, the M3 main control chip drives the LCD (Liquid Crystal Display) to display fault codes, store fault logs, and upload abnormal information to the host computer monitoring terminal via a communication link. Furthermore, all human-computer interaction and peripheral device control, such as LCD progress display, button interaction, cooling fan start / stop, remote data interaction, and Flash storage space management, are uniformly handled by the M3 main control chip. The DSP computing chip does not participate in these non-computational tasks, maximizing the utilization of computing resources.

[0030] (2) M3 HEX firmware, DSP HEX firmware and the differences between them HEX firmware is essentially a hexadecimal program file that the chip can recognize. It is a packaged file format of pre-written control programs and needs to be written to the chip's flash memory using a programming tool for the hardware to run according to the set logic. M3 HEX firmware corresponds to the management program of the M3 main control chip in the photovoltaic inverter, while DSP HEX firmware corresponds to the power algorithm program of the DSP computing chip. Although both have the same suffix, HEX files, their target users, internal code functions, processing rules, and programming requirements are significantly different.

[0031] The M3 main control chip serves as the central management hub for the entire system. Its HEX firmware consists entirely of management code related to device scheduling, peripheral control, and communication interaction. It primarily handles transactional logic such as backend integration, upgrade process control, screen display, fault logging, and fan and relay control, and does not contain high-intensity power calculation algorithms. Therefore, the processing of the original M3 HEX file in this solution is relatively simple. Only redundant address verification invalid data is removed, and blank sections in the program are padded. It is then directly converted into a standard BIN file for compression, encryption, and transmission. During final flashing, it is written to Flash in BIN format, resulting in a simple file structure, fixed addressing rules, and better compatibility.

[0032] DSP computing chips undertake high-precision real-time computing tasks such as inverter grid connection, maximum power point tracking, and waveform modulation. Their HEX firmware consists entirely of floating-point arithmetic algorithm code, with extremely stringent requirements for memory addresses and instruction addressing. The original DSPHEX file contains a large amount of special marker data adapted to algorithm operation; direct conversion can easily lead to runtime anomalies. Therefore, during processing, not only must invalid and redundant data be removed, but also chip-specific function identifiers must be added before converting to a BIN file. After encryption, compression, and distribution, and device verification and decompression, the programming stage requires conversion back to HEX format and flash memory to ensure accurate algorithm code execution.

[0033] The core differences between the two are as follows: First, their functions differ: the M3 firmware manages scheduling, while the DSP firmware manages core power operations. Second, their file preprocessing rules differ: the DSP firmware requires a dedicated function code for identification. Third, their final burning formats differ: the M3 uses BIN burning, while the DSP uses HEX burning. This invention provides differentiated processing rules for these two types of HEX firmware, effectively avoiding burning failures caused by firmware format incompatibility and improving the success rate and stability of dual-chip upgrades.

[0034] To facilitate a better understanding of this solution, the following section describes the network architecture to which this solution can be applied. Please refer to [link / reference]. Figure 1 , Figure 1 This is a schematic diagram of the architecture of a firmware upgrade encryption system provided in an embodiment of this application. Figure 1 As shown, the firmware encryption system architecture includes a host computer monitoring terminal 10 and a photovoltaic inverter 20, wherein a communication connection is established between the host computer monitoring terminal 10 and the photovoltaic inverter 20. The photovoltaic inverter 20 includes a main control chip, a computing chip, internal Flash memory, and external Flash memory. The photovoltaic inverter 20 sends a firmware upgrade request to the host computer monitoring terminal 10. The host computer monitoring terminal 10 responds to the firmware upgrade request and executes the firmware encryption, decryption, and upgrade process, or executes the firmware encryption, compression, decompression, decryption, and upgrade process.

[0035] The firmware encryption, decryption, and upgrade process may include: firstly, processing the first original firmware corresponding to the main control chip and the second original firmware corresponding to the computing chip to generate a first firmware file and a second firmware file in standard format; then, performing hash operations on the first firmware file and the second firmware file to obtain corresponding data digests, and encrypting the data digests with the private key of the encryption algorithm to generate digital signatures, and concatenating each digital signature to the end of the corresponding firmware file to form a first signed firmware file and a second signed firmware file; then, sending the first signed firmware file and the second signed firmware file to the photovoltaic inverter so that the photovoltaic inverter can verify the first signed firmware file and the second signed firmware file based on the root public key stored in its internal Flash. If the verification is successful, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of their own firmware.

[0036] The firmware encryption, compression, decompression, decryption, and upgrade process may include: firstly, processing the first original firmware corresponding to the main control chip and the second original firmware corresponding to the computing chip to generate a first firmware file and a second firmware file in standard format; then, performing hash operations on the first firmware file and the second firmware file to obtain corresponding data digests, encrypting the data digests using the private key of the encryption algorithm to generate digital signatures, and concatenating each digital signature to the end of the corresponding firmware file to form a first signed firmware file and a second signed firmware file; then, using a compression algorithm to perform block compression on the first signed firmware file and the second signed firmware file to obtain a first compressed firmware package and a second compressed firmware package; in the first compressed firmware package... File identification information is appended to the end of the second compressed firmware package. This file identification information is used to distinguish between purely encrypted files and encrypted compressed mixed files. Then, the host computer monitoring terminal sends the first and second compressed firmware packages to the photovoltaic inverter. The photovoltaic inverter stores the first and second compressed firmware packages in the first compressed firmware storage area and the second compressed firmware storage area, respectively. This allows the photovoltaic inverter to perform block decompression operations adapted to the compression algorithm on the first and second compressed firmware packages. Based on the root public key stored in the internal Flash, the photovoltaic inverter verifies the decompressed first and second signed firmware files. If the verification passes, the photovoltaic inverter control computing chip and main control chip complete the download and update of their own firmware.

[0037] It should be noted that, in Figure 1 In the system architecture shown, the host computer monitoring terminal can be, but is not limited to, various user-accessible devices such as mobile phones, tablets, personal digital assistants (PDAs), and mobile internet devices (MIDs).

[0038] Please see Figure 2 This application provides a firmware encryption upgrade method to address how to ensure the security of the firmware upgrade process for photovoltaic equipment. The method may include, but is not limited to, the following steps: Step S201: The host computer monitoring terminal processes the data of the first original firmware corresponding to the main control chip and the second original firmware corresponding to the computing chip respectively, and generates the first firmware file and the second firmware file in standard format.

[0039] For example, the first original firmware is M3 HEX firmware. The host computer monitoring terminal performs data processing on the first original firmware corresponding to the main control chip, including: removing redundant address verification data and filling blank segments to generate a first firmware file in standard BIN format.

[0040] For example, the second original firmware is DSP HEX firmware. The host computer monitoring terminal performs data processing on the second original firmware corresponding to the computing chip, including: removing redundant data and adding exclusive function codes, and converting it into a second firmware file in BIN format.

[0041] Step S202: The host computer monitoring terminal performs hash operations on the first firmware file and the second firmware file respectively to obtain the corresponding data digests, and uses the private key of the encryption algorithm to encrypt the data digests to generate digital signatures. Each digital signature is concatenated to the end of the corresponding firmware file to form the first signed firmware file and the second signed firmware file.

[0042] After obtaining the first and second firmware files, security processing operations are performed on both files. For example, a SHA256 hash operation is performed on the entire first firmware file, incorporating all code, configuration parameters, drivers, and other data to generate a unique, fixed-length first data digest. Simultaneously, the same SHA256 hash operation is performed on the second firmware file to obtain the second data digest. The SHA256 hash algorithm is unidirectional, irreversible, and collision-resistant. If any byte of data within the firmware is tampered with, lost, added, or deleted, the resulting digest value will completely change, allowing for precise verification of the firmware file's integrity and tamper-resistance.

[0043] After the data digest is generated, the host computer monitoring terminal can call an asymmetric encryption algorithm (such as ECC elliptic curve cryptography) to encrypt two data digests using a pre-stored private key known only to the developer. The ECC algorithm offers shorter key lengths and lower computational overhead for the same security strength, making it suitable for lightweight encryption scenarios in embedded firmware. After encrypting the digests with the private key, a first digital signature corresponding to the first firmware and a second digital signature corresponding to the second firmware are generated.

[0044] Then, a file concatenation and encapsulation operation is performed, appending the first digital signature binary data to the end of the first firmware file to generate a complete first signed firmware file; similarly, the second digital signature is concatenated to the end of the second firmware file to obtain the second signed firmware file.

[0045] The final signed firmware file contains the original firmware body and the hash check digest encrypted signature. After receiving the firmware, the photovoltaic inverter can separate and extract the signature and the original firmware text, use the matching public key to decrypt the signature to restore the data digest, and then perform a hash operation on the firmware again for comparison. This double verification of firmware integrity and the legality of the release source prevents firmware tampering.

[0046] Step S203: The host computer monitoring terminal sends the first signed firmware file and the second signed firmware file to the photovoltaic inverter.

[0047] Step S204: The photovoltaic inverter receives the first signed firmware file and the second signed firmware file, and verifies the first signed firmware file and the second signed firmware file respectively based on the root public key stored in the internal Flash. If the verification passes, proceed to step S205; if the verification fails, proceed to step S206.

[0048] The photovoltaic inverter receives the first and second signed firmware files from the host computer monitoring terminal. It can initially cache both firmware binary data streams. After fully caching both firmware binary data streams, it initiates the firmware security verification process. The photovoltaic inverter's internal Flash memory has a reserved secure storage partition for storing the root public key. This root public key is paired one-to-one with the host computer monitoring terminal's ECC private key and cannot be erased or rewritten, serving as the root of trust for firmware legitimacy verification.

[0049] The photovoltaic inverter verifies the two signed firmware files separately and independently. Taking a single firmware file as an example, the verification logic is as follows: First, the ECC digital signature data is extracted from the end of the signed firmware, separating the firmware's binary content. Then, the built-in SHA256 hash function is called to recalculate the hash digest of the entire extracted clean firmware text. Next, the ECC asymmetric decryption module is called to read the root public key stored in the internal Flash memory to decrypt the extracted digital signature, restoring the data digest (also known as the original data digest) generated when the host computer monitoring terminal signed the firmware.

[0050] The photovoltaic inverter compares the locally calculated firmware digest and the decrypted original data digest byte by byte. If the two data digests are completely identical, it means the firmware has not been tampered with and the signature was issued by a legitimate host computer private key. The verification passes, and the process automatically proceeds to step S205. If there is any byte difference between the two data digests, or if the digital signature decryption fails, the signature data format is abnormal, or the firmware file is missing or corrupted, the verification fails. Step S206 is executed when the verification fails.

[0051] Step S205: The photovoltaic inverter control computing chip and main control chip complete the download and update of their own firmware.

[0052] In one specific implementation, the photovoltaic inverter control computing chip first completes the download and update of its own firmware, and the main control chip then completes the download and update of its own firmware.

[0053] In one specific implementation, the photovoltaic inverter control computing chip first completes the download and burning of its own firmware. After the computing chip completes the burning, it sends an upgrade completion flag to the main control chip. Upon receiving the upgrade completion flag, the main control chip resets and enters the bootloader to complete the download and update of its own compressed firmware. It is understood that this application designs an active collaborative feedback mechanism for the upgrade process. After the computing chip completes the firmware download and burning, it actively reports the upgrade completion flag to the main control chip, so that the main control chip can complete its own firmware download and burning. Compared to the passive delay waiting scheme in the prior art (where the host computer blindly waits), this can improve the efficiency of dual-chip firmware upgrades. Furthermore, the photovoltaic inverter can also synchronously output global upgrade progress information. For example, the global upgrade progress information is synchronously output through the entire unit's LCD, presented in the form of a global upgrade progress bar. In this way, the LCD's global progress bar provides a visual display, allowing users to intuitively obtain the global upgrade progress and improving the fault tolerance of the upgrade process.

[0054] It should be noted that the technical solution proposed in this application performs differentiated flashing for the M3 firmware and the DSP firmware. The main control chip is the M3 main control chip, whose program startup logic natively supports BIN binary firmware. Therefore, the M3 firmware directly uses the original BIN format. After decompression and verification, no format conversion is required; it is directly written to the independent Flash storage partition allocated to the main control chip, saving format translation overhead and improving flashing speed. The computing chip is the DSP computing chip, whose internal bootloader is only compatible with HEX hexadecimal files and cannot directly parse BIN data streams. Therefore, before flashing, the DSP firmware needs to be format converted, converting the complete BIN data into a standard HEX file before writing it to the DSP's dedicated Flash partition. The two types of firmware partitions are physically isolated and do not overwrite each other; the flashing process is executed independently. This differentiated format adaptation solution does not require additional format parsing drivers, conforms to the native underlying specifications of both chips, ensuring fast flashing of the M3 firmware while meeting the DSP chip's boot verification requirements, avoiding program startup failures and device upgrade freezes caused by file format incompatibility.

[0055] Step S206: The photovoltaic inverter interrupts the upgrade and reports the upgrade fault warning information to the host computer monitoring terminal.

[0056] Implementing the embodiments of this application involves processing the first original firmware corresponding to the main control chip to generate a first firmware file in a standard format, and processing the second original firmware corresponding to the computing chip to generate a second firmware file in a standard format. Then, hash operations are performed on the first and second firmware files respectively to obtain corresponding data digests. The data digests are then encrypted using a private key of an encryption algorithm to generate digital signatures. These digital signatures are concatenated to the end of their respective firmware files to form a first signed firmware file and a second signed firmware file. For the photovoltaic inverter, the first and second signed firmware files can be verified based on the root public key stored in the internal Flash memory. If the verification passes, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware. This method improves the security of the photovoltaic equipment firmware upgrade process.

[0057] Please see Figure 3 This application provides a firmware encryption upgrade method, which aims to solve the problem of how to improve the efficiency of dual-chip firmware upgrades while ensuring the security of the firmware upgrade process for photovoltaic equipment. The method may include, but is not limited to, the following steps: Step S301: The host computer monitoring terminal processes the data of the first original firmware corresponding to the main control chip and the second original firmware corresponding to the computing chip respectively, and generates the first firmware file and the second firmware file in standard format.

[0058] For example, the first original firmware is M3 HEX firmware. The host computer monitoring terminal performs data processing on the first original firmware corresponding to the main control chip, including: removing redundant address verification data and filling blank segments to generate a first firmware file in standard BIN format.

[0059] For example, the second original firmware is DSP HEX firmware. The host computer monitoring terminal performs data processing on the second original firmware corresponding to the computing chip, including: removing redundant data and adding exclusive function codes, and converting it into a second firmware file in BIN format.

[0060] Step S302: The host computer monitoring terminal performs hash operations on the first firmware file and the second firmware file respectively to obtain the corresponding data digests, and uses the private key of the encryption algorithm to encrypt the data digests to generate digital signatures. Each digital signature is concatenated to the end of the corresponding firmware file to form the first signed firmware file and the second signed firmware file.

[0061] After obtaining the first and second firmware files, security processing operations are performed on both files. For example, a SHA256 hash operation is performed on the entire first firmware file, incorporating all code, configuration parameters, drivers, and other data to generate a unique, fixed-length first data digest. Simultaneously, the same SHA256 hash operation is performed on the second firmware file to obtain the second data digest. The SHA256 hash algorithm is unidirectional, irreversible, and collision-resistant. If any byte of data within the firmware is tampered with, lost, added, or deleted, the resulting digest value will completely change, allowing for precise verification of the firmware file's integrity and tamper-resistance.

[0062] After the data digest is generated, the host computer monitoring terminal can call an asymmetric encryption algorithm (such as ECC elliptic curve cryptography) to encrypt two data digests using a pre-stored private key known only to the developer. The ECC algorithm offers shorter key lengths and lower computational overhead for the same security strength, making it suitable for lightweight encryption scenarios in embedded firmware. After encrypting the digests with the private key, a first digital signature corresponding to the first firmware and a second digital signature corresponding to the second firmware are generated.

[0063] Then, a file concatenation and encapsulation operation is performed, appending the first digital signature binary data to the end of the first firmware file to generate a complete first signed firmware file; similarly, the second digital signature is concatenated to the end of the second firmware file to obtain the second signed firmware file.

[0064] The final signed firmware file contains the original firmware body and the hash check digest encrypted signature. After receiving the firmware, the photovoltaic inverter can separate and extract the signature and the original firmware text, use the matching public key to decrypt the signature to restore the data digest, and then perform a hash operation on the firmware again for comparison. This double verification of firmware integrity and the legality of the release source prevents firmware tampering.

[0065] Step S303: The host computer monitoring terminal uses a compression algorithm to compress the first signed firmware file and the second signed firmware file into blocks to obtain the first compressed firmware package and the second compressed firmware package.

[0066] Before distributing the firmware, the host computer monitoring terminal first performs block compression processing on the first and second signed firmware files, which have completed digital signature encapsulation. For example, the lightweight Fastlz compression algorithm can be used for data compression. This algorithm has fast compression and decompression speeds, low resource consumption, and is suitable for the transmission scenarios of embedded devices in photovoltaic inverters. In practical applications, a fixed block length of 4KB can be set, and the two signed firmware binary data files are divided equally. The remaining data less than 4KB at the end is treated as an independent block. For each data block obtained from the division, the Fastlz algorithm is called separately to compress and generate compressed block data, and the plaintext length and the length of the compressed data are encapsulated in the header of each block. After all block processing is completed, all compressed blocks with header identifiers are concatenated in the original file order to generate the first compressed firmware package and the second compressed firmware package, respectively. The length field carried by the block allows the photovoltaic inverter to accurately distinguish the boundaries of each block when receiving the data, quickly verify the integrity of a single block of data, avoid retransmission of the entire package after an error, and reduce transmission bandwidth consumption and upgrade time.

[0067] Step S304: The host computer monitoring terminal appends file identification information to the end of the first compressed firmware package and the second compressed firmware package. The file identification information is used to distinguish between purely encrypted files and encrypted compressed mixed files.

[0068] For example, file identification information includes 4 bytes of total file length, 4 bytes of file checksum, and 1 byte of file type identifier.

[0069] Step S305: The host computer monitoring terminal sends the first compressed firmware package and the second compressed firmware package to the photovoltaic inverter.

[0070] Step S306: The photovoltaic inverter stores the first compressed firmware package and the second compressed firmware package in the first compressed firmware storage area and the second compressed firmware storage area, respectively, so that the photovoltaic inverter performs a block decompression operation adapted to the compression algorithm on the first compressed firmware and the second compressed firmware, and verifies the decompressed first signed firmware file and the second signed firmware file based on the root public key stored in the internal Flash. If the verification passes, proceed to step S307; if the verification fails, proceed to step S308.

[0071] After receiving the first and second compressed firmware packets, the photovoltaic inverter writes the first compressed firmware packet into a hardware-defined first compressed firmware storage area, and stores the second compressed firmware packet in a separate second compressed firmware storage area. The two storage areas are physically isolated to prevent data packets from overwriting and interfering with each other. After storage is complete, the inverter initiates an integrated process of block decompression and signature verification adapted to the Fastlz compression algorithm.

[0072] The photovoltaic inverter first reads the factory-fixed, unrewritable root public key from the internal Flash memory. Then, it performs security verification on the complete signed firmware after decompressing the compressed package: first, it peels off the ECC digital signature from the end of the firmware, calculates the SHA256 digest of the entire original firmware, and uses the root public key to decrypt the signature to restore the host computer data digest. The two sets of data digests are compared byte by byte. At the same time, the file mask flag can be further verified to complete the dual verification of the firmware's source legitimacy and integrity.

[0073] In practical applications, the 4K block decompression process can be initiated only after the verification is passed. The photovoltaic inverter can read the plaintext length and compressed data length stored in the header of each block in the compressed package, and sequentially retrieve the Fastlz decompression module to restore the binary data block by block. The decompressed DSP firmware and M3 firmware are then written to their respective dedicated partitions in the external Flash memory. These partitions are independent of each other to prevent program confusion.

[0074] If the signature decryption fails, the hash digest does not match, or the file mask flag is abnormal, and any one of the verifications fails, proceed to step S308. Only if all verifications and block decompression operations are successful will the process proceed to step S307 to perform the original program erasure and new firmware writing operations.

[0075] Step S307: The photovoltaic inverter control and computing chip and the main control chip complete the download and update of their own firmware.

[0076] In one specific implementation, the photovoltaic inverter control computing chip first completes the download and update of its own firmware, and the main control chip then completes the download and update of its own firmware.

[0077] In one specific implementation, the photovoltaic inverter control computing chip first completes the download and burning of its own firmware. After the computing chip completes the burning, it sends an upgrade completion flag to the main control chip. Upon receiving the upgrade completion flag, the main control chip resets and enters the bootloader to complete the download and update of its own compressed firmware. It is understood that this application designs an active collaborative feedback mechanism for the upgrade process. After the computing chip completes the firmware download and burning, it actively reports the upgrade completion flag to the main control chip, so that the main control chip can complete its own firmware download and burning. Compared to the passive delay waiting scheme in the prior art (where the host computer blindly waits), this can improve the efficiency of dual-chip firmware upgrades. Furthermore, the photovoltaic inverter can also synchronously output global upgrade progress information. For example, the global upgrade progress information is synchronously output through the entire unit's LCD, presented in the form of a global upgrade progress bar. In this way, the LCD's global progress bar provides a visual display, allowing users to intuitively obtain the global upgrade progress and improving the fault tolerance of the upgrade process.

[0078] It should be noted that the technical solution proposed in this application performs differentiated flashing for the M3 firmware and the DSP firmware. The main control chip is the M3 main control chip, whose program startup logic natively supports BIN binary firmware. Therefore, the M3 firmware directly uses the original BIN format. After decompression and verification, no format conversion is required; it is directly written to the independent Flash storage partition allocated to the main control chip, saving format translation overhead and improving flashing speed. The computing chip is the DSP computing chip, whose internal bootloader is only compatible with HEX hexadecimal files and cannot directly parse BIN data streams. Therefore, before flashing, the DSP firmware needs to be format converted, converting the complete BIN data into a standard HEX file before writing it to the DSP's dedicated Flash partition. The two types of firmware partitions are physically isolated and do not overwrite each other; the flashing process is executed independently. This differentiated format adaptation solution does not require additional format parsing drivers, conforms to the native underlying specifications of both chips, ensuring fast flashing of the M3 firmware while meeting the DSP chip's boot verification requirements, avoiding program startup failures and device upgrade freezes caused by file format incompatibility.

[0079] Step S308: The photovoltaic inverter is interrupted during the upgrade and an upgrade fault warning is reported to the host computer monitoring terminal.

[0080] In implementing the embodiments of this application, after encrypting the first firmware file and the second firmware file to obtain the first signed firmware file and the second signed firmware file, a compression algorithm can be used to perform block compression on the first signed firmware file and the second signed firmware file to obtain the first compressed firmware package and the second compressed firmware package. Then, these packages are sent to the photovoltaic inverter. The photovoltaic inverter performs block decompression operations on the first compressed firmware file and the second compressed firmware file, adapted to the compression algorithm, and verifies the decompressed first signed firmware file and the second signed firmware file based on the root public key stored in its internal Flash memory. If the verification passes, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware. On the one hand, firmware block compression can reduce the transmission size and improve the efficiency of dual-chip firmware upgrades; on the other hand, encryption of the firmware can improve the security of the firmware upgrade process.

[0081] To better understand the technical solutions described in this application, an embodiment of this application discloses a host computer monitoring terminal 40. This host computer monitoring terminal is applied to a firmware encryption system, which also includes a photovoltaic inverter. The photovoltaic inverter includes a main control chip, a computing chip, and internal Flash memory. The internal Flash memory has a reserved secure storage partition for storing the root public key. Figure 4 As shown, the host computer monitoring terminal 40 includes a processing module 401 and a communication module 402; wherein, The processing module 401 is used to process the first original firmware corresponding to the main control chip and the second original firmware corresponding to the computing chip respectively to generate a first firmware file and a second firmware file in standard format; to perform hash operation on the first firmware file and the second firmware file respectively to obtain corresponding data digests, and to encrypt the data digests with the private key of the encryption algorithm to generate a number front, and to concatenate each digital signature to the end of the corresponding firmware file to form a first signed firmware file and a second signed firmware file. The communication module 402 is used to send the first signed firmware file and the second signed firmware file to the photovoltaic inverter, so that the photovoltaic inverter can verify the first signed firmware file and the second signed firmware file based on the root public key stored in the internal Flash. If the verification is successful, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware.

[0082] The first original firmware is M3 HEX firmware. The processing module 401 performs data processing on the first original firmware corresponding to the main control chip, including: removing redundant address verification data and filling blank segments to generate a first firmware file in standard BIN format.

[0083] The second original firmware is DSP HEX firmware. The processing module 401 performs data processing on the second original firmware corresponding to the computing chip, including: removing redundant data and adding exclusive function codes, and converting it into a second firmware file in BIN format.

[0084] The photovoltaic inverter further includes an external Flash memory; the external Flash memory is divided into an independent first compressed firmware storage area and a second compressed firmware storage area, respectively used to store the compressed firmware of the main control chip and the computing chip; after the processing module 401 concatenates each digital signature to the end of the corresponding firmware file to form a first signed firmware file and a second signed firmware file, it is further used to: The first signed firmware file and the second signed firmware file are compressed in blocks using a compression algorithm to obtain a first compressed firmware package and a second compressed firmware package. File identification information is appended to the end of the first compressed firmware package and the second compressed firmware package. The file identification information is used to distinguish between purely encrypted files and encrypted-compressed mixed files. The communication module 402 sends the first signed firmware file and the second signed firmware file to the photovoltaic inverter, including: The first compressed firmware package and the second compressed firmware package are sent to the photovoltaic inverter. The photovoltaic inverter stores the first compressed firmware package and the second compressed firmware package in the first compressed firmware storage area and the second compressed firmware storage area, respectively, so that the photovoltaic inverter performs a block decompression operation adapted to the compression algorithm on the first compressed firmware and the second compressed firmware. Based on the root public key stored in the internal Flash, the photovoltaic inverter verifies the decompressed first signed firmware file and the second signed firmware file, respectively. If the verification is successful, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware.

[0085] Wherein, if the verification passes, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware, including: The photovoltaic inverter controls the computing chip to first complete the download and burning of its own firmware. After the computing chip has completed the burning, it sends an upgrade completion flag to the main control chip. After receiving the upgrade completion flag, the main control chip resets and enters the bootloader to complete the download and update of its own compressed firmware, and simultaneously outputs global upgrade progress information.

[0086] The global upgrade progress information is synchronously output through the entire machine's LCD and presented in the form of a global upgrade progress bar.

[0087] The compression algorithm is Fastlz; the fixed block length for block compression is 4K; and the header of each block encapsulates the plaintext length and the length of the compressed data.

[0088] in, The main control chip is an M3 main control chip, and its firmware is written to the corresponding Flash storage area in BIN format during the burning process. The computing chip is a DSP computing chip, and its firmware is converted to HEX format and written to the corresponding Flash storage area during the burning process.

[0089] Implementing this embodiment involves processing the first original firmware corresponding to the main control chip to generate a first firmware file in a standard format, and processing the second original firmware corresponding to the computing chip to generate a second firmware file in a standard format. Then, hash operations are performed on the first and second firmware files respectively to obtain corresponding data digests. The data digests are then encrypted using a private key of an encryption algorithm to generate digital signatures. These digital signatures are concatenated to the end of their respective firmware files to form a first signed firmware file and a second signed firmware file. For the photovoltaic inverter, the first and second signed firmware files can be verified based on the root public key stored in its internal Flash memory. If the verification passes, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware. This method improves the security of the photovoltaic equipment firmware upgrade process.

[0090] Please see Figure 5 This is a schematic diagram of another host computer monitoring terminal 50 provided in an embodiment of this application. It may include a processor 501, a memory 504, and a communication module 505. The processor 501, memory 504, and communication module 505 can be interconnected via a bus 506. The memory 504 may be a high-speed random access memory (RAM) or a non-volatile memory, such as at least one disk storage device. Optionally, the memory 504 may also be at least one storage system located away from the aforementioned processor 501. The memory 504 is used to store application code and may include an operating system, a network communication module, a user interface module, and a data processing program. The communication module 505 is used for information interaction with external devices. The processor 501 is configured to call the program code to execute the steps of the firmware encryption upgrade method proposed in this application.

[0091] This application also provides another computer storage medium for storing the above-mentioned... Figure 2 , Figure 3The computer software instructions used by the host computer monitoring terminal include programs designed for executing the methods described in the embodiments above. Firmware encryption upgrades can be achieved by executing the stored programs.

[0092] This application also provides a computer storage medium for storing the above-mentioned... Figure 2 , Figure 3 The computer software instructions used in the photovoltaic inverter shown include programs designed for executing the methods described in the embodiments above. Firmware encryption upgrades can be achieved by executing the stored programs.

[0093] It should be understood that the application scenarios applicable to the methods provided in the embodiments of this application are only examples and are not limited to these in actual applications.

[0094] It should also be understood that the first, second, third and various numerical designations used in this application are merely distinctions for ease of description and are not intended to limit the scope of this application.

[0095] It should be understood that the term "and / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Furthermore, the character " / " in this application generally indicates that the preceding and following related objects have an "or" relationship.

[0096] Furthermore, in the various embodiments of this application, the order of the above-mentioned process numbers does not imply the 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.

[0097] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0098] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0099] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0100] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0101] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

[0102] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0103] The above embodiments are merely illustrative of several implementation methods described in detail, but they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this specification, and these all fall within the scope of protection of this specification. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A firmware encryption upgrade method, characterized in that, The method is applied to a firmware encryption system, which includes a host computer monitoring terminal and a photovoltaic inverter; the photovoltaic inverter includes a main control chip, a computing chip, and internal Flash; wherein, the internal Flash has a reserved secure storage partition for storing the root public key; the method includes: The host computer monitoring terminal processes the data of the first original firmware corresponding to the main control chip and the second original firmware corresponding to the computing chip to generate a first firmware file and a second firmware file in standard format. The host computer monitoring terminal performs hash operations on the first firmware file and the second firmware file respectively to obtain corresponding data digests, and uses the private key of the encryption algorithm to encrypt the data digests to generate digital signatures. Each digital signature is concatenated to the end of the corresponding firmware file to form the first signed firmware file and the second signed firmware file. The host computer monitoring terminal sends the first signed firmware file and the second signed firmware file to the photovoltaic inverter, so that the photovoltaic inverter verifies the first signed firmware file and the second signed firmware file based on the root public key stored in the internal Flash. If the verification is successful, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware.

2. The method according to claim 1, characterized in that, The first original firmware is M3 HEX firmware. The host computer monitoring terminal performs data processing on the first original firmware corresponding to the main control chip, including: removing redundant address verification data and filling blank segments to generate a first firmware file in standard BIN format.

3. The method according to claim 1, characterized in that, The second original firmware is DSP HEX firmware. The host computer monitoring terminal performs data processing on the second original firmware corresponding to the computing chip, including: removing redundant data and adding exclusive function codes, and converting it into a second firmware file in BIN format.

4. The method according to claim 1, characterized in that, The photovoltaic inverter also includes an external Flash memory; the external Flash memory is divided into an independent first compressed firmware storage area and a second compressed firmware storage area, which are used to store the compressed firmware of the main control chip and the computing chip, respectively. After concatenating each digital signature to the end of the corresponding firmware file to form the first signed firmware file and the second signed firmware file, the process further includes: The host computer monitoring terminal uses a compression algorithm to compress the first signed firmware file and the second signed firmware file into blocks to obtain a first compressed firmware package and a second compressed firmware package. The host computer monitoring terminal appends file identification information to the end of the first compressed firmware package and the second compressed firmware package. The file identification information is used to distinguish between purely encrypted files and encrypted compressed mixed files. The host computer monitoring terminal sends the first signed firmware file and the second signed firmware file to the photovoltaic inverter, including: The host computer monitoring terminal sends the first compressed firmware package and the second compressed firmware package to the photovoltaic inverter. The photovoltaic inverter stores the first compressed firmware package and the second compressed firmware package in the first compressed firmware storage area and the second compressed firmware storage area, respectively, so that the photovoltaic inverter performs a block decompression operation adapted to the compression algorithm on the first compressed firmware and the second compressed firmware. Based on the root public key stored in the internal Flash, the photovoltaic inverter verifies the decompressed first signed firmware file and the second signed firmware file, respectively. If the verification is successful, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware.

5. The method according to claim 4, characterized in that, If the verification passes, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware, including: The photovoltaic inverter controls the computing chip to first complete the download and burning of its own firmware. After the computing chip has completed the burning, it sends an upgrade completion flag to the main control chip. After receiving the upgrade completion flag, the main control chip resets and enters the bootloader to complete the download and update of its own compressed firmware, and simultaneously outputs global upgrade progress information.

6. The method according to claim 5, characterized in that, The global upgrade progress information is synchronously output through the entire device's LCD and presented in the form of a global upgrade progress bar.

7. The method according to claim 4, characterized in that, The compression algorithm is the Fastlz algorithm; the fixed block length for block compression is 4K; each block header encapsulates the plaintext length and the compressed data length.

8. The method according to any one of claims 1-7, characterized in that, The main control chip is an M3 main control chip, and its firmware is written to the corresponding Flash storage area in BIN format during the burning process. The computing chip is a DSP computing chip, and its firmware is converted to HEX format and written to the corresponding Flash storage area during the burning process.

9. A host computer monitoring terminal, characterized in that, The host computer monitoring terminal is used in a firmware encryption system, which also includes a photovoltaic inverter. The photovoltaic inverter includes a main control chip, a computing chip, and internal Flash memory. The internal Flash memory has a reserved secure storage partition for storing the root public key. The host computer monitoring terminal includes a processing module and a communication module. The processing module is used to process the first original firmware corresponding to the main control chip and the second original firmware corresponding to the computing chip respectively to generate a first firmware file and a second firmware file in standard format; perform hash operation on the first firmware file and the second firmware file respectively to obtain the corresponding data digest, encrypt the data digest with the private key of the encryption algorithm to generate a number front, and concatenate each digital signature to the end of the corresponding firmware file to form a first signed firmware file and a second signed firmware file. The communication module is used to send the first signed firmware file and the second signed firmware file to the photovoltaic inverter, so that the photovoltaic inverter can verify the first signed firmware file and the second signed firmware file based on the root public key stored in the internal Flash. If the verification is successful, the photovoltaic inverter controls the computing chip and the main control chip to complete the download and update of its own firmware.

10. A host computer monitoring terminal, characterized in that, The device includes a processor and a memory interconnected thereto, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is configured to invoke the program instructions to perform the method as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-8.