Summary of the invention
In view of the above problems, the present invention has been proposed in order to a kind of overcome the problems referred to above or a kind of device for the treatment of program upgrade that addresses the above problem at least in part, system and corresponding a kind of method for the treatment of program upgrade are provided.
According to one aspect of the present invention, a kind of method for the treatment of program upgrade is provided, comprising:
Generate an executable file, described executable file is used for: will deposit described executable file data field in for the upgrade data that is used for upgrading of the upgrade data of original installation and follow-up new acquisition, and at specified bytes position or the data segment store list file data in described upgrade data district; Comprising of described listing file data recording: the file feature information of installation data and each upgrade data, and installation data and each upgrade data byte location or the data segment in the data field, stored;
Program upgrade downloading process based on described executable file comprises:
Receive the program upgrade download request of client;
According to described program upgrade download request, obtain the first row list file data of specifying byte location or data segment storage in the described executable file data field and the secondary series list file data of obtaining corresponding client executable file, and the file feature information of more described first row list file data and secondary series list file data, judge whether the upgrade data that exists client not download;
If exist, then according to the described upgrade data of listing file data recording at the byte location of in the data field, storing or data segment, from described executable file data field, extract upgrade data and institute's upgrade data offered client downloads;
Wherein, the check information that also comprises the upgrade data section in the described listing file data in the file feature information of each upgrade data;
Further, behind the complete described upgrade data of described client downloads, calculate the check information of described upgrade data, and the check information of this upgrade data in described check information and the listing file data is compared;
If verification is passed through, then store described upgrade data section;
If the verification failure then notifies client described upgrade data mistake.
Optionally, described according to described program upgrade download request, obtain the first row list file data of specifying byte location or data segment storage in the described executable file data field and the secondary series list file data of obtaining corresponding client executable file, and the file feature information of more described first row list file data and secondary series list file data, judge whether that the data that exist client not download comprise:
From the specified bytes position or data segment of described executable file data field, extract first row list file data;
The notice client is with the secondary series list file data upload in its executable file;
The file feature information of secondary series list file data and first row list file data is compared byte location or data segment that the upgrade data that the client of acquisition is not downloaded is stored in described executable file data field.
Optionally, described according to described program upgrade download request, obtain the first row list file data of specifying byte location or data segment storage in the described executable file data field and the secondary series list file data of obtaining corresponding client executable file, and the file feature information of more described first row list file data and secondary series list file data, judge whether that the upgrade data that exists client not download comprises:
From the specified bytes position or data segment of described executable file data field, extract first row list file data and offer client downloads;
Receive the upgrade data download request that client sends; Described upgrade data download request comprises: extract local secondary series list file data by client, and with the file feature information of secondary series list file data and first row list file data relatively after, byte location or data segment that the upgrade data that the client of acquisition is not downloaded is stored in described executable file data field.
Optionally, described file feature information with secondary series list file data and first row list file data compares, and byte location or data segment that the data that the client of acquisition is not downloaded are stored in described executable file data field comprise:
With the file feature information of each upgrade data in the first row list file data, and compare with the file feature information of each upgrade data in the secondary series list file data, judge whether to occur new file feature information;
If new file feature information do not occur, can judge that then client downloads finishes;
If there is new file feature information, then from described new corresponding byte location or the data segment of file feature information of listing file extracting data.
Optionally, the file feature information of each upgrade data in the described listing file is successively used journal by upgrading; Described upgrade data successively uses sequential storage by upgrading in described executable file.
Optionally, described file feature information with secondary series list file data and first row list file data compares, and byte location or data segment that the data that the client of acquisition is not downloaded are stored in described executable file data field comprise:
One by one the file feature information of upgrade data in the file feature information of upgrade data in the first row list file data and this secondary series list file data is compared in order, judge whether to occur new file feature information;
If there is new file feature information, then stop comparison, and from described new corresponding byte location or the data segment of file feature information of listing file extracting data.
Optionally, byte location or data segment that the described upgrade data of not downloading according to described client is stored in described executable file data field, extract data and described upgrade data offered client downloads and comprise from the data field of executable file:
The byte stream that begins to extract upgrade data from the described byte location of executable file or data segment sends to client.
According to another aspect of the present invention, a kind of device for the treatment of program upgrade is provided, comprising:
The executable file generation module, be suitable for generating an executable file, described executable file is used for: will deposit described executable file data field in for the upgrade data that is used for upgrading of the upgrade data of original installation and follow-up new acquisition, and at specified bytes position or the data segment store list file data in described upgrade data district; Comprising of described listing file data recording: the file feature information of installation data and each upgrade data, and installation data and each upgrade data byte location or the data segment in the data field, stored;
The upgrade request receiver module is suitable for receiving the program upgrade download request of client;
Judge module, be suitable for according to described program upgrade download request, obtain the first row list file data of specifying byte location or data segment storage in the described executable file data field and the secondary series list file data of obtaining corresponding client executable file, and the file feature information of more described first row list file data and secondary series list file data, judge whether the upgrade data that exists client not download;
Upgrade data provides module, exist if be suitable for, then according to the described upgrade data of listing file data recording at the byte location of in the data field, storing or data segment, from described executable file data field, extract upgrade data and institute's upgrade data offered client downloads;
Wherein, the check information that also comprises the upgrade data section in the described listing file in the file feature information of each upgrade data;
Further, also comprise in described client:
Correction verification module, be suitable for the complete described upgrade data of described client downloads after, calculate the check information of described upgrade data, and the check information of this upgrade data in described check information and the listing file data compared;
If verification is passed through, then store described upgrade data section;
If the verification failure then notifies client described upgrade data mistake.
Optionally, described judge module comprises:
First row list file extraction module one is suitable for from the specified bytes position or data segment of described executable file data field, extracts first row list file data;
Secondary series list file acquisition module one is suitable for notifying client with the secondary series list file data upload in its executable file;
The first judge module is suitable for the file feature information of secondary series list file data and first row list file data is compared byte location or data segment that the upgrade data that the client of acquisition is not downloaded is stored in described executable file data field.
Optionally, described judge module comprises:
First row list file extraction module two is suitable for from the specified bytes position or data segment of described executable file data field, extracts first row list file data and offers client downloads;
Upgrade data download request receiver module is suitable for receiving the upgrade data download request that client sends; Described upgrade data download request comprises: extract local secondary series list file data by client, and with the file feature information of secondary series list file data and first row list file data relatively after, byte location or data segment that the upgrade data that the client of acquisition is not downloaded is stored in described executable file data field.
Optionally, described judge module comprises:
The second judge module is suitable for the file feature information with each upgrade data in the first row list file data, and compares with the file feature information of each upgrade data in the secondary series list file data, judges whether to occur new file feature information; If new file feature information do not occur, can judge that then client downloads finishes; If there is new file feature information, then from described new corresponding byte location or the data segment of file feature information of listing file extracting data.
Optionally, the file feature information of each upgrade data in the described listing file is successively used journal by upgrading; Described upgrade data successively uses sequential storage by upgrading in described executable file.
Optionally, described judge module comprises:
The second judge module is suitable in order one by one the file feature information of upgrade data in the file feature information of upgrade data in the first row list file data and this secondary series list file data is compared, and judges whether to occur new file feature information;
If there is new file feature information, then stop comparison, and from described new corresponding byte location or the data segment of file feature information of listing file extracting data.
Optionally, described upgrade data provides module to comprise:
The first extraction module, the byte stream that is suitable for beginning to extract from the described byte location of executable file or data segment upgrade data sends to client.
A kind of method for the treatment of program upgrade according to the present invention can be at server with all various data that are suitable for upgrading, be arranged in the same executable file with initial installation procedure, then in this executable file, specify a fixed position to deposit the listing file data, the file feature information of the data segment that is suitable for upgrading of described listing file data various version, this document characteristic information comprise that the data segment that respectively is suitable for upgrading is stored in the position in this executable file; So based on this executable file, when client is upgraded to original product, then at first obtain the listing file data of this executable file assigned address from server, it is resolved and compares with local listing file data, judge whether to exist the data segment of needs download, if exist then download this data from this data segment position of executable file described in the server, can upgrade.
The present invention has solved in the prior art thus:
At first owing to need to be consistent between the file of each version, so along with the rolling up of version, the corresponding quantity of documents of various version increases, and the conforming logic that causes keeping the various version file also becomes increasingly complex;
Secondly, owing to there is the file of various version in the server, cause the catalogue File too much, and for the upgrade request of certain client, its storage of server lookup corresponding to the file of described upgrade request the time, need the file of traversal also very huge, affect server performance.
Again, inconvenient for store and management because the corresponding document number is relatively a lot, and take also large problem of storage space;
The present invention has obtained following beneficial effect:
At first, upgrade data and installation procedure file only have a executable file, need not do the redaction installation procedure for up-to-date user, and all installation procedure versions only have portion, have so fully guaranteed the FileVersion consistance;
Secondly, and greatly reduce file quantity, guarantee the efficient of whois lookup file;
Again, the file amount is very little, can carry out buffer memory to file targetedly, improves the download efficiency of server; Can also greatly save at last the beneficial effect of disk storage space.
Above-mentioned explanation only is the general introduction of technical solution of the present invention, for can clearer understanding technological means of the present invention, and can be implemented according to the content of instructions, and for above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Although shown exemplary embodiment of the present disclosure in the accompanying drawing, yet should be appreciated that and to realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order to understand the disclosure more thoroughly that these embodiment are provided, and can with the scope of the present disclosure complete convey to those skilled in the art.
It shows the schematic flow sheet of a kind of embodiment of the method one for the treatment of program upgrade of the present invention with reference to Fig. 1, specifically can comprise:
Step S100, generate an executable file, described executable file is used for: will deposit described executable file data field in for the upgrade data that is used for upgrading of the upgrade data of original installation and follow-up new acquisition, and at specified bytes position or the data segment store list file data in described upgrade data district; Comprising of described listing file data recording: the file feature information of installation data and each upgrade data, and installation data and each upgrade data byte location or the data segment in the data field, stored;
In embodiments of the present invention, for installation procedure an executable file can be set, the .exe in executable file such as the windows system wherein, the isostructural file of .dll.Wherein, such as Fig. 3, it shows executable file (is the PE file, the PE file is called as the full name that portable executable is Portable Execute, common EXE, DLL, OCX, SYS, COM are the PE files) disk file organization, executable file comprises DOS file header, PE head, Sections table, code segment, reorientation data segment and data field (being each data segment).At the place that begins of a PE file, we can see a DOS file header, and it makes any PE file all is an effective MS-DOS executable file.File header (pressing the COFF form) afterwards, be used for illustrating which kind of machine will be this binary file will operate on, the time of minute several sections, link, be executable file or DLL, etc., the back comprises Section table, i.e. " data directory " array; These catalogues comprise the pointer of each " section " data of many sensings.Be exactly data segment afterwards, the content in each joint is only you and carries out a real requirement of program, the installation logic of code segment and reorientation data segment storage products, and assigned address has been stored the listing file data in the data field, and has stored upgrade data.The content of described listing file data recording comprises: be stored in the file feature information that respectively is suitable for the upgrade data of upgrading in the data field of described executable file, described file feature information comprises the file feature information of each upgrade data and byte location or the data segment in the data field of relative executable file.
Original upgrade data of the present invention (can be understood as initial installation procedure), and follow-up upgrade data (can be understood as follow-up AKU) is arranged in the executable file by above-mentioned steps.
In embodiments of the present invention, from server side implementation process of the present invention is described.
Program upgrade downloading process based on described executable file comprises:
Step S110, the program upgrade download request of reception client;
Client can send program upgrade and download request to server, carries out program upgrade with announcement server for this client and downloads flow process.Concrete program upgrade download request can comprise the identity information of client, such as IP address information etc.
Step S120, according to described program upgrade download request, obtain the first row list file data of specifying byte location or data segment storage in the described executable file data field and the secondary series list file data of obtaining corresponding client executable file, and the file feature information of more described first row list file data and secondary series list file data, judge whether the upgrade data that exists client not download;
There are first row list file data in specified bytes position in the executable file that server side provides or data segment, deposit the secondary series list file data of corresponding executable file in client, the file feature information of first row list file data and the file feature information of secondary series list file data can be compared so, judge the file feature information that whether has the upgrade data that client do not download in the executable file of server side, thereby can know the upgrade data that whether exists client not download in the executable file of server side.
Optionally, described according to described program upgrade download request, obtain the first row list file data of specifying byte location or data segment storage in the described executable file data field and the secondary series list file data of obtaining corresponding client executable file, and the file feature information of more described first row list file data and secondary series list file data, judge whether that the data that exist client not download comprise:
Step S11, server extract first row list file data from the specified bytes position or data segment of described executable file data field;
Server extracts first row list file data from the specified bytes position or data segment of the executable file data field of server side.
Step S12, the server notification client is with the secondary series list file data upload in its executable file;
The server notification client is with the secondary series list file data upload in the executable file in the client
Step S13, server compares byte location or data segment that the upgrade data that the client of acquisition is not downloaded is stored with the file feature information of secondary series list file data and first row list file data in described executable file data field.
Server compares byte location or data segment that the upgrade data that the client of acquisition is not downloaded is stored with the file feature information of secondary series list file data and first row list file data in described executable file data field.
Optionally, described according to described program upgrade download request, obtain the first row list file data of specifying byte location or data segment storage in the described executable file data field and the secondary series list file data of obtaining corresponding client executable file, and the file feature information of more described first row list file data and secondary series list file data, judge whether that the upgrade data that exists client not download comprises:
Step S21, server extract first row list file data and offer client downloads from the specified bytes position or data segment of described executable file data field;
Step S22, client is extracted local secondary series list file data, and with the file feature information of secondary series list file data and first row list file data relatively after, byte location or data segment that the upgrade data that the client of acquisition is not downloaded is stored in described executable file data field;
Step S23, the byte location that the upgrade data that client is not downloaded according to described client is stored in described executable file data field or data segment generate the upgrade data download request, and the upgrade data that sends downloads request to server;
Step S24, server receives the upgrade data download request that client sends.
Be that server receives the upgrade data download request that client sends, and described upgrade data download request comprise byte location or data segment that upgrade data that client is not downloaded is stored in described executable file data field.
Optionally, described file feature information with secondary series list file data and first row list file data compares, and byte location or data segment that the data that the client of acquisition is not downloaded are stored in described executable file data field comprise:
Step S31 with the file feature information of each upgrade data in the first row list file data, and compares with the file feature information of each upgrade data in the secondary series list file data, judges whether to occur new file feature information;
Step S32 if new file feature information do not occur, can judge that then client downloads finishes;
Step S33 is if there is new file feature information, then from described new corresponding byte location or the data segment of file feature information of listing file extracting data.
Optionally, the file feature information of each upgrade data in the described listing file is successively used journal by upgrading; Described upgrade data successively uses sequential storage by upgrading in described executable file.
Be about in upgrade data deposits server in by the upgrading sequencing the data field of executable file.
Further, described file feature information with secondary series list file data and first row list file data compares, and byte location or data segment that the data that the client of acquisition is not downloaded are stored in described executable file data field comprise:
Step S41 compares the file feature information of upgrade data in the file feature information of upgrade data in the first row list file data and this secondary series list file data in order one by one, judges whether to occur new file feature information;
Step S42 if there is new file feature information, then stops comparison, and from described new corresponding byte location or the data segment of file feature information of listing file extracting data.
Because store in order in the executable file, listing file data in specified bytes position or the data segment also can be carried out record in order so, so then can be in order one by one the file feature information of upgrade data in the file feature information of upgrade data in the first row list file data and this secondary series list file data be compared, judge whether to occur new file feature information, if there is new file feature information, then stop comparison, the so savable relatively time.
Step S130, if exist, then according to the described upgrade data of listing file data recording at the byte location of in the data field, storing or data segment, from described executable file data field, extract upgrade data and institute's upgrade data offered client downloads.
Pointed out because of the upgrade data download request and to have extracted data from which position of executable file and offer client downloads to upgrade, server can according to each position of this prompting, extract data and offer client downloads from executable file so.
Optionally, at front step S52, situation under, byte location or data segment that the described upgrade data of not downloading according to described client is stored in described executable file data field, from the data field of executable file, extract data and described upgrade data offered client downloads and comprise:
Step S42, the byte stream that begins to extract upgrade data from the described byte location of executable file or data segment sends to client.
Owing to use the upgrade data of sequential storage during executable file by upgrading, only pointed out the relative executable file skew byte that the starting position begins to download, this step can be from the skew byte of this prompting so, the data that exist after it are extracted entirely offer client downloads, thereby can not make mistakes, also only need judge beginning deviation post and final end position because of server, and it goes without doing other extra position judgment, thereby improve judgement and the download efficiency of server.
The check information that wherein, also can comprise the upgrade data section in the described listing file data in the file feature information of each upgrade data;
Calculate the MD5 value such as the data content of upgrade data section being MD5 (MD5, message digest algorithm the 5th edition), correspondence is stored.
Further comprise:
Step D11 behind the complete described upgrade data of described client downloads, calculates the check information of described upgrade data, and the check information of this upgrade data in described check information and the listing file data is compared;
Carry out MD5 such as the content of each upgrade data section that download is obtained and calculate, with the MD5 value that calculates, the MD5 value of downloading in the listing file data that obtain should data segment storing with preceding step compares.
Step D12 if verification is passed through, then stores described upgrade data section;
If the MD5 value is identical, then verification is passed through, and then stores described upgrade data section.
Step D13 is if the verification failure then notifies client described upgrade data mistake.
If the MD5 value is identical, then verification failure then notifies client described upgrade data mistake, needs again to download etc.
With reference to Fig. 2, the schematic flow sheet that it shows a kind of embodiment of the method two for the treatment of program upgrade of the present invention specifically can comprise:
Step 100, generate an executable file, described executable file is used for: will deposit described executable file data field in for the upgrade data that is used for upgrading of the upgrade data of original installation and follow-up new acquisition, and at specified bytes position or the data segment store list file data in described upgrade data district; Comprising of described listing file data recording: the file feature information of installation data and each upgrade data, and installation data and each upgrade data byte location or the data segment in the data field, stored;
Step 110, the program upgrade download request of reception client;
Client can send program upgrade and download request to server, carries out program upgrade with announcement server for this client and downloads flow process.Concrete program upgrade download request can comprise the identity information of client, such as IP address information etc.
In addition, before this step, also can comprise: server can be according to the update status of current executable file, and the notice client is carried out program upgrade and downloaded.
Upgraded such as the upgrade data of server with executable file, then can notify each client that program is upgraded.
Step 120 from the specified bytes position or data segment of described executable file data field, is extracted first row list file data and is offered client downloads;
In embodiments of the present invention, for installation procedure an executable file can be set, the .exe in executable file such as the windows system wherein, the isostructural file of .dll.Wherein, such as Fig. 3, it shows executable file (is the PE file, the PE file is called as the full name that portable executable is Portable Execute, common EXE, DLL, OCX, SYS, COM are the PE files) disk file organization, executable file comprises DOS file header, PE head, Sections table, code segment, reorientation data segment and data field (being each data segment).At the place that begins of a PE file, we can see a DOS file header, and it makes any PE file all is an effective MS-DOS executable file.File header (pressing the COFF form) afterwards, be used for illustrating which kind of machine will be this binary file will operate on, the time of minute several sections, link, be executable file or DLL, etc., the back comprises Section table, i.e. " data directory " array; These catalogues comprise the pointer of each " section " data of many sensings.Be exactly data segment afterwards, the content in each joint is only you and carries out a real requirement of program, the installation logic of code segment and reorientation data segment storage products, and assigned address has been stored the listing file data in the data field, and has stored upgrade data.Comprising of described listing file data recording content: be stored in the file feature information that respectively is suitable for the upgrade data of upgrading in the data field of described executable file, described file feature information comprises the file feature information of each upgrade data and byte location or the data segment of relative executable file.
In executable file, all there is the skew byte in the starting position of the relative executable file of each data segment, which skew byte of can making an appointment so begins the store list file data, and the information such as file feature information, skew byte that comprise that are about to the upgrade data that is suitable for upgrading are stored in this byte that specifies Offsets.The server and client side can specify the listing file data that read this byte that specifies Offsets to process when upgrading flow process so.
Preferably, the file feature information of each upgrade data in the described listing file is successively used journal by upgrading; Described upgrade data successively uses sequential storage by upgrading in described executable file.
Successively use the order of upgrade data during namely according to installation, upgrade data is pressed this sequential storage in the data field, use in order upgrade data a1, a2, a3 during such as installation, so can be forward in the data segment skew byte of data area stores a1, the data segment of storage a2 is right after behind a1, and the data segment of storage a3 is right after behind a2.
So in this step, after server receives the program upgrade download request of client, according to this program upgrade download request for executable file, at first the byte location of appointment or data segment extract the listing file data from the executable file data field, offer client downloads.In the specific data district, relatively the skew byte of executable file starting position be m1 to deviation post be data segment between the m2 position, extract the byte stream of this position data section, provide it to client downloads.Wherein, such as Fig. 3, the deviation post of executable file starting position is 0.
Step 130 receives the upgrade data download request that client sends; Described upgrade data download request comprises: extract local secondary series list file data by client, and with the file feature information of secondary series list file data and first row list file data relatively after, byte location or data segment that the upgrade data that the client of acquisition is not downloaded is stored in described executable file data field;
After client arrives described listing file data, client can compare the file feature information of the file feature information in the listing file data with local this program, judge whether whether file feature information in the listing file data of current download exists the file feature information of each upgrade data section that this locality do not have, need upgrading with the program that judges whether client.If exist, extract so byte location or the data segment of the relative executable file of described upgrade data section, such as the skew byte of relative executable file starting position, then generate the upgrade data download request according to this byte location or data segment.
Concrete, the byte location in the described executable file or data segment are compared described listing file data and local listing file data by client and comprise:
Steps A 11, client is resolved the file feature information of each upgrade data in the listing file data of downloading, and compare with the file feature information of each upgrade data in the client terminal local listing file data, judge whether to occur new file feature information;
Client will be saved to from the byte stream that server is downloaded the listing file data that obtain the corresponding local table data file, then resolve the file feature information of each upgrade data that records in this listing file, such as file feature information, the information such as byte location or data segment.
In the present invention, client is the file feature information in the listing file data of current download, compares with file feature information in the local listing file data, and whether judge in the listing file data of current download has new file feature information to occur.
Steps A 12 if new file feature information do not occur, can judge that then download finishes;
If the new file feature information of outlet not, client can the determining program current version be latest edition so, and then downloading process finishes, not regeneration and send the upgrade data download request.
Steps A 13 if there is new file feature information, is then extracted described new corresponding byte location or the data segment of file feature information, and is generated described upgrade data download request based on described byte location or data segment.
If the file feature information that outlet is new, byte location in the executable file data field or the data segment of the upgrade data section that then the extraction document characteristic information is corresponding, such as the skew byte of relative executable file starting position, then generate the upgrade data download request based on this byte location or data segment.
Further, the file feature information of each upgrade data in described listing file is successively used journal by upgrading; Described upgrade data successively uses on the basis of sequential storage by upgrading in described executable file, and the byte location in the described executable file or data segment are compared described listing file data and local listing file data by client and comprise:
Step B11, client compares the file feature information of upgrade data in the file feature information of upgrade data in the listing file data of downloading and the local listing file data in order one by one, judges whether to occur new file feature information;
Namely store the sequencing of the file feature information of each upgrade data from the listing file data, one by one with the file feature information of upgrade data section in the listing file of current download, compare with the file feature information of the upgrade data section of this locality.
Step B12 if new file feature information do not occur, can judge that then download finishes.
Step B13 if there is new file feature information, then stops comparison, and extracts described byte location or the data segment of described new upgrade data, and generates described upgrade data download request based on described byte location or data segment.
When new upgrade data section occurring, namely during new file feature information, then the residue file feature information in the table data of current download is no longer compared, saving resource consumes.Then generate upgrade request based on current new corresponding byte location or the data segment of file feature information.
Step 140, is extracted upgrade data and institute's upgrade data is offered client downloads at the byte location of storing in the data field or data segment according to the described upgrade data of listing file data recording from described executable file data field.
Pointed out because of the upgrade data download request and to have extracted data from which position of executable file and offer client downloads to upgrade, server can according to each position of this prompting, extract data and offer client downloads from executable file so.
Optionally, the file feature information of each upgrade data in the previous list file is successively used journal by upgrading; Described upgrade data successively uses sequential storage and step B11 to the basis of step B13 by upgrading in described executable file, described according to described upgrade data download request, extract upgrade data from described byte location or the data segment of executable file, offer client downloads and comprise:
Step C11, according to described upgrade data download request, the byte stream that begins to extract upgrade data from the described byte location of executable file or data segment sends to client;
Owing to use the upgrade data of sequential storage during executable file by upgrading, and in the upgrade data request that step B13 generates, only pointed out the relative executable file skew byte that the starting position begins to download, this step can be from the skew byte of this prompting so, the data that exist after it are extracted entirely offer client downloads, thereby can not make mistakes, also only need judge beginning deviation post and final end position because of server, and it goes without doing other extra position judgment, thereby judgement and the download efficiency of server have been improved.
In addition, in described table data file, also can comprise the file size (be 500 bytes such as size) of upgrade data section, further, comprise during described client:
Described client is stored as the byte stream that receives the local upgrade data file of corresponding upgrade data section one by one according to the file size of each upgrade data section.
Beginning to extract data to client downloads such as server from executable file skew byte 1000 byte locations, is 500 bytes and begin first file a1 size from this position, and second file a2 is 800 bytes, and the 3rd file a3 is 300 bytes.
Server is offset 1000 bytes from executable file and extracts data to client so, client judges that the total amount of byte that receives was by 500 o'clock, then this section byte stream is saved as a1, the byte stream that receives adds up at 1300 o'clock, then the byte stream between the 800-1300 is saved as a2, the byte stream that receives adds up at 1600 o'clock, then the byte stream between the 1300-1600 is saved as a3.
The check information that wherein, also can comprise the upgrade data section in the described listing file data in the file feature information of each upgrade data;
Calculate the MD5 value such as the data content of upgrade data section being MD5 (MD5, message digest algorithm the 5th edition), correspondence is stored.
Further comprise:
Step D11 behind the complete described upgrade data of described client downloads, calculates the check information of described upgrade data, and the check information of this upgrade data in described check information and the listing file data is compared;
Carry out MD5 such as the content of each upgrade data section that download is obtained and calculate, with the MD5 value that calculates, the MD5 value of downloading in the listing file data that obtain should data segment storing with preceding step compares.
Step D12 if verification is passed through, then stores described upgrade data section;
If the MD5 value is identical, then verification is passed through, and then stores described upgrade data section.
Step D13 is if the verification failure then notifies client described upgrade data mistake.
If the MD5 value is identical, then verification failure then notifies client described upgrade data mistake, needs again to download etc.
So client then can be upgraded based on the new upgrade data file that download obtains according to logic is installed.
With reference to Fig. 4, the structural representation that it shows the embodiment of a kind of device for the treatment of program upgrade of the application comprises:
Executable file generation module 310, be suitable for generating an executable file, described executable file is used for: will deposit described executable file data field in for the upgrade data that is used for upgrading of the upgrade data of original installation and follow-up new acquisition, and at specified bytes position or the data segment store list file data in described upgrade data district; Comprising of described listing file data recording: the file feature information of installation data and each upgrade data, and installation data and each upgrade data byte location or the data segment in the data field, stored;
Upgrade request receiver module 320 is suitable for receiving the program upgrade download request of client;
Judge module 330, be suitable for according to described program upgrade download request, obtain the first row list file data of specifying byte location or data segment storage in the described executable file data field and the secondary series list file data of obtaining corresponding client executable file, and the file feature information of more described first row list file data and secondary series list file data, judge whether the upgrade data that exists client not download;
Upgrade data provides module 340, exist if be suitable for, then according to the described upgrade data of listing file data recording at the byte location of in the data field, storing or data segment, from described executable file data field, extract upgrade data and institute's upgrade data offered client downloads;
Wherein, the check information that also comprises the upgrade data section in the described listing file in the file feature information of each upgrade data;
Further, also comprise in described client:
Correction verification module, be suitable for the complete described upgrade data of described client downloads after, calculate the check information of described upgrade data, and the check information of this upgrade data in described check information and the listing file data compared;
If verification is passed through, then store described upgrade data section;
If the verification failure then notifies client described upgrade data mistake.
Optionally, described judge module comprises:
First row list file extraction module one is suitable for from the specified bytes position or data segment of described executable file data field, extracts first row list file data;
Secondary series list file acquisition module one is suitable for notifying client with the secondary series list file data upload in its executable file;
The first judge module is suitable for the file feature information of secondary series list file data and first row list file data is compared byte location or data segment that the upgrade data that the client of acquisition is not downloaded is stored in described executable file data field.
Optionally, described judge module comprises:
First row list file extraction module two is suitable for from the specified bytes position or data segment of described executable file data field, extracts first row list file data and offers client downloads;
Upgrade data download request receiver module is suitable for receiving the upgrade data download request that client sends; Described upgrade data download request comprises: extract local secondary series list file data by client, and with the file feature information of secondary series list file data and first row list file data relatively after, byte location or data segment that the upgrade data that the client of acquisition is not downloaded is stored in described executable file data field.
Optionally, described judge module comprises:
The second judge module is suitable for the file feature information with each upgrade data in the first row list file data, and compares with the file feature information of each upgrade data in the secondary series list file data, judges whether to occur new file feature information; If new file feature information do not occur, can judge that then client downloads finishes; If there is new file feature information, then from described new corresponding byte location or the data segment of file feature information of listing file extracting data.
Optionally, the file feature information of each upgrade data in the described listing file is successively used journal by upgrading; Described upgrade data successively uses sequential storage by upgrading in described executable file.
Optionally, described judge module comprises:
The second judge module is suitable in order one by one the file feature information of upgrade data in the file feature information of upgrade data in the first row list file data and this secondary series list file data is compared, and judges whether to occur new file feature information;
If there is new file feature information, then stop comparison, and from described new corresponding byte location or the data segment of file feature information of listing file extracting data.
Optionally, described upgrade data provides module to comprise:
The byte stream that begins to extract upgrade data from the described byte location of executable file or data segment sends to client.
Optionally, described upgrade data extraction module comprises:
The first extraction module is suitable for according to described upgrade data download request, and the byte stream that begins to extract upgrade data from the described byte location of executable file or data segment sends to client.
With reference to Fig. 5, the structural representation that it shows a kind of system embodiment of program upgrade download comprises:
Server 410 and client 420;
Described server 410 comprises:
Upgrade request receiver module 411 is suitable for receiving the program upgrade download request of client;
Listing file extraction module 412 is suitable for from the specified bytes position or data segment of described executable file data field, extracts first row list file data and offers client downloads;
Upgrade data download request receiver module 413 is suitable for receiving the upgrade data download request that client sends; Described upgrade data download request comprises: extract local secondary series list file data by client, and with the file feature information of secondary series list file data and first row list file data relatively after, byte location or data segment that the upgrade data that the client of acquisition is not downloaded is stored in described executable file data field;
Upgrade data extraction module 414, be suitable for described upgrade data according to the listing file data recording at the byte location of in the data field, storing or data segment, from described executable file data field, extract upgrade data and institute's upgrade data is offered client downloads.
Described client 420 comprises:
Upgrade request sending module 421 is suitable for sending described program upgrade download request;
Comparison module 422, be suitable for extracting local secondary series list file data by client, and with the file feature information of secondary series list file data and first row list file data relatively after, byte location or data segment that the upgrade data that the client of acquisition is not downloaded is stored in described executable file data field;
Upgrade data download request generation module 423 is suitable for generating described upgrade data download request based on described byte location or data segment;
Upgrade data download request sending module 424 is suitable for sending described upgrade data download request;
Wherein, the check information that also comprises the upgrade data section in the described listing file in the file feature information of each upgrade data;
Accordingly, also comprise in described client:
Correction verification module, be suitable for the complete described upgrade data of described client downloads after, calculate the check information of described upgrade data, and the check information of this upgrade data in described check information and the listing file data compared;
If verification is passed through, then store described upgrade data section;
If the verification failure then notifies client described upgrade data mistake.
Optionally, the file feature information of each upgrade data in the described listing file is successively used journal by upgrading; Described upgrade data successively uses sequential storage by upgrading in described executable file.
Optionally, in described client, described comparison module comprises:
Resolve comparison module, be suitable for client and resolve the file feature information of each upgrade data in the listing file data of downloading, and compare with the file feature information of each upgrade data in the client terminal local listing file data, judge whether to occur new file feature information;
If new file feature information do not occur, can judge that then download finishes;
If there is new file feature information, then extract described new corresponding byte location or the data segment of file feature information, change upgrade data download request generation module over to.
Optionally, described comparison module comprises:
The order comparison module, be suitable for client and one by one the file feature information of upgrade data in the file feature information of upgrade data in the listing file data of downloading and the local listing file data compared in order, judge whether to occur new file feature information;
If there is new file feature information, then stop comparison, and extract described byte location or the data segment of described new upgrade data, and change upgrade data download request generation module over to.
Optionally, described upgrade data extraction module comprises:
The first extraction module is suitable for according to described upgrade data download request, and the byte stream that begins to extract upgrade data from the described byte location of executable file or data segment sends to client;
Intrinsic not relevant with any certain computer, virtual system or miscellaneous equipment with demonstration at this algorithm that provides.Various general-purpose systems also can be with using based on the teaching at this.According to top description, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also for any certain programmed language.Should be understood that and to utilize various programming languages to realize content of the present invention described here, and the top description that language-specific is done is in order to disclose preferred forms of the present invention.
In the instructions that provides herein, a large amount of details have been described.Yet, can understand, embodiments of the invention can be put into practice in the situation of these details not having.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the description to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes in the above.Yet the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires the more feature of feature clearly put down in writing than institute in each claim.Or rather, as following claims reflected, inventive aspect was to be less than all features of the disclosed single embodiment in front.Therefore, follow claims of embodiment and incorporate clearly thus this embodiment into, wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can adaptively change and they are arranged in one or more equipment different from this embodiment the module in the equipment among the embodiment.Can be combined into a module or unit or assembly to the module among the embodiment or unit or assembly, and can be divided into a plurality of submodules or subelement or sub-component to them in addition.In such feature and/or process or unit at least some are mutually repelling, and can adopt any combination to disclosed all features in this instructions (comprising claim, summary and the accompanying drawing followed) and so all processes or the unit of disclosed any method or equipment make up.Unless in addition clearly statement, disclosed each feature can be by providing identical, being equal to or the alternative features of similar purpose replaces in this instructions (comprising claim, summary and the accompanying drawing followed).
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature rather than further feature included among other embodiment, the combination of the feature of different embodiment means and is within the scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with array mode arbitrarily.
All parts embodiment of the present invention can realize with hardware, perhaps realizes with the software module of moving at one or more processor, and perhaps the combination with them realizes.It will be understood by those of skill in the art that and to use in practice microprocessor or digital signal processor (DSP) to realize some or all some or the repertoire of parts for the treatment of in the device of program upgrade according to the embodiment of the invention a kind of.The present invention can also be embodied as part or all equipment or the device program (for example, computer program and computer program) that is suitable for carrying out method as described herein.Such realization program of the present invention can be stored on the computer-readable medium, perhaps can have the form of one or more signal.Such signal can be downloaded from internet website and obtain, and perhaps provides at carrier signal, perhaps provides with any other form.
It should be noted above-described embodiment the present invention will be described rather than limit the invention, and those skilled in the art can design alternative embodiment in the situation of the scope that does not break away from claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and is not listed in element or step in the claim.Being positioned at word " " before the element or " one " does not get rid of and has a plurality of such elements.The present invention can realize by means of the hardware that includes some different elements and by means of the computing machine of suitably programming.In having enumerated the unit claim of some devices, several in these devices can be to come imbody by same hardware branch.The use of word first, second and C grade does not represent any order.Can be title with these word explanations.