Photovoltaic gateway equipment upgrading method
Through multi-server connection and online topology network, combined with dynamic key and breakpoint resume technology, the unreliability problem of photovoltaic gateway equipment upgrade when the network is unstable and the equipment status is unknown is solved, achieving a more stable and convenient The upgrade process improves the overall upgrade speed and security.
Patent Information
- Application Number
- CN202410717899.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-09-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing photovoltaic gateway equipment upgrade methods are unreliable when the network is unstable or the equipment status is unknown, resulting in upgrade failures and equipment failure to start normally. In addition, online upgrades can easily cause network congestion and make some equipment unable to be upgraded.
It adopts multi-server connection and online topology network, encrypts communication through dynamic keys, and combines topology upgrade and breakpoint resuming technology to ensure the multi-level verification and security of the upgrade package, realize online or offline upgrades, and perform under abnormal circumstances Call the re-upgrade operation to reduce manual participation and the possibility of upgrade failure.
It improves the stability and convenience of upgrading photovoltaic gateway equipment, can cope with complex network conditions and emergencies, reduces the risk of upgrade failure, and improves the overall upgrade speed and security.
Smart Images

Figure CN118677772A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of new energy technology, and in particular relates to a photovoltaic gateway device upgrading method. Background Art
[0002] Photovoltaic power generation is a clean new energy power generation method with the advantages of no pollution, low later costs and long-term continuous benefits.
[0003] The most popular form of photovoltaic power generation at present is the distributed photovoltaic power generation system, which mainly uses roofs, fish ponds and open ground as carriers, making maximum use of terrain resources, so that photovoltaic power generation systems can be promoted and tested on a large scale in units of households and buildings, thereby increasing people's acceptance of photovoltaic new energy.
[0004] With the rapid development of the Internet of Things and smart chips, related businesses in the traditional photovoltaic industry are also developing steadily. In order to adapt to new functions and new technology application scenarios, related hardware equipment in the photovoltaic collection system also needs to respond to business update needs in a timely manner. Therefore, the current photovoltaic gateway equipment needs to be upgraded and updated in a timely manner to optimize functions to meet actual needs.
[0005] The internal firmware of the current mainstream intelligent photovoltaic gateway device is fixed at the factory, and does not support program updates and iterations. Some intelligent gateway devices support external physical interfaces (such as USB interfaces) and use specific program upgrade devices (such as window computers) for offline upgrades or factory upgrades; and the above technical solutions are obviously lagging behind in the current high-speed and stable development of the Internet and intelligent devices, and are not convenient. Therefore, there are still a few intelligent photovoltaic gateway devices with network modules in the prior art that have the function of online upgrade. For example, Chinese patent CN108494818A discloses an online upgrade method for photovoltaic data acquisition gateway devices, which method is to send upgrade program data from a cloud data service center to a gateway device, so that the gateway device completes the online upgrade; the steps include: Step 1: The cloud data service center sends upgrade information to the gateway device through the MQTT message transmission protocol; Step 2: The cloud data service center sends the upgrade program data to the gateway device through the MQTT message transmission protocol; Step 3: The upgrade program data in the external FLASH of the gateway device is copied to the internal space of the gateway device single-chip microcomputer, and the upgrade program data in the internal space of the gateway device single-chip microcomputer is completely read out. Although the technical solution solves the problem of online upgrades, realizes automated operation, and reduces manual participation; however, such technical solutions require that the gateway device's network status is good and the connection with the server is stable before the gateway device can be upgraded, and it is necessary to ensure that the gateway device does not have abnormal conditions (such as network interruption, power failure, etc.) during the upgrade process, and only use the network's own error correction mechanism and the reliability of the device's own operation to ensure the reliability of the upgrade. This upgrade method has a kind of unreliability, because the current status of the gateway device is unknown during the upgrade process. If the network is accidentally disconnected, the network is weak, or the power supply of the device is unstable, there is a chance of upgrade failure, which will cause the gateway device to fail to start normally and other unknown problems. Furthermore, for gateway devices that are known to support online upgrades, such as the above example, the MQTT protocol is usually used to upgrade the gateway devices. Multiple gateway devices are usually deployed on site in the photovoltaic system, and the network conditions of each gateway device are different. If the server sends upgrade instructions in batches, some devices may not receive the instructions. If a large number of devices are performing online upgrade downloads, network congestion may occur, resulting in frequent upgrade failures. This may also bring certain unknown risks to the photovoltaic system, and some gateway devices without network signals may not be able to perform normal upgrade work.
[0006] Therefore, an upgrade method is developed based on the existing hardware conditions (the photovoltaic system is equipped with an intelligent gateway device) to cope with upgrade situations in different scenarios, reduce manual input, enhance upgrade stability, and reduce the impact of different problems that may be caused by upgrade failures. Summary of the invention
[0007] The technical problem to be solved by the present invention is to improve the upgrade stability and convenience of existing photovoltaic gateway equipment.
[0008] The present invention adopts the following technical solutions to solve the above technical problems:
[0009] The present invention provides a photovoltaic gateway device upgrade method, the main steps of which include:
[0010] Photovoltaic gateway devices in the region form an online topology network and are connected to a server; the server includes a first server, a second server and a third server;
[0011] Perform online or offline upgrade according to the network status of the photovoltaic gateway device;
[0012] During online upgrading, the photovoltaic gateway device connects to the first server to obtain a dynamic key after startup, and encrypts communication with the second and third servers through the dynamic key; the second server publishes an upgrade message according to task requirements, and the photovoltaic gateway device verifies the upgrade message and sends an upgrade request to the third server; the third server verifies the upgrade request and sends an upgrade package to the photovoltaic gateway device; after the photovoltaic gateway device downloads the upgrade package, it performs multi-level verification on the upgrade package, and starts the upgrade process after passing the verification; during the online upgrade process, if at least one photovoltaic gateway device fails to connect to the server, the photovoltaic gateway device that fails to connect is subjected to a topology upgrade based on the online topology network;
[0013] When upgrading offline, an upgrade package is configured in the terminal; at least one photovoltaic gateway device in the online topology network is connected to the terminal for upgrading, and after the upgrade is completed, a topology upgrade is performed on the photovoltaic gateway device that has not been upgraded based on the online topology network.
[0014] Optionally, the first server is a key management server and communicates with the photovoltaic gateway device based on the HTTPS protocol;
[0015] The second server is an information management server and communicates with the photovoltaic gateway device based on the MQTT protocol;
[0016] The third server is an upgrade package management server and communicates with the photovoltaic gateway device based on the TCP protocol;
[0017] The photovoltaic gateway devices are all equipped with corresponding communication modules.
[0018] Optionally, after verifying the upgrade message, the photovoltaic gateway device caches the upgrade message in a list of tasks to be processed for standby use;
[0019] When an abnormal situation occurs during the upgrade process, the upgrade message is called and the upgrade operation is performed again.
[0020] Optionally, after verifying the upgrade request, the third server sends an upgrade package to the photovoltaic gateway device based on breakpoint resume technology.
[0021] Optionally, the photovoltaic gateway device performs integrity verification and security verification on the downloaded data subpackets one by one, and stores the data subpackets that pass the verification in an external storage medium of the photovoltaic gateway device.
[0022] Optionally, during the upgrade process, after the photovoltaic gateway device completes downloading the upgrade package, a multi-level verification is performed on the upgrade package, and the multi-level verification includes:
[0023] Level 1 verification, extracting the data sub-packages and merging them into the complete upgrade package, and verifying the integrity of the upgrade package;
[0024] Secondary verification: decompress the upgrade package to obtain a secondary compressed package and an encrypted configuration file, decrypt the encrypted configuration file using a preset key, and verify the file parameters obtained after decryption.
[0025] Optionally, if an abnormal situation occurs in the photovoltaic gateway device, the upgrade operation is performed again and the number of re-upgrades is recorded;
[0026] When the number of re-upgrades exceeds a threshold, the photovoltaic gateway device starts a self-checking program and starts a corresponding processing mechanism for abnormal conditions obtained by the self-checking program.
[0027] Optionally, a configuration file is provided in the upgrade package;
[0028] When upgrading online, if at least one photovoltaic gateway device fails to connect to the server, a topology upgrade instruction is written into the configuration file;
[0029] When upgrading offline, a topology upgrade instruction is written into the configuration file.
[0030] Optionally, the topology upgrade includes:
[0031] The upgraded PV gateway device establishes a TCP server and sends the upgrade information via wired or wireless means;
[0032] The photovoltaic gateway device that has not been successfully upgraded establishes a TCP client, periodically scans the upgrade information, and selects the TCP server that meets the conditions according to the geographical location and / or signal strength to establish a connection.
[0033] Optionally, the TCP client sends an upgrade request to the TCP server, and the TCP server verifies the upgrade request and sends an upgrade package to the TCP client; after the TCP client completes downloading the upgrade package, it performs multi-level verification on the upgrade package and starts the upgrade process after passing it.
[0034] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:
[0035] The present invention connects photovoltaic gateway devices through multiple servers, and sets different servers to be responsible for different functions, so as to reduce network congestion, and combines dynamic keys to enhance the security of communication; further, by establishing an online topology network of photovoltaic gateway devices, the stability and convenience of the overall upgrade are improved by relying on topology upgrades, which can cope with complex network conditions and emergencies, and accelerate the overall upgrade speed to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] 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 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 labor.
[0037] Figure 1 It is a system diagram of the present invention;
[0038] Figure 2 This is a flowchart for downloading the upgrade package of the present invention;
[0039] Figure 3 This is a flow chart of the upgrade package verification of the present invention;
[0040] Figure 4 This is a topology upgrade flow chart of the present invention. DETAILED DESCRIPTION
[0041] 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 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.
[0042] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0043] It should also be noted that the methods used in the present invention are all conventional methods unless otherwise specified; the raw materials and devices used are all conventional commercially available products unless otherwise specified.
[0044] This embodiment provides a photovoltaic gateway device upgrade method, the main steps of which include:
[0045] First, if Figure 1 As shown, according to geographical location differences, photovoltaic gateway devices in the photovoltaic system are divided by region, such as forming an online topology network with photovoltaic gateway devices in a certain county, and connecting the photovoltaic gateway devices with the server. Specifically, it is preferred to network photovoltaic gateway devices of the same model. The online topology network of this embodiment is a network structure based on wireless hotspot communication. The configuration method is that any two photovoltaic gateway devices in the online topology network can be connected through a wireless hotspot or through at least one other photovoltaic gateway device to achieve data transmission.
[0046] The servers of this embodiment specifically include a first server, a second server, and a third server. Optionally, the first server is a key management server, and communicates with the photovoltaic gateway device based on the HTTPS protocol; the second server is an information management server, that is, a cloud-based MQTT platform commonly used in the Internet of Things, and communicates with the photovoltaic gateway device based on the MQTT protocol; the third server is an upgrade package management server, and communicates with the photovoltaic gateway device based on the TCP protocol. Furthermore, a corresponding communication module is provided on each photovoltaic gateway device to ensure that a communication network can be established.
[0047] Secondly, due to the inconsistent network communication conditions in different areas, the lack of wireless signals in some extreme environments and the high cost of laying wired lines, different upgrade strategies are needed. In real scenarios, operators choose online or offline upgrades based on the network status of the photovoltaic gateway equipment in the area.
[0048] When the online upgrade is selected, the built-in system automatically loads and starts the upgrade program software after the photovoltaic gateway device is turned on. After the communication module is successfully networked, the HTTPS protocol security interface is used to dynamically apply to the key management server for the dynamic key required for the photovoltaic gateway device to connect to the cloud MQTT platform, and dynamically allocate one machine and one key to enhance the security of the gateway device and avoid the security risks caused by the factory preset key. Then, the above photovoltaic gateway device uses the obtained dynamic key, the pre-made parameters in the program, and the agreed port number to start connecting to the cloud MQTT platform; if the connection fails within the agreed time, the corresponding fault analysis will be performed and the record will be generated and saved on the FLASH disk, and reported to the fourth server (i.e.: cloud fault management center platform) through the HTTPS protocol security interface when the network is normal, so that the operation and maintenance management personnel can find problems in time and analyze and solve them.
[0049] Combination Figure 2 As shown in the figure, after the photovoltaic gateway device is successfully connected to the cloud MQTT platform, the photovoltaic gateway device immediately reports some basic parameter data of the current device to the cloud MQTT platform through the MQTT protocol. Among them, some parameters are exemplified as: the current ID number of the photovoltaic gateway device, the current system version number, the current version number of each business software, the current longitude and latitude, and the current network signal strength and other related data. After the report is completed, the photovoltaic gateway device begins to subscribe to the topic of the upgrade message on the cloud MQTT platform. The naming method of the topic can be in the form of a string, such as: photovoltaic power station name + gateway device ID + program pre-made key + UPGRADE (upgrade). After the message subscription is completed, wait for the cloud MQTT platform to publish the upgrade message.
[0050] In the upgrade menu of the cloud MQTT platform, find the photovoltaic gateway device that needs to be upgraded online and publish the upgrade message. After the photovoltaic gateway device receives the upgrade message sent by the cloud MQTT platform, it starts to parse the message data in JSON format, verify the integrity of the message body, verify the ID number of the destination device in the message body and the ID number of the current device, and verify the version number of the upgrade package in the message body and the program version number of the current device; if all the verifications pass, it means that this upgrade message is a valid upgrade task; optionally, the photovoltaic gateway device caches the upgrade message in the pending task list of the FLASH local disk for standby, mainly to prevent the loss of the upgrade task if an abnormal situation occurs during the subsequent upgrade process, and call the upgrade operation again if necessary. After the upgrade message is cached, the photovoltaic gateway device begins to parse the parameters in the upgrade message body in detail. The parameters in the upgrade message include: the version number of the upgrade package, the type of the upgrade package, the signature of the upgrade package, the signature method of the upgrade package, the MD5 value of the upgrade package, the download address of the upgrade package and other related parameters. After the parsing is completed, the download process of the upgrade package is triggered. Among them, if the upgrade message verification fails, a record of the abnormal upgrade message will be generated and cached in the local FLASH disk, and the record will be promptly reported and fed back to the cloud MQTT platform to inform the cloud server that this is an invalid upgrade message and provide the specific reason why the gateway device identifies it as an invalid upgrade message.
[0051] After the photovoltaic gateway device parses the upgrade message and confirms that there is a download task, it parses the download address in the parameter into an IP address, and adds the download port number agreed with the upgrade package management server to establish a TCP connection to the cloud upgrade package management server. The reason for connecting to the upgrade package management server separately to download the upgrade package instead of adopting the download method of most gateway devices in the prior art, that is, continuing to use the MQTT transmission communication protocol channel to download the upgrade package after parsing and verifying the upgrade message, is because this method has disadvantages, because the MQTT transmission protocol is an Internet of Things application transmission protocol encapsulated on the TCP transmission protocol, and is generally used for transmission between small instruction-type data packets, but upgrade data packets generally range from 1M to 1G, so it will greatly increase network congestion. When the photovoltaic gateway device is successfully connected, it sends a download task request, i.e., an upgrade request, to the upgrade package management server center in the cloud. The request is used to notify the upgrade package management server and record which specific upgrade package the photovoltaic gateway device is going to download and from where the upgrade package is downloaded. The access and download process is based on breakpoint resume technology, such as FTP protocol based on TCP protocol (it can also be designed or adjusted by breakpoint resume technology). It is mainly used for interruption of the download task due to network interruption or power failure of the device during the download process. When the download is resumed next time, it does not need to start the download from the beginning. It only needs to start downloading from the sub-package of the task that was abnormally interrupted during the last download process. After the photovoltaic gateway device download task message is successfully sent to the upgrade package management server, it starts to receive the data sub-packages of the upgrade package. Each data sub-package of the upgrade package must be verified for data integrity and security. After the verification is passed, the data is written to the external storage medium of the photovoltaic gateway device, i.e., the local external FLASH disk in this embodiment, and the size of the data packet written to the external FLASH is recorded. If an abnormal situation occurs during the download process, such as network disconnection, the upgrade program will enter the network reconnection mechanism to re-upgrade and record the number of re-upgrades; if the download fails after three reconnections, the photovoltaic gateway device will start the self-check program, and conduct a comprehensive abnormal situation check on the device, check whether the memory usage of the device system is close to the preset threshold, check whether the FLASH disk usage is close to the preset threshold, check the CPU usage of the device system, check whether the current temperature of the device exceeds the preset threshold (the device is connected to the temperature acquisition sensor), check the connection status of the network module and the network signal, etc. After the analysis is completed in the upgrade program, the corresponding processing mechanism for the abnormal situation is started to maximize the performance of the device. For example, if the abnormal situation of download interruption is caused by the interruption of the network connection of the communication module, the processing mechanism is to strategically reset and reconnect the communication module, and then re-trigger the download task.
[0052] like Figure 3As shown in the figure, after the PV gateway device downloads the upgrade package, it performs a multi-level verification on the upgrade package. The multi-level verification includes:
[0053] Level 1 verification: extract the data cached in the external FLASH into memory and merge them into a complete upgrade package. Then, use the key sent in the previous upgrade message to verify the integrity of the entire package. If the verification fails, the failure reason will be fed back to the cloud MQTT platform, and all cached data related to this upgrade will be cleared.
[0054] Secondary verification, unzip the upgrade package that has passed the primary verification into the external FLASH to obtain a secondary compressed package and an encrypted configuration file. The encrypted configuration file is decrypted by the pre-made key in the program, and the parameters in the configuration file are read and verified one by one. First, the device ID number in the verification parameter is verified and matched with the ID number of the local device. After the verification and matching is successful, the device key in the configuration file is read and verified and matched with the key solidified by the local device. After the verification and matching is successful, the signature data in the configuration file is read and verified and matched with the signature data when the upgrade message is sent. If any of the three parameters fails to be verified, the gateway device will consider the upgrade package to be an invalid upgrade package, and will promptly report the reason for the upgrade failure to the cloud MQTT platform, and clear all cached data related to this upgrade. When all three parameter verifications are passed, it means that the upgrade program data packet downloaded this time meets the upgrade requirements of the local device, and the device needs to be upgraded. Write the upgrade flag 1 on the specified NADN FLASH address, and then trigger the device to upgrade.
[0055] The upgrade process includes: when the gateway device recognizes that the upgrade flag is 1 at the specified NAND FLASH address, the decompressed secondary compressed package file is decompressed twice and decompressed to the specified FLASH disk path. After the decompression is completed, a binary upgrade encryption program file and an upgrade configuration file will be obtained. The binary encryption program is decrypted and written to the specified FLASH area. After the writing is completed, the upgrade flag in the NAND FLASH area of the gateway device is modified from the original 1 to 2, and the photovoltaic gateway device is restarted according to the upgrade restart mode parameter configured in the configuration file. After the photovoltaic gateway device restarts and loads, when the specified NAND FLASH area flag is recognized as 2, it is necessary to verify the version number of the current program to confirm whether it is the version number of the latest upgrade package. If it is the latest version number, it means that the upgrade is successful, and the latest program is immediately backed up in the NAND FLASH area specified in the backup partition of the system.
[0056] Furthermore, during the online upgrade process, each server records the number of photovoltaic gateway devices involved in the connection. When at least one photovoltaic gateway device fails to connect to the server, the photovoltaic gateway device that failed to connect is topologically upgraded based on the online topological network; specifically, the topology upgrade instructions are recorded in the configuration information sent down. When the successfully upgraded photovoltaic gateway device completes the backup, check whether the topology upgrade instructions are recorded in the previously sent configuration information, that is, it is necessary to perform a topology upgrade on other gateway devices of the same model; if not, clear all cached data and report the upgrade results to the cloud MQTT platform. At this point, the upgrade process of the smart gateway device is complete. If other photovoltaic gateway devices need to be upgraded synchronously, the topology upgrade process needs to be started. Optionally, the topology upgrade includes:
[0057] Combination Figure 4As shown, the upgraded photovoltaic gateway device A (referred to as gateway device A) first turns off its own hotspot search function, and then turns on its own hotspot. The name and connection password of the hotspot are associated with the ID number of the gateway device to ensure uniqueness. After the hotspot is successfully turned on, the TCP service is started, a TCP server is established, and the upgrade information is sent wirelessly. When the photovoltaic gateway devices B, C, and D (referred to as gateway device B, gateway device C, and gateway device D) that have not been successfully upgraded in the online topology network detect that the connection with the server is disconnected or the signal is weak, they respectively establish corresponding TCP clients and periodically scan the hotspot information. During this period, multiple scans, collections, and screenings will be performed, and qualified photovoltaic gateway devices will be screened according to geographic location and / or signal strength for connection one by one, such as the TCP server of gateway device A. After the TCP clients of gateway devices B, C, and D scan the upgrade information, they need to report the basic information of their own gateway devices to the hotspot server (such as the version number of the current gateway device, device storage space, hotspot connection signal status, device operating status, etc.). This is mainly used by the gateway devices on the hotspot TCP server side to verify which gateway devices meet the upgrade conditions, and to kick out the smart gateway devices that do not meet the upgrade conditions (such as those that have been upgraded, have poor signals, or have failed to verify the device ID number or other information). This is also to avoid repeated upgrades or continuous upgrade interruptions during the upgrade process due to poor signals. After successful verification, the TCP clients of gateway devices B, C, and D successfully connect to the TCP server and send upgrade requests. Gateway device A, which acts as a TCP server, reads the latest upgrade package from the backup area of the NAND FLASH upgrade program into the memory, and then divides the data into packets and sends them to the TCP client's gateway device B, gateway device C, and gateway device D to be upgraded. The client's photovoltaic gateway device to be upgraded receives the data packet, verifies it, and writes it into the FLASH cache. After all upgrade packages are downloaded, the overall data packet is verified. If the verification fails, the TCP server needs to be notified and the upgrade is tried again. If it fails three times, the TCP server will notify the photovoltaic gateway device to be upgraded on the TCP client to exit the upgrade process first, and the TCP server will record the gateway device that failed to upgrade so that it can be upgraded again in the future. If the TCP client verifies successfully, it needs to write the latest downloaded upgrade program into the FLASH of the running area and the NAND FLASH of the backup area, and then notify the TCP server that the upgrade is complete. The TCP server will require the gateway device to actively disconnect the TCP connection and the hotspot connection. Then the gateway devices B, C, and D that have successfully upgraded this time continue to provide topology upgrade services for other photovoltaic gateway devices that need to be upgraded based on the topology upgrade instructions in the configuration file. The process is the same as above.Optionally, after confirming that the local TCP server can be connected through the hotspot without topology upgrade, gateway device A closes its own hotspot and stops the TCP service.
[0058] When upgrading offline, the operator responsible for the upgrade configures the aforementioned upgrade package on the terminal (such as a laptop, desktop computer, tablet computer, industrial computer, etc.) and records the topology upgrade instructions in the configuration file. At least one photovoltaic gateway device in the online topology network is connected to the terminal for upgrading, and after the upgrade is completed, the photovoltaic gateway device that has not been upgraded is topologically upgraded based on the online topology network. The specific process is consistent with the aforementioned topology upgrade process, so that all photovoltaic gateway devices of the same model in the online topology network can be upgraded with one connection.
[0059] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A photovoltaic gateway device upgrade method, It is characterized in that the steps include: Photovoltaic gateway devices in the region form an online topology network and are connected to a server; the server includes a first server, a second server and a third server; Perform online or offline upgrade according to the network status of the photovoltaic gateway device; When upgrading online, the photovoltaic gateway device connects to the first server to obtain a dynamic key after startup, and encrypts communication with the second and third servers through the dynamic key; the second server publishes an upgrade message according to task requirements, and the photovoltaic gateway device verifies the upgrade message and sends an upgrade request to the third server; the third server verifies the upgrade request and sends an upgrade package to the photovoltaic gateway device; After the photovoltaic gateway device has downloaded the upgrade package, it performs a multi-level verification on the upgrade package, and starts the upgrade process after passing the verification; when at least one photovoltaic gateway device fails to connect to the server during the online upgrade process, the photovoltaic gateway device that fails to connect is subjected to a topology upgrade based on the online topology network; When upgrading offline, an upgrade package is configured in the terminal; at least one photovoltaic gateway device in the online topology network is connected to the terminal for upgrading, and after the upgrade is completed, a topology upgrade is performed on the photovoltaic gateway device that has not been upgraded based on the online topology network.
2. The photovoltaic gateway device upgrade method according to claim 1, It is characterized in that The first server is a key management server and communicates with the photovoltaic gateway device based on the HTTPS protocol; The second server is an information management server and communicates with the photovoltaic gateway device based on the MQTT protocol; The third server is an upgrade package management server and communicates with the photovoltaic gateway device based on the TCP protocol; The photovoltaic gateway devices are all equipped with corresponding communication modules.
3. The photovoltaic gateway device upgrade method according to claim 1, It is characterized in that After verifying the upgrade message, the photovoltaic gateway device caches the upgrade message in a list of pending tasks for standby use; When an abnormal situation occurs during the upgrade process, the upgrade message is called and the upgrade operation is performed again.
4. The photovoltaic gateway device upgrade method according to claim 1 or 2, It is characterized in that After verifying the upgrade request, the third server sends an upgrade package to the photovoltaic gateway device based on the breakpoint resume technology.
5. The photovoltaic gateway device upgrade method according to claim 4, It is characterized in that The photovoltaic gateway device performs integrity verification and security verification on the downloaded data subpackets one by one, and stores the data subpackets that pass the verification in the external storage medium of the photovoltaic gateway device.
6. The photovoltaic gateway device upgrade method according to claim 5, It is characterized in that During the upgrade process, after the photovoltaic gateway device downloads the upgrade package, a multi-level verification is performed on the upgrade package, and the multi-level verification includes: Level 1 verification, extracting the data sub-packages and merging them into the complete upgrade package, and verifying the integrity of the upgrade package; Secondary verification: decompress the upgrade package to obtain a secondary compressed package and an encrypted configuration file, decrypt the encrypted configuration file using a preset key, and verify the file parameters obtained after decryption.
7. The photovoltaic gateway device upgrade method according to claim 1, It is characterized in that If the photovoltaic gateway device has an abnormal situation, the upgrade operation is performed again and the number of re-upgrades is recorded; When the number of re-upgrades exceeds a threshold, the photovoltaic gateway device starts a self-checking program and starts a corresponding processing mechanism for abnormal conditions obtained by the self-checking program.
8. The photovoltaic gateway device upgrade method according to claim 1, It is characterized in that The upgrade package is provided with a configuration file; When upgrading online, if at least one photovoltaic gateway device fails to connect to the server, a topology upgrade instruction is written into the configuration file; When upgrading offline, a topology upgrade instruction is written into the configuration file.
9. The photovoltaic gateway device upgrade method according to claim 8, It is characterized in that The topology upgrade includes: The upgraded PV gateway device establishes a TCP server and sends the upgrade information via wired or wireless means; The photovoltaic gateway device that has not been successfully upgraded establishes a TCP client, periodically scans the upgrade information, and selects the TCP server that meets the conditions according to the geographical location and / or signal strength to establish a connection.
10. The photovoltaic gateway device upgrade method according to claim 9, It is characterized in that The TCP client sends an upgrade request to the TCP server, and the TCP server verifies the upgrade request and sends an upgrade package to the TCP client; after the TCP client completes downloading the upgrade package, it performs multi-level verification on the upgrade package, and starts the upgrade process after passing the verification.
Citation Information
Patent Citations
Online upgrade method of photovoltaic data collection gateway device
CN108494818A
Photovoltaic power station monitoring system based on MQTT protocol
CN109245295A
Photovoltaic power station equipment software upgrading system, method and device
CN109388419A
Router gateway equipment management method and system based on MQTT
CN114938329A
Topology identification system, method and device for distributed photovoltaic access transformer area
CN116436167A
