CN109302456A - A kind of document transmission method and device based on aerial downloading OTA technology - Google Patents
A kind of document transmission method and device based on aerial downloading OTA technology Download PDFInfo
- Publication number
- CN109302456A CN109302456A CN201811049789.4A CN201811049789A CN109302456A CN 109302456 A CN109302456 A CN 109302456A CN 201811049789 A CN201811049789 A CN 201811049789A CN 109302456 A CN109302456 A CN 109302456A
- Authority
- CN
- China
- Prior art keywords
- ota
- data block
- file
- solicited message
- downloading
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses disclose a kind of document transmission method and device based on aerial downloading OTA technology, this method comprises: equipment end, which sends OTA to server end, downloads solicited message, OTA downloading solicited message includes: file storage address, data block size, data block block number;Server end downloads solicited message for corresponding OTA file division into the data block file for carrying data block block number according to OTA, and the corresponding data block file of data block block number of OTA downloading solicited message is sent to equipment end.This method can allow server end according to the actual download demand of equipment end, and file is downloaded since corresponding position, the downloading demand of equipment end is flexibly met.
Description
Technical field
The present invention relates to field of communication technology more particularly to a kind of document transmission methods based on aerial downloading OTA technology
And device.
Background technique
Under scenes of internet of things, need to access magnanimity terminal equipment in Internet of Things cloud platform, these terminal devices are much all
It is resource-constrained type, i.e. only a small amount of memory headroom and limited computing capability, the especially narrowband NB-IoT Internet of Things
Equipment, these equipment are usually placed under the poor environment of a variety of different network signals, such as: it is needed for wisdom forest
It is placed into the anti-brushfire equipment in remote mountains, needs to buy in the ground magnetic machine of underground for wisdom parking, is put for water conservancy needs
Enter underwater equipment etc., these equipment are once placed into, and general taking-up is all relatively difficult.Since the equipment of this scene is most
Number is all resource-constrained type equipment, during the file transmission of OTA technology is downloaded in progress software upgrading in the air, is needed rationally
Utilization resource, but traditional file Yi Dan open downloading when, just entire file download must be completely terminated, if
Network signal is weaker, and upgrading is be easy to cause to interrupt, and the incomplete file downloaded needs repeated downloads, and server end cannot
According to the demand of equipment end, file is transmitted since corresponding document location, causes the waste of resource and network bandwidth.And mesh
There are two types of preceding charge methods: charge by flow charging and by number, no matter which kind of charge method, the above problem can all cause not
Necessary expense, so resource and the reasonable of network bandwidth make when needing to solve firmware OTA upgrading under Internet of Things application scenarios
Problem.
Summary of the invention
The present invention provides a kind of document transmission method and device based on aerial downloading OTA technology, solves in Internet of Things cloud
When accessing bulk device in platform, the OTA file transmission problem when carrying out device upgrade.
In order to solve the above technical problems, the present invention provides a kind of file transmission based on aerial downloading OTA technology
Method and device, specific method include:
According to first aspect present invention, a kind of method based on aerial downloading OTA file transmission is provided, this method comprises:
For server end, this method comprises:
The OTA that receiving device end is sent downloads solicited message, above-mentioned OTA downloading solicited message include file storage address,
Data block size, data block block number;
Corresponding OTA file is found according to above-mentioned file storage address, and according to above-mentioned data block size by above-mentioned OTA
File division at the carrying data block block number with above-mentioned data block size same size data block file;
Corresponding data block file is searched from above-mentioned data block file according to above-mentioned data block block number, to above-mentioned equipment end
Transmit the data block file corresponding with above-mentioned data block block number found.
For above equipment end, this method comprises:
Send OTA to server end and download solicited message, above-mentioned OTA downloading solicited message include hereafter part storage address,
Data block size, data block block number;
Receive the data block file corresponding with the data block block number of server end transmission found.
According to second aspect of the present invention, a kind of device of file transmission based on aerial downloading OTA technology is provided, comprising:
For server end, which includes:
Request reception unit is downloaded, the OTA sent for receiving device end downloads solicited message, above-mentioned OTA downloading request
Information includes file storage address, data block size, data block block number;
File division unit, for finding corresponding OTA file according to above-mentioned file storage address, and according to above-mentioned number
According to block size by above-mentioned OTA file division at the data block text of the carrying data block block number with above-mentioned data block size same size
Part;
File transmission unit, for searching corresponding data block from above-mentioned data block file according to above-mentioned data block block number
File transmits the data block file corresponding with above-mentioned data block block number found to above-mentioned equipment end.
For above equipment end, which includes:
Request transmitting unit is downloaded, downloads solicited message, above-mentioned OTA downloading request letter for sending OTA to server end
Breath includes lower file storage address, data block size, data block block number;
File reception unit, for receiving the data corresponding with above-mentioned data block block number of server end transmission found
Block file.
A kind of method based on aerial downloading OTA file transmission provided by the invention has following compared with prior art
The utility model has the advantages that
In the above-mentioned methods, the equipment end under above-mentioned platform of internet of things is accessed when carrying out OTA file download, to server
End sends the OTA file download request information for having data block block number and data block size, to the above-mentioned number of server direct request
According to the corresponding data block file of block block number, and the downloading data block file since above-mentioned data block file, such method can be with
It allows above-mentioned server end according to the demand of equipment end, is downloaded since corresponding position, the downloading of equipment end can be flexibly met
Demand reduces the waste etc. of above-mentioned NB-IoT equipment end storage resource to save network bandwidth and resource.
Detailed description of the invention
Fig. 1 is a kind of schematic diagram for method based on aerial downloading OTA file transmission that the embodiment of the present invention one provides;
Fig. 2 is that Internet of Things NB-IoT equipment provided by Embodiment 2 of the present invention ask in aerial downloading software upgrading FOTA
Seek the schematic diagram of downloading OTA file;
Fig. 3 is the schematic diagram of the method for the equipment end for the OTA file transmission that embodiment three provides;
Fig. 4 is the schematic diagram of the server end of the method for the OTA file transmission that embodiment three provides;
Fig. 5 is a kind of device figure based on aerial downloading OTA file transfer means that the embodiment of the present invention three provides.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention make into
It is described in detail to one step, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole implementation
Example.Based on the embodiments of the present invention, obtained by those of ordinary skill in the art without making creative efforts
All other embodiment, shall fall within the protection scope of the present invention.
Embodiment one:
The present invention provides a kind of method based on aerial downloading OTA file transmission, includes server end under platform of internet of things
And equipment end, the angle that the present embodiment cooperates from server end and equipment end, illustrate the OTA file transmission based on platform of internet of things
Method specific embodiment, as shown in Figure 1, its detailed process is as follows:
Step 101, equipment end sends OTA to server end and downloads solicited message, and above-mentioned OTA downloading solicited message includes text
Part storage address, data block size, data block block number;
In specific embodiment, equipment end accesses above-mentioned platform of internet of things with pre-selected protocol, and above-mentioned pre-selected protocol includes
Coap agreement or other can be used to transmit the network protocol of file, those skilled in the art can set according to the actual situation
It is fixed.
Above-mentioned coap agreement, i.e. constrained application protocol, a kind of biography based on REST framework
Defeated agreement is directed to resource-constrained type equipment in scenes of internet of things and the agreement formulated;Due in scenes of internet of things, many equipment
It is all resource-constrained type, i.e. only a small amount of memory headroom and limited computing capability, so traditional http protocol application
What is just shown on Internet of Things is excessively huge and not applicable, and above-mentioned coap agreement is more suitable for the application of above-mentioned Internet of Things.
The data block size of above-mentioned OTA downloading solicited message can be by following methods or other specific sides that may be implemented
Formula determines, comprising: equipment end is before sending OTA downloading solicited message to server end, the data block that consults with server end
Size simultaneously records;Perhaps data block size as defined in the pre-selected protocol of above-mentioned platform of internet of things or equipment end are accessed according to certainly
Body memory space limits calculated data block size.
In specific embodiment, initial OTA downloading is sent to server end when equipment end initially carries out OTA file download and is asked
Information is sought, the data block block number that above-mentioned initial OTA downloading solicited message carries is the data block block number of default;
When equipment end determines that above-mentioned OTA file download does not complete, OTA again is sent to server end and downloads solicited message,
The above-mentioned downloading of OTA again solicited message is the OTA downloading request in addition to initial OTA downloads solicited message sent to server end
Information, the data block block number in above-mentioned OTA again downloading solicited message, for equipment end send OTA again download solicited message it
The data block block number of the last one preceding received data block file or its next data block file.
Step 102, the OTA that received server-side equipment end is sent downloads solicited message, and above-mentioned OTA downloads request packet
Include file storage address, data block size, data block block number;
In specific embodiment, server end is accessed with accessing the consistent pre-selected protocol of above-mentioned platform of internet of things with equipment end
Above-mentioned platform of internet of things, above-mentioned pre-selected protocol include coap agreement.
In an implementation, the initial OTA downloading request sent when received server-side equipment end initially carries out OTA file download
Information, the data block block number that above-mentioned initial OTA downloading solicited message carries are the data block block number of default;
The OTA again that received server-side equipment end is sent downloads solicited message, and the above-mentioned downloading of OTA again solicited message is
The OTA in addition to initial OTA downloads solicited message that equipment end is sent downloads solicited message, and above-mentioned OTA again downloads solicited message
In data block block number, for equipment end send again OTA download solicited message before the last one received data block file or
The data block block number of its next data block file.
Server end parses OTA file download request information, obtains file storage address, data block size, data block block
Number;In the present embodiment, according to selected above-mentioned pre-selected protocol, the transmission of above-mentioned data block file is carried out using coap agreement
OTA file download request information can be following form: coap: // 123.123.123.12:5685/ota/6/128;Wherein
It 123.123.123.12 is above-mentioned file storage address, 6 be above-mentioned data block block number, and 128 be above-mentioned data block size.
Step 103, server end finds corresponding OTA file according to above-mentioned file storage address, and according to above-mentioned number
According to block size by above-mentioned OTA file division at the data block of the carrying data block block number with above-mentioned data block size same size
File;
Step 104, server end is literary from the corresponding data block of above-mentioned data block file search according to above-mentioned data block block number
Part transmits the data block file corresponding with above-mentioned data block block number found to above-mentioned equipment end;
In specific embodiment, received server-side equipment end has successfully received the feedback acknowledgment letter after each data block file
Breath.
Step 105, equipment end receives the data block corresponding with above-mentioned data block block number of server end transmission found
File;
In specific embodiment, default memory space is written in the data block file that equipment end transmits server end, and will
Default memory space is written in the data block block number of above-mentioned data block file;
In an implementation, above equipment end is after each data block file for being properly received server end transmission, to server
End sends feedback acknowledgment information.Corresponding download state flag bit is updated, above-mentioned OTA is determined according to above-mentioned download state flag bit
When file download does not complete, continue to send OTA downloading solicited message to server end;When determining that above-mentioned OTA file download is completed,
Stop sending OTA downloading solicited message to server end.
Concrete form and content to above-mentioned downloading flag bit do not do excessive limitation, and those skilled in the art can be according to reality
The setting of border situation;
During above equipment end carries out the transmission of OTA file, there is the case where network interruption, then above-mentioned OTA file
There is downloading and interrupts in transmission process, then carries out following steps:
Step 106, when server end is to above-mentioned equipment end transmission data block file, the determining network connection between equipment end
When disconnection, stop using OTA mode to above-mentioned equipment end transmission data block file;
The case where above-mentioned network interruption include: equipment end and server end disconnect network connection such as above-mentioned platform of internet of things by
Environment influences, and network transmission signal is deteriorated the even network connection shape of disappearance etc. or equipment end or server end local suddenly
State is when disconnecting, i.e. mistake occurs in the network connection setting of equipment end or server end, or power-off etc. suddenly.
Specifically, received server-side equipment end receives the confirmation message fed back after each data block file, above-mentioned true
Recognize network connection of the information between determining and equipment end to disconnect, not receive equipment end anti-more than setting time for above-mentioned server end
When the confirmation message of feedback, the network connection between determining and equipment end is disconnected;Alternatively, indicated according to local network connection state,
When the network connection state of instruction is to disconnect, determine that network disconnects.
After the interruption of OTA file download, above equipment end is linked into equipment end with predetermined protocol consistent before network interruption
Internet of Things cloud platform, and send OTA again to server end and download solicited message.
In a particular embodiment, equipment end judges the above-mentioned OTA text before network interruption according to download state flag bit
Whether part downloading is completed, and when determining that above-mentioned OTA file download is completed, stops sending OTA downloading solicited message to server end, really
When fixed above-mentioned OTA file download does not complete, OTA again is sent to server end and downloads solicited message, the above-mentioned downloading of OTA again is asked
Seeking information is that the OTA in addition to initial OTA downloads solicited message sent to server end downloads solicited message, above-mentioned OTA again
Download solicited message in data block block number, for equipment end send again OTA download solicited message before it is received the last one
The data block block number of data block file or its next data block file.
Embodiment two:
The application scenarios of the present embodiment are in the process for carrying out aerial downloading software upgrading FOTA, and FOTA is Firm Over-
The aerial downloading software upgrading of The-Air mobile terminal, refers to through cloud upgrade technique, provides for the equipment with networking function
Firmware update services.Above-mentioned FOAT includes interactive process, downloading process and device upgrade process, wherein in interactive process under
The transmission of OTA file is carried out during carrying with the above-mentioned method of the present invention.
Equipment end is the equipment such as mobile phone for being connected to platform of internet of things, tablet computer, portable media player, moves mutually
Networked devices, narrowband Internet of Things NB-IoT equipment etc..
Above-mentioned NB-IoT equipment and server end access platform of internet of things with pre-selected protocol, the pre-selected protocol in the present embodiment
For lwm2m agreement and coap agreement, NB-IoT equipment and server end are linked into Internet of Things cloud platform with lwm2m agreement, with
Coap agreement carries out file transmission, above-mentioned lwm2m agreement, i.e. Lightweight Machine to Machine, a kind of Internet of Things
FidonetFido is mainly used on the embedded device of resource-constrained (including storage, power consumption etc.), this specific implementation is such as
Under, referring to fig. 2:
1) NB-IoT equipment interacts negotiation with server end, determines data block size;
In the present embodiment, determine that data block size is 64Kb.
2) above-mentioned NB-IoT equipment sends initial OTA to server end and downloads solicited message;
In the present embodiment, it is set according to selected coap transport protocol and actual conditions, above-mentioned NB-IoT equipment exists
Send coap to server end when initial progress OTA file download: the initial OTA downloading of //url:port/ota/n/m format is asked
Seeking information is coap: // 123.123.123.12:5685/ota/1/64, the meaning indicated are as follows: above-mentioned NB-IoT device request
The file storage address url of the OTA file of downloading is 123.123.123.12, and the transport protocol used is coap agreement, currently
Every block number when above-mentioned NB-IoT equipment carries out OTA file download is 64Kb according to the size m of block file, i.e. data block size is
64, the port numbers port of file transmission is 5685, the data block for the data block file that current above-mentioned NB-IoT equipment has been downloaded
Block number is 0, applies for that the block number n of the data block file of downloading is 1, that is, it is above-mentioned to indicate that above-mentioned NB-IoT equipment currently has not yet been downloaded
OTA file starts to download above-mentioned OTA file to server end application this moment, applies for that above-mentioned OTA file is by data block size
First data block file of 64Kb segmentation.
3) received server-side is linked into the OTA of the transmission of the above-mentioned NB-IoT equipment under Internet of Things cloud platform with predetermined protocol
Download solicited message;
The OTA that the above-mentioned NB-IoT equipment of received server-side is sent downloads solicited message, that is, coap: //
123.123.123.12:5685/ota/1/64 the download address for obtaining the OTA file of above-mentioned NB-IoT device request this moment is
123.123.123.12, the data block size of above-mentioned OTA file division file is 64Kb, above-mentioned NB-IoT equipment application downloading
Data block file is first data block file, and the mode of above-mentioned OTA downloading is downloading mode as defined in coap agreement;
4) server end finds corresponding OTA file, and root according to above-mentioned file download address 123.123.123.12
According to above-mentioned data block size 64 by above-mentioned OTA file division at the block data block text of the carrying data block block number of 64Kb size
Part;
In this example, it is assumed that the size of above-mentioned OTA file be 1024Kb, then at this time server end according to above-mentioned file
Size and data block size by above-mentioned OTA file division at 16 carry data block block number (from 1 to 16) data block file;
5) above-mentioned server end downloads solicited message according to the OTA for carrying data block block number, searches from above-mentioned OTA file
The number is transmitted to above-mentioned NB-IoT equipment end to the 1st block data block file, and using downloading mode as defined in coap agreement
According to block file, as shown in ack block1 in Fig. 2.
6) above-mentioned NB-IoT equipment receives the 1st data block file that server end is sent, by above-mentioned 1st data block text
Default memory space is written in part and data block block number 1, and reports feedback acknowledgment information to server end, reports that above-mentioned NB-IoT is set
It is standby to be properly received first data block file;
The value of download state flag bit is updated to 0 simultaneously by above-mentioned NB-IoT equipment, determines that above-mentioned OTA file download is not complete
Cheng Shi, continuing to send OTA downloading solicited message to server end to send request again is coap: // 123.123.123.12:
5685/ota/1/64;
The value that download state flag bit is arranged in the present embodiment indicates that above-mentioned OTA file is being downloaded and not complete when being 0
At the value of download state flag bit indicates that above-mentioned OTA file download is completed when being 1;
During carrying out OTA downloading, a certain moment is due to environment reason, above-mentioned NB-IoT equipment end and server end
Network connection interruption, the data block block number of above-mentioned NB-IoT equipment record downloaded is 8 before suspension, i.e. suspension in Fig. 2
When the downloading solicited message that sends of equipment end in the value of n be 8, then follow the steps below at this time the above-mentioned OTA file of progress after
Continuous downloading:
7) received server-side is determining and NB-IoT equipment room less than the feedback information that above-mentioned NB-IoT equipment end confirms
Network connection disconnects, and stops using OTA mode to above-mentioned NB-IoT equipment end transmission data block file;
8) above-mentioned NB-IoT equipment end is reconnected with coap agreement into above-mentioned platform of internet of things, sends OTA downloading request
Information: coap: // 123.123.123.12:5685/ota/9/64, the size of 64Kb is pressed to the above-mentioned OTA file of server application
It is divided into the 9th data block file for carrying data block block number.
And then enter above-mentioned step 3 to the circulation of step 6, server receives coap: // 123.123.123.12:
5685/ota/9/64 transmits above-mentioned OTA file to above-mentioned NB-IoT equipment end using downloading mode as defined in coap agreement and presses
The size of 64Kb is divided into the 9th data block file for carrying data block block number, and then sends OTA downloading solicited message again extremely
The downloading of 16 data block files of above-mentioned OTA file is completed.
9) after the completion of above-mentioned OTA file download, above-mentioned NB-IoT equipment start carry out from upgrade, restart after the completion into
Row registration, connects into above-mentioned platform of internet of things.
In the above-mentioned methods, the OTA file download when carrying out firmware upgrade of the equipment end under above-mentioned platform of internet of things is accessed
When, when meeting with network breakpoint, equipment end directly carries out reconnection, and the OTA for having data block file block number is sent to server end
File download request information, to server direct request network breakpoint before downloaded OTA segmentation data block file it is next
A data block file, has saved network bandwidth and resource, reduces the memory space above equipment end.
Embodiment three:
The present embodiment from the angle of server end and equipment end, illustrates a kind of aerial downloading based on platform of internet of things respectively
OTA document transmission method specific embodiment, detailed process is as follows:
For equipment end, as shown in figure 3, this method comprises:
Step 310, equipment end sends OTA to server end and downloads solicited message, under above-mentioned OTA downloading solicited message includes
File storage address, data block size, data block block number;
It in specific embodiment, further include that equipment end accesses above-mentioned platform of internet of things, above-mentioned pre-selected protocol with pre-selected protocol
Including coap agreement or other can be used to transmit the network protocol of file, those skilled in the art can be according to the actual situation
Setting;
The data block size of above-mentioned OTA downloading solicited message can be by following methods or other specific sides that may be implemented
Formula determines, comprising: equipment end is before sending OTA downloading solicited message to server end, the data block that consults with server end
Size simultaneously records;Or as defined in the pre-selected protocol of the above-mentioned platform of internet of things of access;Or equipment end is according to itself memory space
Limit calculated data block size.
In specific embodiment, the initial OTA downloading request sent when initially carrying out OTA file download to server end is believed
Breath, the data block block number that above-mentioned initial OTA downloading solicited message carries are the data block block number of default;
When determining that above-mentioned OTA file download does not complete, to server end send again OTA download solicited message, it is above-mentioned again
Secondary OTA downloading solicited message is that the OTA in addition to initial OTA downloads solicited message sent to server end downloads solicited message,
Data block block number in the above-mentioned downloading of OTA again solicited message sends before OTA again downloads solicited message for equipment end and receives
The last one data block file or its next data block file data block block number.
Step 320, the data block file corresponding with above-mentioned data block block number of server end transmission found is received.
In specific embodiment, scheduled memory space is written into the data block file of server end transmission, and will be above-mentioned
Scheduled memory space is written in the data block block number of data block file;
It further include after above equipment end is properly received each data block file of server end transmission, being sent out to server end
Feedback acknowledgment information is sent, and updates corresponding download state flag bit, above-mentioned OTA text is determined according to above-mentioned download state flag bit
When part downloading does not complete, continue to send OTA downloading solicited message to server end;When determining that above-mentioned OTA file download is completed, stop
OTA only, which is sent, to server end downloads solicited message.
Concrete form and content to above-mentioned downloading flag bit do not do excessive limitation, and those skilled in the art can be according to reality
The setting of border situation.
For server end, as shown in figure 4, this method comprises:
Step 410, the OTA that received server-side equipment end is sent downloads solicited message, and above-mentioned OTA downloads request packet
Include file storage address, data block size, data block block number;
It in specific embodiment, further include that server end is to access the above-mentioned consistent pre-selection of platform of internet of things with equipment end
Agreement accesses above-mentioned platform of internet of things, and above-mentioned pre-selected protocol includes coap agreement.
In specific embodiment, the initial OTA downloading request that receiving device end is sent when initially carrying out OTA file download is believed
Breath, the data block block number that above-mentioned initial OTA downloading solicited message carries are the data block block number of default;
The OTA again that receiving device end is sent downloads solicited message, and the above-mentioned downloading solicited message of OTA again is equipment end hair
The OTA in addition to initial OTA downloads solicited message sent downloads solicited message, the data in the above-mentioned downloading of OTA again solicited message
Block block number is the data block block number that equipment end sends that OTA again downloads the last one received data block file when solicited message,
Or the data block block number of the data block file of above equipment end application downloading.
Step 420, server end finds corresponding OTA file according to above-mentioned file storage address, and according to above-mentioned number
According to block size by above-mentioned OTA file division at the data block of the carrying data block block number with above-mentioned data block size same size
File;
Step 430, server end is literary from the corresponding data block of above-mentioned data block file search according to above-mentioned data block block number
Part transmits the data block file corresponding with above-mentioned data block block number found to above-mentioned equipment end;
It in specific embodiment, further include that received server-side equipment end is sent after having successfully received each data block file
Feedback acknowledgment information;Above-mentioned confirmation message is disconnected for the network connection between determining and equipment end, comprising: above-mentioned server end
When not receiving the confirmation message of equipment end feedback more than setting time, the network connection between determining and equipment end is disconnected;Alternatively, really
The fixed network connection between equipment end disconnects, such as: being indicated according to local network connection state, in the network connection state of instruction
When to disconnect, determine that network disconnects.
It is applied to a kind of side based on aerial downloading OTA file transmission of server end and equipment end in the embodiment of the present invention
In method, each process embodiment is referring to the corresponding description of embodiment one, and I will not elaborate.
Example IV:
The present invention provides one kind based on aerial downloading OTA file transfer means, as shown in Figure 5, comprising:
For server end, which includes:
Request reception unit 510 is downloaded, the OTA sent for receiving device end downloads solicited message, and the OTA downloading is asked
Seeking information includes file storage address, data block size, data block block number;
It in specific embodiment, further include agreement access unit, it is flat for accessing the Internet of Things with pre-selected protocol
Platform, the pre-selected protocol include coap agreement.
In specific embodiment, the initial OTA that receiving device end is sent when initially carrying out OTA file download downloads request
Information, the data block block number that the initial OTA downloading solicited message carries are the data block block number of default;
The OTA again that receiving device end is sent downloads solicited message, and the downloading solicited message of OTA again is equipment end hair
The OTA in addition to initial OTA downloads solicited message sent downloads solicited message, the data in the downloading of the OTA again solicited message
Block block number;Send that OTA again downloads the last one received data block file before solicited message or its is next for equipment end
The data block block number of data block file.
File division unit 520, for finding corresponding OTA file according to the file storage address, and according to institute
State data of the data block size by the OTA file division at the carrying data block block number with the data block size same size
Block file;
File transmission unit 530, for searching corresponding number from the data block file according to above-mentioned data block block number
According to block file, the data block file corresponding with the data block block number found is transmitted to the equipment end.
Further include feedback information receiving unit 540, receives for receiving device termination and to send after each data block file
Feedback acknowledgment information;It is described to terminate the determining network connection disconnection between equipment end of file transmission unit, comprising: when being more than setting
Between when not receiving the confirmation message of equipment end feedback, the determining network connection between equipment end disconnects;Alternatively, the termination file
The determining network connection between equipment end of transmission unit disconnects, comprising: is indicated according to local network connection state, in instruction
Network connection state is to determine that network disconnects when disconnecting.
It in specific embodiment, further include terminating file transmission unit 550, for transmitting data to the equipment end
When block file, when the network connection between determining and equipment end disconnects, stop to the equipment end transmission data block file.
For equipment end, which includes:
Request transmitting unit 560 is downloaded, downloads solicited message, the OTA downloading request for sending OTA to server end
Information includes hereafter part storage address, data block size, data block block number;
It in specific embodiment, further include agreement access unit, for flat to access the Internet of Things with server end
The consistent pre-selected protocol of platform accesses the platform of internet of things, and the pre-selected protocol includes coap agreement.
In specific embodiment, the initial OTA sent when initially carrying out OTA file download to server end downloads request
Information, the data block block number that the initial OTA downloading solicited message carries are the data block block number of default;
When determining that the OTA file download does not complete, to server end send again OTA download solicited message, it is described again
Secondary OTA downloading solicited message is that the OTA in addition to initial OTA downloads solicited message sent to server end downloads solicited message,
Data block block number in the downloading of the OTA again solicited message;It sends before OTA again downloads solicited message and receives for equipment end
The last one data block file or its next data block file data block block number.
File reception unit 570, it is corresponding with the data block block number for receiving finding for server end transmission
Data block file.
In specific embodiment, after the data block file for receiving server end transmission, it is true that feedback is sent to server end
Recognize information, and update corresponding download state flag bit, the OTA file download is determined not according to the download state flag bit
When completion, continue to send OTA downloading solicited message to server end;When determining that the OTA file download is completed, stop to service
Device end sends OTA and downloads solicited message.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The shape for the computer program product implemented in usable storage medium (including but not limited to magnetic disk storage and optical memory etc.)
Formula.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (15)
1. a kind of document transmission method based on aerial downloading OTA technology, which is characterized in that this method comprises:
The OTA that receiving device end is sent downloads solicited message, and the OTA downloading solicited message includes file storage address, data
Block size, data block block number;
Corresponding OTA file is found according to the file storage address, and according to the data block size by the OTA file
It is divided into the data block file with the carrying data block block number of the data block size same size;
Corresponding data block file is searched from the data block file according to the data block block number, is transmitted to the equipment end
The data block file corresponding with the data block block number found.
2. the method as described in claim 1, which is characterized in that further include:
When to the equipment end transmission data block file, when the determining network connection between equipment end disconnects, stop setting to described
Standby end transmission data block file.
3. the method as described in claim 1, which is characterized in that the OTA that receiving device end is sent downloads solicited message, described
It includes file storage address, data block size, data block block number that OTA, which downloads solicited message, comprising:
The initial OTA that receiving device end is sent when initially carrying out OTA file download downloads solicited message, the initial OTA downloading
The data block block number that solicited message carries is the data block block number of default;
The OTA again that receiving device end is sent downloads solicited message, and the downloading of the OTA again solicited message is what equipment end was sent
OTA in addition to initial OTA downloads solicited message downloads solicited message, the data block block in the downloading of the OTA again solicited message
Number, for the last one received data block file or its next data before equipment end transmission again OTA downloading solicited message
The data block block number of block file.
4. method according to claim 2, which is characterized in that further include:
Receiving device termination receives the feedback acknowledgment information sent after each data block file;
Network connection between determining and equipment end disconnects, comprising:
When not receiving the confirmation message of equipment end feedback more than setting time, the network connection between determining and equipment end is disconnected;
Alternatively, the network connection between determining and equipment end disconnects, comprising:
It is indicated according to local network connection state, when the network connection state of instruction is to disconnect, determines that network disconnects.
5. a kind of document transmission method based on aerial downloading OTA technology, which is characterized in that this method comprises:
OTA is sent to server end and downloads solicited message, and the OTA downloading solicited message includes hereafter part storage address, data
Block size, data block block number;
Receive the data block file corresponding with the data block block number of server end transmission found.
6. method as claimed in claim 5, which is characterized in that the data block size, comprising:
Before sending OTA downloading solicited message to server end, the data block size that is consulted with server end;Or
Access data block size as defined in the pre-selected protocol of platform of internet of things;Or
Calculated data block size is limited according to itself memory space.
7. method as claimed in claim 5, which is characterized in that send OTA to server end and download solicited message, comprising:
The initial OTA sent when initial progress OTA file download to server end downloads solicited message, the initial OTA downloading
The data block block number that solicited message carries is the data block block number of default;
When determining that the OTA file download does not complete, OTA again is sent to server end and downloads solicited message, the OTA again
Downloading solicited message be is sent to server end except initial OTA downloading solicited message in addition to OTA downloading solicited message, it is described again
Data block block number in secondary OTA downloading solicited message, it is received last before sending OTA downloading solicited message again for equipment end
The data block block number of one data block file or its next data block file.
8. the method for claim 7, which is characterized in that when determining that the OTA file download does not complete, comprising:
After being properly received each data block file of server end transmission, feedback acknowledgment information is sent to server end, and update
Corresponding download state flag bit, when determining that the OTA file download does not complete according to the download state flag bit, continue to
Server end sends OTA and downloads solicited message;When determining that the OTA file download is completed, stop sending under OTA to server end
Carry solicited message.
9. a kind of device of the file transmission based on aerial downloading OTA technology characterized by comprising
Request reception unit is downloaded, the OTA sent for receiving device end downloads solicited message, and the OTA downloads solicited message
Including file storage address, data block size, data block block number;
File division unit, for finding corresponding OTA file according to the file storage address, and according to the data block
Size is by the OTA file division at the data block file of the carrying data block block number with the data block size same size;
File transmission unit, for searching corresponding data block text from the data block file according to above-mentioned data block block number
Part transmits the data block file corresponding with the data block block number found to the equipment end.
10. device as claimed in claim 9, which is characterized in that further include:
File transmission unit is terminated, when for the equipment end transmission data block file, the determining network between equipment end connects
When connecing disconnection, stop to the equipment end transmission data block file.
11. device as claimed in claim 9, which is characterized in that the downloading request reception unit is sent out for receiving device end
The OTA downloading solicited message sent, comprising:
The initial OTA that receiving device end is sent when initially carrying out OTA file download downloads solicited message, the initial OTA downloading
The data block block number that solicited message carries is the data block block number of default;
The OTA again that receiving device end is sent downloads solicited message, and the downloading of the OTA again solicited message is what equipment end was sent
OTA in addition to initial OTA downloads solicited message downloads solicited message, the data block block in the downloading of the OTA again solicited message
Number, for the last one received data block file or its next data before equipment end transmission again OTA downloading solicited message
The data block block number of block file.
12. device as claimed in claim 10, which is characterized in that further include:
Feedback information receiving unit receives the feedback acknowledgment information sent after each data block file for receiving device termination;
It is described to terminate the determining network connection disconnection between equipment end of file transmission unit, comprising:
When not receiving the confirmation message of equipment end feedback more than setting time, the network connection between determining and equipment end is disconnected;
Alternatively, described terminate the determining network connection disconnection between equipment end of file transmission unit, comprising:
It is indicated according to local network connection state, when the network connection state of instruction is to disconnect, determines that network disconnects.
13. a kind of device of the file transmission based on aerial downloading OTA technology, which is characterized in that the device includes:
Request transmitting unit is downloaded, downloads solicited message for sending OTA to server end, the OTA downloads request packet
Include lower file storage address, data block size, data block block number;
File reception unit, for receiving data block corresponding with the data block block number text of server end transmission found
Part.
14. device as claimed in claim 13, which is characterized in that the downloading request transmitting unit is used for server end
It sends OTA and downloads solicited message, comprising:
The initial OTA sent when initial progress OTA file download to server end downloads solicited message, the initial OTA downloading
The data block block number that solicited message carries is the data block block number of default;
When determining that the OTA file download does not complete, OTA again is sent to server end and downloads solicited message, the OTA again
Downloading solicited message be is sent to server end except initial OTA downloading solicited message in addition to OTA downloading solicited message, it is described again
Data block block number in secondary OTA downloading solicited message, it is received last before sending OTA downloading solicited message again for equipment end
The data block block number of one data block file or its next data block file.
15. device as claimed in claim 13, which is characterized in that the file reception unit determines the OTA file download
When not completing, comprising:
After the data block file for receiving server end transmission, feedback acknowledgment information is sent to server end, and under update accordingly
State flag bit is carried to continue when determining that the OTA file download does not complete according to the download state flag bit to server end
It sends OTA and downloads solicited message;When determining that the OTA file download is completed, stop sending OTA downloading request letter to server end
Breath.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811049789.4A CN109302456A (en) | 2018-09-10 | 2018-09-10 | A kind of document transmission method and device based on aerial downloading OTA technology |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811049789.4A CN109302456A (en) | 2018-09-10 | 2018-09-10 | A kind of document transmission method and device based on aerial downloading OTA technology |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109302456A true CN109302456A (en) | 2019-02-01 |
Family
ID=65166702
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811049789.4A Pending CN109302456A (en) | 2018-09-10 | 2018-09-10 | A kind of document transmission method and device based on aerial downloading OTA technology |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109302456A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112769949A (en) * | 2021-01-20 | 2021-05-07 | 杭州鸿泉物联网技术股份有限公司 | File transmission method and device, electronic equipment and storage medium |
CN113190249A (en) * | 2021-04-29 | 2021-07-30 | 华人运通(上海)云计算科技有限公司 | OTA-based vehicle control instruction block software package downloading method, device and system |
CN115460109A (en) * | 2022-11-11 | 2022-12-09 | 广州粤芯半导体技术有限公司 | Connection state detection method and device, computer equipment and readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103347095A (en) * | 2013-07-22 | 2013-10-09 | 广州市交通信息中心 | Wireless firmware updating method used in vehicle networking system |
CN104484205A (en) * | 2014-12-17 | 2015-04-01 | 华为技术有限公司 | IO (Input/Output) equipment firmware upgrading device and IO equipment firmware upgrading method |
CN105635287A (en) * | 2015-12-31 | 2016-06-01 | 深圳市网心科技有限公司 | File transmission system and method |
CN106325947A (en) * | 2016-09-18 | 2017-01-11 | 北京方研矩行科技有限公司 | Method for upgrading OTA (over-the-air technology) firmware based on state machine |
-
2018
- 2018-09-10 CN CN201811049789.4A patent/CN109302456A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103347095A (en) * | 2013-07-22 | 2013-10-09 | 广州市交通信息中心 | Wireless firmware updating method used in vehicle networking system |
CN104484205A (en) * | 2014-12-17 | 2015-04-01 | 华为技术有限公司 | IO (Input/Output) equipment firmware upgrading device and IO equipment firmware upgrading method |
CN105635287A (en) * | 2015-12-31 | 2016-06-01 | 深圳市网心科技有限公司 | File transmission system and method |
CN106325947A (en) * | 2016-09-18 | 2017-01-11 | 北京方研矩行科技有限公司 | Method for upgrading OTA (over-the-air technology) firmware based on state machine |
Non-Patent Citations (1)
Title |
---|
徐凯.: "《IoT开发实战CoAP卷》", 31 October 2017 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112769949A (en) * | 2021-01-20 | 2021-05-07 | 杭州鸿泉物联网技术股份有限公司 | File transmission method and device, electronic equipment and storage medium |
CN113190249A (en) * | 2021-04-29 | 2021-07-30 | 华人运通(上海)云计算科技有限公司 | OTA-based vehicle control instruction block software package downloading method, device and system |
CN115460109A (en) * | 2022-11-11 | 2022-12-09 | 广州粤芯半导体技术有限公司 | Connection state detection method and device, computer equipment and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9774642B2 (en) | Method and device for pushing multimedia resource and display terminal | |
CN100527080C (en) | Method for software program synchronization | |
CN106462424A (en) | Method for updating terminal system, terminal and system | |
CN109302456A (en) | A kind of document transmission method and device based on aerial downloading OTA technology | |
CN105610966B (en) | Internet of things terminal and upgrading method thereof | |
CN110635957B (en) | Method and device for network distribution of Internet of things equipment and mobile terminal | |
CN110990482A (en) | Data synchronization method and device between asynchronous databases | |
KR102036579B1 (en) | Method and apparatus for providing a web service in a wireless communication system | |
CN102571820A (en) | Method used for transmitting data, compression server and terminal | |
CN103077061A (en) | Installing method of application software in Android equipment and system | |
CN111142905A (en) | OTA (over-the-air) upgrading method, OTA server and OTA upgrading system | |
CN105530630B (en) | A kind of OTA upgrade method and equipment | |
CN103618967A (en) | Method and device for interaction of mobile terminal and television end | |
CN103929784A (en) | User bandwidth control method, apparatus and system | |
CN102893560A (en) | Method and network device for transmitting data stream | |
CN102916907A (en) | Download method and system based on home gateway, and home gateway | |
EP2515601B1 (en) | Dial-up connection method and device of mobile data terminal | |
CN102761780A (en) | Method for obtaining media metadata by intelligent remote controller to | |
WO2023066046A1 (en) | Contract management method, apparatus and system | |
CN101951642A (en) | Method and device for regulating download speed of mobile terminal | |
CN102088696B (en) | Method and system for downloading large file from target server by mobile terminal | |
CN105471944A (en) | Network data sharing system, method and device | |
CN110856162B (en) | Network configuration method and related device | |
CN104079324A (en) | Data transmission method, electronic equipment and system | |
CN104660651A (en) | P2P connecting method, server, terminal and communication system |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190201 |