OTA remote upgrading method of photovoltaic collector
By adopting multiple verification methods during the OTA upgrade of the photovoltaic acquisition rod, the equipment type errors and firmware version errors that may occur during the OTA upgrade of the photovoltaic acquisition rod are solved, and efficient and reliable firmware upgrades are achieved, improving the photovoltaic Monitoring system stability and reliability.
Patent Information
- Application Number
- CN202411421162.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-02-14
AI Technical Summary
During the OTA upgrade process of photovoltaic acquisition rod, there may be problems such as device type error, firmware version error, data error in the data packet, incomplete data, and inconsistent file name of the firmware, resulting in the upgrade failure or the acquisition rod being disabled.
The OTA remote upgrade method through multiple verification includes verification of request information, packets and upgrade files, ensuring that the firmware version number of the upgrade file is consistent, and modifying the flag bits in the boot area to boot load new firmware and applications.
It effectively avoids upgrade failures caused by platform problems, transmission impacts and human errors, improves the reliability and security of firmware upgrades, reduces the risk of photovoltaic collector failure, and improves the stability and reliability of the photovoltaic monitoring system.
Smart Images

Figure CN119440594A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of photovoltaic power stations, and in particular to the field of photovoltaic collector OTA. Background Art
[0002] Data collection for photovoltaic power station monitoring is an important part of photovoltaic power station operation and management. Through data collection, the operating status of photovoltaic power stations can be monitored in real time to ensure the safe and stable operation of the power station. However, with the advancement of technology and the continuous expansion of power station scale, traditional data collection methods can no longer meet the needs. Therefore, a more efficient and reliable data collection solution is needed. As a new type of data collection tool, the photovoltaic data collection stick can adapt to mainstream inverter collection, plug and play, and can transmit the working status and power generation of the inverter, so as to conduct long-term and effective monitoring of the photovoltaic power generation system.
[0003] Firmware upgrade is an important means to improve device performance and security. With the continuous advancement of technology, the firmware of devices also needs to be continuously updated to adapt to new technical standards and safety requirements. OTA (Over-The-Air) upgrade technology allows the device to upgrade its firmware directly through a wireless network without disassembling the device, greatly improving the efficiency and convenience of the upgrade.
[0004] In the application of photovoltaic data collection sticks, OTA upgrade technology enables the data collection stick to remotely receive the latest firmware updates, thereby improving the efficiency and accuracy of data collection, while also ensuring the safety and stability of the equipment. Through OTA upgrade technology, remote management and maintenance of photovoltaic power station monitoring systems can be achieved, improving the intelligence level of the system and reducing maintenance costs.
[0005] However, during the OTA upgrade process, there may be problems such as the wrong device type to be upgraded, wrong firmware version, wrong data in the data packet, incomplete data, file name inconsistent with the firmware, etc.; there may also be situations in the process of copying from the backup area to the execution area where the program cannot run after copying due to uncertain factors, causing serious malfunctions to the acquisition stick and making it unusable.
[0006] In view of this, this application is proposed. Summary of the invention
[0007] The present application provides an OTA remote upgrade method for a photovoltaic collector, which avoids upgrade failures caused by platform problems, transmission impacts, human errors, and other factors through multiple verifications.
[0008] The present application provides an OTA remote upgrade method for a photovoltaic collector, comprising the following steps:
[0009] Step 1: Start the photovoltaic collector;
[0010] Step 2: The photovoltaic collector receives the request information;
[0011] Step 3: The photovoltaic collector confirms the request information;
[0012] Step 4: Initialize the photovoltaic collector;
[0013] Step 5, the photovoltaic collector receives the data packet;
[0014] Step 6: Verify each data packet;
[0015] Step 7: Verify the complete upgrade file consisting of multiple data packets;
[0016] Step 8. Confirm the firmware version number of the upgrade file;
[0017] Step 9. Modify the boot area and restart.
[0018] Furthermore, starting the photovoltaic collector in step 1 includes: powering on the photovoltaic collector, loading the application in the first execution area, and confirming whether the first application is connected to the Internet of Things cloud platform; if connected, jump to step 2; otherwise, terminate the upgrade process.
[0019] Furthermore, in step 2, the photovoltaic collector receives the request information including: the Internet of Things cloud platform sends the upgrade request information to the photovoltaic collector.
[0020] Furthermore, in step 3, the photovoltaic collector confirms the request information, including: the photovoltaic collector verifies the request information: when the photovoltaic collector receives the request information from the Internet of Things cloud platform, it verifies the request information. If the verification passes, a confirmation response is sent to the Internet of Things cloud platform and jumps to step 4; otherwise, an error response is sent to the Internet of Things cloud platform and the upgrade process is terminated.
[0021] Furthermore, the initialization of the photovoltaic collector in step 4 includes: erasing data in the second execution area.
[0022] Furthermore, in step 5, the photovoltaic collector receives the data packet, including: when the Internet of Things cloud platform receives the confirmation response, it sends the data packet to the photovoltaic collector. At the same time, the photovoltaic collector starts the timer and determines whether the second execution area receives the data packet within the specified time. If so, jump to step 6; if not, terminate the upgrade process.
[0023] Furthermore, in step 6, each data packet is checked by performing a CRC16 check on each data packet. If the check passes, a confirmation response is sent to the IoT cloud platform and the process jumps to step 7. Otherwise, an error response is sent to the IoT cloud platform and the upgrade process is terminated.
[0024] Furthermore, in step 7, the complete upgrade file consisting of multiple data packets is verified as follows: an MD5 check is performed on the complete data packet. If the check passes, a confirmation response is sent to the IoT cloud platform and the process jumps to step 8; otherwise, an error response is sent to the IoT cloud platform and the upgrade process is terminated.
[0025] Furthermore, the firmware version number of the upgrade file in step 8 is confirmed as follows: the PV collector compares the version number of the fixed field in the upgrade file with the version number in the request information sent by the IoT platform. If they are consistent, a confirmation response is sent to the IoT cloud platform and the process jumps to step 9; otherwise, an error response is sent to the IoT cloud platform and the upgrade process is terminated.
[0026] Furthermore, in step 9, modifying the boot area and restarting is as follows: the photovoltaic collector modifies the flag bit in the boot area to guide the photovoltaic collector to load the firmware and application program of the second execution area, and restart.
[0027] Compared with the prior art, the present invention has the following advantages:
[0028] The present invention divides the program storage area into a first execution area and a second execution area. During the OTA upgrade process, multiple verifications are performed to avoid upgrade failures caused by platform problems, transmission effects, human errors, and other factors. At the same time, when data transmission is interrupted, the program exits the upgrade process, and automatically restarts and still runs the program in the first execution area; when the upgrade is successful, it automatically restarts and jumps to the second execution area to run. The risk of copying from the backup area to the execution area is reduced, the impact on the normal operation of the photovoltaic collector is reduced, the stability and reliability of the photovoltaic monitoring system are improved, the risk factors in the process of upgrading the photovoltaic collector firmware are greatly reduced, the reliability and security of the firmware upgrade are improved, the problem of photovoltaic collector failure caused by firmware upgrade is greatly reduced, the manpower, material resources and time costs are reduced, and the firmware update of the photovoltaic collector safely and reliably solves the problems of equipment replacement and vulnerability repair. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 Schematic diagram of the structure of the on-chip program storage area in this embodiment;
[0031] Figure 2-Figure 3 This is a schematic diagram of the working principle of the timer in this embodiment;
[0032] Figure 4 This is a flow chart of the OTA remote upgrade method according to this embodiment. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] Figure 1 FIG. 2 shows a schematic diagram of the structure of the on-chip program storage area in this embodiment. Figure 1 As shown, the on-chip program storage area 1 of this embodiment includes a first execution area 10, a second execution area 20 and a boot area. The first execution area 10 stores the existing firmware and the first application program, the second execution area 20 includes the firmware information to be upgraded and the second application program, and the boot area 30 is used to guide the photovoltaic collector to load the program of the first execution area 10 or the second execution area 20.
[0035] This embodiment downloads and stores the file to be upgraded in the second execution area, which effectively avoids the situation where an error occurs when the upgrade file is transferred from the backup area to the execution area, resulting in upgrade failure.
[0036] This embodiment implements an OTA remote upgrade method for a photovoltaic collector according to the above-mentioned on-chip program storage area 1, including the following steps:
[0037] Step 1, start the photovoltaic collector: the photovoltaic collector is powered on, and the first application in the first execution area 10 is loaded at the same time, and it is confirmed whether the first application is compatible with the Internet of Things cloud platform ( Figure 1 (not shown) connection;
[0038] Step 2: The photovoltaic collector receives the request information: the IoT cloud platform sends the upgrade request information to the photovoltaic collector;
[0039] Step 3, the photovoltaic collector confirms the request information: When the photovoltaic collector receives the request information from the IoT cloud platform, it verifies the request information. If the verification passes, it sends a confirmation reply to the IoT cloud platform and jumps to step 4; otherwise, it sends an error reply to the IoT cloud platform and terminates the upgrade process;
[0040] Step 4, initialization of the photovoltaic collector: erasing the data in the second execution area 20;
[0041] Optionally, step 4 also includes: setting the value of the upgrade start flag (ota_start_flag) to 1.
[0042] Step 5, the photovoltaic collector receives the data packet: When the IoT cloud platform receives the confirmation response, it sends a data packet to the photovoltaic collector. At the same time, it starts the timer and determines whether the second execution area 20 receives the data packet within the specified time. If so, jump to step 6; if not, terminate the upgrade process.
[0043] Optionally, the time specified in step 5 is 100ms.
[0044] Optional, such as Figure 3 As shown, the timer uses the constant tmr_cnt as the calculation value to determine whether it has timed out: if the constant tmr_cnt is greater than the specified time ( Figure 2 100ms), the OTA end bit (ota_over_tmr) is set to 1; if the constant tmr_cnt is less than the specified time ( Figure 2 In the example, the timeout counter accumulates the value. After each accumulation, the timer interrupts to determine whether the constant tmr_cnt is greater than the specified time ( Figure 2 100ms in the example).
[0045] Optionally, whenever the photovoltaic collector receives a data packet, tmr_cnt is cleared.
[0046] Optionally, if no data packet is received within the specified time, it is determined whether ota_over_tmr is 1; if it is 1, it is considered that the upgrade has timed out and the upgrade process is terminated.
[0047] Step 6: Verify each data packet: Perform CRC16 verification on each data packet. If the verification passes, send a confirmation response to the IoT cloud platform and jump to step 7; otherwise, send an error response to the IoT cloud platform and terminate the upgrade process;
[0048] Step 7: Verify the complete upgrade file consisting of multiple data packets: Perform MD5 verification on the complete upgrade file. If the verification passes, send a confirmation response to the IoT cloud platform and jump to step 8; otherwise, send an error response to the IoT cloud platform and terminate the upgrade process;
[0049] Step 8: Confirm the firmware version number of the upgrade file: The photovoltaic collector compares the version number of the fixed field in the upgrade file with the version number in the request information sent by the IoT platform. If they are consistent, a confirmation response is sent to the IoT cloud platform and the process goes to step 9. Otherwise, an error response is sent to the IoT cloud platform and the upgrade process is terminated.
[0050] Step 9, modify the boot area and restart: the photovoltaic collector modifies the flag bit in the boot area 30 to guide the photovoltaic collector to load the firmware and application program of the second execution area 20 and restart.
[0051] Optionally, terminating the upgrade process in step 1 to step 9 includes: automatically restarting and running the application program in the first execution area.
[0052] The "equal" or "same" or "equal" disclosed in the present invention must take into account the distribution of engineering parameters, and the error distribution is within ±30%; the definition of "parallel" of two line segments or two straight lines is that the angle between the two line segments or two straight lines is less than or equal to 45 degrees; the definition of "perpendicular" of two line segments or two straight lines is that the angle between the two line segments or two straight lines is within the range of [60, 120] degrees; the definition of "phase mismatch" also needs to take into account the distribution of engineering parameters, and the error distribution of the degree of mismatch is within ±30%. In addition, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. Without more constraints, an element defined by the phrase "comprising a ..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.
[0053] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0054] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An OTA remote upgrade method for a photovoltaic collector, characterized in that: The following steps are involved: Step 1: Start the photovoltaic collector; Step 2: The photovoltaic collector receives the request information; Step 3: The photovoltaic collector confirms the request information; Step 4: Initialize the photovoltaic collector; Step 5, the photovoltaic collector receives the data packet; Step 6: Verify each data packet; Step 7: Verify the complete upgrade file consisting of multiple data packets; Step 8. Confirm the firmware version number of the upgrade file; Step 9. Modify the boot area and restart.
2. The OTA remote upgrade method according to claim 1, characterized in that: Starting the photovoltaic collector in step 1 includes: powering on the photovoltaic collector, loading the application in the first execution area, and confirming whether the first application is connected to the Internet of Things cloud platform; if connected, jump to step 2; otherwise, terminate the upgrade process.
3. The OTA remote upgrade method according to claim 1, characterized in that: The photovoltaic collector receiving the request information in step 2 includes: the Internet of Things cloud platform sends the upgrade request information to the photovoltaic collector.
4. The OTA remote upgrade method according to claim 1, characterized in that: In step 3, the photovoltaic collector confirms the request information, including: the photovoltaic collector verifies the request information: when the photovoltaic collector receives the request information from the Internet of Things cloud platform, it verifies the request information. If the verification passes, it sends a confirmation response to the Internet of Things cloud platform and jumps to step 4; otherwise, it sends an error response to the Internet of Things cloud platform and terminates the upgrade process.
5. The OTA remote upgrade method as claimed in claim 1, characterized in that: In step 4, the initialization of the photovoltaic collector includes: erasing the data in the second execution area.
6. The OTA remote upgrade method according to claim 1, characterized in that: In step 5, the photovoltaic collector receives the data packet, including: when the Internet of Things cloud platform receives the confirmation response, it sends the data packet to the photovoltaic collector. At the same time, the photovoltaic collector starts the timer and determines whether the second execution area receives the data packet within the specified time. If so, jump to step 6; if not, terminate the upgrade process.
7. The OTA remote upgrade method according to claim 1, characterized in that: In step 6, each data packet is checked as follows: a CRC16 check is performed on each data packet. If the check passes, a confirmation response is sent to the IoT cloud platform and the process jumps to step 7; otherwise, an error response is sent to the IoT cloud platform and the upgrade process is terminated.
8. The OTA remote upgrade method according to claim 1, characterized in that: In step 7, the complete upgrade file consisting of multiple data packets is verified as follows: MD5 verification is performed on the complete data packet. If the verification passes, a confirmation response is sent to the IoT cloud platform and the process jumps to step 8; otherwise, an error response is sent to the IoT cloud platform and the upgrade process is terminated.
9. The OTA remote upgrade method according to claim 1, characterized in that: The firmware version number of the upgrade file in step 8 is confirmed as follows: the photovoltaic collector compares the version number of the fixed field in the upgrade file with the version number in the request information sent by the IoT platform. If they are consistent, a confirmation response is sent to the IoT cloud platform and jumps to step 9; Otherwise, an error response is sent to the IoT cloud platform and the upgrade process is terminated.
10. The OTA remote upgrade method according to claim 1, characterized in that: Modifying the boot area and restarting in step 9 is as follows: the photovoltaic collector modifies the flag bit in the boot area to guide the photovoltaic collector to load the firmware and application program of the second execution area and restart.