CN108008970A - Application upgrade method and device - Google Patents

Application upgrade method and device Download PDF

Info

Publication number
CN108008970A
CN108008970A CN201610974060.2A CN201610974060A CN108008970A CN 108008970 A CN108008970 A CN 108008970A CN 201610974060 A CN201610974060 A CN 201610974060A CN 108008970 A CN108008970 A CN 108008970A
Authority
CN
China
Prior art keywords
file
application
bag
upgrade package
path
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
CN201610974060.2A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610974060.2A priority Critical patent/CN108008970A/en
Publication of CN108008970A publication Critical patent/CN108008970A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

This disclosure relates to a kind of application upgrade method and device.The application upgrade method includes:Check that application whether there is more new version;Application renewal request is initiated when the application has more new version, updated by the application and corresponding upgrade package is applied described in acquisition request, the file path in the upgrade package where resource file is different from the file path using where resource file in corresponding file bag;Upgrade package described in extreme saturation, with the file path according to where file in the upgrade package and the difference using file path where file in corresponding file bag, the file merged in the upgrade package applies corresponding file bag to described.The application upgrade method and device provided using the disclosure can realize the silent upgrading of application.

Description

Application upgrade method and device
Technical field
This disclosure relates to Computer Applied Technology field, more particularly to a kind of application upgrade method and device.
Background technology
With the rapid development of Computer Applied Technology, the application that can be installed in terminal(App, application)More Come abundanter, user can complete particular or several task functions by using corresponding application.For example, user is led to Cross using browser application to read news shown in webpage etc..
Under normal circumstances, after the developer of application has issued the more new version of application, user can obtain accordingly should It with upgrade tip or can inquire using renewal, and then will apply from current version and upgrade to more new version.It is existing to answer With in escalation process, it usually needs the first application of current version out of service, can after treating the application upgrade to more new version Restarting.
If the application is used in user, the operation for causing the application is interrupted by application upgrade, so that user Operation is interrupted and causes poor user experience.If user refuses to upgrade the application because of the application that is not desired to interrupt, not only So that corresponding more new version can not be popularized, it is also possible to influencing defect present in the application can not be solved in time, And then it will also influence user experience.
Therefore, how the application for avoiding the problem that being currently running during application upgrade be interrupted still have it is to be solved.
The content of the invention
Based on this, a purpose of the disclosure is to provide a kind of application upgrade method, for solving in the prior art should The problem of with that in escalation process the application being currently running can be caused to be interrupted.
In addition, another object of the present disclosure is to provide a kind of application upgrade device, for solving in the prior art should The problem of with that in escalation process the application being currently running can be caused to be interrupted.
In order to solve the above-mentioned technical problem, technical solution is used by the disclosure:
A kind of application upgrade method, including:Check that application whether there is more new version;Sent out when the application has more new version Application renewal request is played, is updated by the application and corresponding upgrade package is applied described in acquisition request, resource in the upgrade package File path where file is different from the file path using where resource file in corresponding file bag;Extreme saturation The upgrade package, with where file in the file bag corresponding with the application of the file path according to where file in the upgrade package The difference of file path, the file merged in the upgrade package apply corresponding file bag to described.
A kind of application upgrade device, including:Renewal checks module, for checking that application whether there is more new version;Upgrading Bag acquisition module, for initiating application renewal request when the application has more new version, is updated by the application and asked Obtain the corresponding upgrade package of the application, the file path in the upgrade package where resource file is different from the application and corresponds to File bag in file path where resource file;File combination module, for upgrade package described in extreme saturation, with according to institute File path where file and the difference using file path where file in corresponding file bag in upgrade package are stated, is merged File in the upgrade package applies corresponding file bag to described.
Compared with prior art, the disclosure has the advantages that:
By being different from the file path where resource file in upgrade package using where resource file in corresponding file bag File path so that extreme saturation is carried out in upgrade package, according to it is described difference merge upgrade package in file to application correspond to File bag when, the resource of required reading during the application operation of resource file, i.e. current version that will not be in overlay file bag File will not be deleted, so that the application of current version still can be with normal operation without stopping during application upgrade Only, so that the application that can cause to be currently running during solving the problems, such as application upgrade in the prior art is interrupted.
It should be appreciated that the general description and following detailed description of the above are only exemplary and explanatory, not The disclosure can be limited.
Brief description of the drawings
Attached drawing herein is merged in specification and forms the part of this specification, shows the implementation for meeting the disclosure Example, and be used in specification to explain the principle of the disclosure together.
Fig. 1 is the schematic diagram of the implementation environment according to involved by the disclosure.
Fig. 2 is a kind of block diagram of terminal according to an exemplary embodiment.
Fig. 3 is a kind of flow chart of application upgrade method according to an exemplary embodiment;
Fig. 3 a be Fig. 3 correspond in embodiment check application whether there is more flow chart of the new version step in one embodiment;
Fig. 3 b are that Fig. 3 corresponds to the initiation application renewal request when the application is in the presence of more new version in embodiment, are answered by described Corresponding upgrade package step is applied described in renewal acquisition request in the flow chart of one embodiment.
Fig. 4 is the flow chart of another application upgrade method according to an exemplary embodiment.
Fig. 5 is that Fig. 3 corresponds to upgrade package described in extreme saturation in embodiment, with the file according to where file in the upgrade package Path and the difference using file path where file in corresponding file bag, merge file in the upgrade package to institute State the flow chart in one embodiment using corresponding file bag step;
Fig. 5 a be the Piece file mergence involved by the disclosure preceding document bag in file path where file schematic diagram;
The schematic diagram of file path before Fig. 5 b are Piece file mergences involved by the disclosure in upgrade package where file;
Fig. 5 c are the schematic diagrames of the file path in file bag where file after Piece file mergence involved by the disclosure.
Fig. 6 is a kind of block diagram of application upgrade device according to an exemplary embodiment.
Fig. 7 is the block diagram of another application upgrade device according to an exemplary embodiment.
Fig. 8 is that Fig. 6 corresponds in embodiment file combination module in the block diagram of one embodiment.
Pass through above-mentioned attached drawing, it has been shown that the clear and definite embodiment of the disclosure, will hereinafter be described in more detail, these attached drawings It is not intended to limit the scope of disclosure design by any mode with word description, but is by reference to specific embodiment Those skilled in the art illustrate the concept of the disclosure.
Embodiment
Here explanation will be performed to exemplary embodiment in detail, its example is illustrated in the accompanying drawings.Following description is related to During attached drawing, unless otherwise indicated, the same numbers in different attached drawings represent the same or similar key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appended The example of the consistent apparatus and method of some aspects be described in detail in claims, the disclosure.
Either MAC systems, android system or Windows systems, can not all accomplish first to delete answering for current version With restarting the application of more new version, therefore, the upgrading of application often relies on upgrade procedure.
Upgrade procedure is during application upgrade, it is necessary to perform following operation:1st, using the inspection of renewal;2nd, application is obtained Corresponding upgrade package;3rd, the application of current version out of service;4th, it will be applied by upgrade package and renewal is upgraded to by current version Version;5th, the application of more new version is restarted.
For example, if android system, it will be applied by upgrade package and more new version is upgraded to by current version, i.e., It is the same file replaced with the file in upgrade package in the corresponding file bag of application, can is all texts in whole file bag Part is replaced or needs the partial document updated to be replaced in file bag, so as to achieve the purpose that application upgrade.
And in MAC systems, due to the presence of GateKeeper mechanism, run any application and be required for checking that signature is complete Property, and then confirm whether the application is illegally distorted, thereby protect the malicious application that MAC systems are downloaded from network influence, And in network the application of abnormal behavior influence.It can not accomplish incremental update when this allows for application upgrade, i.e., can not accomplish Replaced similar to the partial document carried out in android system, otherwise will destroy integrality of signing, and by GateKeeper mechanism It is considered the malicious application illegally distorted.
Therefore, in MAC systems, it will be applied by upgrade package and more new version is upgraded to by current version, and be to delete On the premise of the application of whole current version, by the file path where the file copy to the application of current version in upgrade package Under, achieve the purpose that application upgrade by way of " whole bag is replaced ".
No matter which kind of above-mentioned system, during application upgrade all there may be delete resource file the problem of, especially Seem more prominent in MAC systems.It is appreciated that when resource file is deleted, the application being currently running will be unable to read Resource file needed for it and cause outage, for this reason, during application upgrade must current version out of service should With.
It follows that if user selects upgrade application, the application being currently running must be just interrupted, so that user grasps It is interrupted, it is necessary to can just reuse the application when application upgrade finishes, and cause poor user experience., whereas if with Family refusal upgrades the application, can not only reduce the turnover rate of application, it is also possible to so that defect present in the application can not be timely Ground solves, and then will also influence user experience.
Therefore, in order to avoid causing the application being currently running to be interrupted during application upgrade the problem of, spy proposes one Kind application upgrade method.
Fig. 1 is the implementation environment involved by this kind of application upgrade method.The implementation environment includes terminal 100 and and terminal The server 200 of 100 communications.
Wherein, terminal 100 can be smart mobile phone, tablet computer, palm PC, laptop or other can transport The electronic equipment of the operating systems such as row MAC systems, android system, Windows systems.
Application of the server 200 then to be run in terminal 100 provides upgrading relevant adequate and systematic service, as upgrade package stores, Upgrade package inquiry, upgrade package download etc..
By the communication of terminal 100 and server 200, terminal 100 can carry out the inspection using renewal in real time, examine When finding using renewal, make to apply by working as by getting in server 200 using corresponding upgrade package, and then by the upgrade package Preceding edition upgrading is to more new version.
Referring to Fig. 2, Fig. 2 is a kind of block diagram of terminal according to an exemplary embodiment.It should be noted that should Terminal 100 is an example for adapting to the disclosure, it is impossible to thinks to there is provided any limit to the use scope of the disclosure System.The terminal 100 can not be construed to need to rely on or must have in exemplary terminal 100 shown in Figure 2 One or more component.
As shown in Fig. 2, terminal 100 includes memory 101, storage control 103, one or more(One is only shown in figure It is a)Processor 105, Peripheral Interface 107, radio-frequency module 109, locating module 111, photographing module 113, audio-frequency module 115, touch-control Screen 117 and key-press module 119.These components are mutually communicated by one or more communication bus/signal wire 121.
It is appreciated that the structure shown in Fig. 2 is only to illustrate, terminal 100 may also include more more or fewer than shown in Fig. 2 Component, or there is the component different from shown in Fig. 2.Each component shown in Fig. 2 can use hardware, software To realize.
Wherein, memory 101 can be used for storage software program and module, such as the application in disclosure exemplary embodiment Programmed instruction and module corresponding to upgrade method and device, processor 105 are stored in the program in memory 101 by operation Instruction, so as to perform various functions and data processing, that is, realizes above application upgrade method.
The carrier that memory 101 is stored as resource, can be random storage medium, such as high speed random access memory, non- Volatile memory, such as one or more magnetic storage device, flash memory or other solid-state memories.Storage mode can be Of short duration storage permanently stores.
Peripheral Interface 107 can include an at least wired or wireless network interface, an at least connection in series-parallel translation interface, at least One input/output interface and at least USB interface etc., for exterior various input/output devices to be coupled to memory 101 and processor 105, to realize the communication with exterior various input/output devices.
Radio-frequency module 109 is used for transceiving electromagnetic ripple, the mutual conversion of electromagnetic wave and electric signal is realized, so as to pass through communication network Network is communicated with other equipment.Communication network includes cellular telephone networks, WLAN or Metropolitan Area Network (MAN), above-mentioned communication network Network can use various communication standards, agreement and technology.
Locating module 111 is used for the geographical location being currently located for obtaining terminal 100.The example of locating module 111 includes But it is not limited to GPS(GPS), location technology based on WLAN or mobile radio communication.
Photographing module 113 is under the jurisdiction of camera, for shooting picture or video.The picture or video of shooting can be deposited In storage to memory 101, it can also be sent by radio-frequency module 109 to host computer.
Audio-frequency module 115 provides a user audio interface, it may include one or more microphone interfaces, one or more Speaker interface and one or more earphone interfaces.Interacting for voice data is carried out with miscellaneous equipment by audio interface.Sound Frequency can also be sent according to that can store to memory 101 by radio-frequency module 109.
Touch Screen 117 provides an I/O Interface between terminal 100 and user.Specifically, user can pass through Touch Screen 117 carries out input operation, such as the gesture operation such as click, touch, slip, so that electronic equipment operates the input Responded.Terminal 100 then passes through word, picture the output content that either any one form of video or combination are formed Touch Screen 117 is to user's display output.
Key-press module 119 includes at least one button, to provide the interface that user is inputted to terminal 100, user By pressing different buttons terminal 100 can be made to perform different functions.For example, sound regulating key is for user's realization pair The adjusting for the wave volume that terminal 100 plays.
In addition, also can equally realize the disclosure by hardware circuit or hardware circuit combination software instruction, therefore, realize The disclosure is not limited to any specific hardware circuit, software and both combinations.
Referring to Fig. 3, in one exemplary embodiment, a kind of application upgrade method is suitable for implementation ring illustrated in fig. 1 Terminal 100 in border, this kind of application upgrade method can be performed by terminal 100, may comprise steps of:
Step 310, check that application whether there is more new version.
Using being the software program that can complete particular or several functions for users to use.For example, user passes through Applied using instant messaging and conversated with other users.Using being usually stored in the form of file bag in terminal, Yong Huke To view this using the content in corresponding file bag by the operation for performing " display bag content ".
By taking MAC systems as an example, using having generally comprised signature file, application information file in corresponding file bag, can hold Line program file, resource file etc..Wherein, digital signature is included in signature file, when applying for running signed The inspection of whole property, to verify whether application is created by unknown developer and application is illegally distorted.Application message text Part is used for the application identities and application version number for providing application, to coordinate upgrade procedure to carry out inspection and application pair using renewal The acquisition for the upgrade package answered.Executable program file, which is used to run, to be applied, and makes to answer by loading executable program file to memory With being run.Resource file then reads for the application of operation, it includes picture resource, file resource etc., for example, application fortune By reading the picture in picture resource during row, corresponding picture will be shown in the display interface of application.
It is noted that upgrade procedure is commonly included in resource file, and for being read during application operation, Jin Ershi Existing application upgrade.
When application adds new function or needs to solve some defect, the developer of application will be applied more The issue of new version, at this point it is possible to run manually using corresponding upgrade procedure by user, or should by terminal automatic running Using corresponding upgrade procedure, more new version whether there is to check to apply with the operation by upgrade procedure.
Specifically, as shown in Figure 3a, the process checked using renewal may comprise steps of:
Step 311, by extracting the application identities being applied and application version number in application information file.
As it was previously stated, application information file is used for the application identities and application version number for providing application, to coordinate upgrading journey Sequence carries out the inspection using renewal and the acquisition of the corresponding upgrade package of application.Therefore, obtained in by the corresponding file bag of application After getting application information file, you can by application identities and application version number that application is extracted in application information file.
Wherein, application identities are for distinguishing each application, it can be represented by the title of application, can also be passed through The globally unique identification code that server is distributed in the initial version of storage application for application(UUID, Universally Unique Identifier)To represent.
Application version number is used for each version for distinguishing application, is the identification number of version, passes through the combination of numeral and/or letter To identify version, so that user understands whether application used in it is that the application of latest edition and the version can be provided Function etc..Application version number generally includes major version number and secondary version number two parts.For example, corresponding to the current version of application Application version number is 1.0, wherein, major version number 1, secondary version number 0.
Step 313, to the corresponding more new version number of server request application identities.
After the application identities being applied, upgrade procedure will initiate application renewal according to the application identities to server Inquiry request, to obtain the corresponding more new version number of the application identities by application renewal inquiry request.Wherein, looked into using renewal Ask request to be generated by the application identities, that is, apply in renewal inquiry request and carry the application identities.
Server will update inquiry request to the application and respond, is i.e. root after application renewal inquiry is received Matching inquiry is carried out in the upgrade package of storage according to application identities, the upgrade package corresponding to the application identities is obtained with inquiry.
Since upgrade package is for application to be upgraded to more new version by current version, is risen wherein containing using completion The application version number corresponding to more new version after level, that is, be considered as more new version number, therefore, by inquiring about obtained upgrade package i.e. More new version number can be got.
Furthermore, it is necessary to explanation, when the initial version of the application is distributed to server by the developer of application, service Device is the title that would know that application, and is that application distributes globally unique identification code while the initial version is stored, in order to The correspondence between the title of upgrade package and application and globally unique identification code is established when carrying out upgrade package storage.It is based on This, no matter application identities are represented by which kind of foregoing mode, and server can be by application identities matching inquiry to corresponding Upgrade package.
Step 315, compare the application version number and more new version number of application, if inconsistent, judge that application has renewal Version.
After the application version number of application and more new version number is got, upgrade procedure will be compared the two.If Comparative result is consistent with more new version number for application version number, then it represents that the current version of application is latest edition, i.e., should answer With there is no more new version.Conversely, if comparative result is application version number and more new version number is inconsistent, then it represents that application is worked as Preceding version is not latest edition, i.e. the application has more new version.
Certainly, in other embodiments, terminal can also send application version number to server, with complete by server Into the comparison of application version number and more new version number, and comparative result is fed back into terminal after completion is compared.
By process as described above, that is, complete the inspection using renewal.
Step 330, application renewal request is initiated when application has more new version, acquisition request application is updated by application Corresponding upgrade package.
When upgrade procedure, which is known, to be applied in the presence of more new version, will be initiated to server using renewal request, with by answering Corresponding upgrade package is applied by being obtained in server with renewal request, and then easy to be applied subsequently through the upgrade package by current Edition upgrading is to more new version.
Specifically, as shown in Figure 3b, the acquisition process of upgrade package may comprise steps of:
Step 331, the download address that the renewal request of server response application returns is received, download address is server according to application What the application identities in message file were inquired about.
Server will update request to the application and respond, i.e., according to application after receiving using renewal request Mark carries out matching inquiry in the upgrade package of storage, obtains the upgrade package corresponding to the application identities with inquiry, and then pass through Inquire about obtained upgrade package and obtain download address corresponding with the upgrade package.
Step 333, the corresponding upgrade package that is applied is downloaded according to download address.
Certainly, in other embodiments, server can also will inquire about obtained upgrading by established transmission channel Bag returns directly to terminal.
By process as described above, when the corresponding upgrade package of application is completed to download, terminal also just completes upgrade package Obtain.
Generally comprised in the upgrade package using required file is updated, this document can include signature file, using letter Cease file, executable program file, resource file etc..
Further, in the present embodiment, in order to avoid the application being currently running during application upgrade is interrupted, provided in upgrade package File path where source file will be different from using the file path where resource file in corresponding file bag.
It should be understood that, it is generally the case that the catalogue in upgrade package and file bag is one-to-one, in order to application upgrade During file renewal.Therefore, the difference of file path where resource file can be by file bag and upgrade package Central Plains Have and add new subdirectory under catalogue respectively to realize, can also be by adding new catalogue in file bag and upgrade package come real It is existing.
By taking resource file is picture resource as an example, by adding different subdirectories under original catalogue in file bag, make The file path obtained in file bag and upgrade package where picture resource is otherwise varied.For example, the corresponding figure of current version will be applied Piece resource is stored under 1.0 subdirectories increased newly in file bag, and will be stored in liter using the corresponding picture resource of more new version Under 1.1 subdirectories increased newly in level bag.That is, if the file path in file bag where picture resource is A.app/ Contents/Resources/1.0/B.jpg, then the file path in upgrade package where picture resource will be A.app/ Contents/Resources/1.1/ B.jpg。
More preferably, in one exemplary embodiment, in the corresponding upgrade package of application, add for storing in the upgrade package The catalogue of resource file, so that the file path in upgrade package where resource file is different from using resource in corresponding file bag File path where file.Accordingly, in the corresponding file bag of application, also add for storing resource text in this document bag The catalogue of part.
It is noted that the adjustment of above-mentioned file path can be previously-completed in the server for making upgrade package, into And causing terminal when getting using corresponding upgrade package, the file path in the upgrade package where resource file is and should It is otherwise varied with the file path where resource file in corresponding file bag.
Or the operation by upgrade procedure in terminal, carry out the adjustment of above-mentioned file path.Then, above-mentioned file road The adjustment in footpath will carry out between getting upgrade package and application is upgraded by upgrade package, i.e., before application upgrade, The file path in upgrade package where resource file is set to be different from using the file road where resource file in corresponding file bag Footpath.
Step 350, extreme saturation upgrade package, with according to file place file path in upgrade package with applying corresponding file The difference of file path where file in bag, merges the file in upgrade package to using corresponding file bag.
So-called upgrading refers to making to apply upgrading to more new version by current version, for this reason, the file in upgrade package is It is the file corresponding to using the more new version completed after upgrading.Then, when the All Files in upgrade package is all updated to application During corresponding file bag, that is, think using completing upgrading.
In the present embodiment, the renewal is completed by Piece file mergence.Wherein, merging can be file replacement, file Copy etc..All Files in bag to be upgraded completes Piece file mergence, and the upgrading of application also just correspondingly completes.When in terminal This is run again in application, being the application of more new version.
Further, merging process is:By the extreme saturation to upgrade package, the file where file in upgrade package is obtained Path, and then the difference in file path where comparing file in the upgrade package and file bag between file path where file, And the file merged according to the difference in upgrade package extremely applies corresponding file bag.
Further, merging includes copying the resource file according to the file path where resource file in upgrade package Into file bag.
Specifically, since the file path where resource file in upgrade package is different from file bag where resource file File path, i.e., be not present and resource text in upgrade package according to the file path where resource file in upgrade package in file bag The identical resource file of part, therefore, when carrying out Piece file mergence, the resource file in upgrade package is according to the file road where it Footpath is copied to file bag, and and it is non-replaced so that the resource that resource file in upgrade package will not be in overlay file bag File.
That is, the corresponding resource file of current version will not be deleted in file bag, if be currently running in terminal The application of current version, then the application still can continue to read its required resource file, so that this is applied Still can be with normal operation during application upgrade, and avoid necessary out of service during application upgrade in the prior art The application of current version.
By process as described above, the silent upgrading of application is realized, i.e., need not interrupt the application being currently running, and then The current operation of user is not interfered with, so as to effectively improve user experience.
Further, since the application being currently running will not be interrupted so that user is unlikely to refuse to application upgrade unaware Exhausted upgrade application, can not only improve the turnover rate of application, and because continually upgrading application user will not be caused to dislike, from And be conducive to the iteratively faster exploitation of application, and can effectively further lift user experience.
Referring to Fig. 4, in one exemplary embodiment, before step 350, method as described above can also include following Step:
Step 410, the executable program file in load document bag passes through load operating application to memory.
Step 430, in the operation of application resource text is read according to the file path where resource file in file bag Part.
The corresponding resource file of current version is only contained before Piece file mergence is carried out, in file bag, so pass through reading Take that the resource file in file bag run is the application of current version, that is to say, that in the present embodiment, is carrying out file conjunction And before, the application of current version is currently running.
Since the resource file that the resource file in file bag can't be upgraded when carrying out Piece file mergence in bag is covered Lid, therefore, applying for current version still can continue to read the corresponding resource file of current version during application upgrade, So that the application of current version still can be with normal operation, avoiding during application upgrade must current version out of service Using realizing that the silent of application upgrades with this.
Referring to Fig. 5, in one exemplary embodiment, step 350 may comprise steps of:
Step 351, judge that this document whether there is in file bag according to the file path where file in upgrade package.
As it was previously stated, it can be that file is replaced to merge, even there are identical file, then with more new version pair in upgrade package The corresponding file of current version or file copy in the file overlay file bag answered, even there is no identical file, Then copy upgrade package in the corresponding file of more new version into file bag.
Based on this, before Piece file mergence is carried out, it will determine that the file in upgrade package whether there is in file bag.Into one Step, in the present embodiment, which is by carrying out extreme saturation realization in upgrade package, i.e., according to file institute in upgrade package File path file is judged.
It is not present in file bag, enters if judging to obtain this document according to the file path where file in upgrade package Step 353.If being present in conversely, judging to obtain this document according to the file path where file in upgrade package in file bag, Enter step 355.
Step 353, the file in upgrade package is copied in file bag according to the file path where it.
Step 355, with the file in the file alternate file bag in upgrade package.
By taking MAC systems as an example, Fig. 5 a show that the file path where file, Fig. 5 b show in the preceding document bag of Piece file mergence The file path in upgrade package where file before Piece file mergence is gone out.
As shown in Fig. 5 a to 5b, it is assumed that there is no remaining subdirectory in _ CodeSignature catalogues and only store signature text Part, also stores without remaining subdirectory and only executable program file in MacOS catalogues, is then used to deposit in Versions catalogues Resource file is stored up, for example, what is stored in Versions/1.0 catalogues is to apply 1.0 versions(That is current version)Corresponding resource text Part, what is stored in Versions/1.1 catalogues is to apply 1.1 versions(That is more new version)Corresponding resource file, and Any file is not stored due to being additionally arranged Versions catalogues in Resources catalogues.
It follows that Contents/_CodeSignature, Info.plist in upgrade package(Application information file)、 The file that Contents/ MacOS, Contents/Resources file paths are stored is present in file bag, so, , will be corresponding with current version in those corresponding file alternate file bags of more new version in upgrade package when carrying out Piece file mergence In file, i.e. file bag the corresponding file of current version because be upgraded bag in those corresponding files of more new version cover and by Delete.
Since Versions/1.1 file paths are different from Versions/1.0 file paths in file bag in upgrade package, i.e., The resource file that Versions/1.1 file paths are stored in upgrade package is not present in file bag, therefore, into style of writing When part merges, directly the resource file that Versions/1.1 file paths are stored in upgrade package is copied in file bag, i.e., The resource file corresponding to more new version has been newly increased in file bag, while has also remained the text of the resource corresponding to current version Part.
As shown in Figure 5 c, question paper, which merges, completes, signature file, application information file and executable program in file bag File is replaced for 1.1 versions by 1.0 versions, and resource file then corresponds to two versions(1.0 versions and 1.1 editions This).
It is appreciated that after Piece file mergence is completed, even if executable program file has been replaced by 1.1 versions, but Since the corresponding executable program file of 1.0 versions has been loaded on memory, it does not interfere with the fortune of the application of 1.0 versions OK.
Simultaneously as the resource file corresponding to 1.0 versions is not deleted, the application of 1.0 versions still can be read To its required resource file, so the outage of the application of 1.0 versions will not be caused, so that user still may be used With the application of 1.0 version of normal use, its any operation made also need not be all interrupted, it is achieved thereby that user's unaware Application upgrade pattern, effectively improve user experience.
Further, since contain the corresponding signature file of 1.1 versions, executable program file and resource at the same time in file bag File so that three has identical digital signature, destroys signature integrality, and therefore, the applications of 1.1 versions will not be by GateKeeper mechanism is considered the malicious application illegally distorted, and then when restarting in terminal should be in application, can run 1.1 the application of version.
It is noted that after being completed due to application upgrade, upgrade procedure will also be in system configuration file by accordingly The application version number of application is updated to 1.1 by 1.0, so that the application of 1.1 versions in operation will be according in configuration file Application version number read corresponding resource file, the i.e. corresponding resource file of 1.1 versions, therefore, even if in file bag at the same time The corresponding resource file of 1.0 versions and the corresponding resource file of 1.1 versions are contained, can't be to the fortune of the application of 1.1 versions Row produces any influence.
In one exemplary embodiment, after upgrading is completed in application, the resource file in file bag at least corresponds to two A version.
As it was previously stated, by the way that the file path where resource file in upgrade package is different from resource file institute in file bag File path so that extreme saturation is carried out in upgrade package, by the resource file in upgrade package according to the file where it When path is copied to file bag, resource file that will not be in overlay file bag.
In other words, the corresponding resource file of current version is not only contained in file bag, will also include more new version pair Resource file in the resource file answered, i.e. file bag at least corresponds to two versions.
Correspondingly, after step 350, method as described above can also comprise the following steps:
Delete processing is carried out to the resource file in file bag according to default deletion rule.
It should be appreciated that after application upgrade is completed every time, the resource file included in file bag will all increased, that is, rise Resource file in level bag is copied in file bag as the corresponding resource file of more new version, while also retains in file bag The corresponding resource file of current version.
However, the memory space in terminal is limited, will if increasing the resource file in file bag without limitation The operation of terminal operating system is caused to be collapsed.
Based on this, in the present embodiment, application upgrade completion after, by according to default deletion rule to the money in file bag Source file carries out delete processing.
Wherein, default deletion rule can be set according to the version number of reservation, can also be according to the copy of resource file Time is set.
For example, if default deletion rule is arranged to only retain the corresponding resource file of newest two versions, text The corresponding resource file of more new version and current version corresponding resource text when can only retain last time application upgrade in part bag Part, and delete the corresponding resource file of remaining version.
If default deletion rule is arranged to delete copy time and resource file of the current time more than one month, file Only retain copy time and resource file of the current time not less than one month in bag, and delete remaining and meet default deletion rule Resource file.
Further, after being completed due to application upgrade, the application of current version may still run, then current version pair The resource file answered can be still read, based on this, default deletion rule may be arranged as not deleting be read it is current The corresponding resource file of version.In other words, the corresponding resource file of current version is only out of service in the application of current version When, be possible to be deleted.
By process as described above, the occupancy of memory space in terminal is significantly reduced, at the same time, additionally it is possible to avoid The application that application upgrade is completed to be currently running afterwards is interrupted.
Following is embodiment of the present disclosure, can be used for performing the application upgrade method involved by the disclosure.For this The details not disclosed in disclosed device embodiment, refer to the application upgrade embodiment of the method involved by the disclosure.
Referring to Fig. 6, in one exemplary embodiment, a kind of application upgrade device 600 includes but not limited to:Renewal checks Module 610, upgrade package acquisition module 630 and file combination module 650.
Wherein, renewal checks that module 610 is used to check that application whether there is more new version.
Upgrade package acquisition module 630 is used to initiate application renewal request when application has more new version, by application more New acquisition request applies corresponding upgrade package.File path in upgrade package where resource file is different from using corresponding file File path in bag where resource file.
File combination module 650 is used for extreme saturation upgrade package, with the file path according to where file in upgrade package and answers The difference of file path where file in corresponding file bag, merges the file in upgrade package to using corresponding file bag.
Referring to Fig. 7, in one exemplary embodiment, device 600 as described above is further included but is not limited to:Application operation Module 710 and file read module 730.
Wherein, application operation module 710 passes through to load and transports for the executable program file in load document bag to memory Row application.
File read module 730 is used to read according to the file path where resource file in file bag in the operation of application Take the resource file.
Referring to Fig. 8, in one exemplary embodiment, file combination module 650 includes but not limited to:Path judging unit 651 and file copy unit 653.
Wherein, path judging unit 651 is used to whether judge this document according to the file path where file in upgrade package It is present in file bag.If being not present, circular document copy cell 653.
File copy unit 653 is used to the file in upgrade package being copied to file bag according to the file path where it In.
Further, as shown in figure 8, in one exemplary embodiment, file combination module 650 is further included but is not limited to: File replacement unit 655.
Wherein, file replacement unit 655 is used to judge to obtain this document according to the file path where file in upgrade package It is present in file bag, then with the file in the file alternate file bag in upgrade package.
In one exemplary embodiment, device as described above is further included but is not limited to:File removing module.
Wherein, file removing module is used to carry out at deletion the resource file in file bag according to default deletion rule Reason.
In one exemplary embodiment, device as described above is further included but is not limited to:Catalogue adds module.
Wherein, catalogue is added module and is used in the corresponding upgrade package of application, adds for storing resource in the upgrade package The catalogue of file, so that the file path in upgrade package where resource file is different from using resource file in corresponding file bag The file path at place.
It should be noted that the application upgrade device that above-described embodiment is provided is when carrying out application upgrade, only with above-mentioned The division progress of each function module, can be as needed and by above-mentioned function distribution by different for example, in practical application Function module is completed, i.e., the internal structure of application upgrade device will be divided into different function modules, described above to complete All or part of function.
In addition, application upgrade device and the embodiment of application upgrade method that above-described embodiment is provided belong to same structure Think, wherein modules perform the concrete mode operated and are described in detail in embodiment of the method, no longer superfluous herein State.
The preferable examples embodiment of the above, the only disclosure, the embodiment for being not intended to limit the disclosure, this Field those of ordinary skill can very easily carry out corresponding flexible or repair according to the central scope and spirit of the disclosure Change, therefore the protection domain of the disclosure should be subject to the protection domain required by claims.

Claims (12)

  1. A kind of 1. application upgrade method, it is characterised in that including:
    Check that application whether there is more new version;
    Application renewal request is initiated when the application has more new version, is updated by the application and is applied described in acquisition request Corresponding upgrade package, the file path in the upgrade package where resource file are different from the corresponding file bag of the application and provide File path where source file;
    Upgrade package described in extreme saturation, with file path and the corresponding file of the application according to where file in the upgrade package The difference of file path where file in bag, the file merged in the upgrade package apply corresponding file bag to described.
  2. 2. the method as described in claim 1, it is characterised in that upgrade package described in the extreme saturation, with according to the upgrading File path where file and the difference using file path where file in corresponding file bag, merge the liter in bag Before file to the step of application corresponding file bag in level bag, the method further includes:
    The executable program file in the file bag is loaded to memory, by being applied described in the load operating;
    In the operation of the application resource file is read according to the file path where resource file in the file bag.
  3. 3. the method as described in claim 1, it is characterised in that upgrade package described in the extreme saturation, with according to the upgrading File path where file and the difference using file path where file in corresponding file bag, merge the liter in bag File to the step of application corresponding file bag in level bag, includes:
    Judge that this document whether there is in the file bag according to the file path where file in the upgrade package;
    If being not present, the file in the upgrade package is copied in the file bag according to the file path where it.
  4. 4. method as claimed in claim 3, it is characterised in that upgrade package described in the extreme saturation, with according to the upgrading File path where file and the difference using file path where file in corresponding file bag, merge the liter in bag File to the step of application corresponding file bag in level bag, further includes:
    Judge to obtain this document according to the file path where file in the upgrade package and be present in the file bag, then with institute State the file in the file replacement file bag in upgrade package.
  5. 5. the method as described in claim 1, it is characterised in that upgrade package described in the extreme saturation, with according to the upgrading File path where file and the difference using file path where file in corresponding file bag, merge the liter in bag After file to the step of application corresponding file bag in level bag, the method further includes:
    Delete processing is carried out to the resource file in the file bag according to default deletion rule.
  6. 6. the method as described in claim 1 to 5 is any, it is characterised in that the method further includes:
    In the corresponding upgrade package of the application, the catalogue for storing resource file in the upgrade package is added, so that the liter File path in level bag where resource file is different from the file road using where resource file in corresponding file bag Footpath.
  7. A kind of 7. application upgrade device, it is characterised in that including:
    Renewal checks module, for checking that application whether there is more new version;
    Upgrade package acquisition module, for initiating application renewal request when the application has more new version, passes through the application Update and corresponding upgrade package is applied described in acquisition request, the file path in the upgrade package where resource file is different from described Using the file path where resource file in corresponding file bag;
    File combination module, for upgrade package described in extreme saturation, with according to where file in the upgrade package file path with The difference using file path where file in corresponding file bag, merges file in the upgrade package to the application Corresponding file bag.
  8. 8. device as claimed in claim 7, it is characterised in that described device further includes:
    Application operation module, for loading the executable program file in the file bag to memory, passes through the load operating The application;
    File read module, in the operation of the application according to the file path where resource file in the file bag Read the resource file.
  9. 9. device as claimed in claim 7, it is characterised in that the file combination module includes:
    Path judging unit, for judging that this document whether there is in institute according to the file path where file in the upgrade package State in file bag;If being not present, circular document copy cell;
    The file copy unit, for file in upgrade package to be copied to the text according to the file path where it In part bag.
  10. 10. device as claimed in claim 9, it is characterised in that the file combination module further includes:
    File replacement unit, is present in institute for judging to obtain this document according to the file path where file in the upgrade package State in file bag, then the file in the file bag is replaced with the file in the upgrade package.
  11. 11. device as claimed in claim 7, it is characterised in that described device further includes:
    File removing module, for carrying out delete processing to the resource file in the file bag according to default deletion rule.
  12. 12. the device as described in claim 7 to 11 is any, it is characterised in that described device further includes:
    Catalogue adds module, in the corresponding upgrade package of the application, adding for storing resource file in the upgrade package Catalogue so that the file path in the upgrade package where resource file is different from resource in the corresponding file bag of the application File path where file.
CN201610974060.2A 2016-10-27 2016-10-27 Application upgrade method and device Pending CN108008970A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610974060.2A CN108008970A (en) 2016-10-27 2016-10-27 Application upgrade method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610974060.2A CN108008970A (en) 2016-10-27 2016-10-27 Application upgrade method and device

Publications (1)

Publication Number Publication Date
CN108008970A true CN108008970A (en) 2018-05-08

Family

ID=62048423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610974060.2A Pending CN108008970A (en) 2016-10-27 2016-10-27 Application upgrade method and device

Country Status (1)

Country Link
CN (1) CN108008970A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367563A (en) * 2020-03-06 2020-07-03 中国银行股份有限公司 Host version merging method and device
CN113778546A (en) * 2021-03-19 2021-12-10 北京沃东天骏信息技术有限公司 Method and device for gray scale optimization

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009589A (en) * 2006-01-26 2007-08-01 腾讯科技(深圳)有限公司 A method and system for software upgrade
CN102955702A (en) * 2011-08-23 2013-03-06 腾讯科技(深圳)有限公司 Method and device for installing and upgrading software
CN105635277A (en) * 2015-12-30 2016-06-01 北京京东尚科信息技术有限公司 Upgrade packet providing method and device and client side upgrade method and device
CN105808273A (en) * 2014-12-30 2016-07-27 Tcl集团股份有限公司 Software upgrading method and software upgrading device
JP2016139211A (en) * 2015-01-26 2016-08-04 Kddi株式会社 Software update device, method, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009589A (en) * 2006-01-26 2007-08-01 腾讯科技(深圳)有限公司 A method and system for software upgrade
CN102955702A (en) * 2011-08-23 2013-03-06 腾讯科技(深圳)有限公司 Method and device for installing and upgrading software
CN105808273A (en) * 2014-12-30 2016-07-27 Tcl集团股份有限公司 Software upgrading method and software upgrading device
JP2016139211A (en) * 2015-01-26 2016-08-04 Kddi株式会社 Software update device, method, and program
CN105635277A (en) * 2015-12-30 2016-06-01 北京京东尚科信息技术有限公司 Upgrade packet providing method and device and client side upgrade method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111367563A (en) * 2020-03-06 2020-07-03 中国银行股份有限公司 Host version merging method and device
CN111367563B (en) * 2020-03-06 2024-02-23 中国银行股份有限公司 Host version merging method and device
CN113778546A (en) * 2021-03-19 2021-12-10 北京沃东天骏信息技术有限公司 Method and device for gray scale optimization

Similar Documents

Publication Publication Date Title
US10742694B2 (en) Method for migrating data and terminal
CN105302587B (en) Data-updating method and device
CN107273160A (en) A kind of method and device of edition upgrading
CN106126685B (en) Page loading method and device
US10021213B2 (en) Systems and methods for adaptive cloning of mobile devices
US10372383B2 (en) Providing secure access to data in mobile devices
CN104991793A (en) Method, device and system used for application program subpackage
WO2011095914A1 (en) Systems, methods, and apparatuses for facilitating distribution of firmware updates
CN105335187A (en) Application processing method and apparatus
CN103716346A (en) Management method and device of application on android handset client
CN106201610A (en) Web application accesses the method and device of the primary function of terminal
US20170163787A1 (en) Method and electronic device for upgrading or downgrading system
CN105446768A (en) System upgrading method and apparatus
CN106681749A (en) Local code patch updating method and device based on Android platform
CN111273942A (en) Code generation method, storage medium, electronic device and system
CN103634393A (en) IVR (interactive voice response) and realization method thereof
CN107018189A (en) Migrate application data and receive the method and device of application data
CN108008970A (en) Application upgrade method and device
CN104199682A (en) Information processing method and electronic equipment
CN110046000A (en) Small routine operation method and device
CN106330561A (en) Dynamic UI setting method and apparatus
CN111443903A (en) Software development file acquisition method and device, electronic equipment and storage medium
CN112988426B (en) Message processing method and device
US11757976B2 (en) Unified application management for heterogeneous application delivery
CN106664637A (en) Routing information configuration method and apparatus

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

Application publication date: 20180508

RJ01 Rejection of invention patent application after publication