CN109814893A - Method for down loading, device, computer equipment and the storage medium of OTA upgrade package - Google Patents
Method for down loading, device, computer equipment and the storage medium of OTA upgrade package Download PDFInfo
- Publication number
- CN109814893A CN109814893A CN201711177197.6A CN201711177197A CN109814893A CN 109814893 A CN109814893 A CN 109814893A CN 201711177197 A CN201711177197 A CN 201711177197A CN 109814893 A CN109814893 A CN 109814893A
- Authority
- CN
- China
- Prior art keywords
- upgrade package
- ota upgrade
- keyword
- ota
- download
- 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
- 238000000034 method Methods 0.000 title claims abstract description 65
- 238000004590 computer program Methods 0.000 claims description 7
- 238000000605 extraction Methods 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 claims 1
- 239000002699 waste material Substances 0.000 abstract description 7
- 238000005516 engineering process Methods 0.000 abstract description 5
- 238000004891 communication Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000012795 verification Methods 0.000 description 6
- 239000000284 extract Substances 0.000 description 5
- 230000005611 electricity Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the present invention provides method for down loading, device, computer equipment and the storage medium of OTA upgrade package, belongs to field of communication technology.The method for down loading of the OTA upgrade package includes: when receiving the download instruction of OTA upgrade package, to obtain the download address of the OTA upgrade package;The partial document of the OTA upgrade package is downloaded from the download address, which includes the comment field of the OTA upgrade package;Parse the keyword that the comment field in the partial document carries;When the keyword of parsing is consistent with preset keyword, the complete OTA upgrade package is downloaded from the download address.The downloading accuracy of OTA upgrade package can be improved in the present invention, and the upgrade package of downloading mistake is avoided to cause the waste to bandwidth.
Description
Technical field
The present invention relates to fields of communication technology, more particularly to the method for down loading, device, computer equipment of OTA upgrade package
And storage medium.
Background technique
As the device category and quantity of various android clients are growing, and these device distributions are different
Place, the system that often requires that constantly upgrade to repair defect or provide better function.OTA (Over the Air: aerial
Downloading) upgrading be android system provide standard system software packet upgrading mode, it is powerful, mainly passes through network
(such as the networks such as WIFI, 3G/4G) downloading OTA upgrade package is upgraded automatically, since current android system function increasingly increases
By force, OTA upgrade package is also increasing, different from the APK application packet size having a single function at present, also implies that OTA upgrade package pair
The occupancy of bandwidth also will increase.
This OTA upgrading mode requires necessary first complete downloading OTA upgrade package at present, restarts system and enters Recover
Mode (reforestation practices) further verifies the correctness of version to determine whether version can be used to upgrade, if version is not required
The correspondence version packet to be upgraded, this mode just inevitably waste download bandwidth under limited resource.
It is used along with present more and more operators only allow producer to provide an image upgrade packet to complete online terminal
The upgrading at family, upgrade server, NM server are to be managed collectively and dispose in each operation commercial city, will not be according to the reality of each producer
Existing method carrys out customization server.In addition, if OTA upgrade package placed on upgrade server itself is problematic, e.g. one
Wrong version packet, current method have also only downloaded complete upgrade package just, it can be seen that being another situation again to lower carrier band
Wide waste.
Summary of the invention
In view of this, the purpose of the present invention is to provide a kind of method for down loading of OTA upgrade package, device, computer equipment
And storage medium, the downloading accuracy of OTA upgrade package can be improved, the upgrade package of downloading mistake is avoided to cause the wave to bandwidth
Take.
It is as follows that the present invention solves technical solution used by above-mentioned technical problem:
According to an aspect of the present invention, a kind of method for down loading of the OTA upgrade package provided, this method comprises:
When receiving the download instruction of OTA upgrade package, the download address of the OTA upgrade package is obtained;
The partial document of the OTA upgrade package is downloaded from the download address, which includes the OTA upgrade package
Comment field;
Parse the keyword that the comment field in the partial document carries;
When the keyword of parsing is consistent with preset keyword, the complete OTA liter is downloaded from the download address
Grade packet.
According to another aspect of the present invention, a kind of download apparatus of the OTA upgrade package provided, the device include:
Command reception module, when for receiving the download instruction of OTA upgrade package, with obtaining the downloading of the OTA upgrade package
Location;
First download module, for downloading the partial document of the OTA upgrade package from the download address, the partial document packet
Comment field containing the OTA upgrade package;
Parsing module, for parsing the keyword of the carrying of the comment field in the partial document;
Second download module, for when the keyword of parsing is consistent with preset keyword, from the download address
Download the complete OTA upgrade package.
Another invention according to the present invention, a kind of computer equipment provided, including memory, processor and be stored in
On memory and the computer program that can run on a processor, the processor realize above-mentioned OTA upgrading when executing the program
The method for down loading of packet.
Another invention according to the present invention, a kind of computer readable storage medium provided are stored thereon with computer
Program, the program realize the step in the method for down loading of above-mentioned OTA upgrade package when being executed by processor.
Method for down loading, device, computer equipment and the storage medium of a kind of OTA upgrade package provided in an embodiment of the present invention,
By the way that when receiving the download instruction of OTA upgrade package, first download package contains the OTA liter from the download address of OTA upgrade package
The partial document of the comment field of grade packet, when the keyword carried in the comment field, such as version number, version time, verification
When the market code that code and/or the OTA upgrade package are applicable in is identical as the keyword of expected setting, indicate in the download address
OTA upgrade package is correct upgrade package, and the complete OTA upgrade package is being downloaded to the upgrade package that can guarantee downloading at this time
It is exactly required upgrade file, improves the downloading accuracy of OTA upgrade package, the upgrade package of downloading mistake is avoided to cause to bandwidth
Waste.
Detailed description of the invention
Fig. 1 is the flow chart according to the method for down loading of the OTA upgrade package of one embodiment of the present of invention;
Fig. 2 is the flow chart according to the method for down loading of the OTA upgrade package of another embodiment of the present invention;
Fig. 3 is the schematic diagram according to EOCD field in the OTA upgrade package of one embodiment of the present of invention;
Fig. 4 is the flow chart according to the method for down loading of the OTA upgrade package of another embodiment of the present invention;
Fig. 5 is the flow chart according to the method for down loading of the OTA upgrade package of one more embodiment of the present invention;
Fig. 6 is the exemplary block diagram according to the download apparatus of the OTA upgrade package of one embodiment of the present of invention;
Fig. 7 is the schematic diagram of internal structure according to the computer equipment of one embodiment of the present of invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
In order to be clearer and more clear technical problems, technical solutions and advantages to be solved, tie below
Drawings and examples are closed, the present invention will be described in further detail.It should be appreciated that specific embodiment described herein is only
To explain the present invention, it is not intended to limit the present invention.
Fig. 1 is according to the flow chart of the method for down loading of the OTA upgrade package of one embodiment of the present of invention, below with reference to Fig. 1
Be described in detail the method for down loading of OTA upgrade package according to an embodiment of the invention, as shown in Figure 1, this method include with
Lower step S101 to step S104.
S101, when receiving the download instruction of OTA upgrade package, the download address of the OTA upgrade package is obtained.
In this embodiment, above-mentioned download instruction can be the order that the downloading of user's input updates, and can be calculating
When the system starting of machine equipment, the download instruction that system issues automatically be can also be when computer equipment meets certain triggering
Condition (such as connection WiFi and electricity be more than setting value) when, the download instruction for the OTA upgrade package that the system that receives is sent automatically,
Herein with no restrictions.
Wherein, the download address in the step can be upgrade server address, which can be web page interlinkage.
The download address can be the download address being locally stored, and be also possible to the download address that server issues, the present embodiment is to this
The source of download address is with no restrictions.
S102, the partial document that the OTA upgrade package is downloaded from the download address, the partial document include the OTA liter
The comment field of grade packet.
In one of them embodiment, as long as the partial document can cover the comment field of the OTA upgrade package.
Since OTA upgrade package belongs to the ZIP file of standard, provide that its comment field is located at ZIP file in the format of the ZIP file of standard
EOCD (end of central directory record: catalogue end of identification) field in, and the catalogue end of identification is deposited
It is the tail portion of entire compressed package, so can pass through in partial document of the downloading comprising the comment field of the OTA upgrade package
Existing http range technology downloading is located at the packet of last 4K size in the OTA upgrade package tail portion or so.
S103, the keyword that the comment field in the partial document carries is parsed.
In one of them embodiment, above-mentioned keyword includes at least one of following keyword: OTA upgrading
The version number of packet, the version time of the OTA upgrade package, the check code of the OTA upgrade package and the OTA upgrade package applicable market generation
Code.
In this embodiment it is possible to by searching for the EOCD field of the OTA upgrade package, then positioning in the EOCD field should
Then the comment field of upgrade package extracts the character being written in the comment field, finally come out the character resolution of extraction,
The keyword parsed is the keyword that the comment field carries.
S104, when the keyword of parsing is consistent with preset keyword, from the download address download completely should
OTA upgrade package.
In one of them embodiment, which includes but is not limited to: version number, version time, verification
Code and market code.
In one of them embodiment, judge that the keyword of parsing can be by such as with whether preset keyword is consistent
Under type: judge whether include the keyword of all parsings in preset keyword, if so, judging the pass of parsing
Key word is consistent with preset keyword.
For example according to the present embodiment usage scenario: preset keyword includes: version number, version time, verification
Code and market code, the keyword parsed include version number, check code and market code, if the version number parsed,
Check code and market code and preset version number, check code and market code are all the same, then may determine that the key of parsing
Word is consistent with preset keyword.
In one of them embodiment, which is located at the tail portion of the OTA upgrade package, should be from the download address
The step of downloading the partial document of the OTA upgrade package include:
Downloading is located at the partial document of the OTA upgrade package tail portion from the download address.
In this embodiment, since above-mentioned partial document belongs to a part of OTA upgrade package, with the OTA upgrade package
Download address is identical, therefore partial document and the complete OTA upgrading of the OTA upgrade package should be downloaded from same download address
Packet.
In one of them embodiment, the method for down loading of the OTA upgrade package further comprising the steps of (1) to (3).
(1), the feature string in the OTA upgrade package is inquired, the feature string is for positioning the comment field
Starting position.
According to the present embodiment example, the positioning that can be signed according to the EOCD in OTA upgrade package is located at the OTA and upgrades
The EOCD field of tail portion is wrapped, the field for indicating the annotation length of the OTA upgrade package is then searched in the EOCD field, can be incited somebody to action
Initial position of the latter one field adjacent with the field that this finds as the comment field.
(2), the keyword is compiled as corresponding character.
Wherein, which indicates the key message of the OTA upgrade package, such as version number, version time, check code, city
Field code etc..
(3) character of compiling is stored into the comment field.
In one of them embodiment, can according to from above-mentioned steps (1) determine comment field initial position,
The character of the compiling is stored since the initial position.
In one of them embodiment, the method for down loading of the OTA upgrade package further include:
When the keyword of parsing is not consistent with preset keyword, the message that the keyword is not consistent is exported.
According to the present embodiment example, the mode of the output shows output, is also possible to voice output, does not do herein
Limitation.When local terminal computer equipment is upgating object, the object exported in the step, which can be, is not consistent the keyword
Message is exported to local terminal, and when upgating object is to be updated to long-range computer equipment, the object exported in the step is also
It can be the other computer equipments to be updated of output.
The method for down loading of the OTA upgrade package in one of the embodiments, further include: when the keyword of parsing and default
Keyword when not being consistent, cancel and download the complete OTA upgrade package, exit upgrading process.
The present embodiment is by the way that when receiving the download instruction of OTA upgrade package, elder generation is under in the download address of OTA upgrade package
Load includes the partial document of the comment field of the OTA upgrade package, when the keyword carried in the comment field, such as version
Number, version time, check code and/or the OTA upgrade package it is applicable market code it is identical as the keyword of expected setting when, expression
OTA upgrade package in the download address is correct upgrade package, downloads and can protect by the complete OTA upgrade package at this time
The upgrade package of card downloading is exactly required upgrade file, improves the downloading accuracy of OTA upgrade package, avoids the liter of downloading mistake
Grade packet causes the waste to bandwidth.
Fig. 2 is according to the flow chart of the method for down loading of the OTA upgrade package of another embodiment of the present invention, below with reference to Fig. 2
The method for down loading of OTA upgrade package according to another embodiment of the present invention is described in detail, as shown in Fig. 2, this method includes upper
On the basis of stating step S101, S102 and S104, above-mentioned steps S103 further comprising the steps of S201 to S204.
S201, feature string in the partial document is inquired.
According to the present embodiment example, this feature character is used to mark the starting position of EOCD field, in standard ZIP
The starting position of regulation " 50 4B 05 06 " label EOCD field in the format of file.
S202, the starting position according to the comment field of this feature text string location OTA upgrade package.
According to the present embodiment example, length is annotated with " CA06 " label ZIP file, due to the annotation of key message
Field is located at behind the annotation length mark field, it is possible to by the latter one adjacent with the annotation length mark field
Initial position of the field as the comment field.
S203, since the starting position, extract the character in the comment field.
S204, by the character resolution be corresponding keyword.
Wherein, the OTA upgrade package of Android is the ZIP file of a standard, and ZIP file is recorded by several
(record) it constitutes, each record head has the label (signature) of a nybble to be used to distinguish different types of note
Record, the first two byte of all signatures are all " PK " (16 systems are 50 4B), and only latter two byte is had any different.
In various records, the most basic is EOCD field, and Fig. 3 is the OTA liter according to one embodiment of the present of invention
The schematic diagram of EOCD field in grade packet, as shown in figure 3, the label of the EOCD field is 16 systems " 50 4B 05 06 ", each
Have in zip file and only one this record, be mainly used for providing the position for the listed files for including in compressed package, catalogue
End of identification is present in the ending of entire compressed package, therefore EOCD must be searched for forward from tail of file.
Wherein, the field definition of EOCD such as following table (1):
Table (1)
Wherein, most latter two field " annotation length " and " notes content " can add the note of arbitrary content for ZIP file
It releases, so we can add version key message as the annotation of ZIP file.It is such to extend while being also compatible with
The standard universal of OTA file.
In key message we can with the key content of customized some versions, such as: version number, version time, school
Test code and applicable market code.These information are bundled in the last comment field of OTA packet when version makes.
A kind of method that the character resolution by comment field is corresponding keyword is present embodiments provided, positioning is passed through
To the initial position of the comment field, the character in the comment field is extracted, then by the character resolution of extraction be corresponding key
The parsing of the keyword carried to the comment field in partial document can be completed in word.
Fig. 4 is according to the flow chart of the method for down loading of the OTA upgrade package of another embodiment of the present invention, below with reference to Fig. 4
The method for down loading of OTA upgrade package according to still another embodiment of the invention is described in detail, as shown in figure 4, this method is including
On the basis of above-mentioned steps S101 to S104, further comprising the steps of S401 to S403.
S401, feature string in the OTA upgrade package is inquired, the feature string is for positioning the comment field
Starting position.
, can be since the tail portion of OTA upgrade package in one of them embodiment, search characteristics character string " 50 4B
05 06 ", to navigate to EOCD field, the fixed field length of this EOCD field is 22, and comment field length is then by two
Byte representation can be up to 65535 bytes.
Then according to " .ZIP file comment " field of this feature text string location to EOCD, length is by " .ZIP
File comment length " field provides, it is that the signature packets of OTA upgrade package can be placed on comment field finally, its length by
" signature length " field provides, such as the mark in Fig. 3.
S402, the keyword is compiled as corresponding character, obtains key message.
In one of them embodiment, which includes but is not limited to the version number of OTA upgrade package, OTA upgrading
The applicable market code etc. of the version time of packet, the check code of the OTA upgrade package and the OTA upgrade package.
S403, the character of compiling is stored into the comment field.
" .ZIP file comment " field is written into the key message, and accordingly modifies " .ZIP file comment
The value of length " and " annotation total length " field.
Before user prepares upgrading downloading OTA upgrade package, can first (it ensure from the packet that tail of file downloads last 4K size
Comment field can be covered) after, corresponding field is found according to the method being packaged above, extracts and is stored in OTA upgrade package
Key message in comment field.Key message is first checked, it is the upgrade package that user needs that information, which meets expression, this when is again
Download whole upgrade package, if verification key message is not met, would not waste bandwidth download.
Fig. 5 be according to the flow chart of the method for down loading of the OTA upgrade package of one more embodiment of the present invention, as shown in figure 5,
In the embodiment, the method for down loading of the OTA upgrade package includes the following steps S501 to S507:
S501, tail portion specified bytes are downloaded by http range;
S502, judge whether to find EOCD field, if so, the S503 that gos to step, otherwise, go to step S507;
S503, judge whether the comment field in EOCD meets the format of OTA packet, if so, the S504 that gos to step, no
Then, go to step S507;
S504, extract EOCD field in key message comment field;
S505, judge whether the key message in comment field matches with preset keyword, if so, going to step
S506, otherwise, go to step S507;
S506, start to download, prepare upgrading;
S507, deployment train are undesirable, refusal upgrading.
The information that the present embodiment needs additionally to carry required for the customized OTA packet of key message extracted according to version first
Content, then key message is added in OTA packet comment field when version is integrated, wherein mainly pass through following steps 1) extremely walk
It is rapid that key message 3) is added in OTA packet comment field when version is integrated:
1) the EOCD origin identification symbol of OTA packet is positioned;
Since OTA packet tail portion, 50 4B 05 06 of search characteristics character string, to navigate to EOCD, this record is fixed
Field length is 22, and comment field length is then by two byte representations -- it can at most increase the annotation information of 65535 bytes;
2) according to the definition of standard ZIP file EOCD field, comment field starting position is positioned;
3) customized key message field is added.
OTA packet " annotation " field is written into key message, and accordingly modifies " ZIP file annotation length " and " annotation overall length
The value of degree " field.
According to the upgrade server address issued before terminal prepares upgrading, it is finally several first to download OTA upgrading APMB package
Byte can cover comment field, extract critical field information, then be verified in advance according to the key message of extraction logical
It crosses, if entering upgrading by beginning to downloading OTA upgrade package, does not pass through, then without downloading OTA upgrade package.
The present embodiment is by storing included key message in a complete OTA upgrade package, to download in version
Before, some fields of position can be fixed in OTA upgrade package by first downloading, to judge in advance the key message of version, if symbol
The upgrade information of this version is closed, downloading integrated package can be just removed, incorrect upgrade package is avoided to cause customer upgrade band
Wide waste.
In order to achieve the above object, the present invention provides a kind of in an OTA upgrade file increases the side of key message
Method, OTA upgrade file are the ZIP file format compression packets of standard, and the Standard File Format according to ZIP file defines, and utilize ZIP
The comment field of file stores key message, and such upgrade package meets versatility, and can use a standard upgrade file
The pre- judgement of version correctness is completed, with alternative document, server does not have dependence.
According to the present embodiment example, the label of above-mentioned steps S101~S507 is not used to limit in the present embodiment
The sequencing of each step, the number of each step are intended merely to allow general reference step when describing each step
Label easily referred to, as long as each step execute sequence do not influence the present embodiment logical relation indicate
Within the scope of being claimed.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to be realized by hardware, but very much
In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing
The part that technology contributes can be embodied in the form of software products, which is stored in a storage
In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate
Machine, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
Fig. 6 be according to the exemplary block diagram of the download apparatus of the OTA upgrade package of one embodiment of the present of invention, below
The download apparatus of OTA upgrade package according to an embodiment of the invention is described in detail in conjunction with Fig. 6, as shown in fig. 6, the OTA
The download apparatus 100 of upgrade package includes command reception module 11, the first download module 12, parsing module 13 and the second download module
14.Wherein:
Command reception module 11 when for receiving the download instruction of OTA upgrade package, obtains the downloading of the OTA upgrade package
Address.
In this embodiment, above-mentioned download instruction can be the order that the downloading of user's input updates, and can be calculating
When the system starting of machine equipment, the download instruction that system issues automatically be can also be when computer equipment meets certain triggering
Condition (such as connection WiFi and electricity be more than setting value) when, the download instruction for the OTA upgrade package that the system that receives is sent automatically,
Herein with no restrictions.
Wherein, the download address in the step can be upgrade server address, which can be web page interlinkage.
The download address can be the download address being locally stored, and be also possible to the download address that server issues, the present embodiment is to this
The source of download address is with no restrictions.
First download module 12, for downloading the partial document of the OTA upgrade package from the download address, the partial document
It include the comment field of the OTA upgrade package.
In one of them embodiment, as long as the partial document can cover the comment field of the OTA upgrade package.
Since OTA upgrade package belongs to the ZIP file of standard, provide that its comment field is located at ZIP file in the format of the ZIP file of standard
EOCD (end of central directory record: catalogue end of identification) field in, and the catalogue end of identification is deposited
It is the tail portion of entire compressed package, so first download module 12 is in the portion of comment field of the downloading comprising the OTA upgrade package
When single cent part, it can be downloaded by existing http range technology and be located at the last 4K size or so in the OTA upgrade package tail portion
Packet.
Parsing module 13, for parsing the keyword of the carrying of the comment field in the partial document.
In one of them embodiment, above-mentioned keyword includes at least one of following keyword: OTA upgrading
The version number of packet, the version time of the OTA upgrade package, the check code of the OTA upgrade package and the OTA upgrade package applicable market generation
Code.
In this embodiment, which can be by searching for the EOCD field of the OTA upgrade package, then in the EOCD
The comment field of the upgrade package is positioned in field, the character being written in the comment field is then extracted, finally by the character of extraction
It parses, the keyword parsed is the keyword that the comment field carries.
Second download module 14, for when the keyword of parsing is consistent with preset keyword, from the download address
It is middle to download the complete OTA upgrade package.
In one of them embodiment, which includes but is not limited to: version number, version time, verification
Code and market code.
In one of them embodiment, judge that the keyword of parsing can be by such as with whether preset keyword is consistent
Under type: judge whether include the keyword of all parsings in preset keyword, if so, judging the pass of parsing
Key word is consistent with preset keyword.
For example according to the present embodiment usage scenario: preset keyword includes: version number, version time, verification
Code and market code, the keyword parsed include version number, check code and market code, if the version number parsed,
Check code and market code and preset version number, check code and market code are all the same, then may determine that the key of parsing
Word is consistent with preset keyword.
In one of them embodiment, which includes:
Query unit, the feature string for inquiring in the partial document.This feature character is for marking EOCD field
Starting position, in the format of standard ZIP file regulation with " 50 4B 05 06 " label EOCD field starting position;
Positioning unit, for the starting position according to the comment field of this feature text string location OTA upgrade package.Its
In, length can be annotated with " CA06 " label ZIP file, since the comment field of key message is located at the annotation length mark word
Behind section, it is possible to using the latter one field adjacent with the annotation length mark field as the starting of the comment field
Position;
Character extraction unit, for extracting the character in the comment field since the starting position;
Resolution unit, for being corresponding keyword by the character resolution.
First download module 12 is specifically used for downloading to be located at from the download address being somebody's turn to do in one of the embodiments,
The partial document of OTA upgrade package tail portion.
The download apparatus 100 of the OTA upgrade package in one of the embodiments, further include:
Character string enquiry module, the feature string for inquiring in the OTA upgrade package, the feature string is for fixed
The starting position of the position comment field;
Collector, for the keyword to be compiled as corresponding character;
Memory module, for storing the character of compiling into the comment field.
The download apparatus 100 of the OTA upgrade package in one of the embodiments, further include:
Output module, for exporting the keyword not phase when the keyword of parsing is not consistent with preset keyword
The message of symbol.
According to the present embodiment example, the mode of the output shows output, is also possible to voice output, does not do herein
Limitation.When local terminal computer equipment is upgating object, the object exported in the step, which can be, is not consistent the keyword
Message is exported to local terminal, and when upgating object is to be updated to long-range computer equipment, the object exported in the step is also
It can be the other computer equipments to be updated of output.
In one of them embodiment, above-mentioned keyword includes at least one of following keyword:
The version number of the OTA upgrade package, the version time of the OTA upgrade package, the OTA upgrade package check code and the OTA
The applicable market code of upgrade package.
In one of them embodiment, the download apparatus 100 of the OTA upgrade package further include:
Module is exited, for when the keyword of parsing is not consistent with preset keyword, cancelling downloading, this to be complete
OTA upgrade package exits upgrading process.
Wherein the meaning of above-mentioned first download module and " first " and " second " in the second download module is only that two
A download module is distinguish, be not used to limit which download module priority is higher or other limiting meanings.
Wherein, the modules for including in the download apparatus of the OTA upgrade package can fully or partially through software, hardware or
A combination thereof is realized.Further, the modules in the download apparatus of the OTA upgrade package can be for realizing corresponding function
Program segment.
The download apparatus of above-mentioned OTA upgrade package can be implemented as a kind of form of computer program, and computer program can be with
It is run in computer equipment as shown in Figure 7.
It should be noted that above-mentioned apparatus embodiment and embodiment of the method belong to same design, specific implementation process is detailed
See embodiment of the method, and the technical characteristic in embodiment of the method is corresponding applicable in Installation practice, which is not described herein again.
A kind of computer equipment provided according to one embodiment of present invention, including memory, processor and be stored in
On memory and the computer program that can run on a processor, the processor realize above-mentioned OTA upgrading when executing the program
The method for down loading of packet.
Fig. 7 is according to the schematic diagram of internal structure of the computer equipment of one embodiment of the present of invention, the computer equipment
It can be server.Referring to Fig. 7, which includes the processor connected by system bus, memory, input dress
It sets, display screen and network interface.Wherein, which includes non-volatile memory medium and built-in storage, the computer equipment
Non-volatile memory medium can storage program area and computer-readable instruction, which is performed, can
So that processor executes a kind of method for down loading of OTA upgrade package of each embodiment of the application, the specific implementation process of this method can
Referring to figs. 1 to the particular content of 5 each embodiments, details are not described herein.The processor of the computer equipment for provide calculate and
Control ability supports the operation of entire computer equipment.Computer-readable instruction can be stored in the built-in storage, the computer
When readable instruction is executed by processor, processor may make to execute a kind of method for down loading of OTA upgrade package.Computer equipment it is defeated
Enter input of the device for parameters, the display screen of computer equipment is for being shown, the network interface of computer equipment
For carrying out network communication, such as file download.It will be understood by those skilled in the art that structure shown in Fig. 7, only with
The block diagram of the relevant part-structure of application scheme, does not constitute the computer equipment being applied thereon to application scheme
Limit, specific computer equipment may include than more or fewer components as shown in the figure, perhaps combine certain components or
With different component layouts.
Memory in the present embodiment can be used for storing software program and various data.Memory can mainly include storage
Program area and storage data area, wherein storing program area can application program needed for storage program area, at least one function
Deng;Storage data area, which can be stored, uses created data etc. according to mobile phone.In addition, memory may include that high speed is deposited at random
Access to memory, can also include nonvolatile memory, a for example, at least disk memory, flush memory device or other easily
The property lost solid-state memory.
The present embodiment separately provides a kind of computer readable storage medium, is stored thereon with computer program, which is located
Reason device realizes each step in the method for down loading of above-mentioned OTA upgrade package when executing.
According to the present embodiment example, all or part of the process in above-described embodiment method can pass through calculating
Machine program is completed to instruct relevant hardware, and described program can be stored in a computer-readable storage medium, such as this hair
In bright embodiment, which be can be stored in the storage medium of computer system, and by least one of the computer system
Processor executes, and includes the process such as the embodiment of above-mentioned each method with realization.The storage medium includes but is not limited to magnetic disk, excellent
Disk, CD, read-only memory (Read-Only Memory, ROM) etc..
Method for down loading, device, computer equipment and the storage medium of a kind of OTA upgrade package provided in this embodiment, pass through
When receiving the download instruction of OTA upgrade package, first download package contains the OTA upgrade package from the download address of OTA upgrade package
Comment field partial document, when the keyword carried in the comment field, for example, version number, the version time, check code and/
Or the OTA upgrade package it is applicable market code it is identical as the keyword of expected setting when, indicate that the OTA in the download address upgrades
Packet is correct upgrade package, is exactly at this time institute the complete OTA upgrade package to be downloaded to the upgrade package that can guarantee downloading
The upgrade file needed, improves the downloading accuracy of OTA upgrade package, and the upgrade package of downloading mistake is avoided to cause the wave to bandwidth
Take.
Preferred embodiments of the present invention have been described above with reference to the accompanying drawings, not thereby limiting the scope of the invention.This
Without departing from the scope and spirit of the invention, there are many variations to implement the present invention by field technical staff, for example as one
The feature of a embodiment can be used for another embodiment and obtain another embodiment.It is all to use institute within technical concept of the invention
Any modifications, equivalent replacements, and improvements of work, should all be within interest field of the invention.
Claims (10)
1. a kind of method for down loading of OTA upgrade package, which is characterized in that the described method includes:
When receiving the download instruction of OTA upgrade package, the download address of the OTA upgrade package is obtained;
The partial document of the OTA upgrade package is downloaded from the download address, the partial document includes the OTA upgrading
The comment field of packet;
Parse the keyword that the comment field in the partial document carries;
When the keyword of parsing is consistent with preset keyword, the complete OTA is downloaded from the download address
Upgrade package.
2. the method according to claim 1, wherein the partial document is located at the tail portion of the OTA upgrade package,
The step of partial document that the OTA upgrade package is downloaded from the download address includes:
Downloading is located at the partial document of OTA upgrade package tail portion.
3. the method according to claim 1, wherein the comment field in the parsing partial document carries
Keyword the step of include:
Inquire the feature string in the partial document;
The starting position of the comment field of the OTA upgrade package is positioned according to the feature string;
Since the starting position, the character in the comment field is extracted;
It is corresponding keyword by the character resolution.
4. method according to any one of claims 1 to 3, which is characterized in that the method also includes:
The feature string in the OTA upgrade package is inquired, the feature string is used to position the beginning of the comment field
Position;
The keyword is compiled as corresponding character;
The character of compiling is stored into the comment field.
5. method according to any one of claims 1 to 3, which is characterized in that the method also includes:
When the keyword of parsing is not consistent with preset keyword, the message that the keyword is not consistent is exported.
6. method according to any one of claims 1 to 3, which is characterized in that the keyword includes in following keyword
At least one:
The version number of the OTA upgrade package, the version time of the OTA upgrade package, the check code of the OTA upgrade package and described
The applicable market code of OTA upgrade package.
7. a kind of download apparatus of OTA upgrade package, which is characterized in that described device includes:
Command reception module when for receiving the download instruction of OTA upgrade package, obtains the download address of the OTA upgrade package;
First download module, for downloading the partial document of the OTA upgrade package, the partial document from the download address
It include the comment field of the OTA upgrade package;
Parsing module, for parsing the keyword of the carrying of the comment field in the partial document;
Second download module, for when the keyword of parsing is consistent with preset keyword, from the download address
Download the complete OTA upgrade package.
8. device according to claim 6, which is characterized in that the parsing module includes:
Query unit, the feature string for inquiring in the partial document;
Positioning unit, the starting position of the comment field for positioning the OTA upgrade package according to the feature string;
Character extraction unit, for extracting the character in the comment field since the starting position;
Resolution unit, for being corresponding keyword by the character resolution.
9. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor
Calculation machine program, which is characterized in that the processor realizes the OTA liter such as any one of claims 1 to 6 when executing described program
The method for down loading of grade packet.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is processed
It realizes when device executes such as the step in any one of claim 1 to 6 the method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711177197.6A CN109814893A (en) | 2017-11-22 | 2017-11-22 | Method for down loading, device, computer equipment and the storage medium of OTA upgrade package |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711177197.6A CN109814893A (en) | 2017-11-22 | 2017-11-22 | Method for down loading, device, computer equipment and the storage medium of OTA upgrade package |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109814893A true CN109814893A (en) | 2019-05-28 |
Family
ID=66599867
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711177197.6A Pending CN109814893A (en) | 2017-11-22 | 2017-11-22 | Method for down loading, device, computer equipment and the storage medium of OTA upgrade package |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109814893A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111970689A (en) * | 2020-06-29 | 2020-11-20 | 百度在线网络技术(北京)有限公司 | OTA data packet generation method and device and electronic equipment |
CN112529759A (en) * | 2020-12-22 | 2021-03-19 | 北京百度网讯科技有限公司 | Document processing method, device, equipment, storage medium and computer program product |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102118640A (en) * | 2009-12-31 | 2011-07-06 | 乐金电子(中国)研究开发中心有限公司 | Digital television as well as software upgrading method and system thereof |
CN105933150A (en) * | 2016-04-20 | 2016-09-07 | 努比亚技术有限公司 | OTA upgrade method, device and system |
CN106909404A (en) * | 2015-12-22 | 2017-06-30 | 博雅网络游戏开发(深圳)有限公司 | Oftware updating method and system |
WO2017161947A1 (en) * | 2016-03-23 | 2017-09-28 | 广州视睿电子科技有限公司 | Multi-system ota upgrade method and multi-system device |
-
2017
- 2017-11-22 CN CN201711177197.6A patent/CN109814893A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102118640A (en) * | 2009-12-31 | 2011-07-06 | 乐金电子(中国)研究开发中心有限公司 | Digital television as well as software upgrading method and system thereof |
CN106909404A (en) * | 2015-12-22 | 2017-06-30 | 博雅网络游戏开发(深圳)有限公司 | Oftware updating method and system |
WO2017161947A1 (en) * | 2016-03-23 | 2017-09-28 | 广州视睿电子科技有限公司 | Multi-system ota upgrade method and multi-system device |
CN105933150A (en) * | 2016-04-20 | 2016-09-07 | 努比亚技术有限公司 | OTA upgrade method, device and system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111970689A (en) * | 2020-06-29 | 2020-11-20 | 百度在线网络技术(北京)有限公司 | OTA data packet generation method and device and electronic equipment |
CN112529759A (en) * | 2020-12-22 | 2021-03-19 | 北京百度网讯科技有限公司 | Document processing method, device, equipment, storage medium and computer program product |
CN112529759B (en) * | 2020-12-22 | 2024-05-14 | 北京百度网讯科技有限公司 | Document processing method, apparatus, device, storage medium, and computer program product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10212563B2 (en) | Updating web resources | |
CN105446769B (en) | Image file upgrade processing method, device and terminal device | |
CA2753020C (en) | Device dependent on-demand compiling and deployment of mobile applications | |
CN104598274B (en) | A kind of automatically instrument compiling installation method and system | |
CN107870787A (en) | Application plug loading method and system | |
CN102065118A (en) | Method for updating network equipment and device for implementing method | |
CN104699511B (en) | Plug-in unit upgrade method and device | |
CN106547576A (en) | The acquisition methods and device of configuration file | |
CN101958933A (en) | Method and device for upgrading terminal software | |
CN107797823B (en) | Business rule management method and device, storage medium and computer equipment | |
CN112559354A (en) | Front-end code specification detection method and device, computer equipment and storage medium | |
JP2001147826A (en) | Device and method for loading object from hash index of primary memory | |
CN106657361B (en) | A kind of Android installation kit OTA upgrade method that code addition is obscured | |
CN107632901A (en) | A kind of self-repair method and device of application program operation exception | |
CN103164237A (en) | Firmware upgrade method and system | |
CN109814893A (en) | Method for down loading, device, computer equipment and the storage medium of OTA upgrade package | |
CN109840103B (en) | Method and device for updating application program container and storage medium | |
CN106990988A (en) | The method and device that a kind of program updates | |
CN105988943B (en) | A kind of method and device driving wireless adapter | |
CN105094787B (en) | Method and device for processing enterprise internet application | |
CN111556127B (en) | Wearable device upgrading method and related device | |
US20120072900A1 (en) | Information providing apparatus, information processing apparatus, method for controlling the same, and program | |
CN112965732A (en) | Resource package obtaining method, intelligent wearable device and storage medium | |
CN104217021A (en) | Reading server, terminal equipment and method for displaying reading contents | |
CN104657184A (en) | Upgrading method by corresponding files to multi-embedded equipment |
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: 20190528 |