CN108234216A - Method and device for downloading data message - Google Patents

Method and device for downloading data message Download PDF

Info

Publication number
CN108234216A
CN108234216A CN201810044467.4A CN201810044467A CN108234216A CN 108234216 A CN108234216 A CN 108234216A CN 201810044467 A CN201810044467 A CN 201810044467A CN 108234216 A CN108234216 A CN 108234216A
Authority
CN
China
Prior art keywords
firmware
terminal device
pieces
server
business datum
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.)
Granted
Application number
CN201810044467.4A
Other languages
Chinese (zh)
Other versions
CN108234216B (en
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.)
Guangdong Transtek Medical Electronics Co Ltd
Original Assignee
Guangdong Transtek Medical Electronics 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 Guangdong Transtek Medical Electronics Co Ltd filed Critical Guangdong Transtek Medical Electronics Co Ltd
Priority to CN201810044467.4A priority Critical patent/CN108234216B/en
Publication of CN108234216A publication Critical patent/CN108234216A/en
Application granted granted Critical
Publication of CN108234216B publication Critical patent/CN108234216B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/085Retrieval of network configuration; Tracking network configuration history
    • H04L41/0853Retrieval of network configuration; Tracking network configuration history by actively collecting configuration information or by backing up configuration information
    • 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]

Abstract

The embodiment of the invention provides a method and a device for downloading a data message, and belongs to the technical field of Internet of things. According to the method, in the process of service data transmission between a terminal device and a server, when the terminal device determines that firmware installed in the terminal device needs to be upgraded, the terminal device sends a first firmware fragment acquisition request for downloading the firmware of the latest version to the server, and then the terminal device acquires a first service data message sent by the server, wherein the first service data message comprises a first firmware fragment acquired by the server according to the first firmware fragment acquisition request, so that the terminal device can acquire each firmware fragment of the firmware in the normal service data transmission process with the server, download of the firmware of the latest version is completed, and further, time consumption of firmware download can be balanced in a short time and operation complexity can be reduced in some terminal devices with limited resources.

Description

The method and device of downloading data message
Technical field
The present invention relates to internet of things field, in particular to a kind of method and device of downloading data message.
Background technology
It is based on the firmware of HTTP (Hyper Text Transfer Protocol hypertext transfer protocol) currently on the market The mode of upgrading is downloaded, firmware fresh information is obtained using http protocol, obtains firmware upgrade file, feed back updating result, It is widely used in many scenes.Meanwhile also have using other such as FTP (File Transfer Protocol files Transport protocol), the agreements such as TFTP (Trivial File Transfer Protocol Simple File Transfer Protocol) are as firmware The agreement of download.These modes are all very ripe, and have referred to the very many aspects of built-in field.
But with the high speed development of Internet of Things, the concern being mainly also increasingly subject to by the network that sensor node forms, this A little terminal nodes the characteristics of to be usually constructed with that output power is low, processing capacity is weak, memory capacity is small resource-constrained.And http protocol Due to the features such as complicated, agreement header overhead is big, the firmware upgrade of these resource-constrained devices is allowed to cause a difficult point.And it uses File Transfer Protocol or TFTP agreements can also increase protocol stack complexity as firmware download protocol.
On the other hand, using more download upgrade method, firmware file is such as directly downloaded in an idle state, so not It needs artificially to go to operate, but special data message and special download time is needed to go to be downloaded work;Such as artificial triggering Firmware is downloaded, this can also increase operation complexity, while may influence the transmission of other data during downloading.
Invention content
In view of this, the embodiment of the present invention is designed to provide a kind of method and device of downloading data message, to change The kind above problem.
In a first aspect, an embodiment of the present invention provides a kind of method of downloading data message, the method includes:In terminal During equipment carries out business data transmission with server, and determine to need to set to being installed on the terminal in the terminal device When firmware in standby is upgraded, the terminal device sends solid for downloading the first of latest edition firmware to the server Part segment obtains request;The terminal device obtains the first business datum message that the server is sent, wherein, described first Business datum message includes the first pieces of firmware that the server obtains request acquisition according to first pieces of firmware.
Further, it is described after the first business datum message for obtaining that the server is sent in the terminal device Method further includes:When the terminal device judges first pieces of firmware for complete segment, the terminal device is to described Server sends the second pieces of firmware and obtains request and the terminal device from the server the second business datum report of acquisition Text, wherein, the second business datum message includes the server and obtains request acquisition according to second pieces of firmware The second pieces of firmware;The terminal device is when determining to obtain the complete latest edition firmware, described in operation installation most New version firmware.
Further, it is described after the first business datum message for obtaining that the server is sent in the terminal device Method further includes:When the terminal device judges first pieces of firmware for imperfect segment, the terminal device is to institute It states server and sends the acquisition request of third pieces of firmware;The terminal device obtains third business datum report from the server Text, wherein, the third business datum message includes the server and obtains request acquisition according to the third pieces of firmware Third pieces of firmware, wherein, the third pieces of firmware include at least first pieces of firmware.
Further, the terminal device is when determining to obtain the complete latest edition firmware, described in operation installation Latest edition firmware, including:The terminal device is to first pieces of firmware of acquisition, second pieces of firmware and described Third pieces of firmware carries out completeness check, to determine to obtain the complete latest edition firmware;It is complete determining to obtain The latest edition firmware runs and installs the latest edition firmware.
Second aspect, an embodiment of the present invention provides a kind of method of downloading data message, the method includes:It is servicing During device carries out business data transmission with terminal device, the server obtains the terminal device and is determining to need to installation What the firmware in the terminal device was sent when being upgraded obtains for downloading the first pieces of firmware of latest edition firmware Request;The server sends the first business datum message to the terminal device, wherein, the first business datum message packet Include the first pieces of firmware that the server obtains request acquisition according to first pieces of firmware.
Further, in the server after the terminal device sends the first business datum message, the method It further includes:When the terminal device judges first pieces of firmware for complete segment, the server obtains the terminal The second pieces of firmware that equipment is sent obtains request;The server sends the second business datum message to the terminal device, Wherein, the second business datum message include that the server obtains that request obtains according to second pieces of firmware the Two pieces of firmware.
Further, in the server after the terminal device sends the first business datum message, the method It further includes:When the terminal device judges first pieces of firmware for imperfect segment, the server obtains the end The third pieces of firmware that end equipment is sent obtains request;The server sends third business datum report to the terminal device Text, wherein, the third business datum message includes the server and obtains request acquisition according to the third pieces of firmware Third pieces of firmware, wherein, the third pieces of firmware include at least first pieces of firmware.
The third aspect, the embodiment of the present invention provide a kind of method of downloading data message, the method includes:It is set in terminal During the standby progress business data transmission with server, and determine to need to being installed on the terminal device in the terminal device In firmware when being upgraded, being sent to the server please for downloading that the first pieces of firmware of latest edition firmware obtains It asks;The server obtains first pieces of firmware and obtains request;The server is obtained according to first pieces of firmware Request obtains the first pieces of firmware;The server sends the first business datum message to the terminal device, wherein, described the One business datum message includes first pieces of firmware;The terminal device obtains the first business datum message.
Fourth aspect, the embodiment of the present invention provide a kind of device of downloading data message, run on terminal device, the dress Put including:Request sending module, during carrying out business data transmission in terminal device and server, and in the terminal When equipment determines to need to upgrade the firmware being installed in the terminal device, send to download most to the server First pieces of firmware of new version firmware obtains request;Pieces of firmware acquisition module, for obtain that the server sends the One business datum message, wherein, the first business datum message includes the server according to first pieces of firmware Obtain the first pieces of firmware that request obtains.
5th aspect, the embodiment of the present invention provide a kind of device of downloading data message, run on server, described device Including:Acquisition request module, during carrying out business data transmission in server and terminal device, the server obtains What the terminal device was sent when determining that needs upgrade the firmware being installed in the terminal device is used to download most First pieces of firmware of new version firmware obtains request;Pieces of firmware sending module sets for the server to the terminal Preparation send the first business datum message, wherein, the first business datum message includes the server according to described first Pieces of firmware obtains the first pieces of firmware that request obtains.
The advantageous effect of the embodiment of the present invention is:
The embodiment of the present invention provides a kind of method and device of downloading data message, in terminal device and server into industry It is engaged in data transmission procedure, and determines to need to upgrade the firmware being installed in the terminal device in the terminal device When, the terminal device is sent to the server obtains request for downloading the first pieces of firmware of latest edition firmware, eventually End equipment obtains the first business datum message that the server is sent again, which includes the service Device according to first pieces of firmware obtain request obtain the first pieces of firmware, so as to terminal device can with server just Each pieces of firmware of firmware can be obtained during normal business data transmission, completes the download of latest edition firmware, and then is made Some resource-constrained terminal devices also can within a short period of time can balanced firmware download taking and reducing complicated for operation Degree.
Other features and advantages of the present invention will illustrate, also, partly become from specification in subsequent specification It is clear that by implementing understanding of the embodiment of the present invention.The purpose of the present invention and other advantages can be by saying what is write Specifically noted structure is realized and is obtained in bright book, claims and attached drawing.
Description of the drawings
It in order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of range, for those of ordinary skill in the art, without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the schematic diagram that terminal device provided in an embodiment of the present invention is interacted with server;
Fig. 2 shows a kind of structure diagrams that can be applied to the electronic equipment in the embodiment of the present application;
Fig. 3 is the flow chart of a kind of method of downloading data message that first embodiment of the invention provides;
Fig. 4 is a kind of Data Structures schematic diagram of Coap agreements provided in an embodiment of the present invention;
Fig. 5 is a kind of second structure diagram of business datum message provided in an embodiment of the present invention;
Fig. 6 is a kind of third structure diagram of business datum message provided in an embodiment of the present invention;
Fig. 7 is a kind of 4th structure diagram of business datum message provided in an embodiment of the present invention;
Fig. 8 is a kind of 5th structure diagram of business datum message provided in an embodiment of the present invention;
Fig. 9 is a kind of 6th structure diagram of business datum message provided in an embodiment of the present invention;
Figure 10 is a kind of flow chart of the method for downloading data message provided in an embodiment of the present invention;
Figure 11 is a kind of interaction diagrams of the method for downloading data message provided in an embodiment of the present invention;
Figure 12 is the structure diagram of the device of a kind of downloading data message that fourth embodiment of the invention provides;
Figure 13 is the structure diagram of the device of a kind of downloading data message that fifth embodiment of the invention provides.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Ground describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.Usually exist The component of the embodiment of the present invention described and illustrated in attached drawing can be configured to arrange and design with a variety of different herein.Cause This, the detailed description of the embodiment of the present invention to providing in the accompanying drawings is not intended to limit claimed invention below Range, but it is merely representative of the selected embodiment of the present invention.Based on the embodiment of the present invention, those skilled in the art are not doing Go out all other embodiments obtained under the premise of creative work, shall fall within the protection scope of the present invention.
It should be noted that:Similar label and letter represents similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, does not then need to that it is further defined and explained in subsequent attached drawing.Meanwhile the present invention's In description, term " first ", " second " etc. are only used for distinguishing description, and it is not intended that instruction or hint relative importance.
The schematic diagram that Fig. 1 is interacted for terminal device 10 provided in an embodiment of the present invention with server 20, the service Device 20 is communicatively coupled by network 30 and one or more terminal devices 10, with into row data communication or interaction.The clothes Business device 20 can be network server, database server etc..The terminal device 10 can be PC (personal Computer, PC), tablet computer, smart mobile phone, personal digital assistant (personal digital assistant, PDA), The terminals such as wearable device.
Fig. 2 is please referred to, Fig. 2 shows a kind of structure diagrams of electronic equipment 100 that can be applied in the embodiment of the present application. Electronic equipment 100 can be the terminal device 10 described in the embodiment of the present invention, and the device including downloading data message stores Device 101, storage control 102, processor 103, Peripheral Interface 104, input-output unit 105, audio unit 106, display are single Member 107.
The memory 101, storage control 102, processor 103, Peripheral Interface 104, input-output unit 105, sound Frequency unit 106,107 each element of display unit are directly or indirectly electrically connected between each other, to realize the transmission of data or friendship Mutually.It is electrically connected for example, these elements can be realized between each other by one or more communication bus or signal wire.The download The device of data message can be stored in the form of software or firmware (firmware) in the memory 101 including at least one Or it is solidificated in the software function mould in the operating system (operating system, OS) of the device of the downloading data message Block.The processor 103 is used to perform the executable module stored in memory 101, such as the dress of the downloading data message Put including software function module or computer program.
Wherein, memory 101 may be, but not limited to, random access memory (Random Access Memory, RAM), read-only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), Electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory, EEPROM) etc.. Wherein, for memory 101 for storing program, the processor 103 performs described program after execute instruction is received, aforementioned The method performed by server that the stream process that any embodiment of the embodiment of the present invention discloses defines can be applied to processor 103 In or realized by processor 103.
Processor 103 can be a kind of IC chip, have the processing capacity of signal.Above-mentioned processor 103 can To be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;Can also be digital signal processor (DSP), application-specific integrated circuit (ASIC), Ready-made programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hard Part component.It can realize or perform disclosed each method, step and the logic diagram in the embodiment of the present invention.General processor Can be microprocessor or the processor 103 can also be any conventional processor etc..
Various input/output devices are coupled to processor 103 and memory 101 by the Peripheral Interface 104.At some In embodiment, Peripheral Interface 104, processor 103 and storage control 102 can be realized in one single chip.Other one In a little examples, they can be realized by independent chip respectively.
Input-output unit 105 is used to that user input data to be supplied to realize user and the server (or local terminal) Interaction.The input-output unit 105 may be, but not limited to, mouse and keyboard etc..
Audio unit 106 provides a user audio interface, may include that one or more microphones, one or more raises Sound device and voicefrequency circuit.
Display unit 107 provides an interactive interface (such as user's operation circle between the electronic equipment 100 and user Face) or for display image data give user reference.In the present embodiment, the display unit 107 can be liquid crystal display Or touch control display.Can be the capacitance type touch control screen or resistance for supporting single-point and multi-point touch operation if touch control display Formula touch screen etc..Single-point and multi-point touch operation is supported to refer to that touch control display can sense on the touch control display one Or at multiple positions simultaneously generate touch control operation, and by the touch control operation that this is sensed transfer to processor 103 carry out calculate and Processing.
Various input/output devices are coupled to processor 103 and memory 101 by the Peripheral Interface 104.At some In embodiment, Peripheral Interface 104, processor 103 and storage control 102 can be realized in one single chip.Other one In a little examples, they can be realized by independent chip respectively.
Input-output unit 105 is used for the interaction that user input data is supplied to realize user and processing terminal.It is described defeated Enter output unit 105 may be, but not limited to, mouse and keyboard etc..
It is appreciated that structure shown in Fig. 2 is only to illustrate, the electronic equipment 100 may also include more than shown in Fig. 2 Either less component or with the configuration different from shown in Fig. 2.Hardware, software may be used in each component shown in Fig. 2 Or combination is realized.
First embodiment
Fig. 3 is please referred to, Fig. 3 is the flow chart of a kind of method of downloading data message that first embodiment of the invention provides, The method is applied to terminal device, and described method includes following steps:
Step S110:The terminal device sends the first pieces of firmware for downloading latest edition firmware to the server Section obtains request.
Terminal device and server during normal service data interaction is carried out are led to by CoAP agreements Letter, CoAP are the synonym of restricted application protocol (Constrained Application Protocol) and HTTP associations It discusses similar, based on REST (Representational State Transfer) framework, provides GET, POST, PUT, DELETE Method, but also allow for the application of Internet of Things and M2M and improve some mechanism and increase some functions.CoAP agreements are very Compact, minimum data message can only have 4 bytes, and message structure is as shown in Figure 4.
This method is also to be made by CoAP agreements by the communication between CoAP protocol realizations terminal device and server Downloading mode for firmware file.By combining the characteristic of CoAP agreements, resource-constrained network on the one hand can be effectively adapted to And node, on the other hand it can simplify protocol stack.
Each data communication message that terminal device and server by CoAP agreements send in data exchange process (i.e. business datum message) can all pass through integrality effect (optional MD5, SHA1, CRC etc.), it is ensured that accessed by this method The integrality of firmware file, general CON-GET message structures are shown in Fig. 5.
In CON-GET message structures, ID, ID label including version number, type of message, each CoAP message are asked Ask head and the data information of interaction etc..
When terminal device and server are carried out during business data transmission, if terminal device want to it is mounted certain It when a firmware is upgraded, then can be asked in the carrying firmware upgrade in the business datum message sent to server, and should It may include the information such as the current version number for having mounted firmware and the firmware identifiers in firmware upgrade request, also, this is solid Part upgrade request may include sending together in the business datum message sent to server in terminal device, so as to reduce terminal The occupancy of device resource.After server obtains firmware upgrade request, the latest edition of the firmware is obtained according to the firmware identifiers This number, and when server sends business datum message to terminal device, the latest edition number of the firmware is included in the industry It is sent together in business data message, terminal device receives the latest edition number of firmware, then by the newest of the firmware received The current version number of version number and firmware is compared, if the current version number of the firmware is not latest edition number, it is determined that It needs to upgrade the estimation being installed in the terminal device, i.e., into firmware pattern to be upgraded.
After terminal device enters pattern to be upgraded, terminal device is according to normal condition and server into row data communication mistake Cheng Zhong can send to the server and obtain request for downloading the first pieces of firmware of latest edition firmware.
Step S120:The terminal device obtains the first business datum message that the server is sent.
Terminal data obtains request by being included in terminal device to server to the first pieces of firmware that server is sent In the business datum message of transmission, server is after getting first pieces of firmware and obtaining request, to the terminal device The first business datum message is sent, the server is included in the first business datum message according to first pieces of firmware Obtain the first pieces of firmware that request obtains.
Terminal device obtains the first business datum message that the server is sent, so as to from the first business datum message In get the first pieces of firmware.
Wherein, a complete firmware can be made of multiple pieces of firmware length, and pieces of firmware length is long for message Threshold value subtracts the data length that this time interacts, such as in this terminal device and server carry out data exchange process, if Terminal device needs to ask for 2 data to server, and the long threshold value of preset message is according to practical application network environment, in advance State the appropriate data message length of setting on the server, in the embodiment, which refers to the first business datum message, For example, can the long threshold value of the message be set as 5, then it is 3 to include pieces of firmware length in the first business datum message The first pieces of firmware that first pieces of firmware, i.e. the first business datum message are data including 2 and pieces of firmware length is 3 Section.
After terminal device gets first pieces of firmware, the integrality of first pieces of firmware can be judged, That is, in each data message that the terminal device is sent, a completeness check position can be all carried, it is ensured that accessed The integrality of firmware file, such as detects whether first pieces of firmware has loss of data, if there is loss, judges first firmware Segment is imperfect segment, if not losing, judges that first pieces of firmware for complete segment, has been in the first pieces of firmware During full wafer section, terminal device can send the during service data interaction is carried out with server next time to the server Two pieces of firmware obtain request, represent to obtain the second pieces of firmware.
Server obtains request in the second pieces of firmware for obtaining terminal device transmission, and the second business is sent to terminal device Data message, second pieces of firmware obtain request and can also reside in terminal device into the business datum message that server is sent It is sent, which includes the server and obtain what request obtained according to second pieces of firmware Second pieces of firmware.
Terminal device can from server send the second business datum message in obtain the second pieces of firmware, then in order to Ensure the integrality of pieces of firmware, also need to judge the integrality of second pieces of firmware, judge complete method and to first The integrality judgment method of pieces of firmware is consistent, after judging the second pieces of firmware for complete segment, terminal device can continue to Server sends third pieces of firmware and obtains request, and after getting complete latest edition firmware, terminal device can be run The latest edition firmware is installed.
When the terminal device judges first pieces of firmware for imperfect segment, the terminal device can be to institute It states server and sends the request for obtaining the first pieces of firmware again, is i.e. third pieces of firmware obtains request, and server is being got After the third pieces of firmware that terminal device is sent obtains request, third business datum message, the third industry are sent to terminal device Business data message includes the third pieces of firmware that the server obtains request acquisition according to the third pieces of firmware.
Terminal device can get third pieces of firmware from the third business datum message of acquisition, the third pieces of firmware Section is identical with the first pieces of firmware, but can also include the first pieces of firmware, i.e. third pieces of firmware includes at least described first Pieces of firmware, certainly, can also be only therein a bit of comprising the first pieces of firmware in the third pieces of firmware.Namely It says, in terminal device initiates the acquisition request of third firmware again, expression also needs to reacquire the first pieces of firmware, if but taking The business datum that business device is sent in the third business datum message of terminal device is small, and occupied space is smaller, then in third Pieces of firmware length can be increased in pieces of firmware, if the first pieces of firmware is a, then third pieces of firmware can be a or abc Deng.If the business datum that server is sent in the third business datum message of terminal device is big, occupied space is bigger, then Pieces of firmware length can be reduced in third pieces of firmware, if the first pieces of firmware is abc, then third pieces of firmware can be a Or ab etc..
In addition, server is in the first business datum message for issuing terminal device, for the ease of the complete of entire firmware Property verification, pieces of firmware can also be numbered, such as the first pieces of firmware have the first number, the second pieces of firmware has the second volume Number, the first pieces of firmware that server is numbered in first sent to terminal device, if terminal device judges first pieces of firmware Section is complete segment, then the second number of the second pieces of firmware sent in server to terminal device is that the first number adds 1, i.e., If for the first number of the first pieces of firmware when being 1, the second number is 2, if terminal device is judging that the first pieces of firmware is not During complete segment, then also need to retransmit the third pieces of firmware containing the first pieces of firmware, then at this time by third pieces of firmware Third number equal to the first number of the first pieces of firmware, the first number of even the first pieces of firmware when being 1, then consolidate by third The third number of part segment is also 1, that is to say, that number is constant, and the first pieces of firmware continues to carry and server and terminal device The message of normal communication next time (third business datum message) in, the third business datum message format is as shown in Figure 6 CON-GET message formats.
Wherein, in the business datum message sent in server to the terminal device, such as the first business datum message and Third business datum message, when filled in business datum message terminal device need server respond data after, the data are also Not up to message long threshold value when, then whether have update, if being updated over, filled out in remaining space if first judging the number of pieces of firmware Next section of pieces of firmware is filled, if as shown in fig. 7, the number of pieces of firmware does not update, the remaining firmware of upper segment return The caching of file, redistributes the pieces of firmware of appropriate length, and fills remaining space.If when the data filling of server response Afterwards, the long threshold value of message is had reached, then does not refill pieces of firmware, as shown in figure 8, i.e. this time of server is sent to terminal device Business datum message in do not contain pieces of firmware.
Further, the terminal device is to first pieces of firmware of acquisition, second pieces of firmware and described Third pieces of firmware carries out completeness check, complete determining to obtain to determine to obtain the complete latest edition firmware The latest edition firmware runs and installs the latest edition firmware.If for example, a complete firmware includes 10 admittedly Part segment, then the terminal device is when determining that obtaining this 10 pieces of firmware is complete pieces of firmware, then it represents that whole A latest edition firmware, which is downloaded, to be completed, and can just be run and be installed the latest edition firmware.
It should be noted that after terminal device has had been acknowledged and all received all pieces of firmware, it can be to clothes Business device sends one and confirms instruction, and the number of pieces of firmware is then set as 0 by server in the response for replying to the terminal device, And terminal device is notified to exit pattern to be upgraded.
Wherein, terminal device can just carry out the operation installation process of firmware in an idle state, for example, terminal device is examined Measure does not have data interaction in preset time with server, then it represents that terminal device is in idle condition down, and judges electricity In the case of abundance, you can operation installation is carried out to the firmware got, so as to which firmware mounted to terminal device carries out Upgrading update, after the completion of firmware upgrade update, if the industry sent in the business datum communication process of terminal device and server The version number of firmware is carried in business data message, then also needs to update the firmware version number in each data communication message.
If terminal device in an idle state there are no whole pieces of firmware have been obtained when, can be sent to server Remaining pieces of firmware obtains request, then remaining pieces of firmware is sent to terminal device, such as Fig. 9 in the form of message between server It is shown.
Second embodiment
Please refer to Figure 10, Figure 10 is a kind of flow chart of the method for downloading data message provided in an embodiment of the present invention, institute Method is stated applied to server, described method includes following steps:
Step S210:During server and terminal device carry out business data transmission, described in the server acquisition What terminal device was sent when determining that needs upgrade the firmware being installed in the terminal device is used to download latest edition First pieces of firmware of this firmware obtains request.
Step S220:The server sends the first business datum message to the terminal device.
Wherein, the first business datum message includes the server and is asked according to first pieces of firmware acquisition The first pieces of firmware obtained.
In the server after the terminal device sends the first business datum message, the method further includes:
When the terminal device judges first pieces of firmware for complete segment, the server obtains the terminal The second pieces of firmware that equipment is sent obtains request.
The server sends the second business datum message to the terminal device, wherein, the second business datum report Text includes the second pieces of firmware that the server obtains request acquisition according to second pieces of firmware.
Alternatively, in the server after the terminal device sends the first business datum message, the method is also wrapped It includes:
When the terminal device judges first pieces of firmware for imperfect segment, the server obtains the end The third pieces of firmware that end equipment is sent obtains request.
The server sends third business datum message to the terminal device, wherein, the third business datum report Text includes the server and obtains the third pieces of firmware that request obtains according to the third pieces of firmware, wherein, described the Three pieces of firmware include at least first pieces of firmware.
The detailed process of second embodiment of the invention please refers to the specific descriptions of first embodiment, no longer excessive superfluous herein It states.
3rd embodiment
Figure 11 is please referred to, Figure 11 is a kind of interaction flow of the method for downloading data message provided in an embodiment of the present invention Figure, described method includes following steps:
Step S310:The terminal device sends the first pieces of firmware for downloading latest edition firmware to the server Section obtains request.
It determines to need to peace during terminal device and server carry out business data transmission, and in the terminal device When loaded on the firmware in the terminal device being upgraded, send to download the first of latest edition firmware to the server Pieces of firmware obtains request.
Step S320:The server obtains first pieces of firmware and obtains request.
Step S330:The server obtains request according to first pieces of firmware and obtains the first pieces of firmware.
Step S340:The server sends the first business datum message to the terminal device.
Wherein, the first business datum message includes first pieces of firmware.
Step S350:The terminal device obtains the first business datum message.
The detailed process of third embodiment of the invention please refers to the specific descriptions of first embodiment, no longer excessive superfluous herein It states.
Fourth embodiment
Figure 12 is please referred to, Figure 12 is the knot of the device 200 of a kind of downloading data message that fourth embodiment of the invention provides Structure block diagram, described device run on terminal device, and described device includes:
Request sending module 210, during carrying out business data transmission in terminal device and server, and described When terminal device determines to need to upgrade the firmware being installed in the terminal device, it is used for down to server transmission The first pieces of firmware for carrying latest edition firmware obtains request.
Pieces of firmware acquisition module 220, for obtaining the first business datum message that the server is sent, wherein, institute It states the first business datum message and includes the first firmware that the server obtains request acquisition according to first pieces of firmware Segment.
5th embodiment
Figure 13 is please referred to, Figure 13 is the knot of the device 300 of a kind of downloading data message that fifth embodiment of the invention provides Structure block diagram, described device run on server, and described device includes:
Acquisition request module 310, during carrying out business data transmission in server and terminal device, the service What the device acquisition terminal device was sent when determining that needs upgrade the firmware being installed in the terminal device is used for The first pieces of firmware for downloading latest edition firmware obtains request;
Pieces of firmware sending module 320 sends the first business datum message for the server to the terminal device, Wherein, the first business datum message include that the server obtains that request obtains according to first pieces of firmware the One pieces of firmware.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description Specific work process, can refer to preceding method in corresponding process, no longer excessively repeat herein.
In conclusion the embodiment of the present invention provides a kind of method and device of downloading data message, in terminal device and clothes It is engaged in during device progress business data transmission, and determines to need to being installed on consolidating in the terminal device in the terminal device When part is upgraded, the terminal device sends to the server and is obtained for downloading the first pieces of firmware of latest edition firmware Request is taken, terminal device obtains the first business datum message that the server is sent again, which includes Have the server according to first pieces of firmware obtain request obtain the first pieces of firmware, so as to terminal device can with Each pieces of firmware of firmware can be obtained in the regular traffic data transmission procedure of server, is completed under latest edition firmware Carry so that some resource-constrained terminal devices also can within a short period of time can balanced firmware download taking and reducing Operation complexity.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and block diagram in attached drawing Show the device of multiple embodiments according to the present invention, the architectural framework in the cards of method and computer program product, Function and operation.In this regard, each box in flow chart or block diagram can represent the one of a module, program segment or code Part, a part for the module, program segment or code include one or more and are used to implement holding for defined logic function Row instruction.It should also be noted that at some as in the realization method replaced, the function that is marked in box can also be to be different from The sequence marked in attached drawing occurs.For example, two continuous boxes can essentially perform substantially in parallel, they are sometimes It can perform in the opposite order, this is depended on the functions involved.It is it is also noted that every in block diagram and/or flow chart The combination of a box and the box in block diagram and/or flow chart can use function or the dedicated base of action as defined in performing It realizes or can be realized with the combination of specialized hardware and computer instruction in the system of hardware.
In addition, each function module in each embodiment of the present invention can integrate to form an independent portion Point or modules individualism, can also two or more modules be integrated to form an independent part.
If the function is realized in the form of software function module and is independent product sale or in use, can be with It is stored in a computer read/write memory medium.Based on such understanding, technical scheme of the present invention is substantially in other words The part contribute to the prior art or the part of the technical solution can be embodied in the form of software product, the meter Calculation machine software product is stored in a storage medium, is used including some instructions so that a computer equipment (can be People's computer, server or network equipment etc.) perform all or part of the steps of the method according to each embodiment of the present invention. And aforementioned storage medium includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic disc or CD.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, that is made any repaiies Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.It should be noted that:Similar label and letter exists Similar terms are represented in following attached drawing, therefore, once being defined in a certain Xiang Yi attached drawing, are then not required in subsequent attached drawing It is further defined and is explained.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in change or replacement, should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention described should be subject to the protection scope in claims.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any this practical relationship or sequence.Moreover, term " comprising ", "comprising" or its any other variant are intended to Non-exclusive inclusion, so that process, method, article or equipment including a series of elements not only will including those Element, but also including other elements that are not explicitly listed or further include as this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that Also there are other identical elements in process, method, article or equipment including the element.

Claims (10)

  1. A kind of 1. method of downloading data message, which is characterized in that the method includes:
    It determines to need to being installed on during terminal device and server carry out business data transmission, and in the terminal device When firmware in the terminal device is upgraded, the terminal device is sent to the server to be consolidated for downloading latest edition First pieces of firmware of part obtains request;
    The terminal device obtains the first business datum message that the server is sent, wherein, the first business datum report Text includes the first pieces of firmware that the server obtains request acquisition according to first pieces of firmware.
  2. 2. according to the method described in claim 1, it is characterized in that, obtain that the server sends in the terminal device the After one business datum message, the method further includes:
    When the terminal device judges first pieces of firmware for complete segment, the terminal device is sent out to the server The second pieces of firmware is sent to obtain request and the terminal device and obtains the second business datum message from the server, wherein, The second business datum message includes the server and is consolidated according to second that second pieces of firmware obtains request acquisition Part segment;
    For the terminal device when determining to obtain the complete latest edition firmware, the latest edition firmware is installed in operation.
  3. 3. according to the method described in claim 2, it is characterized in that, obtain that the server sends in the terminal device the After one business datum message, the method further includes:
    When the terminal device judges first pieces of firmware for imperfect segment, the terminal device is to the server It sends third pieces of firmware and obtains request;
    The terminal device obtains third business datum message from the server, wherein, the third business datum message packet The third pieces of firmware that the server obtains request acquisition according to the third pieces of firmware is included, wherein, the third is consolidated Part segment includes at least first pieces of firmware.
  4. 4. according to the method described in claim 3, it is characterized in that, the terminal device is determining that acquisition is complete described newest During version firmware, the latest edition firmware is installed in operation, including:
    The terminal device to first pieces of firmware, second pieces of firmware and the third pieces of firmware of acquisition into Row completeness check, to determine to obtain the complete latest edition firmware;
    It is determining to obtain the complete latest edition firmware, is running and the latest edition firmware is installed.
  5. A kind of 5. method of downloading data message, which is characterized in that the method includes:
    During server and terminal device carry out business data transmission, the server obtains the terminal device and is determining It needs to send when upgrading the firmware being installed in the terminal device solid for downloading the first of latest edition firmware Part segment obtains request;
    The server sends the first business datum message to the terminal device, wherein, the first business datum message packet Include the first pieces of firmware that the server obtains request acquisition according to first pieces of firmware.
  6. 6. according to the method described in claim 5, it is characterized in that, the first industry is sent to the terminal device in the server It is engaged in after data message, the method further includes:
    When the terminal device judges first pieces of firmware for complete segment, the server obtains the terminal device The second pieces of firmware sent obtains request;
    The server sends the second business datum message to the terminal device, wherein, the second business datum message packet Include the second pieces of firmware that the server obtains request acquisition according to second pieces of firmware.
  7. 7. according to the method described in claim 5, it is characterized in that, the first industry is sent to the terminal device in the server It is engaged in after data message, the method further includes:
    When the terminal device judges first pieces of firmware for imperfect segment, the server obtains the terminal and sets The third pieces of firmware that preparation is sent obtains request;
    The server sends third business datum message to the terminal device, wherein, the third business datum message packet The third pieces of firmware that the server obtains request acquisition according to the third pieces of firmware is included, wherein, the third is consolidated Part segment includes at least first pieces of firmware.
  8. A kind of 8. method of downloading data message, which is characterized in that the method includes:
    It determines to need to being installed on during terminal device and server carry out business data transmission, and in the terminal device When firmware in the terminal device is upgraded, the first firmware for downloading latest edition firmware is sent to the server Segment obtains request;
    The server obtains first pieces of firmware and obtains request;
    The server obtains request according to first pieces of firmware and obtains the first pieces of firmware;
    The server sends the first business datum message to the terminal device, wherein, the first business datum message packet First pieces of firmware is included;
    The terminal device obtains the first business datum message.
  9. 9. a kind of device of downloading data message, which is characterized in that run on terminal device, described device includes:
    Request sending module during carrying out business data transmission in terminal device and server, and is set in the terminal When standby determining needs upgrade the firmware being installed in the terminal device, sent to the server newest for downloading First pieces of firmware of version firmware obtains request;
    Pieces of firmware acquisition module, for obtaining the first business datum message that the server is sent, wherein, first industry Business data message includes the first pieces of firmware that the server obtains request acquisition according to first pieces of firmware.
  10. 10. a kind of device of downloading data message, which is characterized in that run on server, described device includes:
    Acquisition request module, during carrying out business data transmission in server and terminal device, the server obtains What the terminal device was sent when determining that needs upgrade the firmware being installed in the terminal device is used to download most First pieces of firmware of new version firmware obtains request;
    Pieces of firmware sending module sends the first business datum message for the server to the terminal device, wherein, institute It states the first business datum message and includes the first firmware that the server obtains request acquisition according to first pieces of firmware Segment.
CN201810044467.4A 2018-01-16 2018-01-16 Method and device for downloading data message Active CN108234216B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810044467.4A CN108234216B (en) 2018-01-16 2018-01-16 Method and device for downloading data message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810044467.4A CN108234216B (en) 2018-01-16 2018-01-16 Method and device for downloading data message

Publications (2)

Publication Number Publication Date
CN108234216A true CN108234216A (en) 2018-06-29
CN108234216B CN108234216B (en) 2021-04-20

Family

ID=62641199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810044467.4A Active CN108234216B (en) 2018-01-16 2018-01-16 Method and device for downloading data message

Country Status (1)

Country Link
CN (1) CN108234216B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111083001A (en) * 2018-10-18 2020-04-28 杭州海康威视数字技术股份有限公司 Firmware abnormity detection method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141553A (en) * 2007-10-18 2008-03-12 株洲德通实业有限公司 digital set up boxes software online updating method
CN101616028A (en) * 2009-06-25 2009-12-30 中兴通讯股份有限公司 A kind of communication program service does not interrupt upgrade method and system
US20150271297A1 (en) * 2014-03-21 2015-09-24 Vincent J. Zimmer Broadcasting management information using fountain codes
CN106843958A (en) * 2017-01-18 2017-06-13 成都黑盒子电子技术有限公司 A kind of embedded firmware upgrading method
CN106933616A (en) * 2017-01-17 2017-07-07 成都华立达电力信息系统有限公司 Remote upgrade method based on bandwidth carrier

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141553A (en) * 2007-10-18 2008-03-12 株洲德通实业有限公司 digital set up boxes software online updating method
CN101616028A (en) * 2009-06-25 2009-12-30 中兴通讯股份有限公司 A kind of communication program service does not interrupt upgrade method and system
US20150271297A1 (en) * 2014-03-21 2015-09-24 Vincent J. Zimmer Broadcasting management information using fountain codes
CN106933616A (en) * 2017-01-17 2017-07-07 成都华立达电力信息系统有限公司 Remote upgrade method based on bandwidth carrier
CN106843958A (en) * 2017-01-18 2017-06-13 成都黑盒子电子技术有限公司 A kind of embedded firmware upgrading method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111083001A (en) * 2018-10-18 2020-04-28 杭州海康威视数字技术股份有限公司 Firmware abnormity detection method and device

Also Published As

Publication number Publication date
CN108234216B (en) 2021-04-20

Similar Documents

Publication Publication Date Title
US10713034B2 (en) Updating web resources
CN107205057A (en) A kind of game resource update method, device and client
CN104965848B (en) A kind of front end resource loading method and device
CN110519401A (en) Improve method, apparatus, equipment and the storage medium of network Access Success Rate
CN109408132A (en) A kind of configuration file processing method and server, user terminal, storage medium
CN103874032A (en) Information pushing method and device based on mobile terminals
CN106155750A (en) The loading method of a kind of resource file and device
CN111897564A (en) Application updating method and system
CN109981719A (en) Information processing method and its system, computer system and computer readable medium
CN108984339B (en) Data recovery method and related product
CN103605549A (en) Interface exit display method and device
CN104484482A (en) Webpage information updating method and system of network platform
CN108737487B (en) Data synchronization method and device, storage medium and electronic device
CN105471980A (en) Embedded-OpenWrt-wireless-router-technology-based cloud server data access method
CN108182090A (en) Flash plug-in loading methods and device based on blink kernels
CN109032693A (en) Method and device for loading display information, electronic equipment and readable storage medium
CN108234216A (en) Method and device for downloading data message
CN109672534A (en) Processing method, device, storage medium and the electronic device of Internet resources
US20110258292A1 (en) File download method for mobile device, server and mobile device thereof, and computer-readable medium
CN104350476B (en) A kind of version detection period control method and device
CN110489677A (en) A kind of application market jump method and system based on mobile device identification
CN103634348A (en) Terminal device and method for releasing information
US9730038B2 (en) Techniques to manage platform migrations
CN113507529B (en) Method for realizing file downloading based on Web application
CN105915638B (en) Log in the method for moving game and the client of moving game

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