CN109101261A - A kind of the remote online upgrade method and system of data acquisition transmission instrument terminal - Google Patents

A kind of the remote online upgrade method and system of data acquisition transmission instrument terminal Download PDF

Info

Publication number
CN109101261A
CN109101261A CN201810919372.2A CN201810919372A CN109101261A CN 109101261 A CN109101261 A CN 109101261A CN 201810919372 A CN201810919372 A CN 201810919372A CN 109101261 A CN109101261 A CN 109101261A
Authority
CN
China
Prior art keywords
data
upgrade
transmission instrument
instrument terminal
server
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.)
Pending
Application number
CN201810919372.2A
Other languages
Chinese (zh)
Inventor
徐隋川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENYANG WARE ENVIRONMENT TECHNOLOGY Co Ltd
Original Assignee
SHENYANG WARE ENVIRONMENT TECHNOLOGY Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by SHENYANG WARE ENVIRONMENT TECHNOLOGY Co Ltd filed Critical SHENYANG WARE ENVIRONMENT TECHNOLOGY Co Ltd
Priority to CN201810919372.2A priority Critical patent/CN109101261A/en
Publication of CN109101261A publication Critical patent/CN109101261A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • H04L1/0056Systems characterized by the type of code used
    • H04L1/0061Error detection codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • H04L67/108Resource delivery mechanisms characterised by resources being split in blocks or fragments

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (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)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention is suitable for software upgrading technical field, provides the remote online upgrade method and system of a kind of data acquisition transmission instrument terminal, this method comprises: server sends upgrade command to data acquisition transmission instrument terminal;Whether data acquire transmission instrument terminal and determine in upgrade command to include new version information: if comprising answering server, data acquire transmission instrument terminal downloads upgrade code file data, and juxtaposition upgrades flag bit;Otherwise the notification message without upgrading is sent to server;The data acquisition transmission instrument terminal soft start of upgrade code file data is downloaded, bootstrap Bootloader is run, flag bit is read, if reading upgrading flag bit, then by the code file data of upgrade code file data covering lowest version, original subscriber's application program is otherwise executed;The present invention solve the problems, such as data acquisition transmission instrument terminal can not remote online upgrading, although be in upgrade mode, have no effect on data acquisition transmission instrument terminal normal work.

Description

A kind of the remote online upgrade method and system of data acquisition transmission instrument terminal
Technical field
The invention belongs to the remote online liters of software upgrading technical field more particularly to a kind of data acquisition transmission instrument terminal Grade method and system.
Background technique
Environment monitoring data acquisition Transmission system is designed for all kinds of Online monitoring of pollution sources, and without line number According to Acquisition Instrument as terminal primarily to obtain the data of each monitoring instrument in scene, upload and save initial data, because This equipment is often installed on remote flue gas plants, power plant and sewage treatment plant.Two kinds can be encountered in practical work process now Real difficulty can not work normally first is that some functions need to modify user in use second is that program itself is problematic, It solves such problems traditional approach and can choose staff and re-download program or client to scene to return equipment It returns again to and reinstalls after factory upgrade.For a large amount of, region disperses the on-site terminal used, to complete such more new task Not only temporal waste had been caused but also the additional expenditure such as produce labour cost.Based on this reason, the present invention provides a kind of base In the remote online upgrade-system of data acquisition transmission instrument, this is to use wireless communication technique to realize long-range update industry spot New departure of terminal inner program, can effectively solve above-mentioned technical problem.
Summary of the invention
The present invention provides the remote online upgrade method and system of a kind of data acquisition transmission instrument terminal, it is intended to solve data Acquire transmission instrument terminal can not remote online upgrading the problem of.
The invention is realized in this way a kind of remote online upgrade method of data acquisition transmission instrument terminal, the method Include:
Server sends upgrade command to data acquisition transmission instrument terminal;
Data acquire transmission instrument terminal and are judged whether to enter upgrade status according to the upgrade command of server:
If so, carrying out remote online upgrading: transmission upgrade code text between server and data acquisition transmission instrument terminal Number of packages evidence, data acquisition transmission instrument terminal cover the code file number of lowest version using the upgrade code file data received According to;
Otherwise, data acquisition transmission instrument terminal directly runs active user's application program.
Further, the upgrade command content includes: the IP address of server, port numbers, upgrade code filename Claim, version information and always send number-of-packet.
Further, before the remote online upgrading, further includes:
Upgrade code file data is split into the data cell of several regular lengths by server, respectively with each data Unit is that core forms data packet.
Further, each packet content includes: data packet head mark, command header, packet sequence, data sheet Member, cyclic redundancy check, data packet tail tag will and total packet number.
Further, the remote online upgrading, specifically includes:
Data acquisition transmission instrument terminal often receives a data packet, and all return confirmation messages are to server;
Data acquisition transmission instrument terminal verifies each data packet:
If the data packet verification of current transmission is errorless, the duplication of the data packet is carried out, then proceedes to ask for server Next data packet;
If the data packet of current transmission verifies failure, current data packet is asked for again without storage;
Until data acquisition transmission instrument terminal has received all data packets, and the duplication of whole data packets is carried out.
Further, the data acquisition transmission instrument terminal carries out CRC and exclusive or twin check to each data packet.
Further, the data acquisition transmission instrument terminal is by executing bootstrap Bootloader, to realize root Judge whether to enter upgrade status according to the upgrade command of server.
Further, in the remote online escalation process, data acquisition transmission instrument terminal often receives a data Packet is all stored, different from last time after abnormal interrupt troubleshooting when occurring abnormal interrupt situation in remote online escalation process The data packet often interrupted starts to receive again.
The present invention also provides a kind of remote online upgrade-systems of data acquisition transmission instrument terminal, comprising:
Server sends upgrade command to data acquisition transmission instrument terminal, whole with the data acquisition transmission instrument of upgrade status Upgrade code file data is transmitted between end;
Data acquire transmission instrument terminal, are judged whether to enter upgrade status according to the upgrade command of server:
If so, carrying out remote online upgrading: transmitting upgrade code file data between server, utilize what is received The code file data of upgrade code file data covering lowest version;
Otherwise, active user's application program is directly run.
Further, the data acquire transmission instrument terminal, comprising:
The control chip of embedded F1ASH, sentences for receiving the upgrade command of server, and according to the upgrade command of server It is disconnected whether to enter upgrade status: if so, carrying out remote online upgrading: transmission upgrade code text between server and control chip Number of packages evidence utilizes the code file data of the upgrade code file data covering lowest version received;Otherwise, control chip is direct Run active user's application program;Control chip FLASH region division be bootstrap region, user application region, Upgrade area;The upgrade area is changed under upgrade status for upgrade command and state flag bit that storage server is sent State flag bit is system update state, and upgrade code file data is dumped to user application region at this time;
Flash chip is extended out, control chip often receives a data packet from server, is all buffered in and extends out in flash, Verify it is errorless after copy to control chip user application region.
The present invention provide a kind of data acquisition transmission instrument terminal remote online upgrade method and and system, solve data Acquire transmission instrument terminal can not remote online upgrading the problem of, although data acquisition transmission instrument terminal be in upgrade mode, simultaneously The normal work for not influencing data acquisition transmission instrument terminal, in escalation process, data acquire one frame of the every reception of transmission instrument terminal After data, there is the corresponding information of storage, when occur abnormal conditions, such as communicating interrupt in escalation process, have a power failure suddenly the problems such as, The serial number that last time receives correct frame can be recorded, terminal is reworked after troubleshooting, can receive the ground interrupted from last time Fang Chongxin receives program, solves influence of the various abnormal conditions in scene to upgrading, ensure that the reliability of remote upgrade.In order to make Data acquisition transmission instrument terminal can respond remote online upgrading, using bootstrap Bootloader come Soft Starting System, and And load user program and execute, guarantee that upgrade mode is independent of each other with normal mode of operation.
Detailed description of the invention
Fig. 1 is a kind of remote online upgrade method process for data acquisition transmission instrument terminal that the embodiment of the present invention one provides Figure;
Fig. 2 is a kind of remote online upgrade method process of data acquisition transmission instrument terminal provided by Embodiment 2 of the present invention Figure;
Fig. 3 is a kind of remote online upgrade method process for data acquisition transmission instrument terminal that the embodiment of the present invention five provides Figure;
Fig. 4 is a kind of remote online upgrade-system for data acquisition transmission instrument terminal that the embodiment of the present invention eight to nine provides Block diagram;
Fig. 5 is a kind of remote online upgrade-system frame for data acquisition transmission instrument terminal that the embodiment of the present invention ten provides Figure.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
Embodiment one
The remote online upgrade method for present embodiments providing a kind of data acquisition transmission instrument terminal, as shown in Figure 1, the party Method includes the following steps:
S101, server send upgrade command to data acquisition transmission instrument terminal;
If in S102, data acquisition transmission instrument terminal judgement upgrade command including new version information, answering server, Data acquire transmission instrument terminal downloads upgrade code file data, and juxtaposition upgrades flag bit;
Determine not include new version information in upgrade command if S103, data acquire transmission instrument terminal, is sent out to server Send the notification message without upgrading;
S104, the data acquisition transmission instrument terminal soft start for having downloaded upgrade code file data, run bootstrap Bootloader reads flag bit;
If S105, reading upgrading flag bit, by the code file data of upgrade code file data covering lowest version;
If S106, unread arrive upgrade flag bit, original subscriber's application program is executed.
Under normal operating conditions, data acquire transmission instrument terminal operating user application, complete the acquisition of data, and Transfer data to server.Server receive sent to terminal after the connection request of terminal include upgrade procedure totalframes And the version information of upgrading software.Terminal receives upgrade command and first determines whether it is new version, then prepares to receive upgrading data frame, and Upgrading mark is set as in vain, then starting to ask for upgrade procedure data packet to server with downloading Success Flag, server is received Start to reply corresponding new user program data by the Bale No. in agreement to asking for after instruction for terminal (1 frame is 1K).Hair every time Judge whether correctly, to count if properly terminated according to CRC and exclusive or twin check after sending a frame upgrade procedure, terminal to receive It is extended out in the corresponding address FLASH that flash is distributed according to being written to.Otherwise this frame data, server are wanted with server again Just the frame data of this Bale No. are sent again.Terminal is to ask in order from the first frame data to a last frame data, the two friendship It is mutually until all new user program data receivers are complete.After, terminal profile upgrades successfully mark, and executes soft start, Successfully upgrading mark is determined after single-chip microcontroller electrification reset, new user program data can be copied to and be executed user program region In space, start to work normally, this completes the upgradings of program.In order to respond data acquisition transmission instrument terminal far Journey online upgrading, therefore using the method for default bootstrap Bootloader.BootLoader is one section of bootstrap, its position In the section start of control chip core FLASH, it is primarily used to activation system, and loads user application execution, if There is no Bootloader, after hardware-initiated success, will directly run user application.When data acquire transmission instrument terminal hardware After powerup/reset, soft start is opened, the starting code of Bootloader will be first performed, and carry out a series of initialization operation Afterwards, whether judgement currently needs to enter upgrade status.If you do not need to upgrading, just directly runs user application, otherwise, root According to the flag bit read in control chip core flash, fresh code data (the upgrade code number of files that will be obtained from server According to) region IAP of control chip core is copied to, so that covering original old code executes upgrade procedure, reaches data and adopt Collect transmission instrument terminal online upgrading purpose.
In the embodiment, entire deterministic process is completed in data acquisition transmission instrument terminal, is not necessarily to offline loading upgrading program, The normal operation of active user's application program is not influenced.Under normal operating conditions, data acquire transmission instrument terminal operating user Application program, completes the acquisition of data, and transfers data to server.Data acquisition transmission instrument terminal passes through with server GPRS network carries out both-way communication after establishing connection, and data acquire transmission instrument terminal can instruct acquisition online either according to AT Off-line state acquires transmission instrument terminal to data by server and sends upgrade command notice now if be online Field device prepares upgrading, and if it is off-line state, upgrading short message can be sent by the phone number of terminal by upgrading personnel.
In the embodiment,
Embodiment two
The remote online upgrade method for present embodiments providing a kind of data acquisition transmission instrument terminal, as shown in Fig. 2, in reality On the basis of applying example one, this method further includes following steps:
Upgrade code file data is split into the data cell of several regular lengths by S100, server, respectively with every A data cell is that core forms data packet.
In the embodiment, upgrade code file data is split into multiple data cells of regular length by server, with every A data cell is that core forms data packet, and server can be by upgrade code file after obtaining data acquisition transmission instrument terminal response One frame frame of data is transferred to upgrade code file data in the form of above-mentioned data packet, while carrying out to total packet number and current packet real When show, current packet is the packet numbers that data acquire that transmission instrument terminal current cable is wanted, this information is for checking upgrading progress.Dimension When shield personnel can determine whether currently to wrap equal with total packet number, that is, think to upgrade successfully.In escalation process, to guarantee the data received It is correctly, to avoid the program by mistake from being written in data acquisition transmission instrument terminal, take fixed data format and carry out Transmission.
Embodiment three
The remote online upgrade method for present embodiments providing a kind of data acquisition transmission instrument terminal, in the base of embodiment one On plinth, upgrade command content includes: IP address, port numbers, upgrade code file name, version information and the total transmission of server Number-of-packet.
In the embodiment, data acquisition transmission instrument terminal can judge whether according to the version information in upgrade command content Into upgrade status, when the version is applied with currently running user application version same or below currently running user Program then determines that then data acquisition transmission instrument terminal continues to run active user's application program without upgrading.
Example IV
The remote online upgrade method for present embodiments providing a kind of data acquisition transmission instrument terminal, in the base of embodiment two On plinth, each packet content includes: data packet head mark, command header, packet sequence, data cell, cyclic redundancy check, data packet Tail tag will and total packet number.
In the embodiment, cyclic redundancy check verifies each data packet for subsequent data acquisition transmission instrument terminal, Total packet number is used to be compared according to current packet, checks upgrading progress.
Embodiment five
The remote online upgrade method for present embodiments providing a kind of data acquisition transmission instrument terminal, as shown in figure 3, in reality On the basis of applying example three, data acquire transmission instrument terminal downloads upgrade code file data in step 102, specifically include following step It is rapid:
Step 301, data acquisition transmission instrument terminal often receive a data packet, and all return confirmation messages are to server;
Step 302, data acquisition transmission instrument terminal verify each data packet:
If the verification of step 303, the data packet of current transmission is errorless, the storage of the data packet is carried out, is then proceeded to clothes Business device asks for next data packet;
If the verification failure of step 304, the data packet of current transmission, current data packet is asked for without storage again;
Step 305 has received all data packets up to data acquire transmission instrument terminal, and has carried out depositing for whole data packets Storage.
Server as upgrading task active initiators sends upgrade command (upgrading life to data acquisition transmission instrument terminal Enable the content include: the IP address of server, port numbers, upgrade code file name, version information and always send number-of-packet), Data acquisition transmission instrument terminal 42 makes confirmation response to server immediately after receiving upgrade command and starts to ask for upgrading generation Code file data.Before sending upgrade code file data, these codes can be split into multiple numbers of regular length by server According to unit, data packet is formed by core of each data cell, and (packet content includes data packet head mark, command header, Bao Xu Column, data cell, cyclic redundancy check, data packet tail tag will, total packet number etc.).Data acquisition transmission instrument terminal often receives a number According to packet, confirmation message will be all returned, if data packet verification is errorless, carries out new procedures sheet in region as defined in FLASH extending out The duplication of packet then proceedes to ask for next data packet to server;It asks for work as again without storage if verifying failure Preceding data packet, until all reception duplication completely is complete for data acquisition transmission instrument terminal.
Embodiment six
The remote online upgrade method for present embodiments providing a kind of data acquisition transmission instrument terminal, in the base of embodiment five On plinth, data acquire transmission instrument terminal and carry out CRC and exclusive or twin check to each data packet.
Embodiment seven
The remote online upgrade method for present embodiments providing a kind of data acquisition transmission instrument terminal, in the base of embodiment five It is abnormal if there is abnormal interrupt situation during the data acquisition transmission instrument terminal downloads upgrade code file data on plinth Outage is received since the data packet of last time abnormal interrupt again after excluding.
Embodiment eight
The remote online upgrade-system for present embodiments providing a kind of data acquisition transmission instrument terminal, as shown in figure 4, packet It includes:
Server 41 sends upgrade command, transmission upgrade code file data to data acquisition transmission instrument terminal 42;
Whether data acquire transmission instrument terminal 42, determine in upgrade command to include new version information: if comprising replying Server 41, data acquire transmission instrument terminal 42 and download upgrade code file data, and juxtaposition upgrades flag bit;Otherwise to server 41 send the notification message without upgrading;Data acquisition 42 soft start of transmission instrument terminal of upgrade code file data has been downloaded, Bootstrap Bootloader is run, flag bit is read and covers upgrade code file data if reading upgrading flag bit Otherwise the code file data of lowest version execute original subscriber's application program.
In the embodiment, the operation of data acquisition transmission instrument terminal 42 is broadly divided into operating mode and upgrade mode, wherein Operating mode is default mode, and operating mode refers to equipment normal operating conditions, and acquisition transmission instrument presses scheduled user application Complete corresponding TT&C task, and wireless modes report monitoring to supervision and management center by the way that internet, GPRS be wireless etc. Parameter;Upgrade mode refers to that equipment is in upgrade status, the upgrade code file data sent including receiving server 41, and Program curing code etc. in extending out flash chip.
Server 41 selects upgrade code file (suffix such as .bin), by upgrade code file declustering at the more of regular length A data cell forms data packet using each data cell as core, transmits one frame frame of upgrade code file after obtaining response Transmission instrument terminal 42 is acquired to data, while showing total packet number and current packet, current packet number is that data acquire transmission instrument terminal 42 ask for the Bale No. of data, this information is for checking upgrading progress.When maintenance personnel can determine whether currently to wrap equal with total packet number, i.e., Think to upgrade successfully.In escalation process, to guarantee that the data received are correctly, the program by mistake to be avoided to be written to chip In, data acquisition transmission instrument terminal 42 takes fixed data format, and takes CRC and exclusive or twin check is repeatedly true The method recognized is perfectly safe with determination.
Server can be implemented function such as by software mode:
A. local IP and port are defaulted as IP and the port of current server, can modify port by user;
B. show all online scalable point of termination station (data acquire transmission instrument terminal 42);
C. upgrading is clicked on corresponding website (data acquisition transmission instrument has unique MN number/SIM card number), and selected Select upgrade file (suffix such as .bin), sent after determining by UDP/TCP communication modes " upgrade command ";
D. software shows that current packet number and total packet number, current packet number are the Bale No. that terminal wants data in escalation process, this letter Breath is for checking upgrading progress.When user is believed that current packet is equal with total packet number, that is, think to upgrade successfully;
E. clicked on corresponding website (data acquisition transmission instrument has unique MN number/SIM card number) " connect/disconnect " Button, for establishing and disconnecting, successful connection button becomes green, and disconnecting successfully button becomes red.
Software upgrade server protocol format is as follows:
Upgrade command 0x91: server -- > terminal sends upgrade command
Format: (0 mends the total packet number file name of frame head instruction type packet length server ip address Service-Port End mark together)
Obtain upgrade procedure and instruct 0x94: terminal -- > server asks for upgrade file data, and (Bale No. is increased to from 1 sequence Total packet number)
Format: the total packet number of 11 cell-phone numbers of frame head instruction type packet length (terminal unique identifier) file name Bale No. exclusive or mark (exclusive or of all bytes in front) end mark
Response instructs 0x93: server -- and > terminal sends upgrade file data, and (upgrade file is divided 1024bytes/ Packet, the transmission data length of last packet of upgrade file is the length of actual amount of data, less than 1024 bytes again with the side of 0 polishing Formula)
Format: frame head the data field CRC check of instruction type packet length Bale No. (CRC16 of data field) exclusive or mark (exclusive or of all bytes in front) end mark
Upgrading END instruction 0x92: terminal -- > server informs that upgrade file receives
Format: 11 cell-phone number terminal IP terminal prot exclusive or mark (front institutes of frame head instruction type packet length Have the exclusive or of byte) end mark
System provided by the invention, escalation process do not influence the normal work of equipment.When the abnormal feelings of appearance in escalation process Condition, such as communicating interrupt, the problems such as power failure suddenly, if previous upgrade method may cause system and collapse without corresponding mechanism It bursts.Due to have recorded last time receive correct frame serial number and upgrade successfully mark, and be stored in power down keep memory in.When Data acquisition transmission instrument terminal is reworked after troubleshooting, and the place interrupted can be received from last time and receives program again, is solved Influence of the various abnormal conditions in scene to upgrading.Moreover the data acquisition each electrification reset of transmission instrument terminal is when judgement upgrading mark Position is invalid then directly to run user application, when judgement upgrading flag bit effectively then can be by new user program (upgrade procedure) number It is executed in user program regional space according to copying to, what is both run always is all user application, without will cause system Collapse.
Data acquire the IP of the configurable upgrading channel server of transmission instrument terminal with port, so server can be any There is the place of network, server is flexible, as long as client installs upgrading software, so that it may execute.
It is shown experimentally that, system proposed by the present invention is in the remote upgrade for carrying out software using TCP/UDP communication protocol When, success rate for upgrading with higher, faster updating speed, and the size of code capacity substantially conforms to FLASH memory It is required that.
Embodiment nine
The remote online upgrade-system for present embodiments providing a kind of data acquisition transmission instrument terminal, as shown in figure 4, data Acquire transmission instrument terminal 42, comprising:
The control chip 421 of Embedded flash, in which:
The embedded FLASH of control chip is divided into bootstrap region, user application region, upgrade area;It is described Bootstrap region is for storing bootstrap Bootloader;The upgrading life that the upgrade area is sent for storage server Order and flag bit, dump to user application region for upgrade code file data, cover the code file data of lowest version; The user application region is for storing user application;
Chip is controlled, for whether determining in upgrade command comprising new version information: if comprising, answering server, Upgrade code file data is downloaded, juxtaposition upgrades flag bit;Otherwise the notification message without upgrading is sent to server;It has downloaded The data of upgrade code file data acquire transmission instrument terminal soft start, run bootstrap Bootloader, read flag bit, If reading upgrading flag bit, by the code file data of upgrade code file data covering lowest version, former use otherwise is executed Family application program;
Flash chip 422 is extended out, control chip often receives a data packet from server, is all buffered in and extends out flash In, the user application region of control chip is copied to after verification is errorless.
In the embodiment, control chip 421 selects 32 ARM microprocessor STM32F103ZE of Yi Fa company, is scene Data acquire the control core of transmission instrument terminal, have embedded the flash memory (FLASH) of 512K;STM32F103ZE has online compile The FLASH of Cheng Gongneng, 512K may act as program's memory space can store data again, and have from reading and writing any flash memory The ability of location.The space for controlling the embedded FLASH of chip 421 is allocated as three parts: wherein 16K is bootstrap;492K is positive The operating system software of equipment is equivalent in the monitoring programme of the user application of execution, i.e. data acquisition transmission instrument terminal; In addition 4K is the relevant parameter and flag bit of software upgrading, and when server initiates upgrading task, data acquire transmission instrument terminal just The IP of server is had received, port, fresh code file name, total packet number, task time etc. information, these data is initiated and just deposits Storage is in this region.After fresh code is downloaded successfully, terminal will change correlating markings position, be set to new procedures and need system more Newly, it needs to dump to new procedures in application program memory space.The position that this three parts program is placed in the memory space of CPU It sets and is independent of each other.
Server is communicated with data acquisition transmission instrument terminal by Internet, the upgrading generation downloaded from server 41 Code file data is pre-stored in and extends out in flash, pending data packet verify it is errorless after copy to the region the IAP (user of control chip 421 Application area), system, which is restarted automatically, executes new program code.It is risen although data acquisition transmission instrument terminal 42 is in this way Grade mode, but have no effect on the normal work of data acquisition transmission instrument.
The magnificent nation W25Q128 for extending out flash use of storage fresh code is connected by SPI interface with control chip, capacity 128Mbit, this memory major part space are used to store real time data, the minute data of collection in worksite pollutant, only special Fresh code is distributed in the space of fixed 1M, because only temporary here, from server, all downloading finishes meeting for fresh code to terminal Copy to the region IAP (user application region).
5.6 cun of graphic control panels that enlightening text is also used in the system of the present embodiment, it can be seen that number under the wireless network page According to the connection status of acquisition transmission instrument terminal and multiple servers.It can also be seen that the filename of new procedures if any upgrading task Title, version number and Upgrade process and upgrade status, this facilitates Field Force to check as miscellaneous function.
Embodiment ten
The remote online upgrade-system for present embodiments providing a kind of data acquisition transmission instrument terminal, as shown in figure 5, data Acquiring transmission instrument terminal 42 further includes wireless transport module 423, for establishing two-way communication link with server.
In the embodiment, data acquisition transmission instrument terminal carries out two-way after establishing connection by GPRS network with server News, data acquire transmission instrument terminal can instruct the online either off-line state of acquisition according to AT, if be online, Sending upgrade command by server host notifies field device to prepare upgrading, and if it is off-line state, upgrading personnel can lead to The phone number for crossing terminal sends upgrading short message.
Wireless communication module uses the M35A module of Yi Yuan company, and function is to realize to be wirelessly connected with Server remote. Wireless connection is networked using GPRS technology and Internet, supports TCP/UDP agreement, it ensure that the biography of upgrade file data Defeated channel.Controller is to be connect by serial ports with M35A on hardware, instructs the connection for carrying out network to register by AT on software The operation such as transmitting-receiving with data, the communication speed between them are set as 115200B/s.
Wireless transport module 423 can be connected with background server 41 by the IP address of call server with port automatically Connect, server 41 receive data acquisition transmission instrument terminal 42 connection request after to data acquisition transmission instrument terminal 42 send upgrading Instruction, wherein including the information such as the totalframes of upgrade procedure and the version information for upgrading software.Data acquire transmission instrument terminal 42, which receive upgrade command, first determines whether it is new version, then prepares to receive upgrading data frame, and by state flag bit with downloading successfully Mark is set as in vain, then starting to ask for upgrade code file data to server 41, and server 41 receives data acquisition transmission Asking for after instruction for instrument terminal 42 starts to reply corresponding upgrade code file data by the Bale No. in agreement (1 frame is 1K).Often One frame of secondary transmission (data packet), data acquire after transmission instrument terminal 42 receives is according to CRC and the judgement of exclusive or twin check It is no correct, the corresponding FLASH for extending out flash distribution is write data into if correct data acquires transmission instrument terminal 42 In location.Otherwise this frame data is asked for server 41 again, server 41 just sends the frame data of this Bale No. again.Data Acquisition transmission instrument terminal 42 is to ask in order from the first frame data to a last frame data, and the two interaction is until by whole upgradings Code file data receiver is complete.After, state flag bit is set to upgrading flag bit, and execute soft start, when control core Upgrading flag bit is determined after piece electrification reset, and upgrade code file data is copied to and is executed in user program regional space, Start to work normally, this completes the upgradings of program.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.

Claims (10)

1. a kind of remote online upgrade method of data acquisition transmission instrument terminal, which is characterized in that the method, comprising:
Server sends upgrade command to data acquisition transmission instrument terminal;
Whether data acquire transmission instrument terminal and determine in upgrade command to include new version information:
If comprising answering server, data acquire transmission instrument terminal downloads upgrade code file data, juxtaposition upgrading mark Position;Otherwise the notification message without upgrading is sent to server;
The data acquisition transmission instrument terminal soft start for having downloaded upgrade code file data, runs bootstrap Bootloader, Flag bit is read, it is no by the code file data of upgrade code file data covering lowest version if reading upgrading flag bit Then execute original subscriber's application program.
2. the remote online upgrade method of data acquisition transmission instrument as described in claim 1, which is characterized in that the server Before sending upgrade command to data acquisition transmission instrument terminal, further includes:
Upgrade code file data is split into the data cell of several regular lengths by server, respectively with each data cell Data packet is formed for core.
3. the remote online upgrade method of data acquisition transmission instrument as described in claim 1, which is characterized in that the upgrading life It enables the content include: the IP address of server, port numbers, upgrade code file name, version information and always sending number-of-packet.
4. the remote online upgrade method of data acquisition transmission instrument as claimed in claim 2, which is characterized in that each number Include according to packet content: data packet head mark, command header, packet sequence, data cell, cyclic redundancy check, data packet tail tag will and Zong Bao Number.
5. the remote online upgrade method of data acquisition transmission instrument as claimed in claim 2, which is characterized in that the data are adopted Collect transmission instrument terminal downloads upgrade code file data, specifically include:
Data acquisition transmission instrument terminal often receives a data packet, and all return confirmation messages are to server;
Data acquisition transmission instrument terminal verifies each data packet:
If the data packet verification of current transmission is errorless, the storage of the data packet is carried out, then proceedes to ask for server next A data packet;
If the data packet of current transmission verifies failure, current data packet is asked for again without storage;
Until data acquisition transmission instrument terminal has received all data packets, and the storage of whole data packets is carried out.
6. the remote online upgrade method of data acquisition transmission instrument as claimed in claim 5, which is characterized in that the data are adopted Collect transmission instrument terminal and CRC and exclusive or twin check are carried out to each data packet.
7. the remote online upgrade method of data acquisition transmission instrument as claimed in claim 5, which is characterized in that the data are adopted During collecting transmission instrument terminal downloads upgrade code file data, if there is abnormal interrupt situation, after abnormal interrupt troubleshooting It is received again since the data packet of last time abnormal interrupt.
8. a kind of remote online upgrade-system of data acquisition transmission instrument terminal characterized by comprising
Server sends upgrade command, transmission upgrade code file data to data acquisition transmission instrument terminal;
Whether data acquire transmission instrument terminal, determine in upgrade command to include new version information: if including answer service Device, data acquire transmission instrument terminal downloads upgrade code file data, and juxtaposition upgrades flag bit;Otherwise it is not necessarily to server transmission The notification message of upgrading;The data acquisition transmission instrument terminal soft start for having downloaded upgrade code file data, runs bootstrap Bootloader reads flag bit, if reading upgrading flag bit, by the code of upgrade code file data covering lowest version Otherwise file data executes original subscriber's application program.
9. the remote online upgrade-system of data acquisition transmission instrument terminal as claimed in claim 8, which is characterized in that the number According to acquisition transmission instrument terminal, comprising:
The control chip of Embedded flash, in which:
The embedded FLASH of control chip is divided into bootstrap region, user application region, upgrade area;The guidance Program area is for storing bootstrap Bootloader;Upgrade command that the upgrade area is sent for storage server and Upgrade code file data is dumped to user application region by flag bit, covers the code file data of lowest version;It is described User application region is for storing user application;
Chip is controlled, for whether determining in upgrade command comprising new version information: if comprising, answering server, downloading Upgrade code file data, juxtaposition upgrade flag bit;Otherwise the notification message without upgrading is sent to server;Upgrading is downloaded The data of code file data acquire transmission instrument terminal soft start, run bootstrap Bootloader, read flag bit, if reading Upgrading flag bit is got, then by the code file data of upgrade code file data covering lowest version, otherwise executes original subscriber and answers Use program;
Flash chip is extended out, control chip often receives a data packet from server, is all buffered in and extends out in flash, verifies The user application region of control chip is copied to after errorless.
10. the remote online upgrade-system of data acquisition transmission instrument terminal as claimed in claim 9, which is characterized in that described Data acquire transmission instrument terminal, further includes:
Wireless transport module, for establishing two-way communication link with server.
CN201810919372.2A 2018-08-06 2018-08-06 A kind of the remote online upgrade method and system of data acquisition transmission instrument terminal Pending CN109101261A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810919372.2A CN109101261A (en) 2018-08-06 2018-08-06 A kind of the remote online upgrade method and system of data acquisition transmission instrument terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810919372.2A CN109101261A (en) 2018-08-06 2018-08-06 A kind of the remote online upgrade method and system of data acquisition transmission instrument terminal

Publications (1)

Publication Number Publication Date
CN109101261A true CN109101261A (en) 2018-12-28

Family

ID=64849390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810919372.2A Pending CN109101261A (en) 2018-08-06 2018-08-06 A kind of the remote online upgrade method and system of data acquisition transmission instrument terminal

Country Status (1)

Country Link
CN (1) CN109101261A (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110908692A (en) * 2019-12-15 2020-03-24 湖南龙之翔智能科技有限公司 Remote upgrading method and system for intelligent electric meter
CN111309363A (en) * 2020-03-07 2020-06-19 重庆邮电大学 Contiki operating system-based online upgrading method and device
CN111857772A (en) * 2020-06-29 2020-10-30 湖南中联重科智能技术有限公司 Method and equipment for remote transmission and dynamic loading of terminal edge application program
CN112015446A (en) * 2020-07-06 2020-12-01 尚特杰电力科技有限公司 Remote upgrading method and system for data acquisition unit
CN112015442A (en) * 2019-05-31 2020-12-01 南京理控物联技术有限公司 Method for remotely upgrading software in batches by single lamp controller in non-public network communication
CN112328290A (en) * 2020-12-04 2021-02-05 第一拖拉机股份有限公司 Remote updating method and system for agricultural machinery data acquisition terminal program
CN112416391A (en) * 2020-11-16 2021-02-26 深圳市有方科技股份有限公司 System upgrading method and device, computer equipment and storage medium
CN112463571A (en) * 2020-12-17 2021-03-09 未来电视有限公司 Log processing method, device and equipment
CN112505607A (en) * 2020-12-22 2021-03-16 昆明自动化成套集团股份有限公司 Voltage monitoring device with positioning function and remote upgrading support function
CN112650518A (en) * 2019-10-10 2021-04-13 国创新能源汽车能源与信息创新中心(江苏)有限公司 DSP program on-line upgrading method
CN112783519A (en) * 2019-11-04 2021-05-11 航天科工惯性技术有限公司 Application program updating method and system for measuring pup joint
CN113219872A (en) * 2021-05-10 2021-08-06 安徽大学 Remote upgrading method of monitoring system of refrigerator car based on real-time perception
CN113377057A (en) * 2021-07-06 2021-09-10 河南牧原智能科技有限公司 Control device
CN114124701A (en) * 2021-11-05 2022-03-01 交控科技股份有限公司 Remote upgrading method and system for vehicle-mounted equipment
CN114301992A (en) * 2021-12-29 2022-04-08 北京半导体专用设备研究所(中国电子科技集团公司第四十五研究所) Data transmission method and storage medium
CN114584539A (en) * 2021-12-28 2022-06-03 上海繁易信息科技股份有限公司 Cloud upgrading method and system for industrial field device
CN114710409A (en) * 2022-03-24 2022-07-05 北京和利时电机技术有限公司 Software upgrading method and device, electronic equipment and readable storage medium
CN115102855A (en) * 2022-03-08 2022-09-23 上海锐铼水务科技有限公司 Intelligent water meter embedded software online upgrading method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090796A (en) * 2014-07-08 2014-10-08 成都万维图新信息技术有限公司 Embedded device program updating method and system
CN106569847A (en) * 2016-10-14 2017-04-19 数源科技股份有限公司 Method for realizing IAP remote upgrade through vehicle-mounted system based on mobile network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090796A (en) * 2014-07-08 2014-10-08 成都万维图新信息技术有限公司 Embedded device program updating method and system
CN106569847A (en) * 2016-10-14 2017-04-19 数源科技股份有限公司 Method for realizing IAP remote upgrade through vehicle-mounted system based on mobile network

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015442A (en) * 2019-05-31 2020-12-01 南京理控物联技术有限公司 Method for remotely upgrading software in batches by single lamp controller in non-public network communication
CN112015442B (en) * 2019-05-31 2024-04-02 南京理控物联技术有限公司 Method for remotely upgrading software of single-lamp controllers in batch by using non-public network communication
CN112650518A (en) * 2019-10-10 2021-04-13 国创新能源汽车能源与信息创新中心(江苏)有限公司 DSP program on-line upgrading method
CN112783519A (en) * 2019-11-04 2021-05-11 航天科工惯性技术有限公司 Application program updating method and system for measuring pup joint
CN112783519B (en) * 2019-11-04 2023-10-20 航天科工惯性技术有限公司 Application program updating method and system for measuring nipple
CN110908692A (en) * 2019-12-15 2020-03-24 湖南龙之翔智能科技有限公司 Remote upgrading method and system for intelligent electric meter
CN111309363A (en) * 2020-03-07 2020-06-19 重庆邮电大学 Contiki operating system-based online upgrading method and device
CN111857772A (en) * 2020-06-29 2020-10-30 湖南中联重科智能技术有限公司 Method and equipment for remote transmission and dynamic loading of terminal edge application program
CN111857772B (en) * 2020-06-29 2023-06-09 湖南中联重科智能技术有限公司 Method and device for remote transmission and dynamic loading of terminal edge application program
CN112015446A (en) * 2020-07-06 2020-12-01 尚特杰电力科技有限公司 Remote upgrading method and system for data acquisition unit
CN112416391A (en) * 2020-11-16 2021-02-26 深圳市有方科技股份有限公司 System upgrading method and device, computer equipment and storage medium
CN112328290A (en) * 2020-12-04 2021-02-05 第一拖拉机股份有限公司 Remote updating method and system for agricultural machinery data acquisition terminal program
CN112328290B (en) * 2020-12-04 2023-08-22 第一拖拉机股份有限公司 Remote updating method and system for agricultural machinery data acquisition terminal program
CN112463571A (en) * 2020-12-17 2021-03-09 未来电视有限公司 Log processing method, device and equipment
CN112505607A (en) * 2020-12-22 2021-03-16 昆明自动化成套集团股份有限公司 Voltage monitoring device with positioning function and remote upgrading support function
CN113219872A (en) * 2021-05-10 2021-08-06 安徽大学 Remote upgrading method of monitoring system of refrigerator car based on real-time perception
CN113377057A (en) * 2021-07-06 2021-09-10 河南牧原智能科技有限公司 Control device
CN114124701A (en) * 2021-11-05 2022-03-01 交控科技股份有限公司 Remote upgrading method and system for vehicle-mounted equipment
CN114124701B (en) * 2021-11-05 2024-01-26 交控科技股份有限公司 Remote upgrading method and system for vehicle-mounted equipment
CN114584539A (en) * 2021-12-28 2022-06-03 上海繁易信息科技股份有限公司 Cloud upgrading method and system for industrial field device
CN114584539B (en) * 2021-12-28 2023-08-18 上海繁易信息科技股份有限公司 Cloud upgrading method and system for industrial field device
CN114301992A (en) * 2021-12-29 2022-04-08 北京半导体专用设备研究所(中国电子科技集团公司第四十五研究所) Data transmission method and storage medium
CN115102855B (en) * 2022-03-08 2023-12-22 上海锐铼水务科技有限公司 Online upgrading method and system for intelligent water meter embedded software
CN115102855A (en) * 2022-03-08 2022-09-23 上海锐铼水务科技有限公司 Intelligent water meter embedded software online upgrading method and system
CN114710409A (en) * 2022-03-24 2022-07-05 北京和利时电机技术有限公司 Software upgrading method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN109101261A (en) A kind of the remote online upgrade method and system of data acquisition transmission instrument terminal
CN106569847B (en) Method for vehicle-mounted system to realize IAP remote upgrade based on mobile network
CN107291516B (en) A kind of firmware upgrade method and system
CN102403034B (en) DSP controls single-board device and remote upgrade method thereof and server
US20040237068A1 (en) Embedded software update system
JPH10289108A (en) Remote program downloading device
CN107820603A (en) A kind of firmware update and controller
CN107992321A (en) ECU software update method, device, vehicle-mounted T-BOX and vehicle
CN107357571B (en) Maintenance method and system for equipment component program
CN105224362A (en) Host computer carries out the method and system of program upgrade to slave computer
CN110471692A (en) Over-the-air upgrade method, device, equipment and the storage medium of terminal program
JP2002135350A (en) Data distribution method, data reception method, terminal state notice service providing method and communication terminal
CN107797812B (en) Remote online charger upgrading method and system
WO2022142153A1 (en) Electricity meter upgrading method and system, smart meter, and storage medium
CN106911502A (en) A kind of upgrade method and system of intelligent home gateway equipment
CN102256241B (en) Method, server and intelligent card for acquiring bearer independent protocol (BIP) information of terminal
CN112423322A (en) Model information sending method, device, storage medium and electronic device
CN113138788A (en) Air conditioner program upgrading method and air conditioner system
US20050101310A1 (en) Real time system update in a mobile communication network
CN114745740B (en) Intelligent household appliance upgrading system and method
JP2006113754A (en) Software update device and method
CN105407003A (en) Data loading and unloading method for 1553 bus
CN112767722B (en) Control method and device of traffic signal machine, computer equipment and storage medium
CN115102855A (en) Intelligent water meter embedded software online upgrading method and system
CN103634398A (en) MOST network-based software upgrading 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181228

RJ01 Rejection of invention patent application after publication