CN104699511A - Plug-in upgrading method and plug-in upgrading device - Google Patents

Plug-in upgrading method and plug-in upgrading device Download PDF

Info

Publication number
CN104699511A
CN104699511A CN201510142837.4A CN201510142837A CN104699511A CN 104699511 A CN104699511 A CN 104699511A CN 201510142837 A CN201510142837 A CN 201510142837A CN 104699511 A CN104699511 A CN 104699511A
Authority
CN
China
Prior art keywords
plug
version
unit
master routine
adaptation
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.)
Granted
Application number
CN201510142837.4A
Other languages
Chinese (zh)
Other versions
CN104699511B (en
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 Anyun Century Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510142837.4A priority Critical patent/CN104699511B/en
Publication of CN104699511A publication Critical patent/CN104699511A/en
Application granted granted Critical
Publication of CN104699511B publication Critical patent/CN104699511B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a plug-in upgrading method and a plug-in upgrading device. The method includes: when capturing a trigger event for upgrading a plug-in in a main program, acquiring a current version, existing in the main program, of the plug-in; acquiring a plug-in version, matched with the main program, of the plug-in from the main program; comparing the current version of the plug-in with the plug-in version matched with the main program to acquire a comparison result; upgrading the plug-in selectively according to the comparison result. Compared with the prior art, the plug-in upgrading method and the plug-in upgrading device have the advantages that downloading of a new main program is not needed for guaranteeing match between a new plug-in and the main program, upgrading efficiency is improved, and system and network resources are saved.

Description

Plug-in unit upgrade method and device
Technical field
The present invention relates to computer processing technology field, particularly a kind of plug-in unit upgrade method and device.
Background technology
In software development, conveniently carry out Function Extension to software, plug-in unit mode can be adopted to develop, each plug-in unit, in plug-in unit, is finally integrated in software main program bag and together issues by the function package one by one that will be realized by software.
Normal mutual in order to what ensure between plug-in unit and master routine, need plug-in unit and master routine adaptation, in prior art, realized by the one-to-one relationship write in main program code between dead master routine version and plug-in version.Such as, master routine is upgraded to version 2 from version 1, and now plug-in unit is also upgraded to version 2 from version 1, and it is alternately normal that the one-to-one relationship that can write master routine version 2 and plug-in version 2 in main program code in correlation technique ensures between the two.But, if plug-in unit can be upgraded to version 3 from version 2, owing to writing dead one-to-one relationship in main program code, need to download and install the business function that master routine version 3 could use plug-in version 3, thus cause the plug-in version in master routine can not obtain in time upgrading upgrading.
Summary of the invention
In view of the above problems, the present invention is proposed to provide a kind of overcoming the problems referred to above or the plug-in unit upgrade method solved the problem at least in part and device.
According to one aspect of the present invention, providing a kind of plug-in unit upgrade method, comprising: when capturing the trigger event of upgrading to the plug-in unit in master routine, obtaining the current version of already present described plug-in unit in described master routine; Obtain from described master routine described plug-in unit, with the plug-in version of described master routine adaptation; The plug-in version of the current version of described plug-in unit and described master routine adaptation is compared, obtains comparison result; Optionally described plug-in unit is upgraded according to described comparison result.
Alternatively, if the interface between described master routine and described plug-in unit changes, obtain from described master routine described plug-in unit, with the plug-in version of described master routine adaptation, comprising: at least one plug-in version obtaining described plug-in unit from described master routine; From at least one plug-in version of described plug-in unit, determine described interface change after with the plug-in version of described master routine adaptation.
Alternatively, from at least one plug-in version of described plug-in unit, determine described interface change after with the plug-in version of described master routine adaptation, comprising: the minimum interface version that each plug-in version obtaining minimum interface version that described master routine can support and the highest interface version and described plug-in unit can use and the highest interface version; In each plug-in version of described plug-in unit, the minimum interface version that it can be used and the highest interface version are all positioned at the plug-in version of the interval range of minimum interface version that described master routine can support and the highest interface version, be defined as described interface change after with the plug-in version of described master routine adaptation.
Alternatively, the plug-in version of the current version of described plug-in unit and described master routine adaptation is compared, comprising: the version identifier obtaining the version identifier of the current version of described plug-in unit and the plug-in version with described master routine adaptation; According to version identifier, the current version of plug-in unit described in comparison and the plug-in version of described master routine adaptation of the version identifier of the current version of described plug-in unit and the plug-in version with described master routine adaptation.
Alternatively, according to the version identifier of the version identifier of the current version of described plug-in unit and the plug-in version with described master routine adaptation, the current version of plug-in unit described in comparison and the plug-in version of described master routine adaptation, obtain comparison result, comprise: if described plug-in unit, with the version identifier of the plug-in version of described master routine adaptation in there is the version identifier of described current version, then described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is described current version; If described plug-in unit, with the version identifier of the plug-in version of described master routine adaptation in there is not the version identifier of described current version, then described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is not described current version.
Alternatively, optionally described plug-in unit is upgraded according to described comparison result, comprise: if described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is described current version, then judge whether described current version is latest edition, if, then updating operation is not carried out to described plug-in unit, and if not, then utilize described latest edition to carry out updating operation to described plug-in unit; If described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is not described current version, then from the plug-in version of described master routine adaptation choose any plug-in version, and then download corresponding plug-in unit according to the described any plug-in version chosen, and carry out updating operation after the download is complete.
Alternatively, described version identifier comprise following one of at least: MD5 (the Message Digest Algorithm5 of version number, version name, version, message digest algorithm 5) value, version SHA1 (SecureHash Algorithm1, Secure Hash Algorithm 1) value.
Alternatively, described method also comprises: send plug-in unit to cloud server and obtain request, wherein, prestore the plug-in unit list comprised with multiple plug-in versions of described master routine adaptation in described cloud server; Receive that described cloud server returns according to described plug-in unit list, with the plug-in version of described master routine adaptation.
Alternatively, described cloud server return according to described plug-in unit list, with the plug-in version of described master routine adaptation in also carry following one of at least: the minimum interface version that each plug-in version of URL address, plug-in unit name, plug-in unit can use and the highest interface version.
Alternatively, after optionally described plug-in unit being upgraded according to described comparison result, also comprise: start the plug-in version after upgrading.
Alternatively, the plug-in version after described startup upgrading, comprising: the process traveling through all startups, and the process judging whether to exist startup belongs to the plug-in unit of described current version; If exist, then kill the startup process of the plug-in unit of described current version, and start new process to run plug-in unit corresponding to the plug-in version after upgrading.
According to another aspect of the present invention, additionally provide a kind of plug-in unit update device, comprising:
Acquisition module, is suitable for, when capturing the trigger event of upgrading to the plug-in unit in master routine, obtaining the current version of already present described plug-in unit in described master routine; And obtain from described master routine described plug-in unit, with the plug-in version of described master routine adaptation;
Comparing module, is suitable for the plug-in version of the current version of described plug-in unit and described master routine adaptation to compare, obtains comparison result;
Upgraded module, is suitable for optionally upgrading to described plug-in unit according to described comparison result.
Alternatively, if the interface between described master routine and described plug-in unit changes, described acquisition module is also suitable for: at least one plug-in version obtaining described plug-in unit from described master routine; From at least one plug-in version of described plug-in unit, determine described interface change after with the plug-in version of described master routine adaptation.
Alternatively, described acquisition module is also suitable for: the minimum interface version that each plug-in version obtaining minimum interface version that described master routine can support and the highest interface version and described plug-in unit can use and the highest interface version; In each plug-in version of described plug-in unit, the minimum interface version that it can be used and the highest interface version are all positioned at the plug-in version of the interval range of minimum interface version that described master routine can support and the highest interface version, be defined as described interface change after with the plug-in version of described master routine adaptation.
Alternatively, described comparing module is also suitable for: the version identifier obtaining the version identifier of the current version of described plug-in unit and the plug-in version with described master routine adaptation; According to version identifier, the current version of plug-in unit described in comparison and the plug-in version of described master routine adaptation of the version identifier of the current version of described plug-in unit and the plug-in version with described master routine adaptation.
Alternatively, described comparing module is also suitable for: if described plug-in unit, with the version identifier of the plug-in version of described master routine adaptation in there is the version identifier of described current version, then described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is described current version; If described plug-in unit, with the version identifier of the plug-in version of described master routine adaptation in there is not the version identifier of described current version, then described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is not described current version.
Alternatively, described upgraded module is also suitable for: if described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is described current version, then judge whether described current version is latest edition, if, then updating operation is not carried out to described plug-in unit, and if not, then utilize described latest edition to carry out updating operation to described plug-in unit; If described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is not described current version, then from the plug-in version of described master routine adaptation choose any plug-in version, and then download corresponding plug-in unit according to the described any plug-in version chosen, and carry out updating operation after the download is complete.
Alternatively, described version identifier comprise following one of at least: the MD5 value of version number, version name, version, the SHA1 value of version.
Alternatively, described device also comprises:
Request sending module, is suitable for sending plug-in unit to cloud server and obtains request, wherein, prestore the plug-in unit list comprised with multiple plug-in versions of described master routine adaptation in described cloud server;
Information receiving module, be suitable for receiving that described cloud server returns according to described plug-in unit list, with the plug-in version of described master routine adaptation.
Alternatively, described cloud server return according to described plug-in unit list, with the plug-in version of described master routine adaptation in also carry following one of at least: the minimum interface version that each plug-in version of URL address, plug-in unit name, plug-in unit can use and the highest interface version.
Alternatively, after described upgraded module is optionally upgraded to described plug-in unit according to described comparison result, also comprise: start module, be suitable for the plug-in version after starting upgrading.
Alternatively, described startup module is also suitable for: the process traveling through all startups, and the process judging whether to exist startup belongs to the plug-in unit of described current version; If exist, then kill the startup process of the plug-in unit of described current version, and start new process to run plug-in unit corresponding to the plug-in version after upgrading.
According to another aspect of the present invention, additionally provide a kind of terminal, comprising:
Storer;
One or more processor;
Wherein, described one or more processor is configured to perform following method:
When capturing the trigger event of upgrading to the plug-in unit in master routine, obtain the current version of already present described plug-in unit in described master routine;
Obtain from described master routine described plug-in unit, with the plug-in version of described master routine adaptation;
The plug-in version of the current version of described plug-in unit and described master routine adaptation is compared, obtains comparison result;
Optionally described plug-in unit is upgraded according to described comparison result.
In technical scheme provided by the invention, when capturing the trigger event of upgrading to the plug-in unit in master routine, can directly get from master routine this plug-in unit, with the plug-in version of master routine adaptation, thus by the current version of this plug-in unit and this plug-in unit, to compare with the plug-in version of master routine adaptation after, optionally this plug-in unit is upgraded according to comparison result.Compared to prior art, the present invention, without the need to downloading new master routine to ensure new plug-in unit and master routine adaptation, improves upgrading efficiency, saves System and Network resource.Further, the present invention can get from master routine flexibly, exactly plug-in unit, with the plug-in version of master routine adaptation, thus it is normal mutual to ensure between plug-in unit and master routine, even if the interface between master routine and plug-in unit changes, still can ensure plug-in version and master routine version adaptation, thus can avoid in prior art because of interface change the plug-in unit that causes or master routine not adaptive and the problems such as collapse occur, improve the validity of upgrading.In addition, the present invention by the current version of plug-in unit and this plug-in unit, compare with the plug-in version of master routine adaptation, thus can know that whether the current version of plug-in unit is adaptive with master routine by comparison, if the current version of plug-in unit and master routine are not adaptive, even if current version is latest edition, also need again to upgrade, namely can according to this plug-in unit, upgrade with the plug-in version of master routine adaptation, further ensure the validity of upgrading.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of instructions, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
According to hereafter by reference to the accompanying drawings to the detailed description of the specific embodiment of the invention, those skilled in the art will understand above-mentioned and other objects, advantage and feature of the present invention more.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become cheer and bright for those of ordinary skill in the art.Accompanying drawing only for illustrating the object of preferred implementation, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 shows the process flow diagram of plug-in unit upgrade method according to an embodiment of the invention;
Fig. 2 shows plug-in version according to an embodiment of the invention and controls schematic diagram;
Fig. 3 shows the process flow diagram of plug-in unit upgrade method in accordance with another embodiment of the present invention;
Fig. 4 shows the structural representation of plug-in unit update device according to an embodiment of the invention; And
Fig. 5 shows the structural representation of plug-in unit update device in accordance with another embodiment of the present invention.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
For solving the problems of the technologies described above, the invention provides a kind of plug-in unit upgrade method.Fig. 1 shows the process flow diagram of plug-in unit upgrade method according to an embodiment of the invention.As shown in Figure 1, the method at least comprises the following steps S102 to step S108.
Step S102, when capturing the trigger event of upgrading to the plug-in unit in master routine, obtain the current version of already present plug-in unit in master routine.
Step S104, obtain from master routine plug-in unit, with the plug-in version of master routine adaptation.
Step S106, the plug-in version of the current version of plug-in unit and master routine adaptation to be compared, obtain comparison result.
Step S108, optionally plug-in unit to be upgraded according to comparison result.
In technical scheme provided by the invention, when capturing the trigger event of upgrading to the plug-in unit in master routine, can directly get from master routine this plug-in unit, with the plug-in version of master routine adaptation, thus by the current version of this plug-in unit and this plug-in unit, to compare with the plug-in version of master routine adaptation after, optionally this plug-in unit is upgraded according to comparison result.Compared to prior art, the present invention, without the need to downloading new master routine to ensure new plug-in unit and master routine adaptation, improves upgrading efficiency, saves System and Network resource.Further, the present invention can get from master routine flexibly, exactly plug-in unit, with the plug-in version of master routine adaptation, thus it is normal mutual to ensure between plug-in unit and master routine, even if the interface between master routine and plug-in unit changes, still can ensure plug-in version and master routine version adaptation, thus can avoid in prior art because of interface change the plug-in unit that causes or master routine not adaptive and the problems such as collapse occur, improve the validity of upgrading.In addition, the present invention by the current version of plug-in unit and this plug-in unit, compare with the plug-in version of master routine adaptation, thus can know that whether the current version of plug-in unit is adaptive with master routine by comparison, if the current version of plug-in unit and master routine are not adaptive, even if current version is latest edition, also need again to upgrade, namely can according to this plug-in unit, upgrade with the plug-in version of master routine adaptation, further ensure the validity of upgrading.
Referring to the plug-in version of master routine adaptation of the plug-in unit mentioned in step S104 above can be normally mutual between the plug-in unit that plug-in version is corresponding and master routine.Here the master routine mentioned, i.e. host program, as 360 mobile phone bodyguards, 360 virus killings etc.Plug-in unit refers to applets, as " antitheft " plug-in unit in 360 mobile phone bodyguards, " start is accelerated " plug-in unit, " calendar " plug-in unit, etc.Further, plug-in unit, can write in main program code with the plug-in version of master routine adaptation, also can write in the file of master routine, as being recorded in the file of master routine in the form of a list, usually a JSON (Javascript ObjectNotation can be there is, the data interchange language of lightweight) or XML (eXtensible Markup Language, extend markup language) file in.In addition, under plug-in unit storage directory is generally placed on the catalogue of application program in built-in storage, such as mobile phone terminal /data/data/XXX/files under, wherein XXX represents the bag name of master routine.
If the interface between master routine and plug-in unit changes, in order to ensure master routine and plug-in unit adaptation, the invention provides a kind of preferred embodiment, in this scenario, at least one plug-in version of plug-in unit can be obtained from master routine, subsequently from least one plug-in version of plug-in unit, determine this interface change after with the plug-in version of master routine adaptation.Further, in embodiments of the present invention, the mode that can be controlled by plug-in version realizes from least one plug-in version of plug-in unit, determine this interface change after with the plug-in version of master routine adaptation.
First, composition graphs 2 pairs of plug-in version control programs are described.In Fig. 2, (1) represents the evolution of version, from left to right version more and more newer (or high); (2) represent the minimum interface version that master routine can be supported, also known as compatible version, this information can write in main program code or by other forms and record; (3) represent the highest interface version that master routine can be supported, also known as HOST (main frame) version, this information also can write in main program code or by other forms and record; (4) the indication plug unit minimum interface version that can use, this information can write in the configuration information of plug-in unit or by other forms and record; (5) the indication plug unit the highest interface version that can use, this information also can write in the configuration information of plug-in unit or by other forms and record.
As shown in Figure 2, the minimum interface version that can use when plug-in unit and the highest interface version all drop in the interval range of minimum interface version that master routine can support and the highest interface version, also can be equal, can assert that this plug-in version is effective, i.e. this plug-in version and master routine version adaptation.Particularly, in Fig. 2, <1> is effective plug-in version, the minimum interface version that this plug-in version can use is identical with the highest interface version, and in the minimum interface version all can supported at master routine and the highest this interval range of interface boards, this is that usual plug-in unit seldom relates to the situation revising interface.<2> is effective plug-in version, the minimum interface version that this plug-in version can use is different with the highest interface version, but in the minimum interface version all can supported at master routine and the highest this interval range of interface boards, be commonly considered as adjusting the interface of plug-in unit, but current master routine is not affected, meets the condition of plug-in unit and master routine adaptation.<3> is invalid plug-in version, namely plug-in version and master routine version not adaptive, supplement a kind of situation of <2>, the highest interface version that plug-in unit can use adjusts, and current master routine version is no longer compatible.Generally speaking, the adjustment plug-in unit the highest interface version that can use is the new interface in order to use master routine to provide, and at this time, if still use old master routine, then there will be plug-in unit and master routine is not adaptive.<4> is invalid plug-in version, also be that plug-in version and master routine version are not adaptive, here the another kind of situation of <2> is supplemented, if need the new interface that plug-in unit use master routine provides, or need to delete some excessively old master routine interfaces, so only need to adjust the minimum interface version that can support of master routine, just can allow " rolling off the production line " that the plug-in unit of some early versions is spontaneous, and be updated to redaction.
In conjunction with the above description about plug-in version control program, the mode controlled by plug-in version mentioned above realizes from least one plug-in version of plug-in unit, determine that this interface specifically can realize in the following manner with the plug-in version of master routine adaptation after changing, namely the minimum interface version that can support of master routine and the highest interface version is obtained, and each plug-in version of plug-in unit minimum interface version that can use and the highest interface version, subsequently in each plug-in version of plug-in unit, the minimum interface version that it can be used and the highest interface version are all positioned at the plug-in version of the interval range of minimum interface version that master routine can support and the highest interface version, be defined as this interface change after with the plug-in version of master routine adaptation.
The scheme of step S104 is above described in detail below by a specific embodiment.Following table 1 lists the relevant information of plug-in unit, the minimum interface version that can use as the version identifier of plug-in unit name, plug-in version, plug-in unit, plug-in unit and the highest interface version and plug-in unit deposit position etc.It should be noted that, in table 1, the relevant information of plug-in unit is only enumerated, the information such as the relevant information of plug-in unit can also comprise plug-in unit size, briefly introduce, and then follow-uply can carry out choosing of plug-in version in conjunction with plug-in version, plug-in unit size, the information such as to briefly introduce, meet diversified demand.
Table 1
If the minimum interface version that master routine can be supported is 1, the highest interface version is 1, can be so the version 1 of built-in A with the plug-in version of master routine adaptation.If the minimum interface version that master routine can be supported is 1, the highest interface version is 2, can be so the version 1 of built-in A and the version 1 of built-in B with the plug-in version of master routine adaptation.If the minimum interface version that master routine can be supported is 2, the highest interface version is 3, can be so the version 2 of built-in A with the plug-in version of master routine adaptation.
In addition, in an alternative embodiment of the invention, the plug-in unit list comprised with multiple plug-in versions of master routine adaptation is prestored in cloud server, cloud server also have collected the plug-in version of the various operating system features information that may occur and correspondence in advance, so that carry out matching ratio comparatively by characteristic information operating system platform information and these collected in advance, find the characteristic information with operating system platform information matches, the plug-in unit corresponding with described characteristic information is the plug-in unit of applicable current operation system.Now, step S104 may be embodied as and sends plug-in unit to cloud server and obtain request above, then receive that cloud server returns according to plug-in unit list, with the plug-in version of master routine adaptation.Further, after the plug-in unit obtaining described operating system adaptation, plug-in download address can be returned to plug-in unit loading system by cloud server.Such as, server can return the configuration structure of plug-in unit, which includes URL node, and this URL node is the download address of this plug-in unit.In addition, the minimum interface version that each plug-in version of plug-in unit name, plug-in unit also can use by cloud server and the highest interface version return to plug-in unit loading system, for use in follow-up loading work.
Step S104 obtain from master routine plug-in unit, with the plug-in version of master routine adaptation after, in step S106, the plug-in version of the current version of plug-in unit and master routine adaptation is compared, can directly utilize plug-in version to compare here.If comparison result be plug-in unit, with the plug-in version of master routine adaptation in there is current version, then judge whether current version is latest edition, does not if so, then carry out updating operation to plug-in unit further, and if not, then utilize latest edition to carry out updating operation to plug-in unit.If comparison result be plug-in unit, with the plug-in version of master routine adaptation in there is not current version, then from the plug-in version of master routine adaptation choose any plug-in version, and then download corresponding plug-in unit according to any plug-in version chosen, and carry out updating operation after the download is complete.
Further, distort plug-in version cause the inaccurate problem of comparison result to solve the malice that may exist, the embodiment of the present invention additionally provides a kind of preferred scheme, in this scenario, the version identifier of the version identifier of the current version of plug-in unit and the plug-in version with master routine adaptation can be obtained, subsequently according to version identifier, the current version of comparison plug-in unit and the plug-in version of master routine adaptation of the version identifier of the current version of plug-in unit and the plug-in version with master routine adaptation.Here, version identifier can be the MD5 value or SHA1 value etc. of version number, version name, plug-in version.Concrete, calculated unique hash (Hash) value of plug-in unit in the embodiment of the present invention by MD5 algorithm, i.e. MD5 value.The typical apply of MD5 algorithm produces informative abstract (Message-Digest) to a segment information (Message), to prevent from being tampered.Whole file is used as a Long Binary information by MD5, by its irreversible character string mapping algorithm, creates the MD5 informative abstract that this is unique.Certainly, the cryptographic hash that the embodiment of the present invention adopts other algorithms to calculate executable file according to actual conditions is all feasible, and such as adopt SHA1 etc., the present invention does not limit this.
If plug-in unit, with the version identifier of the plug-in version of master routine adaptation in there is the version identifier of current version, then determine comparison result be plug-in unit, with the plug-in version of master routine adaptation in there is current version, and judge whether current version is latest edition further, if, then updating operation is not carried out to plug-in unit, and if not, then utilize latest edition to carry out updating operation to plug-in unit.If plug-in unit, with the version identifier of the plug-in version of master routine adaptation in there is not the version identifier of current version, then determine comparison result be plug-in unit, with the plug-in version of master routine adaptation in there is not current version, and from the plug-in version of master routine adaptation choose any plug-in version, and then download corresponding plug-in unit according to any plug-in version chosen, and carry out updating operation after the download is complete.Here, have multiple with the reason that there is not the version identifier of current version in the version identifier of the plug-in version of master routine adaptation, such as, interface between master routine and plug-in unit is revised; In such as master routine, the current version of this plug-in unit already present has damage again, and its current version identifications (as MD5 value) changes, and causes comparison failure; In such as master routine, the current version of this plug-in unit already present is very old again, and it is normal mutual that it can not meet with master routine.Now, can choose any plug-in version from the plug-in version of master routine adaptation, wherein, the mode chosen has multiple, as chosen up-to-date plug-in version, and for example chooses according to the size of plug-in unit, chooses for another example according to user's evaluation information of plug-in unit, etc.
Further, here corresponding plug-in unit is downloaded according to any plug-in version chosen, the invention provides a kind of preferred scheme, in this scenario, can in the corresponding relation of the plug-in version set up in advance and plug-in unit storage address (local path or plug-in unit URL as plug-in unit) (corresponding relation as shown in table 1), search the plug-in unit storage address that any plug-in version of choosing is corresponding, and then download corresponding plug-in unit according to the plug-in unit storage address searched.
In order to improve security, after plug-in download completes, before carrying out updating operation, can also verify the legitimacy of plug-in unit, if verification pass through, then directly upgrading download plug-in unit, and if verify do not pass through, then the information of output verification failure.Further, version identifier can be utilized to verify the plug-in unit downloaded, namely the version identifier of the plug-in unit of download is obtained, subsequently plug-in unit, with the version identifier of the plug-in version of master routine adaptation in compare, if plug-in unit, with the version identifier of the plug-in version of master routine adaptation in there is the version identifier of the plug-in unit of download, then determine that verification is passed through, can upgrade download plug-in unit, otherwise, then determine that verification is not passed through, the information of output verification failure.Here, download and after verification succeeds, as originally downloaded early version plug-in unit, then the plug-in unit of download can be utilized directly to cover early version plug-in unit.
In addition, after step S108 optionally upgrades to plug-in unit according to comparison result, the plug-in version after upgrading can also be started.Further, before the plug-in version after starting upgrading, can first killing process, if do not enter journey just to start, also in operation, may there is various unexpected problem in the plug-in unit of possible early version, as Resource Manager (resource management) conflict etc.The invention provides a kind of scheme of killing process, in this scenario, the process of all startups can be traveled through, the process judging whether to exist startup belongs to the plug-in unit of current version, if exist, then kill the startup process of the plug-in unit of current version, and start new process to run plug-in unit corresponding to the plug-in version after upgrading; If do not exist, then directly start new process to run plug-in unit corresponding to the plug-in version after upgrading.
Be described above the multiple implementation of each link in the embodiment shown in Fig. 1, introduce implementation procedure in detail below by specific embodiment.
Fig. 3 shows the process flow diagram of plug-in unit upgrade method in accordance with another embodiment of the present invention.As shown in Figure 3, the method at least comprises the following steps S302 to step S318.
Step S302, when capturing the trigger event of upgrading to the plug-in unit in master routine, obtain the current version of already present plug-in unit in master routine.
Step S304, obtain from master routine plug-in unit, with the plug-in version of master routine adaptation.
Here, the scheme that plug-in version can be adopted to control realizes, namely the minimum interface version that each plug-in version obtaining the minimum interface version that can support of master routine and the highest interface version and plug-in unit can use and the highest interface version, subsequently in each plug-in version of plug-in unit, the minimum interface version that it can be used and the highest interface version are all positioned at the plug-in version of the interval range of minimum interface version that master routine can support and the highest interface version, are defined as the plug-in version with master routine adaptation.
Step S306, the acquisition version identifier of current version of plug-in unit and the version identifier of the plug-in version with master routine adaptation.
Step S308, version identifier according to the version identifier of the current version of plug-in unit and the plug-in version with master routine adaptation, the current version of comparison plug-in unit and the plug-in version of master routine adaptation, if plug-in unit, with the version identifier of the plug-in version of master routine adaptation in there is the version identifier of current version, then continue to perform step S310; If plug-in unit, with the version identifier of the plug-in version of master routine adaptation in there is not the version identifier of current version, then continue to perform step S312.
Step S310, determine comparison result be plug-in unit, with the plug-in version of master routine adaptation in there is current version, and continue to perform step S314.
Step S312, determine comparison result be plug-in unit, with the plug-in version of master routine adaptation in there is not current version, and from the plug-in version of master routine adaptation choose any plug-in version, and then download corresponding plug-in unit according to any plug-in version chosen, and carry out updating operation after the download is complete.
Here, in order to improve security, after plug-in download completes, before carrying out updating operation, can also verify the legitimacy of plug-in unit, if verification pass through, then directly upgrading download plug-in unit, and if verify do not pass through, then the information of output verification failure.
Step S314, judge whether current version is latest edition, if so, then continue to perform step S316; Otherwise if not, then continue to perform step S318.
Step S316, updating operation is not carried out to plug-in unit.
Step S318, latest edition is utilized to carry out updating operation to plug-in unit.
In the embodiment of the present invention, can utilize plug-in version control program in multiple plug-in versions of plug-in unit, determine can with the plug-in version of master routine adaptation.And, the plug-in version of current version and master routine adaptation is compared, if comparison result be plug-in unit, with the plug-in version of master routine adaptation in there is current version, then judge whether current version is latest edition further, if, then updating operation is not carried out to plug-in unit, and if not, then utilize latest edition to carry out updating operation to plug-in unit.If comparison result be plug-in unit, with the plug-in version of master routine adaptation in there is not current version, then from the plug-in version of master routine adaptation choose any plug-in version, and then download corresponding plug-in unit according to any plug-in version chosen, and carry out updating operation after the download is complete.Further, after plug-in download completes, before upgrading, can verify the legitimacy of plug-in unit, add the security of system.
It should be noted that, in practical application, above-mentioned all Alternate embodiments can adopt the mode combination in any of combination, and form optional embodiment of the present invention, this is no longer going to repeat them.
Based on same inventive concept, the embodiment of the present invention additionally provides a kind of plug-in unit update device.Fig. 4 shows the structural representation of plug-in unit update device according to an embodiment of the invention.As shown in Figure 4, this device at least can comprise: acquisition module 410, comparing module 420 and upgraded module 430.
Now introduce the annexation between each composition of the plug-in unit update device of the embodiment of the present invention or the function of device and each several part:
Acquisition module 410, is suitable for, when capturing the trigger event of upgrading to the plug-in unit in master routine, obtaining the current version of already present plug-in unit in master routine; And obtain from master routine plug-in unit, with the plug-in version of master routine adaptation;
Comparing module 420, is coupled with acquisition module 410, is suitable for the plug-in version of the current version of plug-in unit and master routine adaptation to compare, and obtains comparison result;
Upgraded module 430, is coupled with comparing module 420, is suitable for optionally upgrading to plug-in unit according to comparison result.
In one embodiment of the invention, if the interface between master routine and plug-in unit changes, above-mentioned acquisition module 410 is also suitable for: at least one plug-in version obtaining plug-in unit from master routine; From at least one plug-in version of plug-in unit, determine interface change after with the plug-in version of master routine adaptation.
In one embodiment of the invention, above-mentioned acquisition module 410 is also suitable for: the minimum interface version that each plug-in version obtaining the minimum interface version that can support of master routine and the highest interface version and plug-in unit can use and the highest interface version; In each plug-in version of plug-in unit, the minimum interface version that it can be used and the highest interface version are all positioned at the plug-in version of the interval range of minimum interface version that master routine can support and the highest interface version, be defined as interface change after with the plug-in version of master routine adaptation.
In one embodiment of the invention, above-mentioned comparing module 420 is also suitable for: obtain the version identifier of current version of plug-in unit and the version identifier of the plug-in version with master routine adaptation; According to version identifier, the current version of comparison plug-in unit and the plug-in version of master routine adaptation of the version identifier of the current version of plug-in unit and the plug-in version with master routine adaptation.
In one embodiment of the invention, above-mentioned comparing module 420 is also suitable for: if plug-in unit, with the version identifier of the plug-in version of master routine adaptation in there is the version identifier of current version, then comparison result be plug-in unit, with the plug-in version of master routine adaptation in there is current version; If plug-in unit, with the version identifier of the plug-in version of master routine adaptation in there is not the version identifier of current version, then comparison result be plug-in unit, with the plug-in version of master routine adaptation in there is not current version.
In one embodiment of the invention, above-mentioned upgraded module 430 is also suitable for: if comparison result be plug-in unit, with the plug-in version of master routine adaptation in there is current version, then judge whether current version is latest edition, if, then updating operation is not carried out to plug-in unit, and if not, then utilize latest edition to carry out updating operation to plug-in unit; If comparison result be plug-in unit, with the plug-in version of master routine adaptation in there is not current version, then from the plug-in version of master routine adaptation choose any plug-in version, and then download corresponding plug-in unit according to any plug-in version chosen, and carry out updating operation after the download is complete.
In one embodiment of the invention, version identifier comprise following one of at least: the MD5 value of version number, version name, version, the SHA1 value of version.
In one embodiment of the invention, Fig. 5 shows the structural representation of plug-in unit update device in accordance with another embodiment of the present invention.As shown in Figure 5, this device can also comprise:
Request sending module 510, is coupled with acquisition module 410, is suitable for sending plug-in unit to cloud server and obtains request, wherein, prestore the plug-in unit list comprised with multiple plug-in versions of master routine adaptation in cloud server;
Information receiving module 520, is coupled with request sending module 510, be suitable for receiving that cloud server returns according to plug-in unit list, with the plug-in version of master routine adaptation.
In one embodiment of the invention, the device that Fig. 5 shows can also comprise: start module 530, be coupled with upgraded module 430, is suitable for the plug-in version after starting upgrading.
In one embodiment of the invention, above-mentioned startup module 530 is also suitable for: the process traveling through all startups, and the process judging whether to exist startup belongs to the plug-in unit of current version; If exist, then kill the startup process of the plug-in unit of current version, and start new process to run plug-in unit corresponding to the plug-in version after upgrading.
Based on same inventive concept, the embodiment of the present invention additionally provides a kind of terminal, comprising:
Storer;
One or more processor;
Wherein, described one or more processor is configured to perform following method:
When capturing the trigger event of upgrading to the plug-in unit in master routine, obtain the current version of already present described plug-in unit in described master routine;
Obtain from described master routine described plug-in unit, with the plug-in version of described master routine adaptation;
The plug-in version of the current version of described plug-in unit and described master routine adaptation is compared, obtains comparison result;
Optionally described plug-in unit is upgraded according to described comparison result.
According to the combination of any one preferred embodiment above-mentioned or multiple preferred embodiment, the embodiment of the present invention can reach following beneficial effect:
In technical scheme provided by the invention, when capturing the trigger event of upgrading to the plug-in unit in master routine, can directly get from master routine this plug-in unit, with the plug-in version of master routine adaptation, thus by the current version of this plug-in unit and this plug-in unit, to compare with the plug-in version of master routine adaptation after, optionally this plug-in unit is upgraded according to comparison result.Compared to prior art, the present invention, without the need to downloading new master routine to ensure new plug-in unit and master routine adaptation, improves upgrading efficiency, saves System and Network resource.Further, the present invention can get from master routine flexibly, exactly plug-in unit, with the plug-in version of master routine adaptation, thus it is normal mutual to ensure between plug-in unit and master routine, even if the interface between master routine and plug-in unit changes, still can ensure plug-in version and master routine version adaptation, thus can avoid in prior art because of interface change the plug-in unit that causes or master routine not adaptive and the problems such as collapse occur, improve the validity of upgrading.In addition, the present invention by the current version of plug-in unit and this plug-in unit, compare with the plug-in version of master routine adaptation, thus can know that whether the current version of plug-in unit is adaptive with master routine by comparison, if the current version of plug-in unit and master routine are not adaptive, even if current version is latest edition, also need again to upgrade, namely can according to this plug-in unit, upgrade with the plug-in version of master routine adaptation, further ensure the validity of upgrading.
In instructions provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand in each inventive aspect one or more, in the description above to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in detail in the claims, the one of any of embodiment required for protection can use with arbitrary array mode.
All parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions that microprocessor or digital signal processor (DSP) can be used in practice to realize according to the some or all parts in the plug-in unit update device of the embodiment of the present invention.The present invention can also be embodied as part or all equipment for performing method as described herein or device program (such as, computer program and computer program).Realizing program of the present invention and can store on a computer-readable medium like this, or the form of one or more signal can be had.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computing machine of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.
So far, those skilled in the art will recognize that, although multiple exemplary embodiment of the present invention is illustrate and described herein detailed, but, without departing from the spirit and scope of the present invention, still can directly determine or derive other modification many or amendment of meeting the principle of the invention according to content disclosed by the invention.Therefore, scope of the present invention should be understood and regard as and cover all these other modification or amendments.
The invention also discloses: A1, a kind of plug-in unit upgrade method, comprising:
When capturing the trigger event of upgrading to the plug-in unit in master routine, obtain the current version of already present described plug-in unit in described master routine;
Obtain from described master routine described plug-in unit, with the plug-in version of described master routine adaptation;
The plug-in version of the current version of described plug-in unit and described master routine adaptation is compared, obtains comparison result;
Optionally described plug-in unit is upgraded according to described comparison result.
A2, method according to A1, wherein, if the interface between described master routine and described plug-in unit changes, obtain from described master routine described plug-in unit, with the plug-in version of described master routine adaptation, comprising:
At least one plug-in version of described plug-in unit is obtained from described master routine;
From at least one plug-in version of described plug-in unit, determine described interface change after with the plug-in version of described master routine adaptation.
A3, method according to A2, wherein, from least one plug-in version of described plug-in unit, determine described interface change after with the plug-in version of described master routine adaptation, comprising:
The minimum interface version that each plug-in version obtaining minimum interface version that described master routine can support and the highest interface version and described plug-in unit can use and the highest interface version;
In each plug-in version of described plug-in unit, the minimum interface version that it can be used and the highest interface version are all positioned at the plug-in version of the interval range of minimum interface version that described master routine can support and the highest interface version, be defined as described interface change after with the plug-in version of described master routine adaptation.
A4, method according to any one of A1-A3, wherein, the plug-in version of the current version of described plug-in unit and described master routine adaptation is compared, comprising:
Obtain the version identifier of the version identifier of the current version of described plug-in unit and the plug-in version with described master routine adaptation;
According to version identifier, the current version of plug-in unit described in comparison and the plug-in version of described master routine adaptation of the version identifier of the current version of described plug-in unit and the plug-in version with described master routine adaptation.
A5, method according to A4, wherein, according to the version identifier of the version identifier of the current version of described plug-in unit and the plug-in version with described master routine adaptation, the current version of plug-in unit described in comparison and the plug-in version of described master routine adaptation, obtain comparison result, comprising:
If described plug-in unit, with the version identifier of the plug-in version of described master routine adaptation in there is the version identifier of described current version, then described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is described current version;
If described plug-in unit, with the version identifier of the plug-in version of described master routine adaptation in there is not the version identifier of described current version, then described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is not described current version.
A6, method according to A5, wherein, optionally described plug-in unit is upgraded according to described comparison result, comprising:
If described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is described current version, then judge whether described current version is latest edition, if, then updating operation is not carried out to described plug-in unit, and if not, then utilize described latest edition to carry out updating operation to described plug-in unit;
If described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is not described current version, then from the plug-in version of described master routine adaptation choose any plug-in version, and then download corresponding plug-in unit according to the described any plug-in version chosen, and carry out updating operation after the download is complete.
A7, method according to any one of A4-A6, wherein, described version identifier comprise following one of at least: the message digest algorithm MD5 value of version number, version name, version, the Secure Hash Algorithm SHA1 value of version.
A8, method according to any one of A1-A7, wherein, described method also comprises:
Send plug-in unit to cloud server and obtain request, wherein, in described cloud server, prestore the plug-in unit list comprised with multiple plug-in versions of described master routine adaptation;
Receive that described cloud server returns according to described plug-in unit list, with the plug-in version of described master routine adaptation.
A9, method according to A8, wherein, described cloud server return according to described plug-in unit list, with the plug-in version of described master routine adaptation in also carry following one of at least: the minimum interface version that each plug-in version of URL address, plug-in unit name, plug-in unit can use and the highest interface version.
A10, method according to any one of A1-A9, wherein, after optionally upgrading to described plug-in unit according to described comparison result, also comprise:
Start the plug-in version after upgrading.
A11, method according to A10, wherein, describedly start the plug-in version after upgrading, comprising:
Travel through the process of all startups, the process judging whether to exist startup belongs to the plug-in unit of described current version;
If exist, then kill the startup process of the plug-in unit of described current version, and start new process to run plug-in unit corresponding to the plug-in version after upgrading.
B12, a kind of plug-in unit update device, comprising:
Acquisition module, is suitable for, when capturing the trigger event of upgrading to the plug-in unit in master routine, obtaining the current version of already present described plug-in unit in described master routine; And obtain from described master routine described plug-in unit, with the plug-in version of described master routine adaptation;
Comparing module, is suitable for the plug-in version of the current version of described plug-in unit and described master routine adaptation to compare, obtains comparison result;
Upgraded module, is suitable for optionally upgrading to described plug-in unit according to described comparison result.
B13, device according to B12, wherein, if the interface between described master routine and described plug-in unit changes, described acquisition module is also suitable for:
At least one plug-in version of described plug-in unit is obtained from described master routine;
From at least one plug-in version of described plug-in unit, determine described interface change after with the plug-in version of described master routine adaptation.
B14, device according to B13, wherein, described acquisition module is also suitable for:
The minimum interface version that each plug-in version obtaining minimum interface version that described master routine can support and the highest interface version and described plug-in unit can use and the highest interface version;
In each plug-in version of described plug-in unit, the minimum interface version that it can be used and the highest interface version are all positioned at the plug-in version of the interval range of minimum interface version that described master routine can support and the highest interface version, be defined as described interface change after with the plug-in version of described master routine adaptation.
B15, device according to any one of B12-B14, wherein, described comparing module is also suitable for:
Obtain the version identifier of the version identifier of the current version of described plug-in unit and the plug-in version with described master routine adaptation;
According to version identifier, the current version of plug-in unit described in comparison and the plug-in version of described master routine adaptation of the version identifier of the current version of described plug-in unit and the plug-in version with described master routine adaptation.
B16, device according to B15, wherein, described comparing module is also suitable for:
If described plug-in unit, with the version identifier of the plug-in version of described master routine adaptation in there is the version identifier of described current version, then described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is described current version;
If described plug-in unit, with the version identifier of the plug-in version of described master routine adaptation in there is not the version identifier of described current version, then described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is not described current version.
B17, device according to B16, wherein, described upgraded module is also suitable for:
If described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is described current version, then judge whether described current version is latest edition, if, then updating operation is not carried out to described plug-in unit, and if not, then utilize described latest edition to carry out updating operation to described plug-in unit;
If described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is not described current version, then from the plug-in version of described master routine adaptation choose any plug-in version, and then download corresponding plug-in unit according to the described any plug-in version chosen, and carry out updating operation after the download is complete.
B18, device according to any one of B15-B17, wherein, described version identifier comprise following one of at least: the message digest algorithm MD5 value of version number, version name, version, the Secure Hash Algorithm SHA1 value of version.
B19, device according to any one of B12-B18, wherein, described device also comprises:
Request sending module, is suitable for sending plug-in unit to cloud server and obtains request, wherein, prestore the plug-in unit list comprised with multiple plug-in versions of described master routine adaptation in described cloud server;
Information receiving module, be suitable for receiving that described cloud server returns according to described plug-in unit list, with the plug-in version of described master routine adaptation.
B20, device according to B19, wherein, described cloud server return according to described plug-in unit list, with the plug-in version of described master routine adaptation in also carry following one of at least: the minimum interface version that each plug-in version of URL address, plug-in unit name, plug-in unit can use and the highest interface version.
B21, device according to any one of B12-B20, wherein, after described upgraded module is optionally upgraded to described plug-in unit according to described comparison result, also comprise:
Start module, be suitable for the plug-in version after starting upgrading.
B22, device according to B21, wherein, described startup module is also suitable for:
Travel through the process of all startups, the process judging whether to exist startup belongs to the plug-in unit of described current version;
If exist, then kill the startup process of the plug-in unit of described current version, and start new process to run plug-in unit corresponding to the plug-in version after upgrading.
C23, a kind of terminal, comprising:
Storer;
One or more processor;
Wherein, described one or more processor is configured to perform following method:
When capturing the trigger event of upgrading to the plug-in unit in master routine, obtain the current version of already present described plug-in unit in described master routine;
Obtain from described master routine described plug-in unit, with the plug-in version of described master routine adaptation;
The plug-in version of the current version of described plug-in unit and described master routine adaptation is compared, obtains comparison result;
Optionally described plug-in unit is upgraded according to described comparison result.

Claims (10)

1. a plug-in unit upgrade method, comprising:
When capturing the trigger event of upgrading to the plug-in unit in master routine, obtain the current version of already present described plug-in unit in described master routine;
Obtain from described master routine described plug-in unit, with the plug-in version of described master routine adaptation;
The plug-in version of the current version of described plug-in unit and described master routine adaptation is compared, obtains comparison result;
Optionally described plug-in unit is upgraded according to described comparison result.
2. method according to claim 1, wherein, if the interface between described master routine and described plug-in unit changes, obtain from described master routine described plug-in unit, with the plug-in version of described master routine adaptation, comprising:
At least one plug-in version of described plug-in unit is obtained from described master routine;
From at least one plug-in version of described plug-in unit, determine described interface change after with the plug-in version of described master routine adaptation.
3. method according to claim 2, wherein, from least one plug-in version of described plug-in unit, determine described interface change after with the plug-in version of described master routine adaptation, comprising:
The minimum interface version that each plug-in version obtaining minimum interface version that described master routine can support and the highest interface version and described plug-in unit can use and the highest interface version;
In each plug-in version of described plug-in unit, the minimum interface version that it can be used and the highest interface version are all positioned at the plug-in version of the interval range of minimum interface version that described master routine can support and the highest interface version, be defined as described interface change after with the plug-in version of described master routine adaptation.
4. the method according to any one of claim 1-3, wherein, the plug-in version of the current version of described plug-in unit and described master routine adaptation is compared, comprising:
Obtain the version identifier of the version identifier of the current version of described plug-in unit and the plug-in version with described master routine adaptation;
According to version identifier, the current version of plug-in unit described in comparison and the plug-in version of described master routine adaptation of the version identifier of the current version of described plug-in unit and the plug-in version with described master routine adaptation.
5. method according to claim 4, wherein, according to the version identifier of the version identifier of the current version of described plug-in unit and the plug-in version with described master routine adaptation, the current version of plug-in unit described in comparison and the plug-in version of described master routine adaptation, obtain comparison result, comprising:
If described plug-in unit, with the version identifier of the plug-in version of described master routine adaptation in there is the version identifier of described current version, then described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is described current version;
If described plug-in unit, with the version identifier of the plug-in version of described master routine adaptation in there is not the version identifier of described current version, then described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is not described current version.
6. method according to claim 5, wherein, optionally described plug-in unit is upgraded according to described comparison result, comprising:
If described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is described current version, then judge whether described current version is latest edition, if, then updating operation is not carried out to described plug-in unit, and if not, then utilize described latest edition to carry out updating operation to described plug-in unit;
If described comparison result be described plug-in unit, with the plug-in version of described master routine adaptation in there is not described current version, then from the plug-in version of described master routine adaptation choose any plug-in version, and then download corresponding plug-in unit according to the described any plug-in version chosen, and carry out updating operation after the download is complete.
7. the method according to any one of claim 4-6, wherein, described version identifier comprise following one of at least: the message digest algorithm MD5 value of version number, version name, version, the Secure Hash Algorithm SHA1 value of version.
8. the method according to any one of claim 1-7, wherein, described method also comprises:
Send plug-in unit to cloud server and obtain request, wherein, in described cloud server, prestore the plug-in unit list comprised with multiple plug-in versions of described master routine adaptation;
Receive that described cloud server returns according to described plug-in unit list, with the plug-in version of described master routine adaptation.
9. a plug-in unit update device, comprising:
Acquisition module, is suitable for, when capturing the trigger event of upgrading to the plug-in unit in master routine, obtaining the current version of already present described plug-in unit in described master routine; And obtain from described master routine described plug-in unit, with the plug-in version of described master routine adaptation;
Comparing module, is suitable for the plug-in version of the current version of described plug-in unit and described master routine adaptation to compare, obtains comparison result;
Upgraded module, is suitable for optionally upgrading to described plug-in unit according to described comparison result.
10. a terminal, comprising:
Storer;
One or more processor;
Wherein, described one or more processor is configured to perform following method:
When capturing the trigger event of upgrading to the plug-in unit in master routine, obtain the current version of already present described plug-in unit in described master routine;
Obtain from described master routine described plug-in unit, with the plug-in version of described master routine adaptation;
The plug-in version of the current version of described plug-in unit and described master routine adaptation is compared, obtains comparison result;
Optionally described plug-in unit is upgraded according to described comparison result.
CN201510142837.4A 2015-03-27 2015-03-27 Plug-in unit upgrade method and device Active CN104699511B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510142837.4A CN104699511B (en) 2015-03-27 2015-03-27 Plug-in unit upgrade method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510142837.4A CN104699511B (en) 2015-03-27 2015-03-27 Plug-in unit upgrade method and device

Publications (2)

Publication Number Publication Date
CN104699511A true CN104699511A (en) 2015-06-10
CN104699511B CN104699511B (en) 2016-08-24

Family

ID=53346677

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510142837.4A Active CN104699511B (en) 2015-03-27 2015-03-27 Plug-in unit upgrade method and device

Country Status (1)

Country Link
CN (1) CN104699511B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106131612A (en) * 2016-06-30 2016-11-16 武汉斗鱼网络科技有限公司 The method and system of Android app dynamic load resource function module
CN106155739A (en) * 2016-06-30 2016-11-23 北京奇虎科技有限公司 A kind of plug-in unit control metering method, server, client and control amount platform
CN106325923A (en) * 2016-08-17 2017-01-11 北京奇虎科技有限公司 Method and device for managing function plugins
CN106484391A (en) * 2015-08-28 2017-03-08 Ncr公司 Dynamic Service autgmentability
CN106886437A (en) * 2017-01-24 2017-06-23 北京奇虎科技有限公司 Application program update method and apparatus
CN108681460A (en) * 2018-04-18 2018-10-19 北京奇虎科技有限公司 A kind of method and electric terminal of upgrading plug-in unit
CN108845812A (en) * 2018-05-31 2018-11-20 康键信息技术(深圳)有限公司 Update of plug-in method, apparatus, computer equipment and storage medium
CN109710283A (en) * 2018-11-15 2019-05-03 中国平安人寿保险股份有限公司 Obtain method, apparatus, computer equipment and the storage medium of Mynav plug-in unit

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101566954A (en) * 2009-05-31 2009-10-28 珠海金山软件股份有限公司 Method and device for managing plug-in
CN102195804A (en) * 2011-03-10 2011-09-21 易程(苏州)软件股份有限公司 Automatic updating method of software and system thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101566954A (en) * 2009-05-31 2009-10-28 珠海金山软件股份有限公司 Method and device for managing plug-in
CN102195804A (en) * 2011-03-10 2011-09-21 易程(苏州)软件股份有限公司 Automatic updating method of software and system thereof

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106484391A (en) * 2015-08-28 2017-03-08 Ncr公司 Dynamic Service autgmentability
CN106131612A (en) * 2016-06-30 2016-11-16 武汉斗鱼网络科技有限公司 The method and system of Android app dynamic load resource function module
CN106155739A (en) * 2016-06-30 2016-11-23 北京奇虎科技有限公司 A kind of plug-in unit control metering method, server, client and control amount platform
CN106325923A (en) * 2016-08-17 2017-01-11 北京奇虎科技有限公司 Method and device for managing function plugins
CN106886437A (en) * 2017-01-24 2017-06-23 北京奇虎科技有限公司 Application program update method and apparatus
CN106886437B (en) * 2017-01-24 2021-08-31 北京奇虎科技有限公司 Application program updating method and device
CN108681460A (en) * 2018-04-18 2018-10-19 北京奇虎科技有限公司 A kind of method and electric terminal of upgrading plug-in unit
CN108845812A (en) * 2018-05-31 2018-11-20 康键信息技术(深圳)有限公司 Update of plug-in method, apparatus, computer equipment and storage medium
CN108845812B (en) * 2018-05-31 2024-04-05 康键信息技术(深圳)有限公司 Plug-in updating method, device, computer equipment and storage medium
CN109710283A (en) * 2018-11-15 2019-05-03 中国平安人寿保险股份有限公司 Obtain method, apparatus, computer equipment and the storage medium of Mynav plug-in unit
CN109710283B (en) * 2018-11-15 2024-05-07 中国平安人寿保险股份有限公司 Method, device, computer equipment and storage medium for acquiring Mynav plug-ins

Also Published As

Publication number Publication date
CN104699511B (en) 2016-08-24

Similar Documents

Publication Publication Date Title
CN104699511A (en) Plug-in upgrading method and plug-in upgrading device
US10713034B2 (en) Updating web resources
US10212563B2 (en) Updating web resources
US9075693B2 (en) Methods for updating applications
CN104717301B (en) Plug-in download method and device
CN111381858B (en) Application program upgrading method, server and terminal equipment
CN103647816A (en) Method and device for upgrading application software
CN102970346B (en) Browser carries out method and the browser of software download
US11876676B2 (en) Network node firmware update
CN108540509B (en) Processing method and device of terminal browser, server and intelligent terminal
CN102833350A (en) Processing method and processing device of WebApp updating
CN104731623B (en) Mastery routine starts the method and device of plug-in unit
CN110543324B (en) Plug-in increment updating method and device for application program
CN110532016B (en) Version management method, version updating method and version management system
CN110765394A (en) So file loading method and device, storage medium and terminal equipment
CN114296777A (en) Software upgrading method, device, server and computer readable storage medium
CN110851151B (en) Method, device, terminal, server and storage medium for pre-installing application
CN103530155A (en) Method and device for installing application program
CN115729590A (en) Service deployment method, device, equipment and computer readable storage medium
CN106155709B (en) Plug-in loading method, device and equipment
EP2680135A1 (en) Methods for updating applications
CN111190637B (en) Version file release management method, device and system
CN114978902A (en) Information processing method, apparatus, device, storage medium, and program product
CN108259575A (en) Advertisement broadcast method, system, self-service device and Advertisement Server
CN112748932A (en) Data processing method and server based on intelligent contract

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20160729

Address after: 100028 Beijing city Chaoyang District P.R.China 16 building 16-1 room 316 layer 3 layer 1-6

Applicant after: BEIJING ANYUN SHIJI SCIENCE AND TECHNOLOGY CO., LTD.

Address before: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park)

Applicant before: Beijing Qihu Technology Co., Ltd.

Applicant before: Qizhi Software (Beijing) Co., Ltd.

C14 Grant of patent or utility model
GR01 Patent grant