CN104699511B - Plug-in unit upgrade method and device - Google Patents

Plug-in unit upgrade method and device Download PDF

Info

Publication number
CN104699511B
CN104699511B CN201510142837.4A CN201510142837A CN104699511B CN 104699511 B CN104699511 B CN 104699511B CN 201510142837 A CN201510142837 A CN 201510142837A CN 104699511 B CN104699511 B CN 104699511B
Authority
CN
China
Prior art keywords
plug
version
unit
mastery routine
adaptive
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.)
Active
Application number
CN201510142837.4A
Other languages
Chinese (zh)
Other versions
CN104699511A (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 Anyun Century Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Anyun Century Technology Co Ltd filed Critical Beijing Anyun Century 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 kind of plug-in unit upgrade method and device, the method includes: when capturing the trigger event upgrading the plug-in unit in mastery routine, obtains the current version of already present described plug-in unit in described mastery routine;Obtain from described mastery routine described plug-in unit and the adaptive plug-in version of described mastery routine;Plug-in version adaptive with described mastery routine for the current version of described plug-in unit is compared, obtains comparison result;Optionally described plug-in unit is upgraded according to described comparison result.Compared to prior art, the present invention is adaptive to ensure new plug-in unit and mastery routine without downloading new mastery routine, improves a liter stage efficiency, saves system and Internet resources.

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, for convenience software is carried out Function Extension, can open to use plug-in unit mode Send out, by function package one by one to be realized for software in plug-in unit, finally each plug-in unit is integrated in soft Part mastery routine bag is together issued.
Normal mutual in order to ensure between plug-in unit and mastery routine, need plug-in unit adaptive with mastery routine, prior art In, come real by writing the one-to-one relationship between dead mastery routine version and plug-in version in main program code Existing.Such as, mastery routine is upgraded to version 2 from version 1, and now plug-in unit is also upgraded to version 2 from version 1, Correlation technique can write in main program code the one-to-one relationship of mastery routine version 2 and plug-in version 2 Ensure between the two is normal mutual.But, if plug-in unit can be upgraded to version 3 from version 2, due to Main program code is write dead one-to-one relationship, needs to download installation mastery routine version 3 and could use plug-in unit The business function of version 3, thus cause the plug-in version in mastery routine can not obtain timely updates upgrading.
Summary of the invention
In view of the above problems, it is proposed that the present invention is to provide one to overcome the problems referred to above or at least in part Solve plug-in unit upgrade method and the device of the problems referred to above.
According to one aspect of the present invention, it is provided that a kind of plug-in unit upgrade method, including: when capturing master When plug-in unit in program carries out the trigger event upgraded, obtain already present described plug-in unit in described mastery routine Current version;Obtain from described mastery routine described plug-in unit and the adaptive plug-in version of described mastery routine; Plug-in version adaptive with described mastery routine for the current version of described plug-in unit is compared, obtains comparison knot Really;Optionally described plug-in unit is upgraded according to described comparison result.
Alternatively, if the interface between described mastery routine and described plug-in unit changes, from described mastery routine Obtain described plug-in unit and the adaptive plug-in version of described mastery routine, including: obtain from described mastery routine At least one plug-in version of described plug-in unit;From at least one plug-in version of described plug-in unit, determine described The plug-in version that interface is adaptive with described mastery routine after changing.
Alternatively, from least one plug-in version of described plug-in unit, determine described interface change after with The plug-in version that described mastery routine is adaptive, including: obtain the minimum interface version that described mastery routine can be supported by The minimum interface version that can use with each plug-in version of highest interface version and described plug-in unit and the highest Interface version;In each plug-in version of described plug-in unit, minimum interface version that it can be used and the highest Interface version is respectively positioned on minimum interface version and the interval of highest interface version that described mastery routine can be supported by In the range of plug-in version, be defined as plug-in unit version adaptive with described mastery routine after described interface changes This.
Alternatively, plug-in version adaptive with described mastery routine for the current version of described plug-in unit is compared, Including: obtain the version identifier of the current version of described plug-in unit and the plug-in version adaptive with described mastery routine Version identifier;The version identifier of the current version according to described plug-in unit and insert adaptive with described mastery routine The version identifier of part version, the plug-in version that the current version of plug-in unit described in comparison is adaptive with described mastery routine.
Alternatively, according to the version identifier of current version and insert adaptive with described mastery routine of described plug-in unit The version identifier of part version, the plug-in version that the current version of plug-in unit described in comparison is adaptive with described mastery routine, Obtain comparison result, including: if described plug-in unit and the version mark of plug-in version that described mastery routine is adaptive There is the version identifier of described current version in knowledge, the most described comparison result is described plug-in unit and described master There is described current version in the plug-in version that program is adaptive;If described plug-in unit and described mastery routine is adaptive Plug-in version version identifier in there is not the version identifier of described current version, the most described comparison result is There is not described current version in described plug-in unit and that described mastery routine is adaptive plug-in version.
Alternatively, optionally described plug-in unit is upgraded according to described comparison result, including: if described Comparison result is to there is described current version in the plug-in version that described plug-in unit and described mastery routine is adaptive, Then judge whether described current version is latest edition, described plug-in unit do not carried out updating operation, And if it is not, then utilize described latest edition that described plug-in unit is carried out updating operation;If described comparison result is Described plug-in unit and that described mastery routine is adaptive plug-in version do not exists described current version, then from institute State in the plug-in version that mastery routine is adaptive and choose any plug-in version, and then according to the described any plug-in unit chosen Version downloads corresponding plug-in unit, and carries out updating operation after the download is complete.
Alternatively, described version identifier includes at least one following: version number, version name, version MD5 (Message Digest Algorithm5, message digest algorithm 5) value, the SHA1 (Secure of version Hash Algorithm1, Secure Hash Algorithm 1) value.
Alternatively, described method also includes: sends plug-in unit to cloud server and obtains request, wherein, described Cloud server prestores the plug-in unit list including the multiple plug-in versions adaptive with described mastery routine;Receive That described cloud server returns according to described plug-in unit list and that described mastery routine is adaptive plug-in version.
Alternatively, that described cloud server returns according to described plug-in unit list and described mastery routine is adaptive Plug-in version also carry at least one following: URL address, plug-in unit name, each plug-in version institute of plug-in unit The minimum interface version that can use and highest interface version.
Alternatively, after optionally described plug-in unit being upgraded according to described comparison result, also include: Start the plug-in version after upgrading.
Alternatively, the described plug-in version started after upgrading, including: travel through the process of all startups, it is judged that The process whether existence starts belongs to the plug-in unit of described current version;If existing, then kill described current version The startup process of plug-in unit, and start the plug-in unit that new process is corresponding to run the plug-in version after upgrading.
According to another aspect of the present invention, additionally provide a kind of plug-in unit update device, including:
Acquisition module, is suitable to when capturing the trigger event upgrading the plug-in unit in mastery routine, obtains The current version of already present described plug-in unit in described mastery routine;And from described mastery routine, obtain described inserting Part and that described mastery routine is adaptive plug-in version;
Comparing module, is suitable to carry out plug-in version adaptive with described mastery routine for the current version of described plug-in unit Comparison, obtains comparison result;
Upgraded module, is suitable to optionally upgrade described plug-in unit according to described comparison result.
Alternatively, if the interface between described mastery routine and described plug-in unit changes, described acquisition module is also Be suitable to: from described mastery routine, obtain at least one plug-in version of described plug-in unit;From described plug-in unit at least In one plug-in version, determine described interface change after the plug-in version adaptive with described mastery routine.
Alternatively, described acquisition module is further adapted for: obtain the minimum interface version that described mastery routine can be supported by The minimum interface version that can use with each plug-in version of highest interface version and described plug-in unit and the highest Interface version;In each plug-in version of described plug-in unit, minimum interface version that it can be used and the highest Interface version is respectively positioned on minimum interface version and the interval of highest interface version that described mastery routine can be supported by In the range of plug-in version, be defined as plug-in unit version adaptive with described mastery routine after described interface changes This.
Alternatively, described comparing module is further adapted for: obtain the current version of described plug-in unit version identifier and The version identifier of the plug-in version adaptive with described mastery routine;The version mark of the current version according to described plug-in unit Know and the version identifier of the plug-in version adaptive with described mastery routine, the current version of plug-in unit described in comparison with The plug-in version that described mastery routine is adaptive.
Alternatively, described comparing module is further adapted for: if described plug-in unit and plug-in unit that described mastery routine is adaptive There is the version identifier of described current version in the version identifier of version, the most described comparison result is described plug-in unit And there is described current version in plug-in version that described mastery routine is adaptive;If described plug-in unit and institute State the version identifier that there is not described current version in the version identifier of the adaptive plug-in version of mastery routine, then institute State in the plug-in version that comparison result is described plug-in unit and described mastery routine adaptation and there is not described current version This.
Alternatively, described upgraded module is further adapted for: if described comparison result is described plug-in unit and described master There is described current version in the plug-in version that program is adaptive, then judge whether described current version is latest edition This, the most do not carry out updating operation, and if it is not, then utilize described latest edition pair described plug-in unit Described plug-in unit carries out updating operation;If it is adaptive that described comparison result is described plug-in unit and described mastery routine Plug-in version does not exists described current version, then chooses from the plug-in version adaptive with described mastery routine and appoint Meaning plug-in version, and then download corresponding plug-in unit according to the described any plug-in version chosen, and downloading Updating operation is carried out after one-tenth.
Alternatively, described version identifier includes at least one following: version number, version name, version MD5 value, the SHA1 value of version.
Alternatively, described device also includes:
Request sending module, is suitable to send plug-in unit to cloud server and obtains request, and wherein, described high in the clouds takes Business device prestores the plug-in unit list including the multiple plug-in versions adaptive with described mastery routine;
Information receiving module, is suitable to receive described cloud server returns and institute according to described plug-in unit list State the plug-in version that mastery routine is adaptive.
Alternatively, that described cloud server returns according to described plug-in unit list and described mastery routine is adaptive Plug-in version also carry at least one following: URL address, plug-in unit name, each plug-in version institute of plug-in unit The minimum interface version that can use and highest interface version.
Alternatively, optionally described plug-in unit is upgraded according to described comparison result at described upgraded module Afterwards, also include: start module, be suitable to the plug-in version after starting upgrading.
Alternatively, described startup module is further adapted for: travel through the process of all startups, it may be judged whether there is startup Process belong to the plug-in unit of described current version;If existing, then kill the startup of the plug-in unit of described current version Process, and start the plug-in unit that new process is corresponding to run the plug-in version after upgrading.
According to an additional aspect of the present invention, additionally provide a kind of terminal, including:
Memorizer;
One or more processors;
Wherein, the one or more processor is configured to perform following method:
When capturing the trigger event that the plug-in unit in mastery routine is upgraded, obtain in described mastery routine The current version of the described plug-in unit existed;
Obtain from described mastery routine described plug-in unit and the adaptive plug-in version of described mastery routine;
Plug-in version adaptive with described mastery routine for the current version of described plug-in unit is compared, obtains comparison Result;
Optionally described plug-in unit is upgraded according to described comparison result.
In the technical scheme that the present invention provides, when capturing the triggering that the plug-in unit in mastery routine is upgraded During event, that directly can get this plug-in unit from mastery routine and that mastery routine is adaptive plug-in version, from And by the current version of this plug-in unit and this plug-in unit and plug-in version that mastery routine is adaptive compare it After, optionally this plug-in unit is upgraded according to comparison result.Compared to prior art, the present invention without Download new mastery routine and ensure that new plug-in unit and mastery routine are adaptive, improve a liter stage efficiency, save system and Internet resources.Further, the present invention can get plug-in unit and main flexibly, exactly from mastery routine The plug-in version that program is adaptive, thereby may be ensured that between plug-in unit and mastery routine is normal mutual, even if mastery routine And the interface between plug-in unit changes, still ensure that plug-in version is adaptive with mastery routine version, thus Can avoid in prior art because of interface change the plug-in unit caused or mastery routine the most adaptive and collapse Etc. problem, improve the effectiveness of upgrading.Additionally, the present invention by the current version of plug-in unit and this plug-in unit, The plug-in version adaptive with mastery routine is compared such that it is able to known the current version of plug-in unit by comparison The most adaptive, if the current version of plug-in unit is the most adaptive with mastery routine, even if current version is up-to-date with mastery routine Version, it is also desirable to again upgrade, i.e. can be carried out according to the plug-in version adaptive with mastery routine of this plug-in unit Upgrading, further ensures the effectiveness of upgrading.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technology of the present invention Means, and can being practiced according to the content of description, and in order to allow above and other objects of the present invention, Feature and advantage can become apparent, below especially exemplified by the detailed description of the invention of the present invention.
According to below in conjunction with the accompanying drawing detailed description to the specific embodiment of the invention, those skilled in the art will More understand the above-mentioned of the present invention and other purposes, advantage and feature.
Accompanying drawing explanation
By reading the detailed description of hereafter preferred implementation, various other advantage and benefit for ability Territory those of ordinary skill will be clear from understanding.Accompanying drawing is only used for illustrating the purpose of preferred implementation, and also It is not considered as limitation of the present invention.And in whole accompanying drawing, it is denoted by the same reference numerals identical Parts.In the accompanying drawings:
Fig. 1 shows the flow chart of plug-in unit upgrade method according to an embodiment of the invention;
Fig. 2 shows that plug-in version controls schematic diagram according to an embodiment of the invention;
Fig. 3 shows the flow chart 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.
Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although accompanying drawing shows The exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure and should be by Embodiments set forth here is limited.On the contrary, it is provided that these embodiments are able to be best understood from this Open, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
For solving above-mentioned technical problem, the invention provides a kind of plug-in unit upgrade method.Fig. 1 shows basis The flow chart of the plug-in unit upgrade method of one embodiment of the invention.As it is shown in figure 1, the method at least include with Lower step S102 is to step S108.
Step S102, when capturing the trigger event that the plug-in unit in mastery routine is upgraded, obtain main journey The current version of already present plug-in unit in sequence.
Step S104, from mastery routine, obtain plug-in unit and plug-in version that mastery routine is adaptive.
Step S106, the plug-in version that the current version of plug-in unit and mastery routine are adaptive is compared, compared To result.
Step S108, optionally plug-in unit is upgraded according to comparison result.
In the technical scheme that the present invention provides, when capturing the triggering that the plug-in unit in mastery routine is upgraded During event, that directly can get this plug-in unit from mastery routine and that mastery routine is adaptive plug-in version, from And by the current version of this plug-in unit and this plug-in unit and plug-in version that mastery routine is adaptive compare it After, optionally this plug-in unit is upgraded according to comparison result.Compared to prior art, the present invention without Download new mastery routine and ensure that new plug-in unit and mastery routine are adaptive, improve a liter stage efficiency, save system and Internet resources.Further, the present invention can get plug-in unit and main flexibly, exactly from mastery routine The plug-in version that program is adaptive, thereby may be ensured that between plug-in unit and mastery routine is normal mutual, even if mastery routine And the interface between plug-in unit changes, still ensure that plug-in version is adaptive with mastery routine version, thus Can avoid in prior art because of interface change the plug-in unit caused or mastery routine the most adaptive and collapse Etc. problem, improve the effectiveness of upgrading.Additionally, the present invention by the current version of plug-in unit and this plug-in unit, The plug-in version adaptive with mastery routine is compared such that it is able to known the current version of plug-in unit by comparison The most adaptive, if the current version of plug-in unit is the most adaptive with mastery routine, even if current version is up-to-date with mastery routine Version, it is also desirable to again upgrade, i.e. can be carried out according to the plug-in version adaptive with mastery routine of this plug-in unit Upgrading, further ensures the effectiveness of upgrading.
The plug-in unit mentioned in above step S104 and plug-in version that mastery routine is adaptive refer to plug-in version Can be the most mutual between corresponding plug-in unit and mastery routine.Mastery routine described herein, i.e. host program, as 360 mobile phone bodyguards, 360 virus killings etc..Plug-in unit refers to applets, such as " antitheft " in 360 mobile phone bodyguards Plug-in unit, " start is accelerated " plug-in unit, " calendar " plug-in unit, etc..Further, plug-in unit and mastery routine Adaptive plug-in version can write in main program code, it is also possible to writes in the file of mastery routine, as with row The form record of table, in the file of mastery routine, may be generally present a JSON (Javascript Object Notation, the data interchange language of lightweight) or XML (eXtensible Markup Language, Extensible markup language) in file.Additionally, plug-in unit storage catalogue is generally placed upon application program in built-in storage In catalogue under, such as mobile phone terminal /data/data/XXX/files under, wherein XXX represents main journey The bag name of sequence.
If the interface between mastery routine and plug-in unit changes, in order to ensure that mastery routine is adaptive with plug-in unit, this Bright provide a kind of preferred embodiment, in this scenario, plug-in unit can be obtained at least from mastery routine One plug-in version, subsequently from least one plug-in version of plug-in unit, determine this interface change after with The plug-in version that mastery routine is adaptive.Further, in embodiments of the present invention, can be controlled by plug-in version Mode realize from least one plug-in version of plug-in unit, determine this interface change after with mastery routine Adaptive plug-in version.
First, in conjunction with Fig. 2, plug-in version control program is illustrated.In Fig. 2, (1) represents drilling of version Enter, from left to right version increasingly newer (or high);(2) the minimum interface version that mastery routine can be supported by is represented, Also known as compatible version, this information to write in main program code or can be recorded by other forms;(3) represent main The highest interface version that program can be supported by, also known as HOST (main frame) version, this information can also write on Record in main program code or by other forms;(4) the minimum interface version that indication plug unit can use, should Information to write in the configuration information of plug-in unit or can be recorded by other forms;(5) indication plug unit can use Highest interface version, this information can also be write in the configuration information of plug-in unit or be recorded by other forms.
As in figure 2 it is shown, the minimum interface version that can use when plug-in unit and highest interface version all fall within main journey In minimum interface version that sequence can be supported by and the interval range of highest interface version, it is also possible to equal, permissible Assert that this plug-in version is effective, i.e. this plug-in version is adaptive with mastery routine version.Specifically, in Fig. 2,<1> For effective plug-in version, the minimum interface version that this plug-in version can use is identical with highest interface version, And in the range of the minimum interface version that all can be supported by mastery routine and highest interface version interval, this is usual Plug-in unit seldom relates to the situation revising interface.<2>being effective plug-in version, this plug-in version can use Minimum interface version is different with highest interface version, but the minimum interface version that all can be supported by mastery routine and In the range of highest interface version interval, it is considered that be that the interface to plug-in unit is adjusted, but to current main Program does not affect, and meets the condition that plug-in unit is adaptive with mastery routine.<3>it is invalid plug-in version, i.e. plug-in unit Version is the most adaptive with mastery routine version, supplements a kind of situation of<2>, the highest interface that plug-in unit can use Version is adjusted, and current mastery routine version is the most compatible.It is said that in general, adjust what plug-in unit can use Highest interface version, is the new interface in order to use mastery routine to provide, and at this time, if still using old Mastery routine, then there will be plug-in unit the most adaptive with mastery routine.<4>it is invalid plug-in version, namely plug-in unit version This is the most adaptive with mastery routine version, supplements the another kind of situation of<2>here, if it is main to need plug-in unit to use The new interface that program provides, or need to delete some the oldest mastery routine interfaces, then have only to adjust The minimum interface version that mastery routine can be supported by, it is possible to allow " rolling off the production line " that the plug-in unit of some early versions is spontaneous, And update to redaction.
In conjunction with the description above with respect to plug-in version control program, mentioned above controlled by plug-in version Mode realizes from least one plug-in version of plug-in unit, determines that this interface is fitted with mastery routine after changing The plug-in version joined specifically can be accomplished by, and i.e. obtain that mastery routine can be supported by minimum connects Minimum interface version that each plug-in version of mouthful version and highest interface version and plug-in unit can use and High interface version, subsequently in each plug-in version of plug-in unit, minimum interface version that it can be used and High interface version is respectively positioned on minimum interface version and the interval model of highest interface version that mastery routine can be supported by Enclose interior plug-in version, be defined as plug-in version adaptive with mastery routine after this interface changes.
The scheme of above step S104 is described in detail below by a specific embodiment.Table 1 below lists The relevant information of plug-in unit, as plug-in unit name, plug-in version, the version identifier of plug-in unit, plug-in unit can use Low interface version and highest interface version and plug-in unit deposit position etc..It should be noted that table 1 is inserted The relevant information of part is only enumerated, and the relevant information of plug-in unit can also include plug-in unit size, briefly introduce Etc. information, and then follow-up can carry out plug-in unit version in conjunction with information such as plug-in version, plug-in unit size, brief introductions Choosing of this, meets diversified demand.
Table 1
If the minimum interface version that mastery routine can be supported by is 1, highest interface version is 1, then Neng Gouyu The version that plug-in version is built-in A 1 that mastery routine is adaptive.If the minimum interface version that mastery routine can be supported by Being 1, highest interface version is 2, then can be with the version that plug-in version is built-in A of mastery routine adaptation The version 1 of 1 and built-in B.If the minimum interface version that mastery routine can be supported by is 2, highest interface version It is 3, then can be with the version 2 that plug-in version is built-in A of mastery routine adaptation.
Additionally, in an alternative embodiment of the invention, cloud server prestores and includes and mastery routine adaptation The plug-in unit list of multiple plug-in versions, cloud server have collected the various operating system being likely to occur the most in advance Characteristic information and the plug-in version of correspondence, in order to by operating system platform information is received in advance with these The characteristic information of collection carries out matching ratio relatively, finds and the characteristic information of operating system platform information matches, with institute State plug-in unit corresponding to characteristic information and be the plug-in unit of applicable current operation system.Now, above step S104 May be embodied as sending plug-in unit to cloud server and obtain request, then receive cloud server and arrange according to plug-in unit That table returns and that mastery routine is adaptive plug-in version.Further, adaptive the inserting of described operating system is being obtained After part, 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, this URL node is this plug-in unit Download address.Additionally, cloud server also each plug-in version of plug-in unit name, plug-in unit can be used minimum Interface version and highest interface version return to plug-in unit loading system, in order to for follow-up loading work.
After the plug-in version that step S104 obtains plug-in unit from mastery routine and mastery routine is adaptive, step Plug-in version adaptive with mastery routine for the current version of plug-in unit is compared by rapid S106, here can be straight Connect and utilize plug-in version to compare.If in that comparison result is plug-in unit and that mastery routine is adaptive plug-in version There is current version, then determine whether whether current version is latest edition, plug-in unit is not entered Row updating operation, and if it is not, then utilize latest edition that plug-in unit is carried out updating operation.If comparison result is Plug-in unit and there is not current version in plug-in version that mastery routine is adaptive, then insert from adaptive with mastery routine Part version is chosen any plug-in version, and then downloads 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 and cause comparison result inaccurate to solve malice that may be present Problem, the embodiment of the present invention additionally provides a kind of preferably scheme, in this scenario, can obtain plug-in unit The version identifier of current version and the version identifier of the plug-in version adaptive with mastery routine, subsequently according to plug-in unit The version identifier of current version and the version identifier of the plug-in version adaptive with mastery routine, comparison plug-in unit The plug-in version that current version is adaptive with mastery routine.Here, version identifier can be version number, version name, The MD5 value of plug-in version or SHA1 value etc..Concrete, by MD5 algorithm in the embodiment of the present invention Calculate unique hash (Hash) value of plug-in unit, i.e. MD5 value.Typical case's application of MD5 algorithm is right One segment information (Message) produces informative abstract (Message-Digest), to prevent from being tampered.MD5 By whole file as a big text message, by its irreversible character string mapping algorithm, create this Individual unique MD5 informative abstract.Certainly, the embodiment of the present invention uses other algorithm meters according to practical situation The cryptographic Hash calculating executable file is all feasible, and for example with SHA1 etc., this is not limiting as by the present invention.
If plug-in unit and the version mark that there is current version in the version identifier of plug-in version that mastery routine is adaptive Know, it is determined that comparison result is plug-in unit and that mastery routine is adaptive plug-in version exists current version, and Determine whether whether current version is latest edition, plug-in unit is not carried out updating operation, and If it is not, then utilize latest edition that plug-in unit is carried out updating operation.If plug-in unit and plug-in unit that mastery routine is adaptive The version identifier of version does not exists the version identifier of current version, it is determined that comparison result be plug-in unit and The plug-in version that mastery routine is adaptive does not exists current version, and selects from the plug-in version adaptive with mastery routine Take any plug-in version, and then download corresponding plug-in unit according to any plug-in version chosen, and downloading Updating operation is carried out after one-tenth.Here, the version identifier of adaptive with mastery routine plug-in version does not exist current The reason of the version identifier of version has multiple, and the such as interface between mastery routine and plug-in unit is revised;Again Such as in mastery routine, the current version of this plug-in unit already present has damage, and its current version identifications is (such as MD5 Value) change, cause comparison failure;The most such as in mastery routine, the current version of this plug-in unit already present is Through the oldest, it is normal mutual that it can not meet with mastery routine.At this point it is possible to from the plug-in unit version of mastery routine adaptation Choosing any plug-in version in Ben, wherein, the mode chosen has multiple, as chosen up-to-date plug-in version, again As the size according to plug-in unit is chosen, choose according to user's evaluation information of plug-in unit for another example, etc..
Further, download corresponding plug-in unit here according to any plug-in version chosen, the invention provides A kind of preferably scheme, in this scenario, can the plug-in version pre-build and plug-in unit storage address (as The local path of plug-in unit or plug-in unit URL) corresponding relation in (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 according to the plug-in unit storage address searched Corresponding plug-in unit.
In order to improve safety, after plug-in download completes, before carrying out updating operation, it is also possible to plug-in unit Legitimacy verify, if verification pass through, the most directly upgrading download plug-in unit, and if verify do not pass through, The information that then output verification is failed.It is possible to further utilize version identifier that the plug-in unit downloaded is verified, I.e. obtain the version identifier of the plug-in unit of download, subsequently plug-in unit and the version of plug-in version that mastery routine is adaptive This mark is compared, if plug-in unit and the version identifier of plug-in version that mastery routine is adaptive exists The version identifier of the plug-in unit downloaded, it is determined that verification is passed through, the plug-in unit downloaded of can upgrading, otherwise, the most really Determine verification not pass through, the information that output verification is failed.Here, after downloading and verifying successfully, under the most Carried early version plug-in unit, then the plug-in unit of download can be utilized directly to cover early version plug-in unit.
Additionally, after plug-in unit is optionally upgraded by step S108 according to comparison result, it is also possible to Start the plug-in version after upgrading.Further, before the plug-in version after starting upgrading, can first killing Process, just starts if not entering journey, and the plug-in unit of possible early version is also running, it is possible that respectively Plant unexpected problem, such as Resource Manager (resource management) conflict etc..The invention provides The scheme of a kind of killing process, in this scenario, can travel through the process of all startups, it may be judged whether exist The process started belongs to the plug-in unit of current version, if existing, then kills the startup process of the plug-in unit of current version, And start the plug-in unit that new process is corresponding to run the plug-in version after upgrading;If not existing, then directly initiate The plug-in unit that new process is corresponding to run the plug-in version after upgrading.
It is described above the multiple implementation of each link in the embodiment shown in Fig. 1, below by concrete real Execute example and realize process is discussed in detail.
Fig. 3 shows the flow chart of plug-in unit upgrade method in accordance with another embodiment of the present invention.Such as Fig. 3 institute Showing, the method at least comprises the following steps S302 to step S318.
Step S302, when capturing the trigger event that the plug-in unit in mastery routine is upgraded, obtain main journey The current version of already present plug-in unit in sequence.
Step S304, from mastery routine, obtain plug-in unit and plug-in version that mastery routine is adaptive.
Here it is possible to the scheme using plug-in version to control realizes, i.e. obtain mastery routine and can be supported by The minimum interface version that each plug-in version of low interface version and highest interface version and plug-in unit can use With highest interface version, subsequently in each plug-in version of plug-in unit, the minimum interface version that it can be used It is respectively positioned on minimum interface version and the district of highest interface version that mastery routine can be supported by with highest interface version Plug-in version in the range of between, is defined as the plug-in version adaptive with mastery routine.
Step S306, the version identifier obtaining the current version of plug-in unit and the plug-in version adaptive with mastery routine Version identifier.
Step S308, according to the version identifier of the current version of plug-in unit and the plug-in version adaptive with mastery routine Version identifier, the plug-in version that the current version of comparison plug-in unit and mastery routine are adaptive, if plug-in unit and main The version identifier of the plug-in version that program is adaptive exists the version identifier of current version, then continues executing with step S310;If plug-in unit and the version that there is not current version in the version identifier of plug-in version that mastery routine is adaptive This mark, then continue executing with step S312.
Step S310, determine that comparison result is plug-in unit and that mastery routine is adaptive plug-in version exists current Version, and continue executing with step S314.
Step S312, determine that comparison result is plug-in unit and that mastery routine is adaptive plug-in version does not exists and work as Front version, and choose any plug-in version from the plug-in version adaptive with mastery routine, and then according to choosing Arbitrarily plug-in version downloads corresponding plug-in unit, and carries out updating operation after the download is complete.
Here, in order to improve safety, after plug-in download completes, before carrying out updating operation, it is also possible to The legitimacy of plug-in unit is verified, if verification is passed through, the plug-in unit that the most directly upgrading is downloaded, and if verification Do not pass through, then the information that output verification is failed.
Step S314, judge whether current version is latest edition, the most then continue executing with step S316; Otherwise if it is not, then continue executing with step S318.
Step S316, plug-in unit is not carried out updating operation.
Step S318, utilize latest edition that plug-in unit is carried out updating operation.
In the embodiment of the present invention, it is possible to use plug-in version control program in multiple plug-in versions of plug-in unit, It is determined to the plug-in version adaptive with mastery routine.Further, by plug-in unit version adaptive with mastery routine for current version Originally compare, if there is current version in that comparison result is plug-in unit and that mastery routine is adaptive plug-in version, Then determine whether whether current version is latest edition, plug-in unit is not carried out updating operation, with And if it is not, then utilize latest edition that plug-in unit is carried out updating operation.If comparison result is plug-in unit and main journey There is not current version in the plug-in version that sequence is adaptive, then choose from the plug-in version adaptive with mastery routine and appoint Meaning plug-in version, and then according to any plug-in version corresponding plug-in unit of download chosen, and after the download is complete Carry out updating operation.Further, after plug-in download completes, before upgrading, can be to plug-in unit Legitimacy verifies, and adds the safety of system.
It should be noted that in actual application, above-mentioned all optional embodiments can be in the way of using combination Combination in any, forms the alternative embodiment of the present invention, and 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 illustrates 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 may include that acquisition module 410, comparing module 420 and upgraded module 430.
Now introduce 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 Between annexation:
Acquisition module 410, is suitable to when capturing the trigger event upgrading the plug-in unit in mastery routine, Obtain the current version of already present plug-in unit in mastery routine;And obtain plug-in unit from mastery routine and main journey The plug-in version that sequence is adaptive;
Comparing module 420, is coupled with acquisition module 410, is suitable to the current version of plug-in unit and mastery routine Adaptive plug-in version is compared, and obtains comparison result;
Upgraded module 430, is coupled with comparing module 420, is suitable to according to comparison result optionally to inserting Part is upgraded.
In one embodiment of the invention, if the interface between mastery routine and plug-in unit changes, above-mentioned obtain Delivery block 410 is further adapted for: obtain at least one plug-in version of plug-in unit from mastery routine;From plug-in unit at least In one plug-in version, determine interface change after the plug-in version adaptive with mastery routine.
In one embodiment of the invention, above-mentioned acquisition module 410 is further adapted for: obtaining mastery routine can prop up What each plug-in version of the minimum interface version held and highest interface version and plug-in unit can use minimum connects Mouth version and highest interface version;In each plug-in version of plug-in unit, the minimum interface boards that it can be used This and highest interface version are respectively positioned on minimum interface version that mastery routine can be supported by and highest interface version Plug-in version in interval range, is defined as plug-in version adaptive with mastery routine after interface changes.
In one embodiment of the invention, above-mentioned comparing module 420 is further adapted for: obtain the current version of plug-in unit This version identifier and the version identifier of the plug-in version adaptive with mastery routine;Current version according to plug-in unit Version identifier and the version identifier of the plug-in version adaptive with mastery routine, the current version of comparison plug-in unit with The plug-in version that mastery routine is adaptive.
In one embodiment of the invention, above-mentioned comparing module 420 is further adapted for: if plug-in unit and main journey There is the version identifier of current version in the version identifier of the plug-in version that sequence is adaptive, then comparison result is plug-in unit And there is current version in plug-in version that mastery routine is adaptive;If plug-in unit and mastery routine is adaptive inserts There is not the version identifier of current version in the version identifier of part version, then comparison result is plug-in unit and main There is not current version in the plug-in version that program is adaptive.
In one embodiment of the invention, above-mentioned upgraded module 430 is further adapted for: if comparison result is plug-in unit And there is current version in plug-in version that mastery routine is adaptive, then judge whether current version is latest edition This, the most do not carry out updating operation, and if it is not, then utilize latest edition to carry out plug-in unit plug-in unit Updating operation;If there is not current version in that comparison result is plug-in unit and that mastery routine is adaptive plug-in version, Then from the plug-in version adaptive with mastery routine, choose any plug-in version, and then according to any plug-in unit chosen Version downloads corresponding plug-in unit, and carries out updating operation after the download is complete.
In one embodiment of the invention, version identifier includes at least one following: version number, version name Title, the MD5 value of version, the SHA1 value of version.
In one embodiment of the invention, Fig. 5 shows plug-in unit liter in accordance with another embodiment of the present invention The structural representation of stage arrangement.As it is shown in figure 5, this device can also include:
Request sending module 510, is coupled with acquisition module 410, is suitable to send plug-in unit to cloud server Obtain request, wherein, cloud server prestores and includes inserting of the multiple plug-in versions adaptive with mastery routine Part list;
Information receiving module 520, is coupled with request sending module 510, is suitable to receive cloud server root That return according to plug-in unit list and that mastery routine is adaptive plug-in version.
In one embodiment of the invention, the device that Fig. 5 shows can also include: starts module 530, It is coupled with upgraded module 430, is suitable to the plug-in version after starting upgrading.
In one embodiment of the invention, above-mentioned startup module 530 is further adapted for: travel through entering of all startups Journey, it may be judged whether the process that there is startup belongs to the plug-in unit of current version;If existing, then kill current version The startup process of plug-in unit, and start the plug-in unit that new process is corresponding to run the plug-in version after upgrading.
Based on same inventive concept, the embodiment of the present invention additionally provides a kind of terminal, including:
Memorizer;
One or more processors;
Wherein, the one or more processor is configured to perform following method:
When capturing the trigger event that the plug-in unit in mastery routine is upgraded, obtain in described mastery routine The current version of the described plug-in unit existed;
Obtain from described mastery routine described plug-in unit and the adaptive plug-in version of described mastery routine;
Plug-in version adaptive with described mastery routine for the current version of described plug-in unit is compared, obtains comparison Result;
Optionally described plug-in unit is upgraded according to described comparison result.
According to any one preferred embodiment above-mentioned or the combination of multiple preferred embodiment, embodiment of the present invention energy Enough reach following beneficial effect:
In the technical scheme that the present invention provides, when capturing the triggering that the plug-in unit in mastery routine is upgraded During event, that directly can get this plug-in unit from mastery routine and that mastery routine is adaptive plug-in version, from And by the current version of this plug-in unit and this plug-in unit and plug-in version that mastery routine is adaptive compare it After, optionally this plug-in unit is upgraded according to comparison result.Compared to prior art, the present invention without Download new mastery routine and ensure that new plug-in unit and mastery routine are adaptive, improve a liter stage efficiency, save system and Internet resources.Further, the present invention can get plug-in unit and main flexibly, exactly from mastery routine The plug-in version that program is adaptive, thereby may be ensured that between plug-in unit and mastery routine is normal mutual, even if mastery routine And the interface between plug-in unit changes, still ensure that plug-in version is adaptive with mastery routine version, thus Can avoid in prior art because of interface change the plug-in unit caused or mastery routine the most adaptive and collapse Etc. problem, improve the effectiveness of upgrading.Additionally, the present invention by the current version of plug-in unit and this plug-in unit, The plug-in version adaptive with mastery routine is compared such that it is able to known the current version of plug-in unit by comparison The most adaptive, if the current version of plug-in unit is the most adaptive with mastery routine, even if current version is up-to-date with mastery routine Version, it is also desirable to again upgrade, i.e. can be carried out according to the plug-in version adaptive with mastery routine of this plug-in unit Upgrading, further ensures the effectiveness of upgrading.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that this Bright embodiment can be put into practice in the case of not having these details.In some instances, the most in detail Known method, structure and technology are shown, in order to do not obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure help to understand in each inventive aspect one or Multiple, above in the description of the exemplary embodiment of the present invention, each feature of the present invention is sometimes by one Rise and be grouped in single embodiment, figure or descriptions thereof.But, should be by the method for the disclosure It is construed to reflect an intention that i.e. the present invention for required protection requires than institute in each claim clearly The more feature of feature recorded.More precisely, as the following claims reflect, send out Bright aspect is all features less than single embodiment disclosed above.Therefore, it then follows detailed description of the invention Claims be thus expressly incorporated in this detailed description of the invention, the conduct of the most each claim itself The independent embodiment of the present invention.
Those skilled in the art are appreciated that and can carry out adaptive to the module in the equipment in embodiment Change to answering property and they are arranged in one or more equipment different from this embodiment.Can be reality Execute the module in example or unit or assembly is combined into a module or unit or assembly, and in addition can be it Be divided into multiple submodule or subelement or sub-component.Except in such feature and/or process or unit Outside at least some excludes each other, can use any combination that (this specification being included, adjoint right is wanted Ask, make a summary and accompanying drawing) disclosed in all features and so disclosed any method or equipment all Process or unit are combined.Unless expressly stated otherwise, this specification (include adjoint claim, Summary and accompanying drawing) disclosed in each feature can by provide identical, equivalent or the alternative features of similar purpose Replace.
Although additionally, it will be appreciated by those of skill in the art that embodiments more described herein include other Some feature included in embodiment rather than further feature, but the combination meaning of the feature of different embodiment Taste and is within the scope of the present invention and is formed different embodiments.Such as, in detail in the claims, One of arbitrarily can mode using in any combination of embodiment required for protection.
The all parts embodiment of the present invention can realize with hardware, or with at one or more processor The software module of upper operation realizes, or realizes with combinations thereof.It will be understood by those of skill in the art that Microprocessor or digital signal processor (DSP) can be used in practice to realize according to the present invention real Execute the some or all functions of some or all parts in the plug-in unit update device of example.The present invention also may be used To be embodied as part or all the equipment for performing method as described herein or device program (such as, computer program and computer program).The program of such present invention of realization can store On a computer-readable medium, or can be to have the form of one or more signal.Such signal can Obtain to download on internet website, or provide on carrier signal, or carry with any other form Supply.
The present invention will be described rather than limits the invention to it should be noted above-described embodiment, and And those skilled in the art can design replacement enforcement without departing from the scope of the appended claims Example.In the claims, any reference marks that should not will be located between bracket is configured to claim Limit.Word " comprises " and does not excludes the presence of the element or step not arranged in the claims.Be positioned at element it Front word "a" or "an" does not excludes the presence of multiple such element.The present invention can be by means of bag Include the hardware of some different elements and realize by means of properly programmed computer.Some listing In the unit claim of device, several in these devices can be to be come specifically by same hardware branch Embody.Word first, second and third use do not indicate that any order.Can be by these word solutions It is interpreted as title.
So far, although those skilled in the art will appreciate that and the most detailed illustrate and describing the present invention's Multiple exemplary embodiments, but, without departing from the spirit and scope of the present invention, still can be according to this Disclosure of invention directly determines or derives other variations or modifications of many meeting the principle of the invention.Cause This, the scope of the present invention is it is understood that and regard as covering other variations or modifications all these.
The invention also discloses: A1, a kind of plug-in unit upgrade method, including:
When capturing the trigger event that the plug-in unit in mastery routine is upgraded, obtain in described mastery routine The current version of the described plug-in unit existed;
Obtain from described mastery routine described plug-in unit and the adaptive plug-in version of described mastery routine;
Plug-in version adaptive with described mastery routine for the current version of described plug-in unit is compared, obtains comparison Result;
Optionally described plug-in unit is upgraded according to described comparison result.
A2, according to the method described in A1, wherein, if the interface between described mastery routine and described plug-in unit is sent out Changing, obtain from described mastery routine described plug-in unit and the adaptive plug-in version of described mastery routine, bag Include:
At least one plug-in version of described plug-in unit is obtained from described mastery routine;
From at least one plug-in version of described plug-in unit, determine described interface change after with described main journey The plug-in version that sequence is adaptive.
A3, according to the method described in A2, wherein, from least one plug-in version of described plug-in unit, really The plug-in version that fixed described interface is adaptive with described mastery routine after changing, including:
Obtain minimum interface version and highest interface version and described plug-in unit that described mastery routine can be supported by The minimum interface version that can use of each plug-in version and highest interface version;
In each plug-in version of described plug-in unit, the minimum interface version that it can be used and highest interface version Originally it is respectively positioned in the interval range of minimum interface version that described mastery routine can be supported by and highest interface version Plug-in version, be defined as plug-in version adaptive with described mastery routine after described interface changes.
A4, according to the method described in any one of A1-A3, wherein, by current version and the institute of described plug-in unit The plug-in version stating mastery routine adaptive is compared, including:
Obtain the version identifier of the current version of described plug-in unit and the plug-in version adaptive with described mastery routine Version identifier;
The version identifier of the current version according to described plug-in unit and the plug-in version adaptive with described mastery routine Version identifier, the plug-in version that the current version of plug-in unit described in comparison is adaptive with described mastery routine.
A5, according to the method described in A4, wherein, according to the version identifier of the current version of described plug-in unit with And the version identifier of the plug-in version adaptive with described mastery routine, the current version of plug-in unit described in comparison is with described The plug-in version that mastery routine is adaptive, obtains comparison result, including:
If the version identifier of the plug-in version that described plug-in unit and described mastery routine is adaptive exists described currently The version identifier of version, the most described comparison result is the plug-in unit version that described plug-in unit and described mastery routine is adaptive Described current version is there is in Ben;
If the version identifier of the plug-in version that described plug-in unit and described mastery routine is adaptive does not exists described working as The version identifier of front version, the most described comparison result is the plug-in unit that described plug-in unit and described mastery routine is adaptive Version does not exists described current version.
A6, according to the method described in A5, wherein, according to described comparison result optionally to described plug-in unit Upgrade, including:
If described comparison result is that in the plug-in version that described plug-in unit and described mastery routine is adaptive, existence is described Current version, then judge whether described current version is latest edition, does not carries out described plug-in unit Updating operation, and if it is not, then utilize described latest edition that described plug-in unit is carried out updating operation;
If described comparison result is to there is not institute in the plug-in version that described plug-in unit and described mastery routine is adaptive State current version, then from the plug-in version adaptive with described mastery routine, choose any plug-in version, Jin Ergen 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, according to the method described in any one of A4-A6, wherein, described version identifier include following at least One of: version number, version name, the message digest algorithm MD5 value of version, the secure Hash of version are calculated Method SHA1 value.
A8, according to the method described in any one of A1-A7, wherein, described method also includes:
To cloud server send plug-in unit obtain request, wherein, described cloud server prestores include with The plug-in unit list of multiple plug-in versions that described mastery routine is adaptive;
Receive the plug-in unit that described cloud server returns and described mastery routine is adaptive according to described plug-in unit list Version.
A9, according to the method described in A8, wherein, described cloud server returns according to described plug-in unit list And plug-in version that described mastery routine is adaptive also carries at least one following: URL address, plug-in unit Name, the minimum interface version that can use of each plug-in version of plug-in unit and highest interface version.
A10, according to the method described in any one of A1-A9, wherein, according to described comparison result selectivity After described plug-in unit is upgraded by ground, also include:
Start the plug-in version after upgrading.
A11, according to the method described in A10, wherein, described start upgrading after plug-in version, including:
Travel through the process of all startups, it may be judged whether the process that there is startup belongs to inserting of described current version Part;
If existing, then kill the startup process of the plug-in unit of described current version, and start new process to run The plug-in unit that plug-in version after upgrading is corresponding.
B12, a kind of plug-in unit update device, including:
Acquisition module, is suitable to when capturing the trigger event upgrading the plug-in unit in mastery routine, obtains The current version of already present described plug-in unit in described mastery routine;And from described mastery routine, obtain described inserting Part and that described mastery routine is adaptive plug-in version;
Comparing module, is suitable to carry out plug-in version adaptive with described mastery routine for the current version of described plug-in unit Comparison, obtains comparison result;
Upgraded module, is suitable to optionally upgrade described plug-in unit according to described comparison result.
B13, according to the device described in B12, wherein, if the interface between described mastery routine and described plug-in unit Changing, described acquisition module is further adapted for:
At least one plug-in version of described plug-in unit is obtained from described mastery routine;
From at least one plug-in version of described plug-in unit, determine described interface change after with described main journey The plug-in version that sequence is adaptive.
B14, according to the device described in B13, wherein, described acquisition module is further adapted for:
Obtain minimum interface version and highest interface version and described plug-in unit that described mastery routine can be supported by The minimum interface version that can use of each plug-in version and highest interface version;
In each plug-in version of described plug-in unit, the minimum interface version that it can be used and highest interface version Originally it is respectively positioned in the interval range of minimum interface version that described mastery routine can be supported by and highest interface version Plug-in version, be defined as plug-in version adaptive with described mastery routine after described interface changes.
B15, according to the device described in any one of B12-B14, wherein, described comparing module is further adapted for:
Obtain the version identifier of the current version of described plug-in unit and the plug-in version adaptive with described mastery routine Version identifier;
The version identifier of the current version according to described plug-in unit and the plug-in version adaptive with described mastery routine Version identifier, the plug-in version that the current version of plug-in unit described in comparison is adaptive with described mastery routine.
B16, according to the device described in B15, wherein, described comparing module is further adapted for:
If the version identifier of the plug-in version that described plug-in unit and described mastery routine is adaptive exists described currently The version identifier of version, the most described comparison result is the plug-in unit version that described plug-in unit and described mastery routine is adaptive Described current version is there is in Ben;
If the version identifier of the plug-in version that described plug-in unit and described mastery routine is adaptive does not exists described working as The version identifier of front version, the most described comparison result is the plug-in unit that described plug-in unit and described mastery routine is adaptive Version does not exists described current version.
B17, according to the device described in B16, wherein, described upgraded module is further adapted for:
If described comparison result is that in the plug-in version that described plug-in unit and described mastery routine is adaptive, existence is described Current version, then judge whether described current version is latest edition, does not carries out described plug-in unit Updating operation, and if it is not, then utilize described latest edition that described plug-in unit is carried out updating operation;
If described comparison result is to there is not institute in the plug-in version that described plug-in unit and described mastery routine is adaptive State current version, then from the plug-in version adaptive with described mastery routine, choose any plug-in version, Jin Ergen 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, according to the device described in any one of B15-B17, wherein, described version identifier include following extremely One of few: version number, version name, the message digest algorithm MD5 value of version, the secure Hash of version Algorithm SHA1 value.
B19, according to the device described in any one of B12-B18, wherein, described device also includes:
Request sending module, is suitable to send plug-in unit to cloud server and obtains request, and wherein, described high in the clouds takes Business device prestores the plug-in unit list including the multiple plug-in versions adaptive with described mastery routine;
Information receiving module, is suitable to receive described cloud server returns and institute according to described plug-in unit list State the plug-in version that mastery routine is adaptive.
B20, according to the device described in B19, wherein, described cloud server returns according to described plug-in unit list That return and that described mastery routine is adaptive plug-in version also carry at least one following: URL address, insert Minimum interface version that part name, each plug-in version of plug-in unit can use and highest interface version.
B21, according to the device described in any one of B12-B20, wherein, at described upgraded module according to described After described plug-in unit is optionally upgraded by comparison result, also include:
Start module, be suitable to the plug-in version after starting upgrading.
B22, according to the device described in B21, wherein, described startup module is further adapted for:
Travel through the process of all startups, it may be judged whether the process that there is startup belongs to inserting of described current version Part;
If existing, then kill the startup process of the plug-in unit of described current version, and start new process to run The plug-in unit that plug-in version after upgrading is corresponding.
C23, a kind of terminal, including:
Memorizer;
One or more processors;
Wherein, the one or more processor is configured to perform following method:
When capturing the trigger event that the plug-in unit in mastery routine is upgraded, obtain in described mastery routine The current version of the described plug-in unit existed;
Obtain from described mastery routine described plug-in unit and the adaptive plug-in version of described mastery routine;
Plug-in version adaptive with described mastery routine for the current version of described plug-in unit is compared, obtains comparison Result;
Optionally described plug-in unit is upgraded according to described comparison result.

Claims (21)

1. a plug-in unit upgrade method, including:
When capturing the trigger event that the plug-in unit in mastery routine is upgraded, obtain in described mastery routine The current version of the described plug-in unit existed;
Obtain from described mastery routine described plug-in unit and the adaptive plug-in version of described mastery routine, wherein, If the interface between described mastery routine and described plug-in unit changes, then from described mastery routine, obtain described inserting At least one plug-in version of part, from least one plug-in version of described plug-in unit, determines that described interface is sent out Plug-in version adaptive with described mastery routine after changing;
Plug-in version adaptive with described mastery routine for the current version of described plug-in unit is compared, obtains comparison Result;
Optionally described plug-in unit is upgraded according to described comparison result.
Method the most according to claim 1, wherein, from least one plug-in version of described plug-in unit In, determine described interface change after the plug-in version adaptive with described mastery routine, including:
Obtain minimum interface version and highest interface version and described plug-in unit that described mastery routine can be supported by The minimum interface version that can use of each plug-in version and highest interface version;
In each plug-in version of described plug-in unit, the minimum interface version that it can be used and highest interface version Originally it is respectively positioned in the interval range of minimum interface version that described mastery routine can be supported by and highest interface version Plug-in version, be defined as plug-in version adaptive with described mastery routine after described interface changes.
Method the most according to claim 1 and 2, wherein, by current version and the institute of described plug-in unit The plug-in version stating mastery routine adaptive is compared, including:
Obtain the version identifier of the current version of described plug-in unit and the plug-in version adaptive with described mastery routine Version identifier;
The version identifier of the current version according to described plug-in unit and the plug-in version adaptive with described mastery routine Version identifier, the plug-in version that the current version of plug-in unit described in comparison is adaptive with described mastery routine.
Method the most according to claim 3, wherein, according to the version of the current version of described plug-in unit Identify and the version identifier of the plug-in version adaptive with described mastery routine, the current version of plug-in unit described in comparison The plug-in version adaptive with described mastery routine, obtains comparison result, including:
If the version identifier of the plug-in version that described plug-in unit and described mastery routine is adaptive exists described currently The version identifier of version, the most described comparison result is the plug-in unit version that described plug-in unit and described mastery routine is adaptive Described current version is there is in Ben;
If the version identifier of the plug-in version that described plug-in unit and described mastery routine is adaptive does not exists described working as The version identifier of front version, the most described comparison result is the plug-in unit that described plug-in unit and described mastery routine is adaptive Version does not exists described current version.
Method the most according to claim 4, wherein, according to described comparison result optionally to institute State plug-in unit to upgrade, including:
If described comparison result is that in the plug-in version that described plug-in unit and described mastery routine is adaptive, existence is described Current version, then judge whether described current version is latest edition, does not carries out described plug-in unit Updating operation, and if it is not, then utilize described latest edition that described plug-in unit is carried out updating operation;
If described comparison result is to there is not institute in the plug-in version that described plug-in unit and described mastery routine is adaptive State current version, then from the plug-in version adaptive with described mastery routine, choose any plug-in version, Jin Ergen Download corresponding plug-in unit according to the described any plug-in version chosen, and carry out updating operation after the download is complete.
Method the most according to claim 3, wherein, described version identifier includes at least one following: Version number, version name, the message digest algorithm MD5 value of version, the Secure Hash Algorithm SHA1 of version Value.
Method the most according to claim 1 and 2, wherein, described method also includes:
To cloud server send plug-in unit obtain request, wherein, described cloud server prestores include with The plug-in unit list of multiple plug-in versions that described mastery routine is adaptive;
Receive the plug-in unit that described cloud server returns and described mastery routine is adaptive according to described plug-in unit list Version.
Method the most according to claim 7, wherein, described cloud server arranges according to described plug-in unit That table returns and that described mastery routine is adaptive plug-in version also carries at least one following: URL address, Minimum interface version that plug-in unit name, each plug-in version of plug-in unit can use and highest interface version.
Method the most according to claim 1 and 2, wherein, according to described comparison result selectivity After described plug-in unit is upgraded by ground, also include:
Start the plug-in version after upgrading.
Method the most according to claim 9, wherein, the described plug-in version started after upgrading, bag Include:
Travel through the process of all startups, it may be judged whether the process that there is startup belongs to inserting of described current version Part;
If existing, then kill the startup process of the plug-in unit of described current version, and start new process to run The plug-in unit that plug-in version after upgrading is corresponding.
11. 1 kinds of plug-in unit update devices, including:
Acquisition module, is suitable to when capturing the trigger event upgrading the plug-in unit in mastery routine, obtains The current version of already present described plug-in unit in described mastery routine;And from described mastery routine, obtain described inserting Part and that described mastery routine is adaptive plug-in version, wherein, if between described mastery routine and described plug-in unit Interface changes, then obtain at least one plug-in version of described plug-in unit from described mastery routine, from described In at least one plug-in version of plug-in unit, determine described interface change after insert adaptive with described mastery routine Part version;
Comparing module, is suitable to carry out plug-in version adaptive with described mastery routine for the current version of described plug-in unit Comparison, obtains comparison result;
Upgraded module, is suitable to optionally upgrade described plug-in unit according to described comparison result.
12. devices according to claim 11, wherein, described acquisition module is further adapted for:
Obtain minimum interface version and highest interface version and described plug-in unit that described mastery routine can be supported by The minimum interface version that can use of each plug-in version and highest interface version;
In each plug-in version of described plug-in unit, the minimum interface version that it can be used and highest interface version Originally it is respectively positioned in the interval range of minimum interface version that described mastery routine can be supported by and highest interface version Plug-in version, be defined as plug-in version adaptive with described mastery routine after described interface changes.
13. according to the device described in claim 11 or 12, and wherein, described comparing module is further adapted for:
Obtain the version identifier of the current version of described plug-in unit and the plug-in version adaptive with described mastery routine Version identifier;
The version identifier of the current version according to described plug-in unit and the plug-in version adaptive with described mastery routine Version identifier, the plug-in version that the current version of plug-in unit described in comparison is adaptive with described mastery routine.
14. devices according to claim 13, wherein, described comparing module is further adapted for:
If the version identifier of the plug-in version that described plug-in unit and described mastery routine is adaptive exists described currently The version identifier of version, the most described comparison result is the plug-in unit version that described plug-in unit and described mastery routine is adaptive Described current version is there is in Ben;
If the version identifier of the plug-in version that described plug-in unit and described mastery routine is adaptive does not exists described working as The version identifier of front version, the most described comparison result is the plug-in unit that described plug-in unit and described mastery routine is adaptive Version does not exists described current version.
15. devices according to claim 14, wherein, described upgraded module is further adapted for:
If described comparison result is that in the plug-in version that described plug-in unit and described mastery routine is adaptive, existence is described Current version, then judge whether described current version is latest edition, does not carries out described plug-in unit Updating operation, and if it is not, then utilize described latest edition that described plug-in unit is carried out updating operation;
If described comparison result is to there is not institute in the plug-in version that described plug-in unit and described mastery routine is adaptive State current version, then from the plug-in version adaptive with described mastery routine, choose any plug-in version, Jin Ergen Download corresponding plug-in unit according to the described any plug-in version chosen, and carry out updating operation after the download is complete.
16. devices according to claim 13, wherein, described version identifier include following at least it One: version number, version name, the message digest algorithm MD5 value of version, the Secure Hash Algorithm of version SHA1 value.
17. according to the device described in claim 11 or 12, and wherein, described device also includes:
Request sending module, is suitable to send plug-in unit to cloud server and obtains request, and wherein, described high in the clouds takes Business device prestores the plug-in unit list including the multiple plug-in versions adaptive with described mastery routine;
Information receiving module, is suitable to receive described cloud server returns and institute according to described plug-in unit list State the plug-in version that mastery routine is adaptive.
18. devices according to claim 17, wherein, described cloud server is according to described plug-in unit That list returns and that described mastery routine is adaptive plug-in version also carry at least one following: URL Minimum interface version that address, plug-in unit name, each plug-in version of plug-in unit can use and highest interface version.
19. according to the device described in claim 11 or 12, wherein, at described upgraded module according to described After described plug-in unit is optionally upgraded by comparison result, also include:
Start module, be suitable to the plug-in version after starting upgrading.
20. devices according to claim 19, wherein, described startup module is further adapted for:
Travel through the process of all startups, it may be judged whether the process that there is startup belongs to inserting of described current version Part;
If existing, then kill the startup process of the plug-in unit of described current version, and start new process to run The plug-in unit that plug-in version after upgrading is corresponding.
21. 1 kinds of terminals, including:
Memorizer;
One or more processors;
Wherein, the one or more processor is configured to perform following method:
When capturing the trigger event that the plug-in unit in mastery routine is upgraded, obtain in described mastery routine The current version of the described plug-in unit existed;
Obtain from described mastery routine described plug-in unit and the adaptive plug-in version of described mastery routine, wherein, If the interface between described mastery routine and described plug-in unit changes, then from described mastery routine, obtain described inserting At least one plug-in version of part, from least one plug-in version of described plug-in unit, determines that described interface is sent out Plug-in version adaptive with described mastery routine after changing;
Plug-in version adaptive with described mastery routine for the current version of described plug-in unit 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 CN104699511A (en) 2015-06-10
CN104699511B true 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)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170060650A1 (en) * 2015-08-28 2017-03-02 Ncr Corporation Dynamic service extensibility
CN106131612B (en) * 2016-06-30 2019-03-05 武汉斗鱼网络科技有限公司 The method and system of Android app dynamically 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
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
CN108845812B (en) * 2018-05-31 2024-04-05 康键信息技术(深圳)有限公司 Plug-in updating method, device, computer equipment and storage medium
CN109710283B (en) * 2018-11-15 2024-05-07 中国平安人寿保险股份有限公司 Method, device, computer equipment and storage medium for acquiring Mynav plug-ins

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

Also Published As

Publication number Publication date
CN104699511A (en) 2015-06-10

Similar Documents

Publication Publication Date Title
CN104699511B (en) Plug-in unit upgrade method and device
US10694353B2 (en) Updating web resources
US9075633B2 (en) Configuration of life cycle management for configuration files for an application
CN104252342B (en) Embedded application implementation method and device capable of configuring parameters
CN104717301B (en) Plug-in download method and device
CN108847950B (en) Electronic device, cloud system software automatic deployment method and storage medium
US9823915B1 (en) Software container format
CN103810011B (en) The method that OTA upgradings are realized by file server
CN111381858B (en) Application program upgrading method, server and terminal equipment
CN108027741A (en) Document handling method, device, terminal and storage medium based on patch upgrading
CN103559065B (en) Method and system for OTA (Over-the-Air Technology) upgrade
CN105718268A (en) Method and device for verifying OTA multi-pack upgrading
CN108196878A (en) Generation method, device, electronic equipment and the storage medium of application program installation kit
CN104133699B (en) Device system software upgrade method and system
CN105159718B (en) Firmware upgrade method and device
CN102833350A (en) Processing method and processing device of WebApp updating
CN107025108B (en) Exporting hierarchical data from a Source Code Management (SCM) system to a Product Lifecycle Management (PLM) system
CN104123149B (en) Method for upgrading software, device, client and system
CN104731623B (en) Mastery routine starts the method and device of plug-in unit
CN105279436B (en) Oftware updating method and system
CN103544030A (en) Software upgrading method, software upgrading system and intelligent terminal
CN110231956B (en) Method, system and device for constructing application program version
CN106371881A (en) Method and system for updating program versions in servers
CN110765394A (en) So file loading method and device, storage medium and terminal equipment
CN110851151B (en) Method, device, terminal, server and storage medium for pre-installing application

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