CN111258601B - Hydraulic RTU remote upgrading method based on lossless data compression algorithm - Google Patents
Hydraulic RTU remote upgrading method based on lossless data compression algorithm Download PDFInfo
- Publication number
- CN111258601B CN111258601B CN202010023868.9A CN202010023868A CN111258601B CN 111258601 B CN111258601 B CN 111258601B CN 202010023868 A CN202010023868 A CN 202010023868A CN 111258601 B CN111258601 B CN 111258601B
- Authority
- CN
- China
- Prior art keywords
- rtu
- data compression
- module
- compression algorithm
- hydraulic
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a hydraulic RTU remote upgrading method based on a lossless data compression algorithm, which comprises the following steps: step one, a server establishes socket connection with an RTU; secondly, compressing an original BIN file by the server through an LZO data compression module, packaging data of the compressed file through a remote upgrading communication protocol module, and sending the data to the RTU according to a communication protocol flow; and thirdly, decompressing the received compressed file into an original BIN file through an LZO data compression module by the RTU, storing the BIN file in a designated area, compressing the program file through an LZO lossless data compression algorithm by adopting a compression algorithm, greatly reducing the size of the program file, and improving the success rate of remote upgrading.
Description
Technical Field
The invention relates to the technical field of hydraulic RTU, in particular to a hydraulic RTU remote upgrading method based on a lossless data compression algorithm.
Background
The water conservancy RTU has the characteristics of higher reliability, more convenient communication and better openness, is widely applied to water conservancy and water service industries (such as mountain torrent early warning and monitoring field, medium and small river monitoring field, reservoir dynamic monitoring field, pump station monitoring field and the like) at present, and also rapidly develops in the fields with remote terminal measurement and control site requirements such as municipal administration, energy, traffic, electric power, environment, weather, geology, agriculture and the like.
In the practical application of the hydraulic RTU, the RTU equipment which is already deployed and installed on the project site needs to update the internal program of the RTU due to the function upgrade. Because the installation and deployment positions of the hydraulic RTU are scattered, the mode of performing field upgrade to the installation site of the equipment has the problems of high personnel cost and low upgrade timeliness, and the hydraulic RTU is required to have a reliable remote program upgrade function.
However, the program file of the hydraulic RTU is about hundreds of K, and needs to be connected for a long time when being remotely upgraded through GPRS, so that the remote upgrading success rate is lower for the area with poor GPRS signal quality, and secondly, the hydraulic engineering is often built at the open field place and is easy to be attacked by lightning, the impact of lightning stroke (direct lightning strike and induced lightning strike) can directly lead to the damage of RTU equipment, and therefore, the hydraulic RTU remote upgrading method based on the lossless data compression algorithm is provided.
Disclosure of Invention
The invention aims to provide a remote upgrading method of a water conservancy RTU based on a lossless data compression algorithm, which aims to solve the problems that in the background art, program files of the water conservancy RTU are about hundreds of K, long-time connection is required to be kept when remote upgrading is carried out through GPRS, and the success rate of remote upgrading is low in areas with poor GPRS signal quality.
In order to achieve the above purpose, the present invention provides the following technical solutions: a hydraulic RTU remote upgrading method based on a lossless data compression algorithm comprises the following steps:
step one, a server establishes socket connection with an RTU;
secondly, compressing an original BIN file by the server through an LZO data compression module, packaging data of the compressed file through a remote upgrading communication protocol module, and sending the data to the RTU according to a communication protocol flow;
step three, the RTU decompresses the received compressed file into an original BIN file through an LZO data compression module, stores the BIN file in a designated area and sends the BIN file to a program upgrading module;
step four, the program upgrading module updates the original BIN file into a program storage area to finish program upgrading;
and fifthly, restarting the RTU to operate after the program upgrading file is replaced.
As a further preferred aspect of the present invention: and the server and the RTU comprise an LZO data compression module and a remote upgrade communication protocol module, wherein the LZO data compression module is used for compressing and decompressing an original BIN file through a lossless data compression algorithm with decompression speed.
As a further preferred aspect of the present invention: the server sends the socket connection application to the RTU, the server receives the RTU verification passing information, and the server establishes socket connection with the RTU.
As a further preferred aspect of the present invention: the remote upgrading communication protocol module comprises a wireless signal transmission device, and the wireless signal transmission device is a wireless signal transmission device with at least one function of Bluetooth, wifi, GPRS and 4G.
As a further preferred aspect of the present invention: the RTU remote upgrade comprises the following steps:
s100, after receiving an upgrade command, the RTU empties a storage area and a related mark of the compressed file, and prepares to accept a program upgrade package;
s200, after receiving the correct message, the RTU takes out the effective data in the message and stores the effective data in the relevant area, and simultaneously replies the message to the server;
s300, if the program upgrading packet is not received within the set time and the remote upgrading fails, returning the RTU to a waiting state;
s400, after the upgrade message is received, the RTU decompresses all upgrade data to the BIN file area, if decompression fails, the RTU returns to a waiting state, and meanwhile, the decompression failure information is uploaded to a server;
and S500, after decompression is successful, the RTU enters a RAM running space, data in the BIN file area is copied to a Flash program space, and after copying is completed, the RTU is restarted to complete program upgrading.
As a further preferred aspect of the present invention: and the RTU for remote upgrading of the RTU is always in a waiting state in operation, and waits for the server to send a remote upgrading command.
As a further preferred aspect of the present invention: the number of RTUs is at least one or more.
As a further preferred aspect of the present invention: the RTU comprises a storage unit and an MCU, wherein the storage unit is in interactive connection with the MCU, the storage unit is a FLASH memory, an EEPROM memory or an FRAM memory, the MCU is an 8-bit, 16-bit or 32-bit singlechip, and the MCU is provided with more than two paths of Uart interfaces.
As a further preferred aspect of the present invention: the RTU also comprises a lightning surge absorbing module and an equipotential protection circuit module.
As a further preferred aspect of the present invention: the lightning-proof surge absorbing module comprises a piezoresistor MOV, a silicon avalanche diode SAD, an air conduit and a discharge capacitor.
Compared with the prior art, the invention has the beneficial effects that: the method comprises the steps that firstly, a server and an RTU are connected in a socket mode; secondly, compressing an original BIN file by the server through an LZO data compression module, packaging data of the compressed file through a remote upgrading communication protocol module, and sending the data to the RTU according to a communication protocol flow; and thirdly, decompressing the received compressed file into an original BIN file through an LZO data compression module by the RTU, storing the BIN file in a designated area, compressing the program file through an LZO lossless data compression algorithm by adopting a compression algorithm, greatly reducing the size of the program file, and improving the success rate of remote upgrading.
Drawings
FIG. 1 is a schematic flow chart of a hydraulic RTU remote upgrading method based on a lossless data compression algorithm;
FIG. 2 is a schematic diagram of a server and RTU connection module according to the present invention;
FIG. 3 is a flow chart of RTU remote upgrade of the present invention;
FIG. 4 is a schematic diagram of the internal structure of the RTU of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Examples
Referring to fig. 1-4, the present invention provides a technical solution: a hydraulic RTU remote upgrading method based on a lossless data compression algorithm comprises the following steps:
step one, a server establishes socket connection with an RTU;
secondly, compressing an original BIN file by the server through an LZO data compression module, packaging data of the compressed file through a remote upgrading communication protocol module, and sending the data to the RTU according to a communication protocol flow;
step three, the RTU decompresses the received compressed file into an original BIN file through an LZO data compression module, stores the BIN file in a designated area and sends the BIN file to a program upgrading module;
step four, the program upgrading module updates the original BIN file into a program storage area to finish program upgrading;
and fifthly, restarting the RTU to operate after the program upgrading file is replaced.
In this embodiment, specific: and the server and the RTU comprise an LZO data compression module and a remote upgrade communication protocol module, wherein the LZO data compression module is used for compressing and decompressing an original BIN file through a lossless data compression algorithm with decompression speed.
In this embodiment, specific: the server sends the socket connection application to the RTU, the server receives the RTU verification passing information, the server and the RTU establish socket connection, if the server passes the verification, the RTU sends the verification passing information to the server, the server receives the RTU verification passing information, and the socket connection is successfully established between the server and the RTU.
In this embodiment, specific: the remote upgrading communication protocol module comprises a wireless signal transmission device, and the wireless signal transmission device is a wireless signal transmission device with at least one function of Bluetooth, wifi, GPRS and 4G.
In this embodiment, specific: the RTU remote upgrade comprises the following steps:
s100, after receiving an upgrade command, the RTU empties a storage area and a related mark of the compressed file, and prepares to accept a program upgrade package;
s200, after receiving the correct message, the RTU takes out the effective data in the message and stores the effective data in the relevant area, and simultaneously replies the message to the server;
s300, if the program upgrading packet is not received within the set time and the remote upgrading fails, returning the RTU to a waiting state;
s400, after the upgrade message is received, the RTU decompresses all upgrade data to the BIN file area, if decompression fails, the RTU returns to a waiting state, and meanwhile, the decompression failure information is uploaded to a server;
and S500, after decompression is successful, the RTU enters a RAM running space, data in the BIN file area is copied to a Flash program space, and after copying is completed, the RTU is restarted to complete program upgrading.
In this embodiment, specific: and the RTU for remote upgrading of the RTU is always in a waiting state in operation, and waits for the server to send a remote upgrading command.
In this embodiment, specific: the number of RTUs is at least one or more.
In this embodiment, specific: the RTU comprises a storage unit and an MCU, wherein the storage unit is in interactive connection with the MCU, the storage unit is a FLASH memory, an EEPROM memory or an FRAM memory, the MCU is an 8-bit, 16-bit or 32-bit singlechip, and the MCU is provided with more than two paths of Uart interfaces.
In this embodiment, specific: the RTU also comprises an anti-lightning surge absorption module and an equipotential protection circuit module, adopts a multi-stage lightning protection module, adopts a power isolation and photoelectric isolation technology, and adopts an anti-lightning design for all input and output ports, so that the influence of lightning on RTU equipment is effectively inhibited.
In this embodiment, specific: the anti-lightning surge absorption module comprises a piezoresistor MOV, a silicon avalanche diode SAD, an air conduit and a discharge capacitor, and is used for resolving (heating and melting) impact current in a loss self mode, so that the impact current led into the ground is in a safe range, and secondary counterattack is not formed. The service life of the suppression element can be shortened due to repeated current impact, the SineTamer adopts a 40 module, a thermal and electric fusing double-insurance, a heat sharing algorithm and the like, the service life of the SineTamer is ensured, about 90% of overvoltage and overcurrent are resolved by the SineTamer, the rest 10% of overvoltage and overcurrent are led into the ground, and the lightning protection circuit module lightning protection circuit, the device failure detection automatic separation circuit, the temperature control limiting circuit, the short-circuit protection and automatic recovery circuit, the detection and signal processing circuit, the surge delay action circuit, the overload current limiting protection circuit and the voltage transformation rectifying circuit are arranged in the ground.
The invention realizes the data compression/decompression function through the server software and the RTU by embedding the MiniLZO library with an open source, and the RTU decompresses the compressed program file sent by the server into an original file and then updates the program.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (9)
1. The hydraulic RTU remote upgrading method based on the lossless data compression algorithm is characterized by comprising the following steps of:
step one, a server establishes socket connection with an RTU;
secondly, compressing an original BIN file by the server through an LZO data compression module, packaging data of the compressed file through a remote upgrading communication protocol module, and sending the data to the RTU according to a communication protocol flow;
step three, the RTU decompresses the received compressed file into an original BIN file through an LZO data compression module, stores the BIN file in a designated area and sends the BIN file to a program upgrading module;
step four, the program upgrading module updates the original BIN file into a program storage area to finish program upgrading;
fifthly, restarting the RTU to operate after the program upgrading file is replaced;
the RTU remote upgrade comprises the following steps:
s100, after receiving an upgrade command, the RTU empties a storage area and a related mark of the compressed file, and prepares to accept a program upgrade package;
s200, after receiving the correct message, the RTU takes out the effective data in the message and stores the effective data in the relevant area, and simultaneously replies the message to the server;
s300, if the program upgrading packet is not received within the set time and the remote upgrading fails, returning the RTU to a waiting state;
s400, after the upgrade message is received, the RTU decompresses all upgrade data to the BIN file area, if decompression fails, the RTU returns to a waiting state, and meanwhile, the decompression failure information is uploaded to a server;
and S500, after decompression is successful, the RTU enters a RAM running space, data in the BIN file area is copied to a Flash program space, and after copying is completed, the RTU is restarted to complete program upgrading.
2. The hydraulic RTU remote upgrade method based on lossless data compression algorithm according to claim 1, wherein: and the server and the RTU comprise an LZO data compression module and a remote upgrade communication protocol module, wherein the LZO data compression module is used for compressing and decompressing an original BIN file through a lossless data compression algorithm with decompression speed.
3. The hydraulic RTU remote upgrade method based on lossless data compression algorithm according to claim 1, wherein: the server sends the socket connection application to the RTU, the server receives the RTU verification passing information, and the server establishes socket connection with the RTU.
4. The hydraulic RTU remote upgrade method based on lossless data compression algorithm according to claim 1, wherein: the remote upgrading communication protocol module comprises a wireless signal transmission device, and the wireless signal transmission device is a wireless signal transmission device with at least one function of Bluetooth, wifi, GPRS and 4G.
5. The hydraulic RTU remote upgrade method based on lossless data compression algorithm according to claim 1, wherein: and the RTU for remote upgrading of the RTU is always in a waiting state in operation, and waits for the server to send a remote upgrading command.
6. The hydraulic RTU remote upgrade method based on lossless data compression algorithm according to claim 1, wherein: the number of RTUs is one or more.
7. The hydraulic RTU remote upgrade method based on lossless data compression algorithm according to claim 1, wherein: the RTU comprises a storage unit and an MCU, wherein the storage unit is in interactive connection with the MCU, the storage unit is a FLASH memory, an EEPROM memory or an FRAM memory, the MCU is an 8-bit, 16-bit or 32-bit singlechip, and the MCU is provided with more than two paths of Uart interfaces.
8. The hydraulic RTU remote upgrade method based on lossless data compression algorithm according to claim 1, wherein: the RTU also comprises a lightning surge absorbing module and an equipotential protection circuit module.
9. The hydraulic RTU remote upgrade method based on lossless data compression algorithm according to claim 8, wherein: the lightning-proof surge absorbing module comprises a piezoresistor MOV, a silicon avalanche diode SAD, an air conduit and a discharge capacitor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010023868.9A CN111258601B (en) | 2020-01-09 | 2020-01-09 | Hydraulic RTU remote upgrading method based on lossless data compression algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010023868.9A CN111258601B (en) | 2020-01-09 | 2020-01-09 | Hydraulic RTU remote upgrading method based on lossless data compression algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111258601A CN111258601A (en) | 2020-06-09 |
CN111258601B true CN111258601B (en) | 2023-09-08 |
Family
ID=70945214
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010023868.9A Active CN111258601B (en) | 2020-01-09 | 2020-01-09 | Hydraulic RTU remote upgrading method based on lossless data compression algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111258601B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040015952A1 (en) * | 2001-04-18 | 2004-01-22 | Domosys Corporation | Method of remotely upgrading firmware in field-deployed devices |
CN102510409A (en) * | 2011-12-19 | 2012-06-20 | 厦门雅迅网络股份有限公司 | Method and system for quickly and remotely updating program of mobile terminal by using wireless network |
CN103425508A (en) * | 2013-05-27 | 2013-12-04 | 林永宗 | Zigbee firmware compressing and updating method |
CN103902309A (en) * | 2012-12-27 | 2014-07-02 | 龙尚智联通信科技(上海)有限公司 | Method for remotely upgrading wireless module firmware |
CN106815051A (en) * | 2016-12-30 | 2017-06-09 | 深圳怡化电脑股份有限公司 | A kind of firmware upgrade method of embedded device, device and currency examination device |
CN107707394A (en) * | 2017-09-26 | 2018-02-16 | 深圳市麦斯杰网络有限公司 | Equipment remote upgrade method, server, system and readable storage medium storing program for executing |
CN108334367A (en) * | 2017-08-31 | 2018-07-27 | 郑州云海信息技术有限公司 | A kind of firmware remote update system and method towards BMC chip |
CN109358883A (en) * | 2018-11-05 | 2019-02-19 | 珠海格力电器股份有限公司 | Programme upgrade method, system and application system, storage medium |
-
2020
- 2020-01-09 CN CN202010023868.9A patent/CN111258601B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040015952A1 (en) * | 2001-04-18 | 2004-01-22 | Domosys Corporation | Method of remotely upgrading firmware in field-deployed devices |
CN102510409A (en) * | 2011-12-19 | 2012-06-20 | 厦门雅迅网络股份有限公司 | Method and system for quickly and remotely updating program of mobile terminal by using wireless network |
CN103902309A (en) * | 2012-12-27 | 2014-07-02 | 龙尚智联通信科技(上海)有限公司 | Method for remotely upgrading wireless module firmware |
CN103425508A (en) * | 2013-05-27 | 2013-12-04 | 林永宗 | Zigbee firmware compressing and updating method |
CN106815051A (en) * | 2016-12-30 | 2017-06-09 | 深圳怡化电脑股份有限公司 | A kind of firmware upgrade method of embedded device, device and currency examination device |
CN108334367A (en) * | 2017-08-31 | 2018-07-27 | 郑州云海信息技术有限公司 | A kind of firmware remote update system and method towards BMC chip |
CN107707394A (en) * | 2017-09-26 | 2018-02-16 | 深圳市麦斯杰网络有限公司 | Equipment remote upgrade method, server, system and readable storage medium storing program for executing |
CN109358883A (en) * | 2018-11-05 | 2019-02-19 | 珠海格力电器股份有限公司 | Programme upgrade method, system and application system, storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111258601A (en) | 2020-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN203300952U (en) | Direction finding antenna field lightning protection system of short wave fixed station | |
CN107219441A (en) | Ultra-high-tension power transmission line fault location system based on mobile phone A PP | |
CN102998596A (en) | System for detecting faults of overhead line and detection method thereof | |
CN103824460B (en) | A kind of fully buried vehicle parking lot detector and detection method | |
CN105375443A (en) | Battery short-circuit protection circuit | |
CN111258601B (en) | Hydraulic RTU remote upgrading method based on lossless data compression algorithm | |
CN103852690A (en) | On-line monitoring system for electric power transmission line | |
CN103874303A (en) | Intelligent lighting remote monitoring and management system | |
CN208872829U (en) | A kind of low pressure protection against electric shock prior-warning device | |
CN104750516A (en) | Upgrading method for terminal equipment operating system | |
CN103795052A (en) | Data signal line RS-485 intelligent anti-lighting device and method | |
CN109918108A (en) | A kind of embedded equipment plug-in upgrade method and device | |
CN103530973A (en) | GPRS (General Packet Radio Service) wireless intelligent electrical safety supervision system | |
CN111638561A (en) | Overhead line prevents outer broken alarm device | |
CN102570388A (en) | Controllable device of surge protector | |
CN111105560A (en) | Charging service network operation monitoring system of charging pile and working method thereof | |
CN205665350U (en) | Injection formula fusing on -line monitoring device | |
CN104318394A (en) | Communication management machine intelligent warning system and method based on multi-motion warning mode | |
US11245180B2 (en) | Base station antenna unified system for sensors and test calls | |
CN205811667U (en) | A kind of small power station connection cutting system and small power station's radio remote thereof are jumped and are controlled device | |
CN104090144A (en) | Intelligent leakage current monitoring sensing device and leakage current monitoring system | |
CN204031459U (en) | Position information transmitter and system | |
CN209072156U (en) | A kind of Dam Safety Monitoring Automation acquisition system remote control power switching device | |
CN103018540B (en) | Zero-sequence voltage detection device of 6-10 KV circuit | |
CN110677746B (en) | Power distribution apparatus, system and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |