CN106648712A - Incremental updating packet generating method and device, and server - Google Patents

Incremental updating packet generating method and device, and server Download PDF

Info

Publication number
CN106648712A
CN106648712A CN201710109119.6A CN201710109119A CN106648712A CN 106648712 A CN106648712 A CN 106648712A CN 201710109119 A CN201710109119 A CN 201710109119A CN 106648712 A CN106648712 A CN 106648712A
Authority
CN
China
Prior art keywords
file
installation
redaction
old version
installation file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710109119.6A
Other languages
Chinese (zh)
Inventor
黄祺
陈敏亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201710109119.6A priority Critical patent/CN106648712A/en
Publication of CN106648712A publication Critical patent/CN106648712A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an incremental updating packet generating method and device, and a server. One specific implementation mode of the method comprises the following steps: acquiring a new version installing packet and a historical version installing packet of a target application; generating a differential file between a new version installing file and a historical version installing file in the historical version installing packet according to a file type of the new version installing file for each new version installing file in the new version installing packet; compressing various generated differential files, and taking a file packet which is obtained by compressing as an incremental updating packet of the target application. Through the implementation mode, the volume of the incremental updating packet is reduced, and then the time and the traffic required for downloading the incremental updating packet at a client are shortened and reduced.

Description

The generation method of incremental update bag, device and server
Technical field
The application is related to field of computer technology, and in particular to Internet technical field, more particularly to incremental update bag Generation method, device and server.
Background technology
When client carries out applying the update, for the download time needed for saving client to download redaction installation kit And flow, mostly incremental update bag is downloaded from server using incremental update mode at present.Server is calculated by binary system difference Method is calculated redaction installation kit and the old version installation kit amount of making the difference, and generates incremental update bag.Then, server is being received When the renewal that client is sent is asked, by incremental update bag corresponding with current version number and target version number that client is sent Download address be sent to client, so as to client can download incremental update bag, and merge with bag is currently installed on, it is raw Into redaction installation kit, so as to be finally completed the upgrading from current version number to target version number.
However, in current increment updating method, server is during incremental update bag is generated, no matter new edition intrinsic safety Included file is that text or binary file generate incremental update bag according to unified mode in dress bag, so as to The incremental update bag for being generated is larger, causes the time of client downloads incremental update bag longer larger with necessary flow then.
The content of the invention
The purpose of the application is to propose a kind of generation method of improved incremental update bag, device and server to solve The technical problem that certainly background section above is mentioned.
In a first aspect, the embodiment of the present application provides a kind of generation method of incremental update bag, the method includes:Obtain mesh The redaction installation kit and old version installation kit of mark application;For each redaction in above-mentioned redaction installation kit installs text Part, generates according to the file type of the redaction installation file and is gone through in the redaction installation file and above-mentioned old version installation kit The differential file of history version installation file;Each differential file for being generated of compression, by the file bag obtained by compression as upper State the incremental update bag of intended application.
In certain embodiments, above-mentioned file type is text or binary file;And it is above-mentioned new according to this The file type of version installation file generates the redaction installation file and installs with old version in above-mentioned old version installation kit The differential file of file, including:Determine the file type of the redaction installation file;In response to determining the redaction installation file File type be binary file, replicate the redaction installation file, and will replicate the redaction installation file that obtains as The differential file of the redaction installation file and old version installation file in above-mentioned old version installation kit.
In certain embodiments, the above-mentioned file type according to the redaction installation file generates the redaction installation file With the differential file of old version installation file in above-mentioned old version installation kit, also include:In response to determining the new edition intrinsic safety The file type of dress file is text, determines in above-mentioned old version installation kit and whether there is and the redaction installation file Filename identical old version installation file;Do not exist and the redaction in response to determining above-mentioned old version installation kit The filename identical old version installation file of installation file, then replicate the redaction installation file, and will replicate what is obtained Difference of the redaction installation file as the redaction installation file and old version installation file in above-mentioned old version installation kit Different article part.
In certain embodiments, the above-mentioned file type according to the redaction installation file generates the redaction installation file With the differential file of old version installation file in above-mentioned old version installation kit, also include:In response to determining above-mentioned history version There is the filename identical old version installation file with the redaction installation file in this installation kit, generate the new edition intrinsic safety Filename identical old version installation file in dress file and above-mentioned old version installation kit with the redaction installation file Differential file;Whether the file size for judging generated differential file is more than default file size threshold value;In response to giving birth to Into the file size of differential file be more than above-mentioned default file size threshold value, then replicate the redaction installation file, and will be multiple The redaction installation file being obtained is installed as the redaction installation file with old version in above-mentioned old version installation kit The differential file of file.
In certain embodiments, the above-mentioned file type according to the redaction installation file generates the redaction installation file With the differential file of old version installation file in above-mentioned old version installation kit, also include:In response to the difference text for being generated The file size of part is not more than default file size threshold value, then the differential file for being generated is defined as into the redaction installation file With the differential file of old version installation file in above-mentioned old version installation kit.
In certain embodiments, said method also includes:Receive the renewal request that client is sent, above-mentioned renewal request bag Include the current version number and target version number of above-mentioned intended application;According to above-mentioned current version number and above-mentioned target version number, really The download address of the incremental update bag corresponding with above-mentioned current version number and above-mentioned target version number of fixed above-mentioned intended application;Will The download address of above-mentioned incremental update bag is sent to above-mentioned client, so that above-mentioned client is according under above-mentioned incremental update bag Set address is downloaded the incremental update bag corresponding with above-mentioned current version number and above-mentioned target version number of above-mentioned intended application and is gone forward side by side Row incremental update is operated.
In certain embodiments, said method also includes:Receive the rollback downgrade request that client is sent, above-mentioned rollback drop Level request includes the rollback degradation version number of above-mentioned intended application, wherein, above-mentioned rollback degradation version number is less than above-mentioned client The current version number of the intended application of middle installation;Obtain the full dose corresponding with above-mentioned rollback degradation version number of above-mentioned intended application The download address of installation kit;The download address of above-mentioned full dose installation kit is sent to into above-mentioned client, so that above-mentioned client root Above-mentioned full dose installation kit is downloaded according to the download address of above-mentioned full dose installation kit and carry out rollback degraded operation.
Second aspect, the embodiment of the present application provides a kind of generating means of incremental update bag, and the device includes:First obtains Unit is taken, is configured to obtain the redaction installation kit and old version installation kit of intended application;Signal generating unit, it is right to be configured to Each redaction installation file in above-mentioned redaction installation kit, being generated according to the file type of the redaction installation file should The differential file of redaction installation file and old version installation file in above-mentioned old version installation kit;Compression unit, configuration For compressing each differential file for being generated, incremental update of the resulting file bag as above-mentioned intended application will be compressed Bag.
In certain embodiments, above-mentioned file type is text or binary file;And above-mentioned signal generating unit Including:First determining module, is configured to determine the file type of the redaction installation file;First replication module, configuration is used It is binary file in the file type in response to determining the redaction installation file, replicates the redaction installation file, and will The redaction installation file that duplication is obtained is pacified as the redaction installation file with old version in above-mentioned old version installation kit The differential file of dress file.
In certain embodiments, above-mentioned signal generating unit also includes:Second determining module, is configured in response to determining that this is new The file type of version installation file is text, determines in above-mentioned old version installation kit and whether there is and the new edition intrinsic safety The filename identical old version installation file of dress file;Second replication module, is configured in response to determining above-mentioned history There is no the filename identical old version installation file with the redaction installation file in version installation kit, then replicate this new Version installation file, and the redaction installation file that duplication is obtained is pacified as the redaction installation file and above-mentioned old version The differential file of old version installation file in dress bag.
In certain embodiments, above-mentioned signal generating unit also includes:Generation module, is configured in response to determining above-mentioned history There is the filename identical old version installation file with the redaction installation file in version installation kit, generate the redaction Text is installed with the filename identical old version of the redaction installation file in installation file and above-mentioned old version installation kit The differential file of part;Whether judge module, be configured to the file size of the generated differential file of judgement more than default file Size threshold value;3rd replication module, the file size for being configured to the differential file in response to being generated is more than above-mentioned default text Part size threshold value, then replicate the redaction installation file, and will replicate the redaction installation file for obtaining as the new edition intrinsic safety Fill the differential file of file and old version installation file in above-mentioned old version installation kit.
In certain embodiments, above-mentioned signal generating unit also includes:3rd determining module, is configured in response to being generated The file size of differential file is not more than default file size threshold value, then the differential file for being generated is defined as into the new edition intrinsic safety Fill the differential file of file and old version installation file in above-mentioned old version installation kit.
In certain embodiments, said apparatus also include:Request reception unit is updated, reception client is configured to and is sent Renewal request, above-mentioned renewal request includes the current version number and target version number of above-mentioned intended application;Determining unit, configuration For according to above-mentioned current version number and above-mentioned target version number, determining above-mentioned intended application and above-mentioned current version number and upper State the download address of the corresponding incremental update bag of target version number;First transmitting element, is configured to above-mentioned incremental update bag Download address be sent to above-mentioned client so that above-mentioned client according to the download address of above-mentioned incremental update bag download it is above-mentioned The incremental update bag corresponding with above-mentioned current version number and above-mentioned target version number of intended application simultaneously carries out incremental update operation.
In certain embodiments, said apparatus also include:Rollback downgrade request receiving unit, is configured to receive client The rollback downgrade request sent, above-mentioned rollback downgrade request includes the rollback degradation version number of above-mentioned intended application, wherein, it is above-mentioned Current version number of the rollback degradation version number less than the intended application installed in above-mentioned client;Second acquisition unit, configuration is used In the download address of the full dose installation kit corresponding with above-mentioned rollback degradation version number for obtaining above-mentioned intended application;Second sends single Unit, is configured to for the download address of above-mentioned full dose installation kit to be sent to above-mentioned client, so that above-mentioned client is according to above-mentioned The download address of full dose installation kit downloads above-mentioned full dose installation kit and carries out rollback degraded operation.
The third aspect, the embodiment of the present application provides a kind of server, and the server includes:One or more processors; Storage device, for storing one or more programs, when said one or multiple programs are held by said one or multiple processors During row so that said one or multiple processors realize the method as described in arbitrary implementation in first aspect.
Fourth aspect, the embodiment of the present application provides a kind of computer-readable recording medium, is stored thereon with computer journey Sequence, it is characterised in that the computer program is when executed by realizing the side as described in arbitrary implementation in first aspect Method.
The generation method and device of the incremental update bag that the application is provided, by the redaction installation kit for obtaining intended application With old version installation kit, then for each the redaction installation file in above-mentioned redaction installation kit, according to the redaction The file type of installation file generates the redaction installation file with old version installation file in above-mentioned old version installation kit Differential file, each differential file for being generated finally is compressed, by the file bag obtained by compression as above-mentioned intended application Incremental update bag, so as to the difference of the old version installation file in redaction installation file and old version installation kit is generated During file, different methods are taken according to the difference of the file type of redaction installation file, reduce incremental update The file size of bag, reduces the time needed for client downloads incremental update bag and flow then.
Description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that the application can apply to exemplary system architecture figure therein;
Fig. 2 a are the flow charts of one embodiment of the generation method of the incremental update bag according to the application;
Fig. 2 b are a kind of flow charts of implementation of step 202 in flow chart shown in Fig. 2 a;
Fig. 2 c are the flow charts of another kind of implementation of step 202 in flow chart shown in Fig. 2 a;
Fig. 3 is the schematic diagram of an application scenarios of the generation method of the incremental update bag according to the application;
Fig. 4 is the flow chart of another embodiment of the generation method of the incremental update bag according to the application;
Fig. 5 is the structural representation of one embodiment of the generating means of the incremental update bag according to the application;
Fig. 6 is adapted for the structural representation of the computer system of the server for realizing the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that, in order to Be easy to description, illustrate only in accompanying drawing to about the related part of invention.
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase Mutually combination.Below with reference to the accompanying drawings and in conjunction with the embodiments describing the application in detail.
Fig. 1 shows can be using the generating means of the generation method of the incremental update bag of the application or incremental update bag The exemplary system architecture 100 of embodiment.
As shown in figure 1, system architecture 100 can include terminal device 101,102,103, network 104 and server 105. Network 104 between terminal device 101,102,103 and server 105 provide communication link medium.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be interacted by network 104 with using terminal equipment 101,102,103 with server 105, to receive or send out Send message etc..Various client applications, such as web browser applications, purchase can be installed on terminal device 101,102,103 Species application, searching class application, JICQ, mailbox client, social platform software etc..Additionally, terminal device 101, 102nd, it is also equipped with for managing (for example download, update, rollback degrades, unloading etc.) above-mentioned terminal device on 103 to be pacified The management-type application of each application of dress.
Terminal device 101,102,103 can support that application download, renewal, rollback degradation, the various electronics of unloading set It is standby, including but not limited to smart mobile phone, panel computer, pocket computer on knee and desktop computer etc..
Server 105 can be that the management-type application by installing on terminal device 101,102,103 provides the clothes supported Business device.Server 105 can be analyzed to data such as the renewal requests that receives and wait process, and result (for example be increased Amount updates the download address of bag) feed back to terminal device 101,102,103.
It should be noted that the generation method of incremental update bag that the embodiment of the present application is provided is typically by server 105 Perform, correspondingly, the generating means of incremental update bag are generally positioned in server 105.
It should be understood that the number of the terminal device, network and server in Fig. 1 is only schematic.According to realizing need Will, can have any number of terminal device, network and server.
With continued reference to Fig. 2 a, the stream of one embodiment of the generation method of incremental update bag according to the application is it illustrates Journey 200.The generation method of the incremental update bag, comprises the following steps:
Step 201, obtains the redaction installation kit and old version installation kit of intended application.
In the present embodiment, the generation method operation of incremental update bag electronic equipment (such as clothes shown in Fig. 1 thereon Business device) the redaction installation kit and old version installation kit of intended application can be obtained.Wherein, redaction installation kit can be right Functional in old version installation kit of intended application improved, increase New function or delete it is functional after give birth to Into.
In practice, the redaction installation kit of intended application can be that each redaction installation file to intended application is carried out Resulting compressed package after compression.Each redaction installation file of intended application can include executable program file, script File, configuration file and picture file, audio file, video file etc..Equally, the old version installation kit of intended application It can be compressed package resulting after each old version installation file to intended application is compressed.Intended application each Old version installation file can also include executable program file, script file, configuration file and picture file, audio frequency text Part, video file etc..In addition, the redaction installation kit and old version installation kit of intended application can have corresponding version number, Version number can serve to indicate that the redaction installation kit of intended application or the version of old version installation kit.
It should be noted that above-mentioned electronic equipment can by wired or wireless mode from communicate with connection other Electronic equipment obtains the redaction installation kit and old version installation kit of intended application;Can be with from locally obtaining locally stored The redaction installation kit and old version installation kit of intended application.Wherein, the redaction installation kit of locally stored intended application With old version installation kit can be that electronic equipment is previously generated, or third-party server is previously generated and is sent to In above-mentioned electronic equipment.The present embodiment is to the redaction installation kit of intended application and the concrete storage position of old version installation kit Put and be not defined.
Step 202, for each the redaction installation file in redaction installation kit, according to the redaction installation file File type generates the differential file of the redaction installation file and old version installation file in old version installation kit.
In the present embodiment, based on the redaction installation kit and old version installation kit obtained in step 201, above-mentioned electronics Equipment (such as the server shown in Fig. 1) can first obtain each the redaction installation file in redaction installation kit, then, The redaction installation file is generated with old version in old version installation kit according to the file type of the redaction installation file The differential file of installation file.
In practice, above-mentioned electronic equipment can be decompressed by the redaction installation kit to intended application, so as to To each redaction installation file in redaction installation kit.In the same manner, above-mentioned electronic equipment can also be by intended application Old version installation kit is decompressed, so as to each old version in the old version installation kit for obtaining intended application is installed File.
It should be noted that the above-mentioned method decompressed to compressed package is widely studied at present and application known skill Art, will not be described here.
In some optional implementations of the present embodiment, above-mentioned file type can be text or binary system File.Wherein, text refers to that dedicated for storing the file of the data of text character the file in addition to text is Binary file, for example, picture file, audio file, video file, executable file etc..
In some optional implementations of the present embodiment, as shown in Figure 2 b, step 202 can include following sub-step Suddenly:
Sub-step 2021b, determines in old version installation kit with the presence or absence of the file famous prime minister with the redaction installation file Same old version installation file, if it does, sub-step 2022b is gone to, if it does not, going to sub-step 2022b '.
Sub-step 2022b ', the redaction installation file is replicated, and the redaction installation file for obtaining will be replicated as this The differential file of old version installation file in redaction installation file and old version installation kit.
In this implementation, above-mentioned electronic equipment can be determined in old version installation kit not in sub-step 2021b In the case of there is the filename identical old version installation file with the redaction installation file, show that the redaction is installed File is increased file with respect to old version installation kit, therefore, above-mentioned electronic equipment can directly replicate the redaction and install File, and the redaction installation file for obtaining will be replicated as history version in the redaction installation file and old version installation kit The differential file of this installation file.
Sub-step 2022b, determines the file type of the redaction installation file, if the file of the redaction installation file Type is binary file, goes to sub-step 2023b ', if the file type of the redaction installation file is text, turn To sub-step 2023b.
In this implementation, above-mentioned electronic equipment can determine in sub-step 2021b to be deposited in old version installation kit In the case of the filename identical old version installation file with the redaction installation file, show that the redaction installs text Part is amended file with respect to old version installation kit, therefore, above-mentioned electronic equipment can be the redaction installation file life Into the differential file with file of the same name in old version installation kit.Because file type is different, differential file is generated accordingly Algorithm is also differed.It is character data due to what is stored in text, corresponding text difference algorithm is typically all base Compare in character.And in binary file store be binary data, corresponding binary system difference algorithm can not be character ratio It is right, and should be that binary system is compared.Therefore, before differential file is generated, above-mentioned electronic equipment can first determine the new edition intrinsic safety The file type of dress file.If it is determined that the file type of the redaction installation file is binary file, sub-step is gone to 2023b ', if the file type of the redaction installation file is text, goes to sub-step 2023b.
Sub-step 2023b ', in generating the redaction installation file and old version installation kit using binary system difference algorithm With the differential file of the filename identical old version installation file of the redaction installation file, and by the difference for being generated text Differential file of the part as old version installation file in the redaction installation file and old version installation kit.
As an example, various existing binary system difference method comparison instrument (for example, Beyond can be adopted Compare, a set of software released by Scooter Software is mainly used for contrasting two files or file), it is right Pacify with the filename identical old version of the redaction installation file in the redaction installation file and old version installation kit The dress file amount of making the difference is calculated, and generates differential file.
Sub-step 2023b, using text difference algorithm generate in the redaction installation file and old version installation kit with The differential file of the filename identical old version installation file of the redaction installation file, and by the differential file for being generated As the differential file of old version installation file in the redaction installation file and old version installation kit.
As an example, (what for example, Google provided opens can to adopt various existing text difference method comparison instruments Source instrument google-diff-match-patch), in the redaction installation file and old version installation kit with the redaction The filename identical old version installation file amount of making the difference of installation file is calculated, and generates differential file.
Alternatively, text difference method comparison instrument is typically by old version installation file A to text type and new The file content of version installation file B enters line character comparison, and it is new to obtain from the up-to-date of old version installation file A The character for increasing newly needed for the file content of version installation file B, deleting or change.Wherein, it can be by two texts that character is compared The character of the same position in presents is compared one by one, to determine two texts in the character of same position whether send out Change more.As an example, the file content of redaction installation file B includes character string " weather is pretty good, wants to go out to take a walk ", The file content of old version installation file A includes character string " weather is not all right, can go out for a walk ", by by two characters Character in string is compared one by one, it is known that be updated to character string " weather by character string " weather is not all right, can go out for a walk " It is pretty good, want to go out to take a walk " newly-increased character "true" is needed, need the operation for carrying out to include:Delete character " ", by character " OK " be substituted for " mistake " and by character " can " be substituted for " thinking ", therefore, old version installation file A and redaction installation file The file content of the differential file of B can include following information:
1st, character " " is deleted;
2nd, character " OK " is substituted for " mistake "
3rd, by character " can " be substituted for " thinking ".
In some optional implementations of the present embodiment, as shown in Figure 2 c, step 202 can also include following sub-step Suddenly:
Sub-step 2021c, determines the file type of the redaction installation file, if the file of the redaction installation file Type is binary file, goes to sub-step 2022c ', if the file type of the redaction installation file is text, turn To sub-step 2022c.
Find after the comparative analysis to existing file difference comparison algorithm, existing difference algorithm is generating two During differential file between binary file, the file size of the differential file for often generating is big with original binary file Little no too big difference, therefore, discomfort is combined into two binary files and generates differential files, on the contrary, generates the mistake of differential file The formation speed that journey causes incremental update bag is slower, and causes client after incremental update bag has been downloaded, and needs to pay The time of redaction installation file is synthesized according to old version installation file and differential file.And existing difference algorithm is being generated During differential file between two texts, the size difference of the differential file size for often generating and original text It is larger, it is suitably for two texts and generates differential file.Therefore, in this implementation, can be it is determined that the new edition intrinsic safety When the file type of dress file is binary file, sub-step 2022c is gone to ', it is determined that the file of the redaction installation file Type is text, goes to sub-step 2022c.
Sub-step 2022c ', the redaction installation file is replicated, and the redaction installation file for obtaining will be replicated as this The differential file of old version installation file in redaction installation file and old version installation kit.
In this implementation, above-mentioned electronic equipment can determine the redaction installation file in sub-step 2021c In the case that file type is binary file, because binary file is not suitable for generating differential file, it is thus possible to directly The redaction installation file is replicated, and the redaction installation file for obtaining will be replicated as the redaction installation file and history version The differential file of old version installation file in this installation kit.
In this implementation, above-mentioned electronic equipment can also be determined in old version installation kit in sub-step 2022c In the case of there is no the filename identical old version installation file with the redaction installation file, show the new edition intrinsic safety Dress file is increased file with respect to old version installation kit, therefore, it can directly replicate the redaction installation file, and will be multiple The redaction installation file being obtained is used as old version installation file in the redaction installation file and old version installation kit Differential file.
Sub-step 2022c, determines in old version installation kit with the presence or absence of the file famous prime minister with the redaction installation file Same old version installation file, if it does, sub-step 2023c is gone to, if it does not, going to sub-step 2022c '.
In this implementation, above-mentioned electronic equipment can determine the redaction installation file in sub-step 2021c In the case that file type is text, determine in old version installation kit with the presence or absence of the text with the redaction installation file Part name identical old version installation file, if it does, sub-step 2023c is gone to, if it does not, going to sub-step 2022c’。
Sub-step 2023c, generate in the redaction installation file and old version installation kit with the redaction installation file Filename identical old version installation file differential file, and by the differential file for being generated, as the new edition intrinsic safety The differential file of old version installation file in dress file and old version installation kit.
In this implementation, above-mentioned electronic equipment can determine in sub-step 2022c to be deposited in old version installation kit In the case of the filename identical old version installation file with the redaction installation file, show that the redaction installs text Part is amended file with respect to old version installation kit, therefore, it can generate the redaction installation file with old version peace Differential file with the filename identical old version installation file of the redaction installation file in dress bag, and will be generated Differential file, as the differential file of old version installation file in the redaction installation file and old version installation kit.It is real In trampling, various existing text difference method comparison instruments (for example, google-diff-match-patch) can be adopted, it is right Pacify with the filename identical old version of the redaction installation file in the redaction installation file and old version installation kit The dress file amount of making the difference is calculated, and generates differential file.
Step 203, compresses each differential file for being generated, and will compress increasing of the resulting file bag as intended application Amount updates bag.
In the present embodiment, the generation method operation of incremental update bag electronic equipment thereon can be in step 202 Each differential file for being generated is compressed, and the file bag obtained by compressing is used as the incremental update bag of intended application.
It should be noted that the above-mentioned compressed file and method that obtains file bag is at present widely studied and application known Technology, will not be described here.
In some optional implementations of the present embodiment, above-mentioned electronic equipment can also perform after step 203 with Lower step (not shown in Fig. 2 a):
Step 204, receives the renewal request that client is sent.
In this implementation, above-mentioned electronic equipment can receive client after the incremental update bag for generating intended application The renewal request that end is sent, wherein, updating request includes the current version number and target version number of intended application.That is, client Wish that the intended application that will be installed thereon is upgraded to target version number from current version number, above-mentioned target version number is worked as higher than above-mentioned Front version number.
Step 205, according to current version number and target version number, determine intended application with current version number and target version The download address of this number corresponding incremental update bag.
In this implementation, above-mentioned electronic equipment can in advance be directed to the installation kit of the Liang Ge version numbers of intended application, The wherein corresponding bag that updates of higher-version number is updated into bag as redaction, using the corresponding bag that updates of relatively low version number as history Version updating bag, then using the method described in step 201 to step 203, generate intended application from relatively low version number Corresponding old version installation kit is upgraded to the incremental update bag of the corresponding redaction installation kit of higher-version number.
So, after above-mentioned electronic equipment receives the renewal request that client is sent, it is possible in update request Current version number, to update the target version number in asking as higher-version number, is then obtained advance as relatively low version number The download address of the incremental update bag generated to higher-version number from above-mentioned relatively low version number's incremental update for intended application.
Step 206, by the download address of incremental update bag client is sent to
In this implementation, above-mentioned electronic equipment can be by the download address of the incremental update bag determined in step 205 Client is sent to, so that client is according to the download address of incremental update bag download intended application and current version number and mesh The corresponding incremental update bag of mark version number simultaneously carries out incremental update operation.
In some optional implementations of the present embodiment, above-mentioned electronic equipment can with perform after step 203 with Lower step (not shown in Fig. 2 a):
Step 204 ', receive the rollback downgrade request that client is sent.
In this implementation, above-mentioned electronic equipment can receive the rollback downgrade request that client is sent.Wherein, rollback Downgrade request includes the rollback degradation version number of intended application, and here the rollback degradation version number in rollback downgrade request is target Using version number and the version number less than the intended application installed in client current version number.
Step 205 ', obtain the download address of the full dose installation kit corresponding with rollback degradation version number of intended application.
In this implementation, because client have sent rollback downgrade request, show that client wishes to install thereon Intended application roll back to the version also lower than current version number, and the full dose of current version number is generally only remained with client Installation kit, and be also not in the incremental update bag of the version also lower than current version number, therefore, client can not be realized From the version number incremental update also lower than rollback degradation version number to rollback degradation version number, full dose renewal can only be carried out.So, Above-mentioned electronic equipment needs the download address of the full dose installation kit corresponding with rollback degradation version number for obtaining intended application.
Step 206 ', the download address of full dose installation kit is sent to into client, so that client is according to full dose installation kit Download address download and full dose installation kit and carry out rollback degraded operation.
In this implementation, above-mentioned electronic equipment can be by step 205 ' in obtain full dose installation kit download address Client is sent to, so that client downloads full dose installation kit and carries out rollback degradation behaviour according to the download address of full dose installation kit Make, so as to client can be realized for intended application rolling back to rollback degradation version number.
With continued reference to Fig. 3, Fig. 3 is one of the application scenarios of the generation method of the incremental update bag according to the present embodiment and shows It is intended to.
In the application scenarios of Fig. 3, as shown in icon 301 in Fig. 3, electronic equipment obtains first the redaction of intended application Installation kit and old version installation kit.
Then, as shown in icon 302 in Fig. 3, above-mentioned electronic equipment obtains four new edition intrinsic safety in redaction installation kit Dress file:Two binary files " 1.png ", " 2.png " and two texts " 1.jsp ", " 2.jsp ", and as schemed in Fig. 3 Shown in mark 303, two old versions installation file binary file " 1.png " in old version installation kit and text text are obtained Part " 1.jsp ".
Then, for redaction installation kit relative to old version installation kit increase newly two files " 2.png " and Two files that " 2.jsp " directly replicates two files and may be copied to are pacified as " 2.png " and " 2.jsp " and old version The differential file of old version installation file in dress bag, as shown in icon 304 in Fig. 3.
Then, two are adopted to binary file " 1.png " of the same name in redaction installation kit and in old version installation kit System difference algorithm generates the differential file between two binary files " 1.png " of the same name, as shown in icon 305 in Fig. 3.It is right Two texts " 1.jsp " of the same name are generated using text difference algorithm in redaction installation kit and in old version installation kit Differential file between two texts " 1.jsp " of the same name, as shown in icon 306 in Fig. 3.
Finally, will be to four differential files:" 2.png " and " 2.jsp ", two binary files of the same name after duplication The differential file between differential file and two texts " 1.jsp " of the same name between " 1.png ", obtains after being compressed Compressed package as intended application incremental update bag corresponding with redaction installation kit and old version installation kit, in such as Fig. 3 Shown in icon 307.
Redaction installation kit and old version that the method that above-described embodiment of the application is provided passes through acquisition intended application Installation kit, then for each the redaction installation file in above-mentioned redaction installation kit, according to the redaction installation file File type generates the differential file of the redaction installation file and old version installation file in above-mentioned old version installation kit, Each differential file for being generated finally is compressed, incremental update of the resulting file bag as above-mentioned intended application will be compressed Bag.During incremental update bag between the redaction installation kit and old version installation kit that generate intended application, according to The difference of the file type of each redaction installation file takes different differential file generation methods in redaction installation kit, subtracts The file size of incremental update bag is lacked, the time needed for client downloads incremental update bag and flow has been reduced then.
With further reference to Fig. 4, the flow process 400 of another embodiment of the generation method of incremental update bag is it illustrates.Should The flow process 400 of the generation method of incremental update bag, comprises the following steps:
Step 401, obtains the redaction installation kit and old version installation kit of intended application.
In the present embodiment, in the embodiment shown in the concrete process of step 401 and Fig. 2 a step 201 concrete process base This is identical, will not be described here.
Step 402, for each the redaction installation file in redaction installation kit, determines the redaction installation file File type, if the file type of the redaction installation file is binary file, goes to step 403 ', if the redaction The file type of installation file is text, goes to step 403.
Find after the comparative analysis to existing file difference comparison algorithm, existing difference algorithm is generating two During differential file between binary file, the file size of the differential file for often generating is big with original binary file Little no too big difference, therefore, discomfort is combined into two binary files and generates differential files, on the contrary, generates the mistake of differential file The formation speed that journey causes incremental update bag is slower, and causes client after incremental update bag has been downloaded, and needs to pay The time of redaction installation file is synthesized according to old version installation file and differential file.And existing difference algorithm is being generated During differential file between two texts, the size difference of the differential file size for often generating and original text It is larger, it is suitably for two texts and generates differential file.
Therefore, in the present embodiment, the generation method operation of incremental update bag electronic equipment (such as Fig. 1 institutes thereon The server for showing) the redaction installation file can be determined for each the redaction installation file in redaction installation kit File type, above-mentioned file type can be text or binary file.Wherein, text is referred to dedicated for depositing The file of the data of storage text character, the file in addition to text is binary file, for example, picture file, audio frequency text Part, video file, executable program file etc..If the file type of the redaction installation file is binary file, turn To step 403 ', if the file type of the redaction installation file is text, go to step 403.
Step 403 ', the redaction installation file is replicated, and the redaction installation file for obtaining will be replicated as the new edition The differential file of old version installation file in this installation file and old version installation kit.
In the present embodiment, above-mentioned electronic equipment can in step 402 determine the files classes of the redaction installation file In the case that type is binary file, differential file is generated because discomfort is combined into two binary files, therefore, above-mentioned electronics sets It is standby directly to replicate the redaction installation file, and the redaction installation file for obtaining will be replicated as redaction installation text The differential file of old version installation file in part and old version installation kit.
In the present embodiment, above-mentioned electronic equipment can also in step 403 determine and not exist in old version installation kit In the case of the filename identical old version installation file of the redaction installation file, show the redaction installation file It is increased file with respect to old version installation kit, therefore, it can directly replicate the redaction installation file, and duplication is obtained Redaction installation file as old version installation file in the redaction installation file and old version installation kit difference File.
In the present embodiment, above-mentioned electronic equipment can also in step 405 judge the file of generated differential file Size is of the same name in the redaction installation file and old version installation kit more than in the case of default file size threshold value, showing The differential file of file it is larger, be not suitable for that the differential file is added in incremental update bag, accordingly it is also possible to directly replicate The redaction installation file, and the redaction installation file for obtaining will be replicated as the redaction installation file and old version peace The differential file of old version installation file in dress bag.
Step 403, determines in old version installation kit with the presence or absence of the filename identical with the redaction installation file Old version installation file, if it does, step 404 is gone to, if it does not, going to step 403 '.
In this implementation, above-mentioned electronic equipment can in step 402 determine the file of the redaction installation file In the case that type is text, determine in old version installation kit with the presence or absence of the filename with the redaction installation file Identical old version installation file, if it does, step 404 is gone to, if it does not, going to step 403 '.
Step 404, generates the text with the redaction installation file in the redaction installation file and old version installation kit The differential file of part name identical old version installation file, and by the differential file for being generated, text is installed as the redaction The differential file of old version installation file in part and old version installation kit.
In this implementation, above-mentioned electronic equipment can determine in step 403 in old version installation kit exist with In the case of the filename identical old version installation file of the redaction installation file, show the redaction installation file phase It is amended file to old version installation kit, therefore, it can generate the redaction installation file and old version installation kit In differential file with the filename identical old version installation file of the redaction installation file, and by the difference for being generated File, as the differential file of old version installation file in the redaction installation file and old version installation kit.In practice, Various existing text difference method comparison instruments (for example, google-diff-match-patch) can be adopted, to the new edition With the filename identical old version installation file of the redaction installation file in this installation file and old version installation kit The amount of making the difference is calculated, and generates differential file.
Whether step 405, the file size for judging generated differential file is more than default file size threshold value, if greatly In going to step 403 ', if it is not greater, going to step 406.
In the present embodiment, above-mentioned electronic equipment can in step 404 generate the filename of the redaction installation file After the differential file of identical old version installation file, judge the file size of generated differential file whether more than pre- If file size threshold value.
If using the differential file for being generated as old version peace in the redaction installation file and old version installation The differential file of dress file is simultaneously added in incremental update bag, then client is needed to be generated during incremental update Differential file pay with down-off and time:Time and flow, duplication institute needed for the differential file that network transmission is generated The required time of the differential file of generation, by the file with the redaction installation file of the intended application installed in client Name identical old version installation file residual quantity was updated to the time needed for the redaction installation file.And if replicating the new edition This installation file as old version installation file in the installation of the redaction installation file and old version differential file and add In being added to incremental update bag, then client is during incremental update, it is only necessary to pay following for the redaction installation file Flow and time:Time and flow needed for the network transmission redaction installation file, the institute for replicating the redaction installation file The time for needing, without paying the identical with the filename of the redaction installation file of the intended application that will be installed in client Old version installation file residual quantity update to the time needed for the redaction installation file.Therefore, in order to reduce client The flow of incremental update and time, need to arrange default file size threshold value, if the file size of the differential file for being generated During more than default file size threshold value, show that differential file itself is larger, in order to save client the time of incremental update is carried out And flow, full dose renewal can be carried out to the redaction installation file, therefore, it can go to step 403 '.If generated The file size of differential file is not more than default file size threshold value, shows that differential file is less, carries out to save client The time of incremental update and flow, can carry out incremental update to the redaction installation file, therefore, it can go to step 406.
As an example it is supposed that the file size of redaction installation file F1 is 1MB (Mega Byte, Mbytes), new edition The file size of this installation file F1 and differential file F1 ' of old version installation file F1 is 900KB (Kilo Byte, K word Section).
If updated using full dose, need for redaction installation file F1 (file size 1MB) to be transferred to client, it is required Transmission time is 5 seconds, and the time that replicating redaction installation file F1 needs is 0.5 second, then client needs to pay altogether Time be 5.5 seconds.
If updated using residual quantity, need for differential file F1 ' (file size 900KB) to be transferred to client, required biography The defeated time is 4.5 seconds, and the time that replication difference file F1 ' needs is 0.5 second, by the old version installation file F1 root of client It it is 1 second the time required to updating to redaction installation file F1 according to differential file F1 ' residual quantity, then client needs what is paid altogether Time is 6 seconds.
Although the file size of differential file F1 ' is less than the file size of redaction installation file F1, from client From the point of view of the total time that needs are paid, the time needed for full dose updates is shorter.Accordingly, it would be desirable to file size threshold value is pre-set, and According to the size of differential file whether more than the default file size threshold value come determine whether the differential file that will be generated as The differential file of old version installation file in the redaction installation file and old version installation kit.
In practice, can carry out after statistical analysis previously according to the reproduction speed of wideband condition and existing terminal device File size threshold value is set.
Step 406, the differential file for being generated is defined as to go through in the redaction installation file and old version installation kit The differential file of history version installation file.
In the present embodiment, above-mentioned electronic equipment can in step 405 judge that the file of generated differential file is big In the case of little no more than default file size threshold value, show that generated differential file is less, be adapted to do incremental update, therefore The differential file for being generated can be defined as the redaction installation file and text is installed with old version in old version installation kit The differential file of part.
Step 407, compresses each differential file for being generated, and will compress increasing of the resulting file bag as intended application Amount updates bag.
In the present embodiment, the generation method operation of incremental update bag electronic equipment thereon can be each to what is generated Individual differential file is compressed, and the file bag obtained by compressing is used as the incremental update bag of intended application.
Figure 4, it is seen that compared with the corresponding embodiments of Fig. 2 a, the generation side of the incremental update bag in the present embodiment The step of flow process 400 of method has had more the file size of the differential file to being generated and has judged.Thus, the present embodiment description Scheme can be of the same name during text and the redaction installation file are installed with old version going through in redaction installation file The file size of the differential file of history version installation file does incremental update in the case of being not more than default file size threshold value, instead It, does full dose renewal, so as to reduce the time that client carries out needed for incremental update to a greater extent.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides a kind of incremental update bag Generating means one embodiment, the device embodiment is corresponding with the embodiment of the method shown in Fig. 2 a, and the device specifically may be used In to be applied to various electronic equipments.
As shown in figure 5, the generating means 500 of the incremental update bag of the present embodiment include:First acquisition unit 501, generation Unit 502 and compression unit 503.Wherein, first acquisition unit 501, are configured to obtain the redaction installation kit of intended application With old version installation kit;Signal generating unit 502, is configured to for each redaction in above-mentioned redaction installation kit installs text Part, generates according to the file type of the redaction installation file and is gone through in the redaction installation file and above-mentioned old version installation kit The differential file of history version installation file;And compression unit 503, it is configured to compress each differential file for being generated, will press Incremental update bag of the file bag obtained by contracting as above-mentioned intended application.
In the present embodiment, the first acquisition unit 501 of the generating means 500 of incremental update bag, signal generating unit 502 and pressure The concrete process of contracting unit 503 and its technique effect for being brought can respectively with reference to step 201, step in Fig. 2 a correspondence embodiments 202 and the related description of step 203, will not be described here.
In some optional implementations of the present embodiment, above-mentioned file type can be text or binary system File;And above-mentioned signal generating unit 502 can include:First determining module 5021, is configured to determine that the redaction installs text The file type of part;First replication module 5022, being configured to the file type in response to determining the redaction installation file is Binary file, replicates the redaction installation file, and will replicate the redaction installation file for obtaining as redaction installation The differential file of file and old version installation file in above-mentioned old version installation kit.First determining module 5021 and first is multiple The concrete process of molding block 5022 and its technique effect for being brought can respectively with reference to step 402 and step in Fig. 4 correspondence embodiments Rapid 403 ' related description, will not be described here.
In some optional implementations of the present embodiment, above-mentioned signal generating unit 502 can also include:Second determines mould Block 5023, the file type being configured in response to determining the redaction installation file is text, determines above-mentioned history version With the presence or absence of the filename identical old version installation file with the redaction installation file in this installation kit;Second backed stamper Block 5024, is configured in response to determining above-mentioned old version installation kit the filename for not having with the redaction installation file Identical old version installation file, then replicate the redaction installation file, and will replicate the redaction installation file work for obtaining For the differential file of the redaction installation file and old version installation file in above-mentioned old version installation kit.Second determines mould Block 5023 and the concrete process of the second replication module 5024 and its technique effect for being brought can respectively with reference to the corresponding embodiments of Fig. 4 Middle step 403, step 403 ' related description, will not be described here.
In some optional implementations of the present embodiment, above-mentioned signal generating unit 502 can also include:Generation module 5025, presence is identical with the filename of the redaction installation file in being configured in response to determining above-mentioned old version installation kit Old version installation file, generate in the redaction installation file and above-mentioned old version installation kit and text be installed with the redaction The differential file of the filename identical old version installation file of part;Judge module 5026, is configured to judge what is generated Whether the file size of differential file is more than default file size threshold value;3rd replication module 5027, is configured in response to institute The file size of the differential file of generation is more than above-mentioned default file size threshold value, then replicate the redaction installation file, and will The redaction installation file that duplication is obtained is pacified as the redaction installation file with old version in above-mentioned old version installation kit The differential file of dress file.Generation module 5025, the concrete process of the replication module 5027 of judge module 5026 and the 3rd and its institute The technique effect for bringing can respectively with reference to Fig. 4 correspondence embodiment in step 404, step 405 and step 403 ' related description, This is repeated no more.
In some optional implementations of the present embodiment, above-mentioned signal generating unit 502 can also include:3rd determines mould Block 5028, the file size for being configured to the differential file in response to being generated is not more than default file size threshold value, then by institute The differential file of generation is defined as the redaction installation file with old version installation file in above-mentioned old version installation kit Differential file.The concrete process of the 3rd determining module 5028 and its technique effect for being brought are referred in Fig. 4 correspondence embodiments The related description of step 406, will not be described here.
In some optional implementations of the present embodiment, the generating means 500 of above-mentioned incremental update bag can also be wrapped Include:Request reception unit 504 is updated, is configured to receive the renewal request that client is sent, above-mentioned renewal request includes above-mentioned The current version number and target version number of intended application;Determining unit 505, is configured to according to above-mentioned current version number and above-mentioned Target version number, determines the incremental update bag corresponding with above-mentioned current version number and above-mentioned target version number of above-mentioned intended application Download address;First transmitting element 506, is configured to for the download address of above-mentioned incremental update bag to be sent to above-mentioned client End, so that above-mentioned client is according to the above-mentioned intended application of the download address of above-mentioned incremental update bag download and above-mentioned current version Number and the corresponding incremental update bag of above-mentioned target version number and carry out incremental update operation.Update request reception unit 504, determine Unit 505 and the concrete process of the first transmitting element 506 and its technique effect for being brought can respectively with reference to the corresponding enforcements of Fig. 2 a The related description of step 204, step 205 and step 206, will not be described here in example.
In some optional implementations of the present embodiment, the generating means 500 of above-mentioned incremental update bag can also be wrapped Include:Rollback downgrade request receiving unit 507, is configured to receive the rollback downgrade request that client is sent, and above-mentioned rollback degrades Request includes the rollback degradation version number of above-mentioned intended application, wherein, above-mentioned rollback degradation version number is less than in above-mentioned client The current version number of the intended application of installation;Second acquisition unit 508, be configured to obtain above-mentioned intended application with above-mentioned time Roll-off the download address of the corresponding full dose installation kit of grade version number;Second transmitting element 509, is configured to install above-mentioned full dose The download address of bag is sent to above-mentioned client, so that above-mentioned client is downloaded according to the download address of above-mentioned full dose installation kit State full dose installation kit and carry out rollback degraded operation.Rollback downgrade request receiving unit 507, second acquisition unit 508 and second The concrete process of transmitting element 509 and its technique effect for being brought can respectively with reference to step 204 in Fig. 2 a correspondence embodiments ', The related description of step 205 ' and step 206 ', will not be described here.
Below with reference to Fig. 6, the computer system 600 that is suitable to the server for realizing the embodiment of the present application is it illustrates Structural representation.Server shown in Fig. 6 is only an example, should not be to the function of the embodiment of the present application and use range band Carry out any restriction.
As shown in fig. 6, computer system 600 includes CPU (CPU, Central Processing Unit) 601, it can be according to the program being stored in read-only storage (ROM, Read Only Memory) 602 or from storage part 606 programs being loaded in random access storage device (RAM, Random Access Memory) 603 and perform it is various appropriate Action and process.In RAM 603, the system that is also stored with 600 operates required various programs and data.CPU 601、ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O, Input/Output) interface 605 is also connected to Bus 604.
I/O interfaces 605 are connected to lower component:Storage part 606 including hard disk etc.;And including such as LAN (locals Net, Local Area Network) card, modem etc. NIC communications portion 607.The Jing of communications portion 607 Communication process is performed by the network of such as internet.Driver 608 is also according to needing to be connected to I/O interfaces 605.Detachable media 609, such as disk, CD, magneto-optic disk, semiconductor memory etc., as needed on driver 608, in order to from The computer program for reading thereon is mounted into as needed storage part 606.
Especially, in accordance with an embodiment of the present disclosure, may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program, and it includes being carried on computer-readable medium On computer program, the computer program includes the program code for the method shown in execution flow chart.In such reality In applying example, the computer program can be downloaded and installed by communications portion 607 from network, and/or from detachable media 609 are mounted.When the computer program is performed by CPU (CPU) 601, perform what is limited in the present processes Above-mentioned functions.It should be noted that computer-readable medium described herein can be computer-readable signal media or Computer-readable recording medium or the two are combined.Computer-readable recording medium for example can be --- but Be not limited to --- the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or device, or arbitrarily more than combination. The more specifically example of computer-readable recording medium can be including but not limited to:Electrical connection with one or more wires, Portable computer diskette, hard disk, random access storage device (RAM), read-only storage (ROM), erasable type may be programmed read-only depositing Reservoir (EPROM or flash memory), optical fiber, portable compact disc read-only storage (CD-ROM), light storage device, magnetic memory Part or above-mentioned any appropriate combination.In this application, computer-readable recording medium can be it is any comprising or storage The tangible medium of program, the program can be commanded execution system, device, and either device is used or in connection.And In the application, computer-readable signal media can include the data letter propagated in a base band or as a carrier wave part Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer Any computer-readable medium beyond readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use In by instruction execution system, device, either device is used or program in connection.Include on computer-readable medium Program code can be with any appropriate medium transmission, including but not limited to:Wirelessly, electric wire, optical cable, RF etc., Huo Zheshang Any appropriate combination stated.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the application, method and computer journey The architectural framework in the cards of sequence product, function and operation.At this point, each square frame in flow chart or block diagram can generation A part for table one module, program segment or code a, part for the module, program segment or code is used comprising one or more In the executable instruction of the logic function for realizing regulation.It should also be noted that in some are as the realization replaced, being marked in square frame The function of note can also be with different from the order marked in accompanying drawing generation.For example, two square frames for succeedingly representing are actually Can perform substantially in parallel, they can also be performed in the opposite order sometimes, this is depending on involved function.Also to note Meaning, the combination of each square frame and block diagram and/or the square frame in flow chart in block diagram and/or flow chart can be with holding The fixed function of professional etiquette or the special hardware based system of operation, or can be with specialized hardware and computer instructions realizing Combination realizing.
Being described in unit involved in the embodiment of the present application can be realized by way of software, it is also possible to by hard The mode of part is realizing.Described unit can also be arranged within a processor, for example, can be described as:A kind of processor bag Include first acquisition unit, signal generating unit and compression unit.Wherein, the title of these units is not constituted to this under certain conditions The restriction of unit itself, for example, compression unit is also described as " unit of compression differential file ".
On the other hand used as, present invention also provides a kind of computer-readable medium, the computer-readable medium can be Included in device described in above-described embodiment;Can also be individualism, and without allocating in the device.Above-mentioned calculating Machine computer-readable recording medium carries one or more program, when said one or multiple programs are performed by the device so that should Device:Obtain the redaction installation kit and old version installation kit of intended application;For each in above-mentioned redaction installation kit Redaction installation file, the redaction installation file is generated with above-mentioned history version according to the file type of the redaction installation file The differential file of old version installation file in this installation kit;Each differential file that compression is generated, compression is resulting Incremental update bag of the file bag as above-mentioned intended application.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art Member should be appreciated that invention scope involved in the application, however it is not limited to the technology of the particular combination of above-mentioned technical characteristic Scheme, while also should cover in the case where conceiving without departing from foregoing invention, is carried out by above-mentioned technical characteristic or its equivalent feature Other technical schemes for being combined and being formed.Such as features described above has similar work(with (but not limited to) disclosed herein The technical scheme that the technical characteristic of energy is replaced mutually and formed.

Claims (14)

1. a kind of generation method of incremental update bag, it is characterised in that methods described includes:
Obtain the redaction installation kit and old version installation kit of intended application;
For each the redaction installation file in the redaction installation kit, according to the file type of the redaction installation file Generate the differential file of the redaction installation file and old version installation file in the old version installation kit;
Each differential file that compression is generated, will compress incremental update of the resulting file bag as the intended application Bag.
2. method according to claim 1, it is characterised in that the file type is text or binary system text Part;And
The file type according to the redaction installation file generates the redaction installation file and installs with the old version The differential file of old version installation file in bag, including:
Determine the file type of the redaction installation file;
In response to determining that the file type of the redaction installation file is binary file, the redaction installation file is replicated, and The redaction installation file for obtaining will be replicated as the redaction installation file and old version in the old version installation kit The differential file of installation file.
3. method according to claim 2, it is characterised in that described to be given birth to according to the file type of the redaction installation file Into the redaction installation file and the differential file of old version installation file in the old version installation kit, also include:
In response to determining that the file type of the redaction installation file is text, determining in the old version installation kit is No presence and the filename identical old version installation file of the redaction installation file;
There is no the filename identical history with the redaction installation file in response to determining the old version installation kit Version installation file, then replicate the redaction installation file, and will replicate the redaction installation file for obtaining as the redaction The differential file of installation file and old version installation file in the old version installation kit.
4. method according to claim 3, it is characterised in that described to be given birth to according to the file type of the redaction installation file Into the redaction installation file and the differential file of old version installation file in the old version installation kit, also include:
There is the filename identical history version with the redaction installation file in response to determining the old version installation kit This installation file, generates the file with the redaction installation file in the redaction installation file and the old version installation kit The differential file of name identical old version installation file;
Whether the file size for judging generated differential file is more than default file size threshold value;
The file size of the differential file in response to being generated is more than the default file size threshold value, then replicate the new edition intrinsic safety Dress file, and the redaction installation file that obtains will be replicated as in the redaction installation file and the old version installation kit The differential file of old version installation file.
5. method according to claim 4, it is characterised in that described to be given birth to according to the file type of the redaction installation file Into the redaction installation file and the differential file of old version installation file in the old version installation kit, also include:
The file size of the differential file in response to being generated is not more than default file size threshold value, then by the difference for being generated text Part is defined as the differential file of the redaction installation file and old version installation file in the old version installation kit.
6. according to arbitrary described method in claim 1-5, it is characterised in that methods described also includes:
The renewal request that client is sent is received, it is described to update the current version number and target version for asking to include the intended application This number;
According to the current version number and the target version number, determine the intended application with the current version number and institute State the download address of the corresponding incremental update bag of target version number;
The download address of the incremental update bag is sent to into the client, so that the client is according to the incremental update The download address of bag downloads the incremental update corresponding with the current version number and the target version number of the intended application Wrap and carry out incremental update operation.
7. according to arbitrary described method in claim 1-5, it is characterised in that methods described also includes:
The rollback downgrade request that client is sent is received, the rollback downgrade request includes the rollback degradation version of the intended application This number, wherein, current version number of the rollback degradation version number less than the intended application installed in the client;
Obtain the download address of the full dose installation kit corresponding with the rollback degradation version number of the intended application;
The download address of the full dose installation kit is sent to into the client, so that the client is installed according to the full dose The download address of bag downloads the full dose installation kit and carries out rollback degraded operation.
8. a kind of generating means of incremental update bag, it is characterised in that described device includes:
First acquisition unit, is configured to obtain the redaction installation kit and old version installation kit of intended application;
Signal generating unit, is configured to for each the redaction installation file in the redaction installation kit, according to the redaction The file type of installation file generates the redaction installation file with old version installation file in the old version installation kit Differential file;
Compression unit, is configured to compress each differential file for being generated, using the file bag obtained by compression as the mesh The incremental update bag of mark application.
9. device according to claim 8, it is characterised in that the file type is text or binary system text Part;And
The signal generating unit includes:
First determining module, is configured to determine the file type of the redaction installation file;
First replication module, it is binary file to be configured to the file type in response to determining the redaction installation file, multiple The redaction installation file is made, and the redaction installation file for obtaining will be replicated as the redaction installation file and the history The differential file of old version installation file in version installation kit.
10. device according to claim 9, it is characterised in that the signal generating unit also includes:
Second determining module, it is text to be configured to the file type in response to determining the redaction installation file, it is determined that With the presence or absence of the filename identical old version installation file with the redaction installation file in the old version installation kit;
Second replication module, is configured to not exist in response to determining the old version installation kit and installs text with the redaction The filename identical old version installation file of part, then replicate the redaction installation file, and the redaction that duplication is obtained Differential file of the installation file as the redaction installation file and old version installation file in the old version installation kit.
11. devices according to claim 10, it is characterised in that the signal generating unit also includes:
Generation module, is configured in response to determining the old version installation kit text for having with the redaction installation file Part name identical old version installation file, generate in the redaction installation file and the old version installation kit with the new edition The differential file of the filename identical old version installation file of this installation file;
Whether judge module, be configured to the file size of the generated differential file of judgement more than default file size threshold value;
3rd replication module, the file size for being configured to the differential file in response to being generated is more than the default file size Threshold value, then replicate the redaction installation file, and will replicate the redaction installation file for obtaining as the redaction installation file With the differential file of old version installation file in the old version installation kit.
12. devices according to claim 11, it is characterised in that the signal generating unit also includes:
3rd determining module, the file size for being configured to the differential file in response to being generated is not more than default file size threshold Value, then be defined as the differential file for being generated the redaction installation file and pacify with old version in the old version installation kit The differential file of dress file.
A kind of 13. servers, including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are by one or more of computing devices so that one or more of processors Realize the method as described in arbitrary in claim 1-7.
A kind of 14. computer-readable recording mediums, are stored thereon with computer program, it is characterised in that the program is by processor The method as described in arbitrary in claim 1-7 is realized during execution.
CN201710109119.6A 2017-02-27 2017-02-27 Incremental updating packet generating method and device, and server Pending CN106648712A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710109119.6A CN106648712A (en) 2017-02-27 2017-02-27 Incremental updating packet generating method and device, and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710109119.6A CN106648712A (en) 2017-02-27 2017-02-27 Incremental updating packet generating method and device, and server

Publications (1)

Publication Number Publication Date
CN106648712A true CN106648712A (en) 2017-05-10

Family

ID=58846538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710109119.6A Pending CN106648712A (en) 2017-02-27 2017-02-27 Incremental updating packet generating method and device, and server

Country Status (1)

Country Link
CN (1) CN106648712A (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108399071A (en) * 2018-01-19 2018-08-14 五八有限公司 Processing method, device, equipment and the storage medium of application program installation kit size
CN109032641A (en) * 2018-07-24 2018-12-18 杭州安恒信息技术股份有限公司 Application version update method and device
CN109522041A (en) * 2018-10-15 2019-03-26 网易(杭州)网络有限公司 Client resource update method, device, processor, server and terminal
CN109582344A (en) * 2018-11-27 2019-04-05 北京车和家信息技术有限公司 Increment updating method, device, Cloud Server and computer readable storage medium
CN109831323A (en) * 2019-01-15 2019-05-31 网宿科技股份有限公司 Management method, management system and the server of server info
CN109857423A (en) * 2018-12-20 2019-06-07 Oppo广东移动通信有限公司 Program version update method, device, server and readable storage medium storing program for executing
CN110032388A (en) * 2019-04-04 2019-07-19 阿里巴巴集团控股有限公司 A kind of building of delta file, publication, method for down loading and device
CN110069273A (en) * 2019-04-30 2019-07-30 四川长虹教育科技有限公司 The batch packaging method and device of software upgrade package
CN110109685A (en) * 2019-04-23 2019-08-09 维沃移动通信有限公司 Production method, device and the mobile terminal of the update, installation kit applied fastly
CN110231947A (en) * 2019-05-21 2019-09-13 深圳壹账通智能科技有限公司 A kind of update of plug-in method, equipment, server and the storage medium of application program
CN110505289A (en) * 2019-08-07 2019-11-26 Oppo广东移动通信有限公司 Document down loading method and device, computer-readable medium, wireless telecom equipment
CN110532236A (en) * 2019-08-21 2019-12-03 广联达科技股份有限公司 Increment updating method, system and the medium of compressed file
CN110741616A (en) * 2017-06-14 2020-01-31 北京嘀嘀无限科技发展有限公司 System and method for data online
CN112424747A (en) * 2018-05-29 2021-02-26 北欧半导体公司 Incremental files with reverse data
WO2021097758A1 (en) * 2019-11-21 2021-05-27 深圳市欢太科技有限公司 Incremental package generation method, incremental package generation apparatus, and server
CN113031997A (en) * 2021-02-26 2021-06-25 深圳壹账通创配科技有限公司 Upgrade package generation and management method and device, computer equipment and storage medium
CN113157302A (en) * 2021-05-24 2021-07-23 平安普惠企业管理有限公司 Software updating method, device, medium and equipment
CN113448612A (en) * 2021-07-12 2021-09-28 中国工商银行股份有限公司 Plug-in updating method, device, electronic equipment, medium and program product
CN114153862A (en) * 2021-12-09 2022-03-08 腾讯科技(成都)有限公司 Service data processing method, device, equipment and storage medium
CN117407031A (en) * 2023-11-27 2024-01-16 深圳麦风科技有限公司 Patch package upgrade file generation method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104378409A (en) * 2014-08-29 2015-02-25 武汉钢铁(集团)公司 File synchronization system
CN104539696A (en) * 2014-12-26 2015-04-22 北京像素软件科技股份有限公司 Client end incremental updating method and system
CN105404521A (en) * 2014-05-30 2016-03-16 广州市动景计算机科技有限公司 Incremental upgrading method and relevant device
CN106462430A (en) * 2016-08-29 2017-02-22 北京小米移动软件有限公司 Method and device for obtaining application upgrade packages

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105404521A (en) * 2014-05-30 2016-03-16 广州市动景计算机科技有限公司 Incremental upgrading method and relevant device
CN104378409A (en) * 2014-08-29 2015-02-25 武汉钢铁(集团)公司 File synchronization system
CN104539696A (en) * 2014-12-26 2015-04-22 北京像素软件科技股份有限公司 Client end incremental updating method and system
CN106462430A (en) * 2016-08-29 2017-02-22 北京小米移动软件有限公司 Method and device for obtaining application upgrade packages

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110741616A (en) * 2017-06-14 2020-01-31 北京嘀嘀无限科技发展有限公司 System and method for data online
CN108399071A (en) * 2018-01-19 2018-08-14 五八有限公司 Processing method, device, equipment and the storage medium of application program installation kit size
CN108399071B (en) * 2018-01-19 2021-07-20 五八有限公司 Application program installation package size processing method, device, equipment and storage medium
CN112424747A (en) * 2018-05-29 2021-02-26 北欧半导体公司 Incremental files with reverse data
CN109032641A (en) * 2018-07-24 2018-12-18 杭州安恒信息技术股份有限公司 Application version update method and device
CN109522041A (en) * 2018-10-15 2019-03-26 网易(杭州)网络有限公司 Client resource update method, device, processor, server and terminal
CN109582344A (en) * 2018-11-27 2019-04-05 北京车和家信息技术有限公司 Increment updating method, device, Cloud Server and computer readable storage medium
CN109857423B (en) * 2018-12-20 2022-06-10 Oppo广东移动通信有限公司 Program version updating method and device, server and readable storage medium
CN109857423A (en) * 2018-12-20 2019-06-07 Oppo广东移动通信有限公司 Program version update method, device, server and readable storage medium storing program for executing
CN109831323A (en) * 2019-01-15 2019-05-31 网宿科技股份有限公司 Management method, management system and the server of server info
CN110032388A (en) * 2019-04-04 2019-07-19 阿里巴巴集团控股有限公司 A kind of building of delta file, publication, method for down loading and device
CN110032388B (en) * 2019-04-04 2022-04-29 创新先进技术有限公司 Incremental file construction, publishing and downloading method and device
CN110109685A (en) * 2019-04-23 2019-08-09 维沃移动通信有限公司 Production method, device and the mobile terminal of the update, installation kit applied fastly
CN110069273A (en) * 2019-04-30 2019-07-30 四川长虹教育科技有限公司 The batch packaging method and device of software upgrade package
CN110231947A (en) * 2019-05-21 2019-09-13 深圳壹账通智能科技有限公司 A kind of update of plug-in method, equipment, server and the storage medium of application program
WO2020233045A1 (en) * 2019-05-21 2020-11-26 深圳壹账通智能科技有限公司 Plug-in update method and device, server and computer readable storage medium
CN110505289B (en) * 2019-08-07 2022-04-26 Oppo广东移动通信有限公司 File downloading method and device, computer readable medium and wireless communication equipment
CN110505289A (en) * 2019-08-07 2019-11-26 Oppo广东移动通信有限公司 Document down loading method and device, computer-readable medium, wireless telecom equipment
CN110532236A (en) * 2019-08-21 2019-12-03 广联达科技股份有限公司 Increment updating method, system and the medium of compressed file
WO2021097758A1 (en) * 2019-11-21 2021-05-27 深圳市欢太科技有限公司 Incremental package generation method, incremental package generation apparatus, and server
CN113031997A (en) * 2021-02-26 2021-06-25 深圳壹账通创配科技有限公司 Upgrade package generation and management method and device, computer equipment and storage medium
CN113157302A (en) * 2021-05-24 2021-07-23 平安普惠企业管理有限公司 Software updating method, device, medium and equipment
CN113448612A (en) * 2021-07-12 2021-09-28 中国工商银行股份有限公司 Plug-in updating method, device, electronic equipment, medium and program product
CN113448612B (en) * 2021-07-12 2024-08-02 中国工商银行股份有限公司 Plug-in updating method, device, electronic equipment, medium and program product
CN114153862A (en) * 2021-12-09 2022-03-08 腾讯科技(成都)有限公司 Service data processing method, device, equipment and storage medium
CN114153862B (en) * 2021-12-09 2024-07-12 腾讯科技(成都)有限公司 Service data processing method, device, equipment and storage medium
CN117407031A (en) * 2023-11-27 2024-01-16 深圳麦风科技有限公司 Patch package upgrade file generation method, device, equipment and storage medium
CN117407031B (en) * 2023-11-27 2024-04-26 深圳麦风科技有限公司 Patch package upgrade file generation method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106648712A (en) Incremental updating packet generating method and device, and server
CN108279932B (en) Method and device for dynamically configuring user interface of mobile terminal
CN105049486B (en) Method for edition management, the apparatus and system of static file
CN102129378B (en) A kind of software menu updating method and device
CN106933614B (en) Single-page application upgrading method and device
WO2019201039A1 (en) Method and system for updating application and application server
CN105302587B (en) Data-updating method and device
CN106598673B (en) Application program upgrading method and system
WO2007072636A1 (en) Screen display method, and screen display device
KR20100133382A (en) Application management within deployable object hierarchy
CN110275723A (en) Obtain method, apparatus, electronic equipment and the readable medium of resource
CN104503780A (en) Method and device for providing application channel packet
CN104063225B (en) Screen locking theme development method and device
CN106919382A (en) For generating the method and apparatus that application updates bag
CN113590974B (en) Recommendation page configuration method and device, electronic equipment and computer readable medium
CN105760183A (en) File processing method, device, and communication system
CN109672534A (en) Processing method, device, storage medium and the electronic device of Internet resources
CN112328283A (en) Application program updating method, device, equipment and medium
CN107809470B (en) Method and device for automatically deploying application program
CN111107133A (en) Generation method of difference packet, data updating method, device and storage medium
CN108123970A (en) Method for exhibiting data and relevant apparatus
CN110505289B (en) File downloading method and device, computer readable medium and wireless communication equipment
CN103139298A (en) Method for transmitting network data and device
CN112887362B (en) Equipment access method, equipment access device and server
CN114860213A (en) Application package generation method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170510