Remote online software upgrading method based on Ethernet tftp protocol

The Ethernet TFTP protocol-based method for remote software upgrade addresses high costs and network signal issues by providing secure and efficient file transfer and execution on RTC devices, ensuring stable and cost-effective upgrades for RTC controllers in energy storage systems.

CN119127267APending Publication Date: 2024-12-13HEFEI HUAZHI ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411150662.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Existing remote software upgrade methods for RTC controllers in energy storage systems face high costs, operational challenges due to 4G network signal issues, and low operability, especially in remote project sites.

Method used

A method utilizing Ethernet TFTP protocol for remote online software upgrade, involving file transfer via EMS devices using HTTPS or SFTP, with integrity checks, scheduled tasks, and tftp client operations to ensure secure and reliable file transfer and execution on RTC devices.

Benefits of technology

Enables cost-effective, reliable, and efficient software upgrades for multiple RTC devices within a local area network, ensuring stability and operability through Ethernet connectivity and robust error handling mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127267A_ABST
    Figure CN119127267A_ABST
Patent Text Reader

Abstract

The invention discloses an Ethernet tftp protocol-based remote online software upgrading method, which comprises the following steps of: transmitting an upgrading file of equipment to be upgraded to EMS (Enhanced Management System) equipment through a PC (Personal Computer) network end, arranging a file uploading interface on the EMS equipment, and receiving the upgrading file from the network by the interface; the upgrade file is uploaded to the EMS device by using a secure file transfer protocol such as HTTPS or SFTP. According to the remote online software upgrading method based on the Ethernet tftp protocol, an EMS adopts a Linux system architecture, the EMS develops data interface support, the EMS has a networking function, files can be conveniently and remotely placed in EMS equipment for storage, the EMS and RTCs are connected through the Ethernet, if multiple RTCs are connected with the EMS, a local area network is formed through a switch, and due to the fact that IPs of the RTCs are different, the remote online software upgrading can be achieved through the Ethernet. The EMS can send an instruction to enable a single RTC device to enter the upgrading state, and can also send an instruction to enable all RTCs in the local area network to enter the upgrading state, so that upgrading of any number of slave devices is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of remote online software upgrade, in particular to a method for remote online software upgrade based on Ethernet TFTP protocol. Background Art

[0002] Industrial and commercial energy storage technology is an emerging technology in recent years. As an integrated system, the technology of energy storage integration is on the road of exploration and progress. It is constantly improving by gradually accumulating experience in combination with actual market project operations. As the core component of system integration, the RTC controller faces the challenge of upgrading its own operating program at any time. The project site is generally remote, and the operating cost is relatively high through manual on-site program upgrades.

[0003] However, the traditional IAP is a reserved communication interface for the product, which is combined with the PC host computer to upgrade the released product. There is also a 4G DTU device to remotely upgrade the device, but this adds additional costs. In addition, due to the influence of 4G network signals, the upgrade experience in remote areas is not very friendly. Summary of the invention

[0004] 1. Technical issues to be resolved

[0005] In view of the shortcomings of the prior art, the present invention provides a method for remote online software upgrade based on the Ethernet TFTP protocol, which has the advantages of realizing the upgrade of any number of slave devices, low cost, easy implementation, and strong operability, and solves the problems of high upgrade cost, influence of 4G network signals, and low operability.

[0006] (II) Technical solution

[0007] To achieve the above object, the present invention provides the following technical solution: a method for remote online software upgrade based on Ethernet TFTP protocol, comprising the following steps:

[0008] Step 1: Transfer the upgrade file of the device to be upgraded to the EMS device through the PC network terminal. Set a file upload interface on the EMS device, which can accept the upgrade file from the network. Use a secure file transfer protocol such as HTTPS or SFTP to upload the upgrade file to the EMS device. After receiving the file, the EMS device performs a file integrity check to ensure that the file is not damaged.

[0009] Step 2: Send the upgrade instruction to the EMS device through the network, or set a scheduled task to automatically send the upgrade instruction at a specified time. After receiving the upgrade instruction, the EMS device parses the instruction content and prepares to perform the upgrade operation;

[0010] Step 3: After receiving the upgrade instruction, the RTC device writes the upgrade flag at the specific address of FLASH, and the RTC device executes the software restart operation and enters the BootLoader program after restarting;

[0011] Step 4: When RTC reads the value of a specific FLASH address in the BootLoader program as a pending upgrade flag, it starts the tftp client and actively connects to the tftp server of the set tftp server IP and port number EMS;

[0012] Step 5: After the tftp client is successfully connected, it sends a get request to the server to request to download a specific upgrade file such as rtc.bin. Before downloading the file, the FLASH data in the application area is copied to the backup program area. After the copy is completed, the FLASH in the application area is erased to prepare to write a new upgrade file.

[0013] Step 6: The tftp client receives the upgrade file according to the protocol, performs a file integrity check after receiving the file, and writes the received file into the FLASH in the application area after the check is correct. After writing is completed, mark the upgrade success flag at a specific address of the FLASH, restart the RTC device, and jump to the new application to run;

[0014] Step 7. During the upgrade process, if any error occurs, such as connection failure, file acquisition failure, transmission timeout, verification failure, etc., stop the upgrade operation immediately, copy the FLASH data in the backup area back to the FLASH in the application area, and restore the previous program to continue running.

[0015] Preferably, when the upgrade file for the device to be upgraded is transmitted to the EMS device via the network, an encrypted network protocol such as HTTPS or SFTP is used to more securely transmit the upgrade file to the EMS device, while providing file transfer status monitoring and logging functions to track the transfer progress and diagnose problems.

[0016] Preferably, when sending an upgrade RTC instruction to EMS via the network or setting a specified time for EMS to send an upgrade instruction to RTC, a confirmation and retry mechanism for sending network instructions is provided to ensure that the instructions can reliably reach the EMS device, and instruction parsing and verification are implemented on the EMS device to ensure the legality and correctness of the instructions.

[0017] Preferably, after the RTC receives the upgrade instruction sent by the EMS, access control and verification of the FLASH address are implemented on the RTC device to ensure that only legal upgrade operations can modify the FLASH, and verification and error handling logic for the upgrade flag are added to the BootLoader program to ensure the correctness of the upgrade process.

[0018] Preferably, after the RTC reads the specific FLASH address in the BootLoader program, the reconnection and timeout processing logic of the tftp client is implemented in the BootLoader program to ensure that it can stably connect to the tftp server, and provide a dynamic configuration function for the tftp server IP and port number to change the connection parameters when necessary. Before obtaining the upgrade file, check the existence and integrity of the file to ensure that the correct upgrade file is obtained.

[0019] Preferably, the specific file name is obtained from the tftp server, and before erasing the FLASH in the application area, it is ensured that the FLASH in the backup program area has enough space to store the backup data, and verification and error handling logic for the FLASH erasing operation is provided to ensure the correctness and reliability of the erasing operation. When backing up and erasing FLASH data, a data encryption and verification mechanism is implemented to ensure the security and integrity of the data.

[0020] Preferably, when the tftp client receives the upgrade file according to the protocol, a data flow control and verification mechanism is implemented to ensure that the received data is complete and correct, and a multiple verification mechanism for the upgrade file is provided, including verification during the receiving process and after the receiving is completed, to ensure the correctness of the file. When writing the upgrade file to the application area FLASH, write verification and error handling logic are implemented to ensure the correctness and reliability of the write operation, and before marking the upgrade success flag, it is ensured that the upgrade file has been correctly written and verified.

[0021] Preferably, during the upgrade process, detailed error logging and diagnostic functions are implemented so that problems can be quickly located when the upgrade fails, and a verification and recovery mechanism for the FLASH data in the backup area is provided to ensure that the previous program version can be restored and continued to run when the upgrade fails. After restoring to the previous program version, necessary system checks and tests are implemented to ensure that the system can run stably. At the same time, an alarm and notification function for upgrade failure is provided so that relevant personnel can be notified in time for processing.

[0022] (III) Beneficial effects

[0023] Compared with the prior art, the present invention provides a method for remote online software upgrade based on Ethernet TFTP protocol, which has the following beneficial effects:

[0024] The method for remote online software upgrade based on Ethernet TFTP protocol adopts Linux system architecture through EMS, EMS develops data interface support, EMS has networking function, and files can be conveniently stored in EMS devices remotely. EMS and RTC are connected through Ethernet. If there are multiple RTC devices connected to EMS, a local area network is formed through a switch. Since the IP addresses of various RTCs are different, EMS can send instructions to make a single RTC device enter an upgrade state, and can also send instructions to make all RTCs in the local area network enter an upgrade state, so that any number of slave devices can be upgraded. At the same time, after EMS receives the complete file, it will upgrade the RTC. The local area network with hard connection formed between EMS and RTC is faster and more stable to upgrade. Compared with traditional upgrade methods, it has the characteristics of low cost, easy implementation and strong operability. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 The present invention provides a structural schematic diagram of a method for remote online software upgrade based on Ethernet TFTP protocol. DETAILED DESCRIPTION

[0026] 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.

[0027] See also Figure 1 , Step 1, transfer the upgrade file for the device to be upgraded to the EMS device through the PC network terminal, use encrypted network protocols such as HTTPS or SFTP to transfer the upgrade file to the EMS device more securely, and provide file transfer status monitoring and log recording functions to track the transfer progress and diagnose problems. Set a file upload interface on the EMS device, which can accept upgrade files from the network, and use secure file transfer protocols such as HTTPS or SFTP to upload the upgrade file to the EMS device. After receiving the file, the EMS device performs a file integrity check to ensure that the file is not damaged;

[0028] Step 2: Send the upgrade command to the EMS device through the network, or set a scheduled task to automatically send the upgrade command at a specified time. After receiving the upgrade command, the EMS device parses the command content and prepares to perform the upgrade operation. At the same time, it provides a confirmation and retry mechanism for sending network commands to ensure that the command can reliably reach the EMS device, and implements command parsing and verification on the EMS device to ensure the legitimacy and correctness of the command.

[0029] Step 3: After the RTC device receives the upgrade instruction, it implements access control and verification of the FLASH address on the RTC device to ensure that only legal upgrade operations can modify the FLASH. Verification and error handling logic for the upgrade flag are added to the BootLoader program to ensure the correctness of the upgrade process. The upgrade flag is written to the specific address of the FLASH. The RTC device executes a software restart operation and enters the BootLoader program after restarting.

[0030] Step 4. When RTC reads the value of a specific FLASH address in the BootLoader program as a pending upgrade flag, it starts the tftp client and actively connects to the tftp server of the set IP and port number of the EMS. At the same time, the reconnection and timeout processing logic of the tftp client is implemented in the BootLoader program to ensure that it can be stably connected to the tftp server. It provides a dynamic configuration function for the IP and port number of the tftp server so that the connection parameters can be changed when necessary. Before obtaining the upgrade file, check the existence and integrity of the file to ensure that the correct upgrade file is obtained.

[0031] Step 5. After the tftp client is successfully connected, it sends a get request to the server to request to download a specific upgrade file such as rtc.bin. Before downloading the file, the FLASH data in the application area is copied to the backup program area. After the copy is completed, the FLASH in the application area is erased. First, ensure that the FLASH in the backup program area has enough space to store the backup data, provide verification and error handling logic for the FLASH erase operation, ensure the correctness and reliability of the erase operation, and implement data encryption and verification mechanisms when backing up and erasing FLASH data to ensure data security and integrity, and prepare to write new upgrade files;

[0032] Step 6. The tftp client receives the upgrade file according to the protocol, and performs a file integrity check after receiving. After the check is correct, the received file is written into the FLASH in the application area. After writing, the data flow control and verification mechanism are implemented to ensure that the received data is complete and correct. A multiple verification mechanism for the upgrade file is provided, including verification during and after the receiving process to ensure the correctness of the file. When writing the upgrade file to the FLASH in the application area, write verification and error handling logic are implemented to ensure the correctness and reliability of the write operation. Before marking the upgrade success flag, first ensure that the upgrade file has been correctly written and verified. The upgrade success flag will be marked at a specific address of the FLASH, restart the RTC device, and jump to the new application to run;

[0033] Step 7. During the upgrade process, if any error occurs, such as connection failure, file acquisition failure, transmission timeout, verification failure, etc., stop the upgrade operation immediately, copy the FLASH data in the backup area back to the FLASH in the application area, and restore to the previous program to continue running. At the same time, during the upgrade process, implement detailed error logging and diagnostic functions so that the problem can be quickly located when the upgrade fails, provide a verification and recovery mechanism for the FLASH data in the backup area, ensure that the previous program version can be restored and continue to run when the upgrade fails, and after restoring to the previous program version, implement necessary system checks and tests to ensure that the system can run stably. At the same time, provide an alarm and notification function for upgrade failure so that relevant personnel can be notified in time for processing.

[0034] In summary, the method of remote online software upgrade based on Ethernet tftp protocol, when in use, adopts Linux system architecture through EMS, EMS develops data interface support, EMS has networking function, and files can be easily stored in EMS devices remotely. EMS and RTC are connected through Ethernet. If there are multiple RTC devices connected to EMS, a local area network is formed through a switch. Since the IPs of each RTC are different, EMS can send instructions to let a single RTC device enter the upgrade state, and can also send instructions to let all RTCs in the local area network enter the upgrade state, so that any number of slave devices can be upgraded. At the same time, after EMS receives the complete file, it will upgrade the RTC. The local area network with hard connection formed between EMS and RTC is faster and more stable to upgrade. Compared with traditional upgrade methods, it has the characteristics of low cost, easy implementation and strong operability.

[0035] It should be noted that, 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 other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0036] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for remote online software upgrade based on Ethernet TFTP protocol, characterized in that: The following steps are involved: Step 1: Transfer the upgrade file of the device to be upgraded to the EMS device through the PC network terminal. Set a file upload interface on the EMS device, which can accept the upgrade file from the network. Use a secure file transfer protocol such as HTTPS or SFTP to upload the upgrade file to the EMS device. After receiving the file, the EMS device performs a file integrity check to ensure that the file is not damaged. Step 2: Send the upgrade instruction to the EMS device through the network, or set a scheduled task to automatically send the upgrade instruction at a specified time. After receiving the upgrade instruction, the EMS device parses the instruction content and prepares to perform the upgrade operation; Step 3: After receiving the upgrade instruction, the RTC device writes the upgrade flag at the specific address of FLASH, and the RTC device executes the software restart operation and enters the BootLoader program after restarting; Step 4: When RTC reads the value of a specific FLASH address in the BootLoader program as a pending upgrade flag, it starts the tftp client and actively connects to the tftp server of the set tftp server IP and port number EMS; Step 5: After the tftp client is successfully connected, it sends a get request to the server to request to download a specific upgrade file such as rtc.bin. Before downloading the file, the FLASH data in the application area is copied to the backup program area. After the copy is completed, the FLASH in the application area is erased to prepare to write a new upgrade file. Step 6: The tftp client receives the upgrade file according to the protocol, performs a file integrity check after receiving the file, and writes the received file into the FLASH in the application area after the check is correct. After writing is completed, mark the upgrade success flag at a specific address of the FLASH, restart the RTC device, and jump to the new application to run; Step 7. During the upgrade process, if any error occurs, such as connection failure, file acquisition failure, transmission timeout, verification failure, etc., stop the upgrade operation immediately, copy the FLASH data in the backup area back to the FLASH in the application area, and restore the previous program to continue running.

2. The method for remote online software upgrade based on Ethernet TFTP protocol according to claim 1, characterized in that: When the upgrade file for the device to be upgraded is transmitted to the EMS device via the network, an encrypted network protocol such as HTTPS or SFTP is used to more securely transmit the upgrade file to the EMS device, while providing file transfer status monitoring and logging functions to track the transfer progress and diagnose problems.

3. The method for remote online software upgrade based on Ethernet TFTP protocol according to claim 1, characterized in that: When sending an upgrade RTC instruction to EMS via the network or setting a specified time for EMS to send an upgrade instruction to RTC, a confirmation and retry mechanism for network instruction sending is provided to ensure that the instruction can reliably reach the EMS device, and instruction parsing and verification are implemented on the EMS device to ensure the legality and correctness of the instruction.

4. The method for remote online software upgrade based on Ethernet TFTP protocol according to claim 1, characterized in that: After the RTC receives the upgrade instruction sent by the EMS, the access control and verification of the FLASH address are implemented on the RTC device to ensure that only legal upgrade operations can modify the FLASH, and the verification and error handling logic of the upgrade flag are added to the BootLoader program to ensure the correctness of the upgrade process.

5. The method for remote online software upgrade based on Ethernet TFTP protocol according to claim 1, characterized in that: After the RTC reads the specific FLASH address in the BootLoader program, the reconnection and timeout processing logic of the tftp client is implemented in the BootLoader program to ensure that it can stably connect to the tftp server, and provide dynamic configuration function for the tftp server IP and port number to change the connection parameters when necessary. Before obtaining the upgrade file, check the existence and integrity of the file to ensure that the correct upgrade file is obtained.

6. The method for remote online software upgrade based on Ethernet TFTP protocol according to claim 1, characterized in that: The specific file name is obtained from the tftp server. Before erasing the FLASH in the application area, it is ensured that the FLASH in the backup program area has enough space to store the backup data. Verification and error handling logic for the FLASH erasing operation are provided to ensure the correctness and reliability of the erasing operation. When backing up and erasing FLASH data, a data encryption and verification mechanism is implemented to ensure the security and integrity of the data.

7. The method for remote online software upgrade based on Ethernet TFTP protocol according to claim 1, characterized in that: When the tftp client receives the upgrade file according to the protocol, a data flow control and verification mechanism is implemented to ensure that the received data is complete and correct, and a multiple verification mechanism for the upgrade file is provided, including verification during the receiving process and after the receiving is completed, to ensure the correctness of the file. When writing the upgrade file to the application area FLASH, write verification and error handling logic are implemented to ensure the correctness and reliability of the write operation. Before marking the upgrade success flag, it is ensured that the upgrade file has been correctly written and verified.

8. The method for remote online software upgrade based on Ethernet TFTP protocol according to claim 1, characterized in that: During the upgrade process, detailed error logging and diagnostic functions are implemented so that problems can be quickly located when the upgrade fails. A verification and recovery mechanism for the FLASH data in the backup area is provided to ensure that the previous program version can be restored and continued to run when the upgrade fails. After restoring to the previous program version, necessary system checks and tests are implemented to ensure that the system can run stably. At the same time, an alarm and notification function for upgrade failure is provided so that relevant personnel can be notified in time for processing.