Summary of the invention
The embodiment of the invention provides a kind of version intelligent updating method and device of network-termination device, is used for shortening with less cost the version updating time of network-termination device.
On the one hand, the embodiment of the invention provides a kind of version intelligent updating method of network-termination device, and this method comprises: obtain the version updating instruction; Resolve said version updating instruction to obtain the version download address; Be connected to upgrade server according to said version download address,, accomplish the download of upgrading version through the BT download unit then if successful connection then utilizes the BT seed file of downloading transaction file on HTTP or the said upgrade server of FTP mode; Get nowhere if connect, then notify said upgrade server can't accomplish the BT seed file and download and withdraw from upgrading, carry out subsequent treatment by said upgrade server and obtain the BT seed file to guarantee said network-termination device; If saidly can't find the BT loading source, then utilize HTTP or FTP mode to download said renewal version from said upgrade server through said BT seed file.
Preferably, resolving said version updating instruction in the embodiment of the invention comprises to obtain the version download address: resolve said version updating instruction to obtain the file verification code character of version download address and renewal version.
Preferably; Resolving said version updating instruction in the embodiment of the invention also comprises after obtaining the version download address and upgrading the file verification code character of version: judge whether the file that upgrades version exists in this locality: if do not exist, then download the file of whole said renewal versions from upgrade server or other network-termination device; If exist; Then obtain the file verification code character of local file; The difference separation is obtained in file verification code character comparison according to file that upgrades version and local file; Duplicate the separation of difference described in local file data before to temporary file, and data to the said temporary file after upgrade server or the said difference separation of other network-termination device download.
Preferably, the method for the embodiment of the invention also comprises: externally provide file to upload in the time of through BT download unit down loading updating version and the down loading updating version externally provides file to upload after accomplishing constantly.
Preferably; Carrying out subsequent treatment by said upgrade server in the embodiment of the invention comprises: upgrade server issues said version updating instruction again; After perhaps said upgrade server strengthens the time interval between the version updating instruction that is handed down to said network-termination device, issue said version updating instruction more again.
On the other hand, the embodiment of the invention also provides a kind of version intelligent updating device of network-termination device, and this device comprises: instruction fetch unit is used to obtain the version updating instruction; The instruction resolution unit is used to resolve said version updating instruction to obtain the version download address; Linkage unit is used for being connected to upgrade server according to said version download address; First download unit is used for when said linkage unit connects the upgrade server success, utilizes HTTP or FTP mode to download the BT seed file of transaction file from said upgrade server; The BT download unit is used to utilize said BT seed file to accomplish the download of upgrading version through the BT downloading mode; Report the unit; Be used for when said linkage unit connection upgrade server is unsuccessful; Notify said upgrade server can't accomplish seed file and download and withdraw from upgrading, carry out subsequent treatment by said upgrade server and obtain the BT seed file to guarantee said network-termination device; Second download unit is used in the time can't finding the BT loading source through said BT seed file, utilizing HTTP or FTP mode to download said renewal version from said upgrade server.
Preferably, the instruction resolution unit in the embodiment of the invention also is used to resolve said version updating instruction to obtain the file verification code character of upgrading version.
Preferably, the embodiment of the invention also comprises: judging unit is used to judge whether the file that upgrades version exists in this locality; Local verification acquiring unit when being used for there has been the file that upgrades version in said judgment unit judges this locality, obtains the file verification code character of local file; Comparing unit, the file verification code character that is used to compare the file that upgrades version and local file is to obtain the difference separation; Copied cells is used to duplicate the separation of difference described in local file data before to temporary file; Said BT download unit and said second download unit when being used for there has been the file that upgrades version in said judgment unit judges this locality, are downloaded data to the said temporary file after the said difference separation.
Preferably, the BT download unit in the embodiment of the invention also is used in the down loading updating version, externally providing file to upload and the down loading updating version externally provides file to upload according to preset strategy after accomplishing.
On the other hand, the embodiment of the invention also provides a kind of network-termination device, comprises aforesaid version intelligent updating device.
Network-termination device is not all directly from server down loading updating version file in the version updating upgrading in the embodiment of the invention; Most of network-termination device is that the mode that the network-termination device from equity utilizes BT to download is obtained the renewal version; Thereby extenuated the pressure of upgrade server; Configuration requirement for upgrade server also greatly lowers, and has reduced cost, in addition owing to do not need equipment up to ten thousand to be connected to the download that upgrade server carries out the upgraded edition presents simultaneously; Can realize that also the all-network terminal equipment upgrades simultaneously, significantly shorten the version updating time.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Be illustrated in figure 1 as the schematic flow sheet of the version intelligent updating method of a kind of network-termination device that the embodiment of the invention provides, present embodiment is the description of being done from the network-termination device side, and this method comprises the steps:
S101: obtain the version updating instruction, this version updating instruction both can be that upgrade server issues, and also can be that the server at the service provider place of network-termination device issues.
S102: resolve the version updating instruction to obtain the version download address, the version download address here is meant the address at upgrade server place.
S103: be connected to upgrade server according to said version download address,, get nowhere, then get into step S104 if connect if successful connection then gets into step S105.
In the present embodiment; Network-termination device can be set a timeout interval or expired times, if perhaps connect the request that upgrade server has been admitted network-termination device in the number of times at this interval, just representes successful connection; If network-termination device is reaction not, then expression connects unsuccessful.
S104: the notice upgrade server can't be accomplished the BT seed file and download and withdraw from upgrading.
In the present embodiment, upgrade server can be carried out scheduled operation and guarantee that said network-termination device obtains the BT seed file after receiving the notice that can't download the BT seed file that network-termination device reports.In the present embodiment, this scheduled operation is such as issuing said version updating instruction more again for after issuing said version updating instruction again, perhaps strengthen the time interval between the version updating instruction that is handed down to said network-termination device.
S105: utilize HTTP or FTP mode to download the BT seed file of transaction file from upgrade server.
S106: judge in a period of time whether can't find the BT loading source, if then get into step S107, otherwise get into step S108 through above-mentioned BT seed file.
S107: utilize HTTP or FTP mode from upgrade server down loading updating version.
It is later that some network-termination device possibly start renewal; Not had equipment this moment is that this renewal version has been done kind; Therefore when whether it can't find the BT loading source through above-mentioned BT seed file in a period of time; In order to guarantee normal upgrading, can also pass through HTTP or FTP mode from upgrade server down loading updating version.
S108: accomplish the download of upgrading version through the BT download unit.
As one embodiment of the present of invention; In through BT download unit down loading updating version, can also externally provide file to upload and the down loading updating version can externally provide file to upload according to preset strategy after accomplishing; The preset strategy here can be controlled the duration that externally provides file to upload after the down loading updating version is accomplished, this preset strategy such as can for: receive that upgrade server sends close upload function before all externally provide file to upload constantly; After downloading completion, externally provide file to upload in the setting-up time section; Perhaps close the upload function of most of network-termination devices, file upload function etc. is provided and keep the sub-fraction network-termination device by the upgrade server decision.
Network-termination device is not all directly from server down loading updating version file in the version updating upgrading in the embodiment of the invention; Most of network-termination device is that the mode that the network-termination device from equity utilizes BT to download is obtained the renewal version; Thereby extenuated the pressure of upgrade server; Configuration requirement for upgrade server also greatly lowers, and has reduced cost, in addition owing to do not need equipment up to ten thousand to be connected to the download that upgrade server carries out the upgraded edition presents simultaneously; Can realize that also the all-network terminal equipment upgrades simultaneously, significantly shorten the version updating time.
Be illustrated in figure 2 as the schematic flow sheet of the version intelligent updating method of the another kind of network-termination device that the embodiment of the invention provides, this method comprises the steps:
S201: obtain the version updating instruction, this version updating instruction both can be that upgrade server issues, and also can be that the server at the service provider place of network-termination device issues.
S202: resolve the version updating instruction to obtain the file verification code character of version download address and renewal version.It is that unit divides with the piece that the file verification sign indicating number is meant file; Through every piece (1k or 2k etc.) data generation check results of certain character string checking algorithm (MD5, CHECKSUM, DES, CRC-8, CRC-16, CRC-32 etc.) to file; And the file verification code character is meant that a large amount of file verification sign indicating numbers connects together the sequence of composition; Each element is a file verification sign indicating number, thereby the file verification code character can be used for the whole file of verification.
S203: judge whether the file that upgrades version exists in this locality, if do not exist, then gets into step S204, if exist, then gets into step S205.It is pointed out that this locality of indication has existed the file that upgrades version to be meant the local file identical with the file identification of this renewal version that exist in embodiments of the present invention, do not represent the local file content that exists identical with the file content that upgrades version.
S204: from the file of upgrade server or the whole said renewal versions of other network-termination device download.This step specifically can repeat no more at this referring to pairing step S103-S107 among Fig. 1 embodiment.
S205: the file verification code character of obtaining local file.
S206: the difference separation is obtained in the file verification code character comparison according to file that upgrades version and local file.The difference separation here is meant: when the application program of redaction or system file are downloaded; File verification code character through contrast server end version and local file version; Find out first different position of two file verification sign indicating numbers (except the file header), this position just is called the difference separation.It is thus clear that, through this difference separation can be just with the file that reflects redaction and the similarity degree of local file.
S207: duplicate data before the difference separation in the local file to temporary file.In order to reduce the downloaded files amount that needs, can directly the data before the difference separation in the local file be copied in the temporary file, only need to download difference separation data afterwards then and get final product.
S208: data to the said temporary file after upgrade server or the said difference separation of other network-termination device download.This step specifically also can be referring to pairing step S103-S107 among Fig. 1 embodiment, and different is with step S204, only needs to download the data after the difference separation in this step, and need not to download all data.
After having downloaded all data through step S208, can be with the file replacement local file of the renewal version in the temporary file, to accomplish the renewal of redaction.
Network-termination device is not all directly from server down loading updating version file in the version updating upgrading in the embodiment of the invention; Most of network-termination device is that the mode that the network-termination device from equity utilizes BT to download is obtained the renewal version; Thereby extenuated the pressure of upgrade server; Configuration requirement for upgrade server also greatly lowers, and has reduced cost, in addition owing to do not need equipment up to ten thousand to be connected to the download that upgrade server carries out the upgraded edition presents simultaneously; Can realize that also the all-network terminal equipment upgrades simultaneously, significantly shorten the version updating time.
Be illustrated in figure 3 as the structural representation of the version intelligent updating device of a kind of network-termination device that the embodiment of the invention provides, this device comprises: instruction fetch unit 310, instruction resolution unit 320, linkage unit 330, first download unit 340, BT download unit 350, report the unit 360 and second download unit 370.
Instruction fetch unit 310 is used to obtain the version updating instruction, and this version updating instruction both can be that upgrade server issues, and also can be that the server at the service provider place of network-termination device issues.
Instruction resolution unit 320 is used to resolve version updating instruction that instruction fetch unit 310 obtained to obtain the version download address.The version download address here is meant the address at upgrade server place.
Linkage unit 330 is used for being connected to upgrade server according to the version download address.
First download unit 340 is used for when linkage unit 330 connects the upgrade server success; Utilize HTTP or FTP mode to download the BT seed file of transaction file from upgrade server; And report unit 360 to be used for when linkage unit 330 connection upgrade servers are unsuccessful; The notice upgrade server can't be accomplished seed file and download and withdraw from upgrading, carries out subsequent treatment by upgrade server and obtains the BT seed file to guarantee said network-termination device.
In the present embodiment; Network-termination device can be set a timeout interval or expired times, if perhaps connect the request that upgrade server has been admitted network-termination device in the number of times at this interval, just representes successful connection; If network-termination device is reaction not, then expression connects unsuccessful.
In the present embodiment, upgrade server can be carried out scheduled operation and guarantee that said network-termination device obtains the BT seed file after receiving the notice that can't download the BT seed file that network-termination device reports.In the present embodiment, this scheduled operation is such as issuing said version updating instruction more again for after issuing said version updating instruction again, perhaps strengthen the time interval between the version updating instruction that is handed down to said network-termination device.
BT download unit 350 is used to utilize the BT seed file to accomplish the download of upgrading version through the BT downloading mode.
As one embodiment of the present of invention, BT download unit 350 in the down loading updating version, can also externally provide file to upload and the down loading updating version can externally provide file to upload after accomplishing constantly.
Second download unit 370 is used in the time can't finding the BT loading source through said BT seed file, utilizing HTTP or FTP mode to download said renewal version from said upgrade server.
Network-termination device is not all directly from server down loading updating version file in the version updating upgrading in the embodiment of the invention; Most of network-termination device is that the mode that the network-termination device from equity utilizes BT to download is obtained the renewal version; Thereby extenuated the pressure of upgrade server; Configuration requirement for upgrade server also greatly lowers, and has reduced cost, in addition owing to do not need equipment up to ten thousand to be connected to the download that upgrade server carries out the upgraded edition presents simultaneously; Can realize that also the all-network terminal equipment upgrades simultaneously, significantly shorten the version updating time.
Be illustrated in figure 4 as the structural representation of the version intelligent updating device of the another kind of network-termination device that the embodiment of the invention provides, this device comprises: instruction fetch unit 410, instruction resolution unit 420, linkage unit 430, first download unit 440, BT download unit 450, report unit 460, second download unit 470, judging unit 480, local verification acquiring unit 490, comparing unit 500 and copied cells 510.
Instruction fetch unit 410 is used to obtain the version updating instruction.
Instruction resolution unit 420 is used to resolve the version updating instruction with the file verification code character to obtain renewal version download address and to upgrade version.
Judging unit 480 judges whether the file that upgrades version exists in this locality after instruction resolution unit 420 is resolved the version updating instruction.
Local verification acquiring unit 490 is used for when judging unit 480 judges that there has been the file that upgrades version in this locality, obtaining the file verification code character of local file.
Comparing unit 500 is used to compare the file verification code character of the file that upgrades version and local file to obtain the difference separation.
Copied cells 510 is used to duplicate the separation of difference described in local file data before to temporary file.
Linkage unit 430 be used for when judging unit 480 judge local when not upgrading the file of version, perhaps when copied cells 510 with the data before the difference separation to temporary file, the connection upgrade server.
First download unit 440, BT download unit 450, report the corresponding units among the corresponding embodiment in the unit 460 and second download unit 470 and Fig. 3 similar, repeat no more at this.
Network-termination device is not all directly from server down loading updating version file in the version updating upgrading in the embodiment of the invention; Most of network-termination device is that the mode that the network-termination device from equity utilizes BT to download is obtained the renewal version; Thereby extenuated the pressure of upgrade server; Configuration requirement for upgrade server also greatly lowers, and has reduced cost, in addition owing to do not need equipment up to ten thousand to be connected to the download that upgrade server carries out the upgraded edition presents simultaneously; Can realize that also the all-network terminal equipment upgrades simultaneously, significantly shorten the version updating time.
Be illustrated in figure 5 as the structural representation of a kind of network-termination device that the embodiment of the invention provides, this network-termination device 600 comprises aforesaid version intelligent updating device 601, and this network-termination device 600 is such as being terminal equipments such as Home eNodeB.Can repeat no more at this referring to aforesaid description for version intelligent updating device 601.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method; Can instruct relevant hardware to accomplish through computer program; Described program can be stored in the computer read/write memory medium; This program can comprise the flow process like the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
Above-described specific embodiment; The object of the invention, technical scheme and beneficial effect have been carried out further explain, and institute it should be understood that the above is merely specific embodiment of the present invention; And be not used in qualification protection scope of the present invention; All within spirit of the present invention and principle, any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.