Photovoltaic inverter firmware upgrading method, device and equipment and storage medium

By dividing the memory of the photovoltaic inverter and determining the file type of the upgrade file, the problems of low firmware upgrade efficiency and low success rate in the prior art are solved, and efficient and stable firmware data partition upgrade is achieved.

CN119938108APending Publication Date: 2025-05-06HUIZHOU HUINENG JINGDIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411977309.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the existing photovoltaic inverter firmware upgrade methods, the control algorithm and operation data are stored and upgraded uniformly, resulting in large volume, long time, low efficiency, and easy to lead to redundant updates and system abnormalities, reducing the success rate.

Method used

By dividing the memory of the photovoltaic inverter, storing firmware data in partitions, and determining the target storage area according to the type of upgrade file to update it, partitioning of firmware data is realized.

Benefits of technology

It improves the success rate and efficiency of firmware upgrades, avoids redundant updates, ensures accurate writing of upgrade data, and improves the stability and flexibility of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938108A_ABST
    Figure CN119938108A_ABST
Patent Text Reader

Abstract

The invention provides a photovoltaic inverter firmware upgrading method and device, equipment and a storage medium, and the method comprises the steps: carrying out the region division of a storage of a photovoltaic inverter, obtaining a plurality of storage regions, and storing different firmware data in each storage region; obtaining an upgrading file of the photovoltaic inverter, and reading a field for storing an upgrading file type in the upgrading file to obtain an upgrading type of the upgrading file; and determining a target storage area in the plurality of storage areas according to the upgrading type of the upgrading file, and updating firmware data in the target storage area by utilizing the upgrading file to realize firmware upgrading. By the adoption of the scheme, partition upgrading of firmware data is achieved, and the success rate and efficiency of firmware upgrading are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic information engineering, and in particular to a photovoltaic inverter firmware upgrade method, device, equipment and storage medium. Background Art

[0002] With the rapid development of photovoltaic power generation technology, the performance and stability of photovoltaic inverters, as the core components of photovoltaic power generation systems, are crucial to the power generation efficiency and safety of the entire system. However, photovoltaic inverters may encounter various problems during operation, such as performance degradation, function loss or safety hazards, which often need to be solved through firmware upgrades.

[0003] In the prior art, all firmware data of photovoltaic inverters, including control algorithms and operating data, are usually stored in a mixed manner. Since the control algorithms and operating data are stored in the same firmware, when the firmware is upgraded, the algorithms and data need to be updated at the same time, resulting in large upgrade file size, long upgrade time, and low upgrade efficiency. In addition, the unified loading and unified upgrade of control algorithms and operating data can easily lead to redundant updates, low efficiency, and even system abnormalities, thereby reducing the success rate of firmware upgrades. Summary of the invention

[0004] In view of this, the object of the present invention is to provide a photovoltaic inverter firmware upgrade method, device, equipment and storage medium to achieve partition upgrade of firmware data and improve the success rate and efficiency of firmware upgrade.

[0005] In a first aspect, an embodiment of the present application provides a method for upgrading firmware of a photovoltaic inverter, the method comprising:

[0006] The memory of the photovoltaic inverter is divided into a plurality of storage areas, wherein different firmware data is stored in each storage area;

[0007] Acquire an upgrade file of the photovoltaic inverter, and read a field storing an upgrade file type in the upgrade file to obtain an upgrade type of the upgrade file;

[0008] A target storage area is determined among the plurality of storage areas according to the upgrade type of the upgrade file, and the firmware data in the target storage area is updated using the upgrade file to implement firmware upgrade.

[0009] Optionally, the storage area includes an algorithm area and a data area; the upgrade type includes algorithm upgrade and data upgrade; and determining a target storage area from the plurality of storage areas according to the upgrade type of the upgrade file includes:

[0010] When the upgrade type of the upgrade file is algorithm upgrade, determining the target storage area as the algorithm area;

[0011] When the upgrade type of the upgrade file is data upgrade, the target storage area is determined to be the data area.

[0012] Optionally, the method further comprises:

[0013] For an upgrade file whose upgrade type is algorithm upgrade, an algorithm binary file generator is used to generate an algorithm binary file;

[0014] The algorithm binary file is packaged using a firmware packager to obtain an upgrade file whose upgrade type is algorithm upgrade.

[0015] Optionally, the method further comprises:

[0016] For an upgrade file whose upgrade type is data upgrade, a data binary file is generated using a data binary file generator;

[0017] The data binary file is packaged using a firmware packager to obtain an upgrade file whose upgrade type is data upgrade.

[0018] Optionally, the data binary file generator includes a parameter selector and a parameter generator; the step of generating the data binary file by using the data binary file generator includes:

[0019] Determining target parameter data from a number of optional parameter data using the parameter selector;

[0020] The parameter generator is used to generate the data binary file according to the target parameter data.

[0021] Optionally, the storage area includes a download area; and the updating of the firmware data in the target storage area using the upgrade file includes:

[0022] Storing the upgrade file in the download area for verification;

[0023] If the upgrade file passes the verification process, the original firmware data in the target storage area is deleted, and the upgrade file is written into the target storage area to implement firmware data update.

[0024] Optionally, the method further comprises:

[0025] Use the linker script to specify different storage areas for upgrade files of different upgrade types.

[0026] In a second aspect, an embodiment of the present application provides a photovoltaic inverter firmware upgrade device, the device comprising:

[0027] A storage area division module, used for dividing the memory of the photovoltaic inverter into a plurality of storage areas, wherein different firmware data is stored in each storage area;

[0028] An upgrade file parsing module, used for obtaining an upgrade file of the photovoltaic inverter, and reading a field storing an upgrade file type in the upgrade file to obtain an upgrade type of the upgrade file;

[0029] The firmware upgrade module is used to determine a target storage area among the plurality of storage areas according to the upgrade type of the upgrade file, and to update the firmware data in the target storage area using the upgrade file to implement firmware upgrade.

[0030] Optionally, the storage area includes an algorithm area and a data area; the upgrade type includes algorithm upgrade and data upgrade; and determining a target storage area from the plurality of storage areas according to the upgrade type of the upgrade file includes:

[0031] When the upgrade type of the upgrade file is algorithm upgrade, determining the target storage area as the algorithm area;

[0032] When the upgrade type of the upgrade file is data upgrade, the target storage area is determined to be the data area.

[0033] Optionally, the device further includes a first upgrade file generating module, wherein the first upgrade file generating module is configured to:

[0034] For an upgrade file whose upgrade type is algorithm upgrade, an algorithm binary file generator is used to generate an algorithm binary file;

[0035] The algorithm binary file is packaged using a firmware packager to obtain an upgrade file whose upgrade type is algorithm upgrade.

[0036] Optionally, the device further includes a second upgrade file generating module, wherein the second upgrade file generating module is configured to:

[0037] For an upgrade file whose upgrade type is data upgrade, a data binary file is generated using a data binary file generator;

[0038] The data binary file is packaged using a firmware packager to obtain an upgrade file whose upgrade type is data upgrade.

[0039] Optionally, the data binary file generator includes a parameter selector and a parameter generator; the step of generating the data binary file by using the data binary file generator includes:

[0040] Determining target parameter data from a number of optional parameter data using the parameter selector;

[0041] The parameter generator is used to generate the data binary file according to the target parameter data.

[0042] Optionally, the storage area includes a download area; and the updating of the firmware data in the target storage area using the upgrade file includes:

[0043] Storing the upgrade file in the download area for verification;

[0044] If the upgrade file passes the verification process, the original firmware data in the target storage area is deleted, and the upgrade file is written into the target storage area to implement firmware data update.

[0045] Optionally, the device further comprises a storage area specifying module, wherein the storage area specifying module is configured to:

[0046] Use the linker script to specify different storage areas for upgrade files of different upgrade types.

[0047] In a third aspect, an embodiment of the present application provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the photovoltaic inverter firmware upgrade method described in any optional implementation manner of the first aspect are performed.

[0048] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, executes the steps of the photovoltaic inverter firmware upgrade method described in any optional implementation manner in the first aspect above.

[0049] The technical solution provided by this application includes but is not limited to the following beneficial effects:

[0050] This application divides the memory of the photovoltaic inverter into several storage areas and allocates different firmware data to each storage area to avoid firmware data confusion, which can make the upgrade process clearer and more orderly. Then, the target storage area is determined according to the upgrade type of the upgrade file and updated in a targeted manner, which can ensure that the upgrade data is accurately written to the correct location. During the upgrade process, independent upgrades are achieved by rewriting specific memory areas to avoid irrelevant areas from being modified, thereby realizing partitioned upgrades of firmware data and improving the success rate and efficiency of firmware upgrades.

[0051] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0053] Figure 1 A flowchart of a photovoltaic inverter firmware upgrade method provided in the first embodiment of the present invention is shown;

[0054] Figure 2 A flowchart of a method for generating an algorithm upgrade file provided in Embodiment 1 of the present invention is shown;

[0055] Figure 3 A flow chart of a method for generating a data upgrade file provided in the first embodiment of the present invention is shown;

[0056] Figure 4 A schematic diagram of storage area division provided by the first embodiment of the present invention is shown;

[0057] Figure 5 A flow chart of a method for generating a data binary file provided by the first embodiment of the present invention is shown;

[0058] Figure 6 A flowchart of a firmware data updating method provided by the first embodiment of the present invention is shown;

[0059] Figure 7 A schematic diagram of a storage area link script provided by the first embodiment of the present invention is shown;

[0060] Figure 8 A schematic diagram of the structure of a photovoltaic inverter firmware upgrade device provided in the second embodiment of the present invention is shown;

[0061] Fig. 9 A schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention is shown. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.

[0063] Embodiment 1

[0064] To facilitate understanding of this application, Figure 1 The flowchart of a photovoltaic inverter firmware upgrade method provided in the first embodiment of the present invention is shown to describe the contents of the embodiment of the present application in detail.

[0065] See also Figure 1 As shown, Figure 1 A flowchart of a photovoltaic inverter firmware upgrade method provided in the first embodiment of the present invention is shown, wherein the method comprises steps S101 to S103:

[0066] S101: Divide the memory of the photovoltaic inverter into a plurality of storage areas, wherein different firmware data is stored in each storage area.

[0067] Specifically, the memory of the inverter is first divided into multiple independent storage areas, each of which stores specific firmware data. This division method is conducive to organizing and managing firmware data, and can also ensure that different versions or types of firmware data will not interfere with or conflict with each other.

[0068] S102: Acquire an upgrade file of the photovoltaic inverter, and read a field storing an upgrade file type in the upgrade file to obtain an upgrade type of the upgrade file.

[0069] Specifically, when the firmware system starts, the boot program determines whether the PV inverter firmware needs to be upgraded, and determines the target upgrade type (algorithm upgrade and / or data upgrade). Obtain the upgrade file of the target upgrade type for upgrading the PV inverter, which usually contains new firmware data. After obtaining the upgrade file, use professional tools or algorithms to parse it to read the upgrade type, version number, storage area address, MD5 calibration and other fields. The upgrade type may include full upgrade (i.e. replacing the entire firmware), partial upgrade (updating only part of the firmware) or upgrade of specific modules.

[0070] S103: determining a target storage area among the plurality of storage areas according to the upgrade type of the upgrade file, and using the upgrade file to update the firmware data in the target storage area to implement firmware upgrade.

[0071] Specifically, the target storage area is located according to the upgrade type of the upgrade file. The target storage area is the area where the firmware data corresponding to the upgrade file is stored. For example, if the upgrade file is for upgrading the control algorithm of the inverter, then the target storage area is the area where the control algorithm firmware data is stored. The integrity of the upgrade data is judged by a partition verification mechanism (such as CRC or Hash verification) to ensure that the upgrades of different areas do not interfere with each other, and then the data in the upgrade file is used to update the firmware data in the area.

[0072] The present application divides the memory into areas, obtains and parses the upgrade file, and finally updates the firmware data of the target storage area according to the upgrade type. This can achieve partitioned and block upgrades of the firmware, improve upgrade efficiency, and enhance the flexibility and stability of photovoltaic inverter firmware upgrades.

[0073] In an optional implementation scheme, the storage area includes an algorithm area and a data area; the upgrade type includes an algorithm upgrade and a data upgrade; and the step of determining a target storage area from among the plurality of storage areas according to the upgrade type of the upgrade file includes:

[0074] When the upgrade type of the upgrade file is algorithm upgrade, the target storage area is determined to be the algorithm area; when the upgrade type of the upgrade file is data upgrade, the target storage area is determined to be the data area.

[0075] Specifically, the algorithm area is an area in the memory used to store the control algorithm code for the operation of the inverter. Updating the algorithm area can optimize the performance of the controller and thus improve the stability of the system operation. The data area is an area used to store the regulatory parameters, calibration parameters, and equipment information required for the operation of the inverter. Updating these data can optimize the operating parameters of the inverter and improve its adaptability and stability. The data area can also store historical real-time data, historical alarm data, and operation logs. The data area where this data is located can be separately divided into a read-only data area, but this area is not within the scope of the firmware upgrade of this application.

[0076] The purpose of this application is to distinguish the algorithm area from the data area so that the data in different areas can be upgraded separately. If the algorithm upgrade and data upgrade need to be performed at the same time, the files and data in both the algorithm area and the data area are upgraded.

[0077] In an alternative embodiment, see Figure 2 As shown, Figure 2 A flowchart of a method for generating an algorithm upgrade file provided in the first embodiment of the present invention is shown, wherein the method comprises steps S201 to S202:

[0078] S201: For an upgrade file whose upgrade type is algorithm upgrade, an algorithm binary file generator is used to generate an algorithm binary file.

[0079] Specifically, the algorithm binary file generator, that is, the algorithm bin file generator includes a compiler, which uses a GCC compiler or an ARMCC compiler to compile the algorithm source code to generate an original algorithm binary file (usually with a .bin extension), that is, the original algorithm bin file.

[0080] S202: Using a firmware packager to package the algorithm binary file to obtain an upgrade file whose upgrade type is algorithm upgrade.

[0081] Specifically, the firmware packager is used to read the binary file and may add some additional information, such as version number, checksum, configuration file, etc., to finally obtain an algorithm file for upgrading. This file not only contains the original algorithm binary code, but also contains all necessary upgrade information and metadata, and finally obtains the algorithm file for upgrading (upgrade type is an upgrade file for algorithm upgrade).

[0082] In an alternative embodiment, see Figure 3 As shown, Figure 3 A flow chart of a method for generating a data upgrade file provided in the first embodiment of the present invention is shown, wherein the method further comprises steps S301 to S302:

[0083] S301: For an upgrade file whose upgrade type is data upgrade, a data binary file is generated by using a data binary file generator.

[0084] Specifically, a data binary file generator, that is, a data bin file generator (including a parameter selector and a parameter generator) is used to create a data binary file, that is, an original data bin file. This file stores all necessary upgrade information in binary form, ensuring efficient processing and storage of data.

[0085] S302: Using a firmware packager to package the data binary file to obtain an upgrade file whose upgrade type is data upgrade.

[0086] Specifically, it is further processed by the firmware packager. The firmware packager not only packages the data binary file as the core content, but also adds a series of metadata. After the firmware packager completes the packaging process, the data file for the upgrade (the upgrade file with the upgrade type of data upgrade) is finally obtained.

[0087] The data binary file generator and firmware packager can be implemented through shell scripts, host computers, etc. The firmware packager processes the original binary file and appends a 96-byte file header field. The file header contains: record the upgrade target (algorithm or data), version number and storage area address, CRC check, MD5 check and other fields.

[0088] In an optional embodiment, the data binary file generator includes a parameter selector and a parameter generator.

[0089] Specifically, the parameter selector is the first part of the data binary file generator. Its main task is to select the parameters that need to be included in the binary file from a series of available parameters according to specific requirements or conditions. Figure 4 As shown, Figure 4 A schematic diagram of a storage area division provided by the first embodiment of the present invention is shown, wherein the storage area is divided into a user boot area, an algorithm area, a read-write data area (i.e., the data area described in this application), a read-only data area, and a download area. The user boot area includes a secondary boot area, the algorithm area includes a control algorithm area, the read-write data area includes a regulatory parameter area, a calibration parameter area, and a device information area, and the read-only data area includes a historical real-time data area, a historical alarm area, and an operation log area. The read-write data area contains various types of parameters, such as regulatory parameters, calibration parameters, and device information parameters. The parameter selector allows the user or system to select the part that needs to be updated or upgraded from these parameters according to actual needs.

[0090] Once the parameter selector determines the parameter type that needs to be included in the binary file, the parameter generator takes over the next task. The main function of the parameter generator is to perform format matching and conversion according to the type of the selected parameter to generate binary data that meets the device requirements. For different types of parameters (such as regulatory parameters, calibration parameters, or device information parameters), the parameter generator applies different format rules and conversion algorithms to ensure that the generated binary file can be correctly read by the device and burned into the corresponding data partition.

[0091] exist Figure 4 In the scenario shown, the data area is divided into multiple partitions, each of which stores a specific type of parameter data. The parameter generator ensures that the generated binary file matches the format requirements of these partitions so that during the firmware upgrade process, the new parameter data can be accurately written to the corresponding partition.

[0092] See also Figure 5 As shown, Figure 5 A flowchart of a method for generating a data binary file provided by the first embodiment of the present invention is shown, wherein the method of generating a data binary file by using a data binary file generator comprises steps S501 to S502:

[0093] S501: Determine target parameter data from a number of optional parameter data using the parameter selector.

[0094] Specifically, the parameter selector and parameter generator work together in the data binary file generator to complete the entire process from parameter selection to binary data generation. First, the parameter selector selects the parameter type that needs to be included in the binary file from the read-write data area according to user requirements or system instructions.

[0095] S502: Utilize the parameter generator to generate the data binary file according to the target parameter data.

[0096] Specifically, the parameter generator then performs format matching and conversion according to the type of the selected parameter to generate binary data that meets the device requirements. Finally, these binary data are combined into a complete binary file for subsequent firmware upgrade operations.

[0097] In an alternative embodiment, see Figure 6 As shown, Figure 6 A flowchart of a firmware data updating method provided by the first embodiment of the present invention is shown, wherein the storage area includes a download area; the firmware data in the target storage area is updated by using the upgrade file, including steps S601 to S602:

[0098] S601: storing the upgrade file in the download area for verification.

[0099] Specifically, the prepared upgrade file is transferred to the download area of ​​the device. As a temporary storage point, the download area mainly receives and temporarily stores files to be used for firmware updates. Once the upgrade file is successfully stored in the download area, it will be verified immediately.

[0100] S602: If the upgrade file passes the verification process, the original firmware data in the target storage area is deleted, and the upgrade file is written into the target storage area to implement firmware data update.

[0101] Specifically, once the upgrade file passes the verification process, the original firmware data in the target storage area is deleted to ensure that the new firmware data can be written smoothly and occupy the original space to avoid conflicts between the new and old data. Next, the upgrade file in the download area is written to the target storage area. This writing process needs to ensure the accuracy and integrity of the data, and usually includes additional steps such as data format conversion and checksum verification. Once the writing is completed, the device's firmware is successfully updated.

[0102] At this point, some additional initialization steps or restarts may be performed to load new algorithms or data to ensure that the new firmware can run properly and function. The verification processing method includes but is not limited to MD5 verification.

[0103] In an optional embodiment, the method further comprises:

[0104] Use the linker script to specify different storage areas for upgrade files of different upgrade types.

[0105] Specifically, different storage areas are specified for upgrade files of different upgrade types through a link script, including: defining a link script, specifying each storage area in the memory storage of the photovoltaic inverter in the link script; in the link script, allocating a storage address and a storage size to each storage area, and marking different types of upgrade files as belonging to the corresponding storage area defined in the link script.

[0106] Furthermore, the storage addresses of the upgrade files of the algorithm type and the data type are specified through the link script, so as to control the storage of different types of upgrade files into the corresponding target storage area of ​​the device. Figure 7 As shown, Figure 7A schematic diagram of a storage area link script provided by the first embodiment of the present invention is shown, wherein the user boot area (size is 16KB) is loaded into the fixed code segment 0x08000000-0x08004000; the algorithm area (size is 222KB) is loaded into the fixed code segment 0x08004000-0x0803B800; the regulatory parameter area (size is 2KB) in the read-write data area is loaded into the fixed code segment 0x0803B800-0x0803C000; the calibration parameter area (size is 2KB) in the read-write data area is loaded into the fixed code segment 0x0803C000-0x0803C800; the device information area in the read-write data area (size is 2KB) is loaded into the fixed code segment 0x0803C800-0x0803D000; the historical real-time data area in the read-only data area (size is 4KB) is loaded into the fixed code segment 0x0803D000-0x0803E000; the historical alarm area in the read-only data area (size is 4KB) is loaded into the fixed code segment 0x0803E000-0x0803F000; the operation log area in the read-only data area (size is 4KB) is loaded into the fixed code segment 0x0803F000-0x08040000; the download area (size is 256KB) is loaded into the fixed code segment 0x08040000-0x0807FFFF. Generate independent algorithm and data loading image files (*.bin or *.hex) through link scripts, divide the firmware into multiple logical areas (such as control algorithm area, regulatory parameter area, calibration parameter area, device information area, etc.), and load data and algorithms into specific memory addresses respectively to avoid mutual interference.

[0107] When the firmware is upgraded through the photovoltaic inverter firmware upgrade method provided by the present application, an independent checksum mechanism can also be designed for each area to ensure the integrity of the data during the upgrade process. And dynamically load data through a pointer or a configuration structure, where the data loading address is determined by the runtime configuration file. When the algorithm area calls the parameters of the data area, it is directly accessed through the configuration table address to avoid hard-coded coupling. By dynamically loading data through a pointer or a configuration structure and determining the data loading address according to the runtime configuration file, the system can be highly flexible and configurable, avoiding hard-coded coupling, making the code easier to modify and maintain. At the same time, a structured way to manage and access configuration information is also provided, thereby improving the reliability and maintainability of the system.

[0108] Embodiment 2

[0109] Embodiment 2 of the present invention provides a photovoltaic inverter firmware upgrade device, see Figure 8 As shown, Figure 8A schematic diagram of the structure of a photovoltaic inverter firmware upgrade device provided by Embodiment 2 of the present invention is shown, wherein the device comprises:

[0110] A storage area division module 801 is used to divide the memory of the photovoltaic inverter into a plurality of storage areas, wherein different firmware data is stored in each storage area;

[0111] An upgrade file parsing module 802 is used to obtain an upgrade file of the photovoltaic inverter, and read a field storing an upgrade file type in the upgrade file to obtain an upgrade type of the upgrade file;

[0112] The firmware upgrade module 803 is used to determine a target storage area among the plurality of storage areas according to the upgrade type of the upgrade file, and use the upgrade file to update the firmware data in the target storage area to achieve firmware upgrade.

[0113] In an optional implementation scheme, the storage area includes an algorithm area and a data area; the upgrade type includes an algorithm upgrade and a data upgrade; and the step of determining a target storage area from among the plurality of storage areas according to the upgrade type of the upgrade file includes:

[0114] When the upgrade type of the upgrade file is algorithm upgrade, determining the target storage area as the algorithm area;

[0115] When the upgrade type of the upgrade file is data upgrade, the target storage area is determined to be the data area.

[0116] In an optional embodiment, the device further includes a first upgrade file generating module, wherein the first upgrade file generating module is used to:

[0117] For an upgrade file whose upgrade type is algorithm upgrade, an algorithm binary file generator is used to generate an algorithm binary file;

[0118] The algorithm binary file is packaged using a firmware packager to obtain an upgrade file whose upgrade type is algorithm upgrade.

[0119] In an optional embodiment, the device further includes a second upgrade file generating module, wherein the second upgrade file generating module is used to:

[0120] For an upgrade file whose upgrade type is data upgrade, a data binary file is generated using a data binary file generator;

[0121] The data binary file is packaged using a firmware packager to obtain an upgrade file whose upgrade type is data upgrade.

[0122] In an optional embodiment, the data binary file generator includes a parameter selector and a parameter generator; the step of generating the data binary file using the data binary file generator includes:

[0123] Determining target parameter data from a number of optional parameter data using the parameter selector;

[0124] The parameter generator is used to generate the data binary file according to the target parameter data.

[0125] In an optional implementation, the storage area includes a download area; and the updating of the firmware data in the target storage area using the upgrade file includes:

[0126] Storing the upgrade file in the download area for verification;

[0127] If the upgrade file passes the verification process, the original firmware data in the target storage area is deleted, and the upgrade file is written into the target storage area to implement firmware data update.

[0128] In an optional embodiment, the device further comprises a storage area designation module, wherein the storage area designation module is configured to:

[0129] Use the linker script to specify different storage areas for upgrade files of different upgrade types.

[0130] Embodiment 3

[0131] Based on the same application concept, see Fig. 9 As shown, Fig. 9 FIG. 4 shows a schematic diagram of the structure of a computer device provided by Embodiment 3 of the present invention, wherein: Fig. 9 As shown, a computer device 900 provided in Embodiment 3 of the present application includes:

[0132] A processor 901, a memory 902 and a bus 903, wherein the memory 902 stores machine-readable instructions executable by the processor 901. When the computer device 900 is running, the processor 901 communicates with the memory 902 via the bus 903. When the processor 901 is running, the machine-readable instructions execute the steps of the photovoltaic inverter firmware upgrade method shown in the above-mentioned embodiment 1.

[0133] Embodiment 4

[0134] Based on the same application concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the photovoltaic inverter firmware upgrade method described in any one of the above embodiments are executed.

[0135] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0136] The computer program product for upgrading the firmware of a photovoltaic inverter provided in an embodiment of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment and will not be repeated here.

[0137] The photovoltaic inverter firmware upgrade device provided in the embodiment of the present invention can be specific hardware on the device or software or firmware installed on the device. The device provided in the embodiment of the present invention has the same implementation principle and technical effects as the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in the device embodiment can refer to the corresponding contents in the aforementioned method embodiment. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.

[0138] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0139] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0140] In addition, each functional unit in the embodiment provided by the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0141] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0142] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0143] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or perform equivalent replacements on some of the technical features thereof; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. They should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for upgrading the firmware of a photovoltaic inverter, characterized in that: The method comprises: The memory of the photovoltaic inverter is divided into a plurality of storage areas, wherein different firmware data is stored in each storage area; Acquire an upgrade file of the photovoltaic inverter, and read a field storing an upgrade file type in the upgrade file to obtain an upgrade type of the upgrade file; A target storage area is determined among the plurality of storage areas according to the upgrade type of the upgrade file, and the firmware data in the target storage area is updated using the upgrade file to implement firmware upgrade.

2. The method according to claim 1, characterized in that The storage area includes an algorithm area and a data area; the upgrade type includes an algorithm upgrade and a data upgrade; and the target storage area is determined in the plurality of storage areas according to the upgrade type of the upgrade file, including: When the upgrade type of the upgrade file is algorithm upgrade, determining the target storage area as the algorithm area; When the upgrade type of the upgrade file is data upgrade, the target storage area is determined to be the data area.

3. The method according to claim 2, characterized in that The method further comprises: For an upgrade file whose upgrade type is algorithm upgrade, an algorithm binary file generator is used to generate an algorithm binary file; The algorithm binary file is packaged using a firmware packager to obtain an upgrade file whose upgrade type is algorithm upgrade.

4. The method according to claim 2, characterized in that: The method further comprises: For an upgrade file whose upgrade type is data upgrade, a data binary file is generated using a data binary file generator; The data binary file is packaged using a firmware packager to obtain an upgrade file whose upgrade type is data upgrade.

5. The method according to claim 4, characterized in that The data binary file generator includes a parameter selector and a parameter generator; the method of using the data binary file generator to generate a data binary file includes: Determining target parameter data from a number of optional parameter data using the parameter selector; The parameter generator is used to generate the data binary file according to the target parameter data.

6. The method according to claim 1, characterized in that The storage area includes a download area; and the updating of the firmware data in the target storage area using the upgrade file includes: Storing the upgrade file in the download area for verification; If the upgrade file passes the verification process, the original firmware data in the target storage area is deleted, and the upgrade file is written into the target storage area to implement firmware data update.

7. The method according to claim 1, characterized in that The method further comprises: Use the linker script to specify different storage areas for upgrade files of different upgrade types.

8. A photovoltaic inverter firmware upgrade device, characterized in that: The device comprises: A storage area division module, used for dividing the memory of the photovoltaic inverter into a plurality of storage areas, wherein different firmware data is stored in each storage area; An upgrade file parsing module, used for obtaining an upgrade file of the photovoltaic inverter, and reading a field storing an upgrade file type in the upgrade file to obtain an upgrade type of the upgrade file; The firmware upgrade module is used to determine a target storage area among the plurality of storage areas according to the upgrade type of the upgrade file, and to update the firmware data in the target storage area using the upgrade file to implement firmware upgrade.

9. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the photovoltaic inverter firmware upgrade method as described in any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the photovoltaic inverter firmware upgrade method according to any one of claims 1 to 7 are executed.