A kind of method for making of difference bag and deviceTechnical field
The present invention relates to technical field of data processing, particularly relate to a kind of method for making of difference bag.
Background technology
Existing OTA (Over ?the ?AirTechnology, over the air) upgrading have two types, this two type respectively: IncrementOTA (increment/difference) and FullOTA (whole bag).
Whole bag upgrading is due to the mirror image of the size relatively whole firmware of upgrade file, and down loading updating bag will be a very very long process.The advantage of difference is smaller, more easily controls relative to whole bag.Easily find out, during current all kinds of smart machine system upgrade, generally use difference bag to upgrade, all the more so in android system.Reason is just that its volume is far smaller than the upgrading of full dose bag.
The producing principle of System level gray correlation subpackage is each file difference in reference source version and target version, and is made into patch, and then generates upgrade script, and the additions and deletions embodied between version change difference.Part and the script of difference is only comprised in difference bag.
For intelligent terminal such as TV, because intelligent television has the screen of multiple size usually, even if model of the same race, the hardware system of the TV of corresponding different size often and incomplete same, the TV of such as different size has different power amplifiers and requires, in order to tackle this kind equipment, the TV often for each size all constantly completes upgrading renewal on the complete machine version sequence of oneself.
But in the difference bag method for making of complete machine version of the prior art, mainly focus on the making completing bag how fast, mainly be embodied in relatively going up of difference, also i.e. the comparing of difference between upgrade file with original, it often carries the data of the hardware aspect of complete machine version, such as, the device A having three hardware incomplete same B C need to do difference upgrading, the content of upgrading is only the renewal of the application APP of installation, but because the hardware information of equipment is different, when making difference bag, need the difference AKU of making three versions, the differentiation of the difference AKU of these three versions is that the hardware information that script file is wherein corresponding is different, like this, although the software content of upgrading is identical, but only because hardware information is not identical, the AKU having to make multiple version removes adaptive different hardware version, in the process of exploitation AKU, waste cost of development and testing cost greatly, occupy more system server resource.
Summary of the invention
The embodiment of the present application is by providing a kind of method for making and device of difference bag, to solve in prior art when software upgrades is identical, the AKU making multiple version for terminal that hardware information is not identical is needed to remove adaptive corresponding hardware information, waste development& testing cost, and occupy the problem of more system server resource, the application makes the terminal device of different size can share the file destination of a version.
On the one hand, the embodiment of the present application provides a kind of method for making of difference bag, comprising:
According to the version information that M station terminal equipment reports, determine the source file to be upgraded in the current version file bag of described M station terminal equipment, M be more than or equal to 1 positive integer;
If the source file of described M station terminal equipment is all identical, the filtercondition corresponding according to the type configuration of described source file to be upgraded;
According to described filtercondition, the difference bag that based target file and source file make is carried out file filtering, described M station terminal equipment can be adapted to make the difference bag after filtering file.
Further, the step of the described filtercondition corresponding according to the type configuration of described source file to be upgraded is specially:
Obtain the system architecture layer belonging to described source file to be upgraded;
If the system architecture layer belonging to described source file to be upgraded is positioned at more than Android inner nuclear layer, then obtain the patch file that terminal hardware information to be upgraded is corresponding;
Determine the instruction of patch file described in filtering as filtercondition corresponding to described source file to be upgraded.
Further, the step that the described filtration corresponding according to the type configuration of described source file to be upgraded regulates is specially:
Judge whether described source file to be upgraded includes image file;
If not, obtain, get the patch file that terminal hardware information to be upgraded is corresponding;
Determine the instruction of patch file described in filtering as filtercondition corresponding to described source file to be upgraded.
Further, described method comprises further, if below the system architecture layer displacement Android inner nuclear layer belonging to described source file to be upgraded, then send the first instruction to server, described first instruction makes difference bag for stopping.
Further, described method comprises further, if described source file to be upgraded includes image file, then sends the second instruction to server, and described second instruction makes difference bag for stopping.
Further, after judging that the system architecture layer belonging to described source file to be upgraded is positioned at the step of more than Android inner nuclear layer, also comprise:
If the system architecture layer described in described source file to be upgraded is positioned at Android application layer, then send the 3rd instruction to server, described 3rd instruction is used to indicate server and generates difference bag corresponding to described source file to be upgraded.
On the other hand, the embodiment of the present application additionally provides a kind of producing device of difference bag, and described device comprises:
Determination module, for the version information reported according to M station terminal equipment, determines the source file to be upgraded in the current version file bag of described M station terminal equipment, M be more than or equal to 1 positive integer;
Filter configuration module, if all identical for the source file of described M station terminal equipment, the filtercondition corresponding according to the type configuration of described source file to be upgraded;
Difference bag control module, for according to described filtercondition, carries out file filtering by the difference bag that based target file and source file make, can adapt to described M station terminal equipment to make the difference bag after filtering file.
A kind of difference bag method for making provided in the embodiment of the present application, first according to the version information that M station terminal equipment reports, determine the source file to be upgraded in the current version file bag of described M station terminal equipment, if secondly the source file of described M station terminal equipment is all identical, the filtercondition corresponding according to the type configuration of described source file to be upgraded, the software information that the identical explanation of source file terminal device to be upgraded will be upgraded is substantially identical, in the process making difference bag, some escalation process can be introduced and irrelevant redundant information of upgrading, last according to described filtercondition, the difference bag that based target file and source file make is carried out file filtering, described M station terminal equipment can be adapted to make the difference bag after filtering file, compared with prior art, owing to adding, the type of source file to be upgraded is judged, according to type, different filterconditions is set, therefore the upgrading mode of certain situation is corresponded to, according to filtercondition, difference bag is carried out file filtering, remaining after filtering will be to supply all spendable difference AKU of all terminals, therefore the application does not need to make corresponding difference AKU respectively to the terminal of each different size, save development& testing cost, and more system server resource can not be taken.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the method for making of a kind of difference bag in the embodiment of the present application one;
Fig. 2 is the module map of the producing device of a kind of difference bag in the embodiment of the present application one;
Embodiment
The embodiment of the present application is by providing a kind of method for making and device of difference bag, to solve in prior art when software upgrades is identical, the AKU making multiple version for terminal that hardware information is not identical is needed to remove adaptive corresponding hardware information, waste development& testing cost, and occupy the problem of more system server resource, the application makes the terminal device of different size can share the file destination of a version.
In order to better understand technique scheme, below in conjunction with Figure of description and concrete embodiment, technique scheme is described in detail.
Embodiment one
The embodiment of the present application provides a kind of method for making of difference bag, and as shown in Figure 1, method comprises:
Step S101: the version information reported according to M station terminal equipment, determines the source file to be upgraded in the current version file bag of described M station terminal equipment, M be more than or equal to 1 positive integer;
Step S102: if the source file of described M station terminal equipment is all identical, the filtercondition corresponding according to the type configuration of described source file to be upgraded;
Step S103: according to described filtercondition, carries out file filtering by the difference bag that based target file and source file make, can adapt to described M station terminal equipment to make the difference bag after filtering file.
For M station terminal equipment, source file content to be upgraded is identical, when server end is compiled by compilation tool, use the benefit of difference upgrading apparent, so you do not need to download complete 8M file, only need down loading updating part just passable, and renewal part may only have 3,4M, can reduce the loss of flow to a great extent.Existing compile mode i.e. difference upgrading or the principle of making increment upgrade very simple, namely first the legacy version of terminal and redaction are done difference, obtain the patch of the part upgraded, the source file of such as legacy version has 5M, redaction have 8M, the part upgraded then may only have about 3M (to it should be noted that here, the difference bag size obtained not is simply subtract each other, because in fact need to comprise some context-sensitive things, also corresponding hardware information can namely be introduced), such as the TV B of a TV A and screen 40 cun of screen 30 cun needs to carry out difference upgrading, although their content of upgrading may be system-level dynamic library file, the library file of such as power amplifier, when compiling, due to the principle of work of compiler, inevitably the dimension information of terminal i.e. hardware information can be introduced, like this, developer needs the difference AKU making two versions to A and the B terminal of two kinds of sizes respectively, this is obviously the process and the manpower that waste exploitation, and the test link afterwards also compares consumes resources, also can take the resource of system server simultaneously.
According to the version information that M station terminal equipment reports, version information have recorded the version at the system place used in terminal, also the source file to be upgraded in the current version file bag of described M station terminal equipment is namely determined, the application needs to judge that whether the source file of M station terminal equipment is identical, the identical pure software content that namely upgrading of this M station terminal equipment needs is described is identical, now, in theory, this M station terminal equipment is the difference bag that can share a upgrading, can possess same software capability.The filtercondition corresponding according to the type configuration of described source file to be upgraded, make according to described filtercondition, the difference bag that based target file and source file make is carried out file filtering, described M station terminal equipment can be adapted to make the difference bag after filtering file.
In actual applications, assuming that we will carry out following upgrading, namely the additions and deletions that a few station terminal completes said function are changed, size A terminal to upgrade then AKU from A1 ?>A2; Size B terminal will be upgraded, then AKU from B1 ?>B2; Size C terminal will be upgraded, then AKU from C1 ?>C2.
Whether we need to classify to the file in process, can adopt following manner of comparison to judge a file X should be disallowable:
A kind of situation, assuming that meet the following conditions after carrying out longitudinal depth ratio to file X:
1) A1 ?do not change in >A2 process, i.e. A1:X==A2:X
2) B1 ?do not change in >B2 process, i.e. B1:X==B2:X
3) C1 ?do not change in >C2 process, i.e. C1:X==C2:X
This illustrates that in the AKU that we are final, X file is without any change before and after upgrading, then X file is unwanted for whole upgrading, and this X file may be the file of the identification hardware information of terminal ABC self.
Contrary, meet the following conditions after the supposition of another situation carries out lateral depth to file X: A2:X==B2:X==C2:X, no matter then the relation of X file in A1/B1/C1, can make X file in difference AKU as complete file in AKU.
A kind of difference bag method for making provided in the embodiment of the present application, first according to the version information that M station terminal equipment reports, determine the source file to be upgraded in the current version file bag of described M station terminal equipment, if secondly the source file of described M station terminal equipment is all identical, the filtercondition corresponding according to the type configuration of described source file to be upgraded, the software information that the identical explanation of source file terminal device to be upgraded will be upgraded is substantially identical, in the process making difference bag, some escalation process can be introduced and irrelevant redundant information of upgrading, last according to described filtercondition, the difference bag that based target file and source file make is carried out file filtering, described M station terminal equipment can be adapted to make the difference bag after filtering file, compared with prior art, owing to adding, the type of source file to be upgraded is judged, according to type, different filterconditions is set, therefore the upgrading mode of certain situation is corresponded to, according to filtercondition, difference bag is carried out file filtering, remaining after filtering will be to supply all spendable difference AKU of all terminals, therefore the application does not need to make corresponding difference AKU respectively to the terminal of each different size, save development& testing cost, and more system server resource can not be taken.
Optionally, as a kind of optional manner in step S102, the step of the described filtercondition corresponding according to the type configuration of described source file to be upgraded is specially:
Obtain the system architecture layer belonging to described source file to be upgraded;
If the system architecture layer belonging to described source file to be upgraded is positioned at more than Android inner nuclear layer, then obtain the patch file that terminal hardware information to be upgraded is corresponding;
Determine the instruction of patch file described in filtering as filtercondition corresponding to described source file to be upgraded.
Optionally, as shown in table 1:
For traditional layer architecture
Usual Android system can be divided into application layer, Framework ccf layer, drive layer, and inner nuclear layer, for inner nuclear layer comprise kernel ramdisk the kernel program such as boot, because its file is the image file of .img form, because the self-characteristic of image file limits, Single document takes up space also larger, generally full dose upgrading can be carried out, for inner nuclear layer source file once, need adopt full dose upgrading or avoid upgrading, and the document upgrading due to inner nuclear layer needs corresponding hardware supported to coordinate, in general, upgrade this class file need and hardware collocation upgrade, the independent upgrade image file of little meeting, and more weak hardware dependency is possessed for the system file upgrading running on more than Android system inner nuclear layer, it changes with hardware information association also little, now, if judge, the system architecture layer belonging to source file to be upgraded is positioned at more than Android inner nuclear layer, then obtain the patch file that terminal hardware information to be upgraded is corresponding, determine the instruction of patch file described in filtering as filtercondition corresponding to described source file to be upgraded.
By after the patch file erase that is associated with hardware, owing to there is no hardware patch file in difference bag, this difference AKU after deleted file just can adaptive all terminal devices to be upgraded, that is, the difference of necessity can be preserved by the means provided by this method, and the difference that hardware is relevant is ignored, generate general difference bag.
Consideration system is divided into the optional manner of framework, the method comprises further, if below the system architecture layer displacement Android inner nuclear layer belonging to described source file to be upgraded, then send the first instruction to server, described first instruction makes difference bag for stopping.
For some dates of manufacture terminal comparatively early, it has commercially existed for many years, the feature of this kind equipment is that its hardware device has been tending towards ripe, basic stopping production, even if there is software layer to have renewal, because hardware can not be changed substantially again, that is for the inner nuclear layer file with hardware strong correlation, also do not need or there is no need to upgrade again, the software layer more than inner nuclear layer often of upgrading, belongs to the renewal of pure software.
Obvious, as another optional manner in step S102, the step of the described filtercondition corresponding according to the type configuration of described source file to be upgraded is specially:
Judge whether described source file to be upgraded is image file;
If not, obtain, get the patch file that terminal hardware information to be upgraded is corresponding;
Determine the instruction of patch file described in filtering as filtercondition corresponding to described source file to be upgraded.
Similar with aforesaid a kind of optional manner, this another kind of optional manner does not repeat them here.
Further, described method comprises, if described source file to be upgraded includes image file, then sends the second instruction to server, and described second instruction makes difference bag for stopping.
Optionally, after judging that the system architecture layer belonging to described source file to be upgraded is positioned at the step of more than Android inner nuclear layer, also comprise:
If the system architecture layer described in described source file to be upgraded is positioned at Android application layer, then send the 3rd instruction to server, described 3rd instruction is used to indicate server and generates difference bag corresponding to described source file to be upgraded.
For system-level application, as installed qq software app in a television set, the compiling difference of the normally each version of reason of its upgrading, also have some prepackage application in the terminal, its upgrading has nothing to do substantially with hardware, for this type of upper layer application, the compile mode of prior art has comparatively ripe code generation, relevant hardware information can not be introduced, just do the variance analysis of apk bag, now make the upgrade file of a version, get final product adaptive all upgradeable terminals, also just do not need the step of carrying out hardware filtering.
The applicant can provide a kind of feasible mode classification, see table 2:
As can be seen from Table 2, for system-level upper layer application, substantially irrelevant with hardware, the difference AKU made can adapt to all terminal devices, and correspond to system executable file, system dynamic library file, system drive file etc., because this class file is the weak relevant file of hardware, after needing the hardware information that filtering is relevant, become general difference AKU, and correspond to kernel the file such as boot, due to stronger hardware dependency, software change needs hardware to match, for the mature terminal of hardware, direct filtering upgrade file can be considered, do not upgrade.
In actual applications, public version information can be squeezed in AKU, so that subsequent upgrade process uses, when upgrading again, the upgrade information of request will use model information+public version information, ensure still can upgrade public version, simultaneously next time, model information is retained, and configures AKU separately still can under special circumstances certain type.
Embodiment two
The present embodiment provides a kind of producing device of difference bag, and described device comprises:
Determination module 201, for the version information reported according to M station terminal equipment, determines the source file to be upgraded in the current version file bag of described M station terminal equipment, M be more than or equal to 1 positive integer;
Filter configuration module 202, if all identical for the source file of described M station terminal equipment, the filtercondition corresponding according to the type configuration of described source file to be upgraded;
Difference bag control module 203, for according to described filtercondition, carries out file filtering by the difference bag that based target file and source file make, can adapt to described M station terminal equipment to make the difference bag after filtering file.
A kind of difference bag producing device provided in the embodiment of the present application, first according to the version information that M station terminal equipment reports, determine the source file to be upgraded in the current version file bag of described M station terminal equipment, if secondly the source file of described M station terminal equipment is all identical, the filtercondition corresponding according to the type configuration of described source file to be upgraded, the software information that the identical explanation of source file terminal device to be upgraded will be upgraded is substantially identical, in the process making difference bag, some escalation process can be introduced and irrelevant redundant information of upgrading, last according to described filtercondition, the difference bag that based target file and source file make is carried out file filtering, described M station terminal equipment can be adapted to make the difference bag after filtering file, compared with prior art, owing to adding, the type of source file to be upgraded is judged, according to type, different filterconditions is set, therefore the upgrading mode of certain situation is corresponded to, according to filtercondition, difference bag is carried out file filtering, remaining after filtering will be to supply all spendable difference AKU of all terminals, therefore the application does not need to make corresponding difference AKU respectively to the terminal of each different size, save development& testing cost, and more system server resource can not be taken.
The first optional manner, described filtration configuration module 202 also comprises:
System architecture acquisition module, for obtaining the system architecture layer belonging to described source file to be upgraded;
Judge acquisition module, if be positioned at more than Android inner nuclear layer for the system architecture layer belonging to described source file to be upgraded, then obtain the patch file that terminal hardware information to be upgraded is corresponding;
First filters control module, for determining the instruction of patch file described in filtering as filtercondition corresponding to described source file to be upgraded.
The second optional manner, described filtration configuration module 202 also comprises:
File type judge module, for judging whether described source file to be upgraded includes image file;
Second filters control module, if when not comprising image file for source file to be upgraded, then using the instruction of image file described in filtering as filtercondition corresponding to described source file to be upgraded.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the process flow diagram of the method for the embodiment of the present invention, equipment (system) and computer program and/or block scheme.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or square frame.These computer program instructions can being provided to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computing machine or other programmable data processing device produce device for realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be loaded in computing machine or other programmable data processing device, make on computing machine or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computing machine or other programmable devices is provided for the step realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.