CN107239299A - Plug-in unit upgrade method and device - Google Patents
Plug-in unit upgrade method and device Download PDFInfo
- Publication number
- CN107239299A CN107239299A CN201710296360.4A CN201710296360A CN107239299A CN 107239299 A CN107239299 A CN 107239299A CN 201710296360 A CN201710296360 A CN 201710296360A CN 107239299 A CN107239299 A CN 107239299A
- Authority
- CN
- China
- Prior art keywords
- plug
- unit
- aku
- checking information
- information
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/57—Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
- G06F21/575—Secure boot
Abstract
The present invention provides a kind of plug-in unit upgrade method and device.The plug-in unit upgrade method of the present invention includes:Obtain AKU corresponding with the first plug-in unit;AKU includes residual quantity file and checking information, and residual quantity file includes the different information of first plug-in unit and the second plug-in unit, and position of the different information in the first data file of second plug-in unit;Wherein, the second plug-in unit is the corresponding latest edition plug-in unit of the first plug-in unit;According to checking information, AKU is verified, the result passed through is verified;Upgraded according to AKU and the first plug-in unit, the first plug-in unit after being upgraded.The plug-in unit upgrade method and device of the present invention, plug-in unit updating speed is fast and does not expend customer flow.
Description
Technical field
The present invention relates to communication engineering technology, more particularly to a kind of plug-in unit upgrade method and device.
Background technology
As the function that android is applied is more and more, installation kit will be increasing, many application programs
(Application, abbreviation APP) all employ Plugin Mechanism.There is Plugin Mechanism dynamic to update, it is not necessary to install, and reduce master
The advantages of memory space that program takes.
The dynamic updating method of plug-in unit is in the prior art:To the Dalvik configuration processors in the plug-in unit bag in server
The program code of (Dalvik VM executes, vehicle economy X) file is modified, so that increase function and/or repair BUG,
Obtain new full plug-in bag, using new full plug-in bag upload server as plug-in unit AKU.Terminal downloads AKU,
And the upgrading that plug-in unit is completed when anterior plug-in bag is replaced using AKU.
But, the plug-in unit larger for taking memory space, when the negligible amounts in BUG or the modification to function are less,
Terminal needs to download AKU to complete escalation process, and the AKU is complete plug-in unit bag, therefore can cause renewal speed
The problem of slow and consuming customer flow.
The content of the invention
The present invention provides a kind of plug-in unit upgrade method and device, to overcome the larger plug-in unit caused of AKU in the prior art
Updating speed is slow and expends the technical problem of customer flow.
In a first aspect, the present invention provides a kind of plug-in unit upgrade method, applied to terminal device, installed in the terminal device
There is the first plug-in unit, methods described includes:
Obtain AKU corresponding with first plug-in unit;The AKU includes residual quantity file and checking information, described
Residual quantity file includes the different information of first plug-in unit and the second plug-in unit, and the different information is in second plug-in unit
Position in first data file;Wherein, second plug-in unit is the corresponding latest edition plug-in unit of first plug-in unit;
According to the checking information, the AKU is verified, the result passed through is verified;
Upgraded according to the AKU and first plug-in unit, the first plug-in unit after being upgraded.
Method as described above, it is described to be upgraded according to the AKU and first plug-in unit, after being upgraded
First plug-in unit, including:
Information to be updated at the second data file correspondence position of first plug-in unit is replaced with into the difference
Information, obtains the 3rd data file;
According to the 3rd data file, the first plug-in unit after the upgrading is obtained.
Method as described above, the checking information includes legal verification information and the first matching checking information, the conjunction
Method checking information includes the first checking information and the second checking information, described according to the checking information, and the AKU is entered
Row checking, is verified the result passed through, including:
Using md5 encryption algorithm to the residual quantity file encryption, the first summary info is obtained;
Judge whether first summary info is identical with first checking information, if so, then passing through public key decryptions pair
The second checking information decryption, obtains the second summary info, if first summary info and the second summary info are identical,
Determine that the AKU is legal;
Second data file is encrypted using md5 encryption algorithm, the 3rd summary info is obtained;
Judge whether the 3rd summary info matches checking information with described first identical, if so, then obtaining AKU
The result being verified.
Method as described above, the checking information also includes:Second matching checking information, described according to the described 3rd
Data file, before obtaining the first plug-in unit after the upgrading, in addition to:
The 3rd data file is encrypted using md5 encryption algorithm, the 4th summary info is obtained;
Judge whether the 4th summary info matches checking information with described second identical, if, it is determined that described
Three data files are matched with the AKU.
Method as described above, acquisition AKU corresponding with first plug-in unit, including:
Inquiry request is sent to server, the inquiry request includes the mark and version information of first plug-in unit,
The inquiry request is used to indicate whether the server lookup is stored with AKU corresponding with first plug-in unit;
Correspondingly, obtaining AKU corresponding with first plug-in unit includes:
The server is obtained it is determined that sending during the corresponding AKU of first plug-in unit that is stored with the server
The AKU.
Second aspect, the present invention provides a kind of plug-in unit upgrade method, including:
Residual quantity file is obtained, the residual quantity file includes the different information of the first plug-in unit and the second plug-in unit, and the difference
Position of the different information in the first data file of second plug-in unit, second plug-in unit is that first plug-in unit is corresponding most
Redaction plug-in unit;
Obtain checking information;The checking information is used for the legitimacy and liter that AKU is verified in plug-in unit escalation process
Whether level bag matches with the first plug-in unit;
The residual quantity file and the checking information are sent to server, so that the server is according to residual quantity text
Part and the checking information, generate the AKU of first plug-in unit, and the AKU is used for the upgrading of first plug-in unit.
Method as described above, the checking information includes legal verification information and the first matching checking information, described to obtain
Checking information is taken to include:
Using md5 encryption algorithm to the residual quantity file encryption, the first checking information is obtained;
First checking information is encrypted by private key encryption, the second checking information is obtained;
The second data file of the first plug-in unit is encrypted using md5 encryption algorithm, the first matching checking information is obtained.
Method as described above, the checking information also includes:Second matching checking information, the acquisition checking information is also
Including:
The first data file of the second plug-in unit is encrypted using md5 encryption algorithm, the second matching checking is obtained
Information.
The third aspect, the present invention provides a kind of plug-in unit update device, including:
AKU acquisition module, the AKU acquisition module is used to obtain AKU corresponding with first plug-in unit;
The AKU includes residual quantity file and checking information, and the residual quantity file includes the difference of first plug-in unit and the second plug-in unit
Information, and position of the different information in the first data file of second plug-in unit;Wherein, second plug-in unit is
The corresponding latest edition plug-in unit of first plug-in unit;
Authentication module, the authentication module is used for according to the checking information, and the AKU is verified, tested
Demonstrate,prove the result passed through;
Upgraded module, the upgraded module is used to be upgraded according to the AKU and first plug-in unit, is risen
The first plug-in unit after level.
Fourth aspect, the present invention provides a kind of plug-in unit update device, including:
First acquisition module, first acquisition module is used to obtain residual quantity file, and the residual quantity file includes first and inserted
The different information of part and the second plug-in unit, and position of the different information in the first data file of second plug-in unit,
Second plug-in unit is the corresponding latest edition plug-in unit of first plug-in unit;
Second acquisition module, second acquisition module is used to obtain checking information;The checking information is used in plug-in unit
Verify whether the legitimacy and AKU of AKU match with the first plug-in unit in escalation process;
Sending module, the sending module sends the residual quantity file and the checking information to server, so that institute
Server is stated according to the residual quantity file and the checking information, the AKU of first plug-in unit is generated, the AKU is used
In the upgrading of first plug-in unit.
The present invention provides a kind of plug-in unit upgrade method and device, and plug-in unit upgrade method of the invention includes:Obtain and first
The corresponding AKU of plug-in unit;AKU includes residual quantity file and checking information, and residual quantity file includes first plug-in unit and second
The different information of plug-in unit, and position of the different information in the first data file of second plug-in unit;Wherein, the second plug-in unit
For the corresponding latest edition plug-in unit of the first plug-in unit;According to checking information, AKU is verified, the knot passed through is verified
Really;Upgraded according to AKU and the first plug-in unit, the first plug-in unit after being upgraded.The plug-in unit upgrade method and dress of the present invention
Put, plug-in unit updating speed is fast and does not expend customer flow.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are this hairs
Some bright embodiments, for those of ordinary skill in the art, without having to pay creative labor, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is application scenario diagram of the invention;
The flow chart one for the plug-in unit upgrade method that Fig. 2 provides for the present invention;
The residual quantity file schematic diagram one that Fig. 3 provides for the present invention;
The residual quantity file schematic diagram two that Fig. 4 provides for the present invention;
The residual quantity file schematic diagram three that Fig. 5 provides for the present invention;
The flowchart 2 for the plug-in unit upgrade method that Fig. 6 provides for the present invention;
The flow chart 3 for the plug-in unit upgrade method that Fig. 7 provides for the present invention;
The structural representation of the embodiment one for the plug-in unit update device that Fig. 8 provides for the present invention;
The structural representation of the embodiment two for the plug-in unit update device that Fig. 9 provides for the present invention;
The structural representation of the embodiment three for the plug-in unit update device that Figure 10 provides for the present invention.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
A kind of possible system architecture diagram that Fig. 1 provides for the present invention.The system architecture provided referring to Fig. 1, the present embodiment
Figure includes the user equipment 12 of server 11 and first and second user equipment 13.First user equipment 12 and second user equipment 13
For example can be mobile phone, flat board, apparatus such as computer.Server 11 is used for memory card and the corresponding AKU of the plug-in unit.
Second user equipment 13 is provided with least one application program, and application program includes at least one plug-in unit, plug-in unit
It for example can be the skin plug-in unit in search dog input program.
First user equipment 12 can obtain plug-in unit from server, generate AKU according to the plug-in unit, the AKU can
To upgrade to the plug-in unit.First user equipment 12 sends the AKU of generation to server, is stored by server,
Called when upgrading for the plug-in unit in second user equipment 13.Wherein, it is slow and expend customer flow in order to solve plug-in unit updating speed
The problem of, the first user equipment 12 generation AKU only include residual quantity file and checking information, therefore, second user equipment from
The AKU that server is obtained only includes residual quantity file and checking information, because the AKU includes residual quantity file, so upgrading
Speed is fast, expends flow few.
The plug-in unit upgrade method and device to the present invention are described in detail below.First, by implementing shown in Fig. 2
Example, the process that the first user equipment does AKU is described in detail.Executive agent in following Fig. 2 for example can be above-mentioned
The first user equipment 12 in Fig. 1.
The flow chart one for the plug-in unit upgrade method that Fig. 2 provides for the present invention, as shown in Fig. 2 applied to terminal device, this reality
Applying the method for example can include:
Step S101, acquisition residual quantity file, residual quantity file include the different information of the first plug-in unit and the second plug-in unit, and poor
Position of the different information in the first data file of the second plug-in unit, the second plug-in unit is the corresponding latest edition plug-in unit of the first plug-in unit;
Step S102, acquisition checking information, the checking information are used for the conjunction that AKU is verified in plug-in unit escalation process
Whether method and AKU match with the first plug-in unit;
Step S103, residual quantity file and checking information sent to server, so that server is according to residual quantity file and tests
Information is demonstrate,proved, the AKU of the first plug-in unit is generated, AKU is used for the upgrading of the first plug-in unit.
Specifically, the first plug-in unit in the present embodiment is the plug-in unit backed up in the server, is not mounted within user equipment
Interior plug-in unit, the second plug-in unit is the corresponding latest edition plug-in unit of the first plug-in unit, that is to say, that the second plug-in unit is to increase by first
The function of plug-in unit and/or the BUG for repairing the first plug-in unit, to the first data file (alternatively referred to as the first DEX texts of the first plug-in unit
Part) program code be modified, obtained plug-in unit.Obtain after the second plug-in unit, also the second plug-in unit uploads onto the server, deposited
Storage is in the server.
In the AKU in generating the present embodiment, the first plug-in unit and the second plug-in unit are obtained from server first.Obtain
After one plug-in unit and the second plug-in unit, the first plug-in unit is decompressed, the second data file of the first plug-in unit is obtained, to the second plug-in unit
Decompressed, obtain the first data file of the second plug-in unit.Wherein, data file refers to the DEX file in plug-in unit bag, in peace
It is Andorid Dalvik executions in tall and erect system.
Using BSDIFF residual quantity instruments, the first data file of contrast and the second data file obtain residual quantity file, residual quantity text
Part includes the different information of the first plug-in unit and the second plug-in unit, and position of the different information in the first data file of the second plug-in unit
Put;The difference existed between first data file and the second data file may have following several situations:(1) first data file
In include data A, the second data file do not include data A, that is to say, that data A has been newly increased in the second plug-in unit;(2) first numbers
According to data B is not included in file, the second data file includes data B, that is to say, that data B is deleted in the second plug-in unit;(3)
Data C is included in one data file, the second data file also includes data C, but the data C and second in the first data file
Data C in data file is differed, that is to say, that the second plug-in unit is modified to data C.Wherein, data A and data C mono-
It is set to variance data, for data B, because the operation to data B is to delete, that is to say, that data B is that do not have effective data,
It therefore, it can ignore data B, do not embodied in residual quantity file, the operation information that can also be deleted data B is recorded in difference
Measure in file.
The residual quantity file schematic diagram one that Fig. 3 provides for the present invention, referring to Fig. 3, in residual quantity file, correspondence is new at a of position
Operation letter deleted corresponding data B at the amended data C of correspondence information, position b at the data A of increasing information, position c
Breath, position a, b, c are the position in the first data file.
The residual quantity file schematic diagram two that Fig. 4 provides for the present invention, referring to Fig. 4, in residual quantity file, correspondence is new at a of position
The amended data C of correspondence information at the data A of increasing information, position c, it in the first data file is position that position a, b, which are,
Put.
The residual quantity file schematic diagram three that Fig. 5 provides for the present invention, referring to Fig. 5, the letter for the data A that correspondence is increased newly at a of position
Breath, the position c places amended data C of correspondence information, b places in position are sky data, during position a, b, c are the first data file
Position.
After residual quantity file has been obtained, checking information is then obtained, checking information is used for when terminal user updates plug-in unit,
Whether checking AKU is tampered or whether first plug-in unit of the AKU with being installed in user equipment matches, and detailed process is:
Checking information includes legal verification information, the first match information and the second match information, and legal verification information includes the first checking
Information and the second checking information;Using md5 encryption algorithm to residual quantity file encryption, the first checking information is obtained;By private key plus
It is close that first checking information is encrypted, obtain the second checking information;Using second data file of the md5 encryption algorithm to the first plug-in unit
It is encrypted, obtains the first matching checking information;The first data file of the second plug-in unit is added using md5 encryption algorithm
It is close, obtain the second matching checking information.
The acquisition of checking information, it is ensured that the security of AKU, and avoid AKU with to be upgraded first insert
The phenomenon that part does not correspond to the staging error caused occurs.
After residual quantity file and each checking information has been obtained, residual quantity file and checking information are sent to server, so that
Server generates the AKU of the first plug-in unit according to residual quantity file and checking information, and AKU is used for the upgrading of the first plug-in unit.I.e.
Server compresses residual quantity file and each checking information, the AKU of the first plug-in unit is obtained, for first in user equipment
Plug-in unit is upgraded.
The AKU of first plug-in unit is identified using the version information of the first plug-in unit, to carry out first in user equipment
Plug-in unit can download correct AKU when upgrading.
The AKU of generation in the present embodiment only includes residual quantity file and checking information, the memory space that AKU takes
Small, the speed that user downloads is fast, and the flow used is smaller, and during upgrading, it is only necessary to by residual quantity file and the second data
Documents Comparison, updating speed is fast.
The plug-in unit upgrade method of the present embodiment includes:Residual quantity file is obtained, residual quantity file includes the first plug-in unit and second and inserted
The different information of part, and position of the different information in the first data file of the second plug-in unit, the second plug-in unit are the first plug-in unit
Corresponding latest edition plug-in unit;Obtain checking information;Residual quantity file and checking information are sent to server, so that server root
According to residual quantity file and checking information, the AKU of the first plug-in unit is generated, AKU is used for the upgrading of the first plug-in unit.The present embodiment
Plug-in unit upgrade method, plug-in unit updating speed is fast and does not expend customer flow.
After adopting and obtaining AKU with the aforedescribed process, used when upgrading for user equipment to the first plug-in unit.
Secondly, specific embodiment is used below, and the plug-in unit upgrade method to user equipment is described in detail.This area
Technical staff is appreciated that the AKU that the AKU is above-mentioned generation;The executive agent of following examples can be for shown in Fig. 1
Second user equipment 13.
The flowchart 2 for the plug-in unit upgrade method that Fig. 6 provides for the present invention.As shown in fig. 6, the method for the present embodiment can be with
Including:
Step S601, acquisition AKU corresponding with the first plug-in unit;AKU includes residual quantity file and checking information, residual quantity
File includes the different information of the first plug-in unit and the second plug-in unit, and different information is in the first data file of the second plug-in unit
Position;Wherein, the second plug-in unit is the corresponding latest edition plug-in unit of the first plug-in unit;
Step S602, according to checking information, AKU is verified, the result passed through is verified;
Step S603, upgraded according to AKU and the first plug-in unit, the first plug-in unit after being upgraded.
Specifically, the first plug-in unit in the present embodiment is the first plug-in unit in user equipment.
In user equipment side, after the corresponding main program of the first plug-in unit is activated, user equipment sends to server and inquired about
Request, inquiry request includes the mark and version information of the first plug-in unit, and inquiry request is used to indicate whether server lookup deposits
Contain AKU corresponding with the first plug-in unit;Server is received after inquiry request, is believed according to the mark of the first plug-in unit and version
Breath is inquired about, will liter corresponding with the first plug-in unit if server lookup is to the AKU corresponding with the first plug-in unit that is stored with
Level bag sends the AKU corresponding with the first plug-in unit sent to user equipment, user equipment the reception server, carries out follow-up
Escalation process.Server is when whether inquiry is stored with AKU corresponding with the first plug-in unit, and inquiry is with the presence or absence of mark and the
The version information identical AKU of one plug-in unit.
The AKU that the server that user equipment is received is sent includes:Residual quantity file and checking information, residual quantity file include
The different information of first plug-in unit and the second plug-in unit, and position of the different information in the first data file of the second plug-in unit;Its
In, the second plug-in unit is the corresponding latest edition plug-in unit of the first plug-in unit.
But during AKU is downloaded, AKU is possible to be tampered, therefore, after AKU is got,
Need to verify AKU, checking mainly includes:Verify whether AKU is legal and whether checking AKU is with first
Plug-in unit is matched;If the result is upgraded to pass through according to AKU and the first plug-in unit, first after being upgraded inserts
Part.Wherein, the information difference included according to residual quantity file, step " is upgraded according to AKU and the first plug-in unit, upgraded
The specific method of the first plug-in unit afterwards " difference.If residual quantity file is the form shown in Fig. 4 or Fig. 5, according to AKU and
First plug-in unit is upgraded, the specific method of the first plug-in unit after being upgraded, including:By the second data file of the first plug-in unit
The information to be updated of corresponding position replaces with different information, obtains the 3rd data file, according to the 3rd data file, is risen
The first plug-in unit after level.
More specifically, if residual quantity file is the form shown in Fig. 4, the process for obtaining above-mentioned 3rd data file is:
The a positions in the second data file are found, the interpolation data A information at a positions finds the c positions in the second data file
Put, the information at c positions is replaced with into amended data C information, the 3rd data file is obtained;Find the second data file
In b positions, the information at b positions is replaced with into sky information, i.e., by the information deletion at b positions, if residual quantity file be Fig. 5 in
Shown form, obtain the 3rd data file process be:The a positions in the second data file are found, are added at a positions
Data A information, finds the c positions in the second data file, and the information at c positions is replaced with into amended data C information,
Obtain the 3rd data file.Wherein, the second data file in the present embodiment is obtained in user equipment authentication AKU,
Specially:User equipment obtains the first plug-in unit, and the first plug-in unit is decompressed, the second data file is obtained.
If in addition, residual quantity file is the form shown in Fig. 3, obtaining the process of the 3rd data file:Find the second data
A positions in file, the interpolation data A information at a positions finds the c positions in the second data file, at c positions
Information replaces with amended data C information, finds the b positions in the second data file, according at residual quantity file b positions pairs
The deletion action information answered, carries out deletion action to the original information at b positions in the first plug-in unit, obtains the 3rd data file.
The checking information that AKU includes also includes:Second matching checking information, correspondingly, according to the 3rd data text
It is further comprising the steps of before part, the first plug-in unit after being upgraded:
The 3rd data file is encrypted using md5 encryption algorithm, the 4th summary info is obtained;Judge the 4th summary letter
Whether breath matches checking information with second identical, if, it is determined that the 3rd data file is matched with AKU.
Determining after the 3rd data file matches with AKU, replaced using the 3rd data file before the upgrading obtained
The second data file in first plug-in unit, the first plug-in unit after being upgraded.
After the first plug-in unit after being upgraded, whether user equipment judges the corresponding main program of the first plug-in unit in operation,
If so, when then etc. the corresponding main program of next first plug-in unit starts, using first before the first plug-in unit covering upgrading after upgrading
Plug-in unit, if it is not, the first plug-in unit before then directly the first plug-in unit covering after upgrading is upgraded, that is, user equipment is original
First plug-in unit is deleted.
The AKU obtained in the present embodiment only includes residual quantity file and checking information, the memory space that AKU takes
Small, the speed that user downloads is fast, and the flow used is smaller, and during upgrading, simply by residual quantity file and the second data text
Part compares, and updating speed is fast.
The plug-in unit upgrade method of the present embodiment includes:Obtain AKU corresponding with the first plug-in unit;AKU includes residual quantity
File and checking information, residual quantity file include the different information of first plug-in unit and the second plug-in unit, and different information is in institute
State the position in the first data file of the second plug-in unit;Wherein, the second plug-in unit is the corresponding latest edition plug-in unit of the first plug-in unit;Root
According to checking information, AKU is verified, the result passed through is verified;Upgraded according to AKU and the first plug-in unit,
The first plug-in unit after being upgraded.The plug-in unit upgrade method of the present embodiment, plug-in unit updating speed is fast and does not expend customer flow.
The flow chart 3 for the plug-in unit upgrade method that Fig. 7 provides for the present invention, as shown in fig. 7, the method for the present embodiment is upper
The process of AKU is verified in one embodiment, the method for the present embodiment includes:
Step S701, using md5 encryption algorithm to residual quantity file encryption, obtain the first summary info;
Step S702, judge whether the first summary info is identical with the first checking information, if so, then passing through public key decryptions pair
Second checking information is decrypted, and the second summary info is obtained, if the first summary info and the second summary info are identical, it is determined that upgrading
Inclusion method;
Step S703, using md5 encryption algorithm the second data file is encrypted, obtains the 3rd summary info;
Step S704, judge whether the 3rd summary info matches checking information with first identical, if so, being then verified logical
The result crossed.
Specifically, the residual quantity file that the residual quantity file in the present embodiment includes for the AKU of download, using md5 encryption
Algorithm obtains the first summary info to residual quantity file encryption.Because the first checking information is to during AKU is generated
The residual quantity file that (embodiment of the method shown in Fig. 1) is obtained uses the information that md5 encryption is obtained, if AKU is not tampered with,
Then the first summary info should be identical with the first checking information.If the first summary info is identical with the first checking information, pass through
Public key decryptions are decrypted to the second checking information, obtain the second summary info.Because the second checking information is for upgrading in generation
Obtained during bag after (embodiment of the method shown in Fig. 1) first checking information private key encryption, if AKU is not usurped
Change, then the first summary info and the second summary info are identical, so that it is determined that AKU is legal.
After it is determined that AKU is legal, then whether the first plug-in unit that verifying user equipment is obtained matches with AKU, specifically
Process is:The second data file is encrypted using md5 encryption algorithm, the 3rd summary info is obtained;Judge the 3rd summary letter
Whether breath match checking information with first identical, because the first matching checking information is to (Fig. 1 during generation AKU
Shown embodiment of the method) the first plug-in unit (the first plug-in unit backed up in server) the second data file carry out md5 encryption obtain
Arrive, if AKU is not tampered with, the first matching checking information should be identical with the 3rd summary info.It is determined that first
With checking information it is identical with the 3rd summary info after, illustrate that the first plug-in unit is matched with AKU, obtain what AKU was verified
As a result.
The plug-in unit of the present embodiment, passes through the checking to AKU, it is ensured that AKU is the first plug-in unit correspondence to be upgraded
AKU, it is to avoid generation of the AKU with the not corresponding staging error phenomenon caused of the first plug-in unit to be upgraded.
The structural representation for the plug-in unit update device embodiment one that Fig. 8 provides for the present invention, as shown in figure 8, the present embodiment
Device can include:AKU acquisition module 81, authentication module 82 and upgraded module 83, AKU acquisition module 81 are used to obtain
Take AKU corresponding with the first plug-in unit;AKU include residual quantity file and checking information, residual quantity file include the first plug-in unit and
The different information of second plug-in unit, and position of the different information in the first data file of the second plug-in unit;Wherein, the second plug-in unit
For the corresponding latest edition plug-in unit of the first plug-in unit;Authentication module 82 is used for according to checking information, and AKU is verified, obtained
The result being verified;Upgraded module 83 is used to be upgraded according to AKU and the first plug-in unit, and first after being upgraded inserts
Part.
Wherein, checking information includes the first checking information, the first checking information, the first matching checking information and the second matching
Letter information;Upgraded module by the information to be updated of the second data file corresponding position of the first plug-in unit specifically for replacing with difference
Different information, obtains the 3rd data file;The 3rd data file is encrypted using md5 encryption algorithm, the 4th summary letter is obtained
Breath;Judge whether the 4th summary info matches checking information with second identical, if, it is determined that the 3rd data file and AKU
Matching;According to the 3rd data file, the first plug-in unit after being upgraded.
Authentication module 82 is specifically for using md5 encryption algorithm to residual quantity file encryption, obtaining the first summary info;Sentence
Whether disconnected first summary info is identical with the first checking information, if so, then being decrypted by public key decryptions to the second checking information, obtains
To the second summary info, if the first summary info and the second summary info are identical, it is determined that AKU is legal;Using md5 encryption
Second data file is encrypted algorithm, obtains the 3rd summary info;Judge that the 3rd summary info matches checking letter with first
Whether breath is identical, if so, then obtaining the result that AKU is verified.
The device of the present embodiment, can be used for the technical scheme for performing above method embodiment, its realization principle and technology
Effect is similar, and here is omitted.
The structural representation for the plug-in unit update device embodiment two that Fig. 9 provides for the present invention, as shown in figure 9, the present embodiment
Device on the basis of Fig. 8 shown device structures, further, sending module 84 can also be included, sending module 84 be used for
Inquiry request is sent to server, inquiry request includes the mark and version information of the first plug-in unit, and inquiry request is used to indicate
Whether server lookup is stored with AKU corresponding with the first plug-in unit;AKU acquisition module 81 is specifically for obtaining server
It is determined that the AKU sent during the corresponding AKU of first plug-in unit that is stored with server.
The structural representation for the plug-in unit update device embodiment three that Figure 10 provides for the present invention, as shown in Figure 10, this implementation
The plug-in unit update device of example includes the first acquisition module 91, the second acquisition module 92 and sending module 93, the first acquisition module 91
For obtaining residual quantity file, residual quantity file includes the different information of the first plug-in unit and the second plug-in unit, and different information is second
Position in first data file of plug-in unit, the second plug-in unit is the corresponding latest edition plug-in unit of the first plug-in unit;Second acquisition module
92 are used to obtain checking information;Sending module 93 is used to send residual quantity file and checking information to server, so that server
According to residual quantity file and checking information, the AKU of the first plug-in unit is generated, AKU is used for the upgrading of the first plug-in unit.
Checking information includes the first checking information, the first checking information, the first matching checking information and the second matching letter letter
Breath;Second acquisition module 92 using md5 encryption algorithm specifically for, to residual quantity file encryption, obtaining the first checking information;Pass through
Private key encryption is encrypted to the first checking information, obtains the second checking information;Using second number of the md5 encryption algorithm to the first plug-in unit
It is encrypted according to file, obtains the first matching checking information;The first data file of the second plug-in unit is entered using md5 encryption algorithm
Row encryption, obtains the second matching checking information.
The device of the present embodiment, can be used for the technical scheme for performing above method embodiment, its realization principle and technology
Effect is similar, and here is omitted.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to
The related hardware of programmed instruction is crossed to complete.Foregoing program can be stored in a computer read/write memory medium.The journey
Sequence upon execution, performs the step of including above-mentioned each method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or
Person's CD etc. is various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than its limitations;To the greatest extent
The present invention is described in detail with reference to foregoing embodiments for pipe, it will be understood by those within the art that:Its according to
The technical scheme described in foregoing embodiments can so be modified, or which part or all technical characteristic are entered
Row equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technology
The scope of scheme.
Claims (10)
1. a kind of plug-in unit upgrade method, it is characterised in that applied to terminal device, is provided with first and inserts in the terminal device
Part, methods described includes:
Obtain AKU corresponding with first plug-in unit;The AKU includes residual quantity file and checking information, the residual quantity
File includes the different information of first plug-in unit and the second plug-in unit, and the different information is the first of second plug-in unit
Position in data file;Wherein, second plug-in unit is the corresponding latest edition plug-in unit of first plug-in unit;
According to the checking information, the AKU is verified, the result passed through is verified;
Upgraded according to the AKU and first plug-in unit, the first plug-in unit after being upgraded.
2. according to the method described in claim 1, it is characterised in that described to be carried out according to the AKU and first plug-in unit
Upgrading, the first plug-in unit after being upgraded, including:
Information to be updated at the second data file correspondence position of first plug-in unit is replaced with into the different information,
Obtain the 3rd data file;
According to the 3rd data file, the first plug-in unit after the upgrading is obtained.
3. method according to claim 2, it is characterised in that the checking information includes legal verification information and first
With checking information, the legal verification information includes the first checking information and the second checking information, described to be believed according to the checking
Breath, verifies to the AKU, is verified the result passed through, including:
Using md5 encryption algorithm to the residual quantity file encryption, the first summary info is obtained;
Judge whether first summary info is identical with first checking information, if so, then by public key decryptions to described
Second checking information is decrypted, and the second summary info is obtained, if first summary info and the second summary info are identical, it is determined that
The AKU is legal;
Second data file is encrypted using md5 encryption algorithm, the 3rd summary info is obtained;
Judge whether the 3rd summary info matches checking information with described first identical, if so, then obtaining AKU checking
The result passed through.
4. method according to claim 3, it is characterised in that the checking information also includes:Second matching checking information,
Described according to the 3rd data file, before obtaining the first plug-in unit after the upgrading, in addition to:
The 3rd data file is encrypted using md5 encryption algorithm, the 4th summary info is obtained;
Judge whether the 4th summary info matches checking information with described second identical, if, it is determined that the 3rd number
Matched according to file with the AKU.
5. the method according to any one of Claims 1 to 4, it is characterised in that the acquisition is corresponding with first plug-in unit
AKU, including:
Inquiry request is sent to server, the inquiry request includes the mark and version information of first plug-in unit, described
Inquiry request is used to indicate whether the server lookup is stored with AKU corresponding with first plug-in unit;
Correspondingly, obtaining AKU corresponding with first plug-in unit includes:
The server is obtained it is determined that the institute sent during the corresponding AKU of first plug-in unit that is stored with the server
State AKU.
6. a kind of plug-in unit upgrade method, it is characterised in that including:
Residual quantity file is obtained, the residual quantity file includes the different information of the first plug-in unit and the second plug-in unit, and difference letter
The position in the first data file of second plug-in unit is ceased, second plug-in unit is the corresponding latest edition of first plug-in unit
This plug-in unit;
Obtain checking information;The checking information is used for the legitimacy and AKU that AKU is verified in plug-in unit escalation process
Whether matched with the first plug-in unit;
The residual quantity file and the checking information are sent to server so that the server according to the residual quantity file and
The checking information, generates the AKU of first plug-in unit, and the AKU is used for the upgrading of first plug-in unit.
7. method according to claim 6, it is characterised in that the checking information is tested including the first checking information, second
Information and the first matching checking information are demonstrate,proved, the acquisition checking information includes:
Using md5 encryption algorithm to the residual quantity file encryption, the first checking information is obtained;
First checking information is encrypted by private key encryption, the second checking information is obtained;
The second data file of the first plug-in unit is encrypted using md5 encryption algorithm, the first matching checking information is obtained.
8. method according to claim 7, it is characterised in that the checking information also includes:Second matching checking information,
The acquisition checking information also includes:
The first data file of the second plug-in unit is encrypted using md5 encryption algorithm, the second matching checking information is obtained.
9. a kind of plug-in unit update device, it is characterised in that including:
AKU acquisition module, the AKU acquisition module is used to obtain AKU corresponding with first plug-in unit;It is described
AKU includes residual quantity file and checking information, and the residual quantity file includes the difference letter of first plug-in unit and the second plug-in unit
Breath, and position of the different information in the first data file of second plug-in unit;Wherein, second plug-in unit is institute
State the corresponding latest edition plug-in unit of the first plug-in unit;
Authentication module, the authentication module is used for according to the checking information, and the AKU is verified, is verified logical
The result crossed;
Upgraded module, the upgraded module is used to be upgraded according to the AKU and first plug-in unit, obtains after upgrading
The first plug-in unit.
10. a kind of plug-in unit update device, it is characterised in that including:
First acquisition module, first acquisition module is used to obtain residual quantity file, the residual quantity file include the first plug-in unit and
The different information of second plug-in unit, and position of the different information in the first data file of second plug-in unit, it is described
Second plug-in unit is the corresponding latest edition plug-in unit of first plug-in unit;
Second acquisition module, second acquisition module is used to obtain checking information;The checking information is used in plug-in unit upgrading
During checking AKU legitimacy and AKU whether matched with the first plug-in unit;
Sending module, the sending module sends the residual quantity file and the checking information to server, so that the clothes
Device be engaged according to the residual quantity file and the checking information, the AKU of first plug-in unit is generated, the AKU is used for institute
State the upgrading of the first plug-in unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710296360.4A CN107239299B (en) | 2017-04-28 | 2017-04-28 | Plug-in upgrading method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710296360.4A CN107239299B (en) | 2017-04-28 | 2017-04-28 | Plug-in upgrading method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107239299A true CN107239299A (en) | 2017-10-10 |
CN107239299B CN107239299B (en) | 2020-07-17 |
Family
ID=59984249
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710296360.4A Active CN107239299B (en) | 2017-04-28 | 2017-04-28 | Plug-in upgrading method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107239299B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108829419A (en) * | 2018-06-07 | 2018-11-16 | 安徽鼎龙网络传媒有限公司 | A kind of update of plug-in and self-measuring system in micro- scene management backstage mobile phone store |
CN109257228A (en) * | 2018-10-25 | 2019-01-22 | 网宿科技股份有限公司 | A kind of data-updating method and Edge Server |
CN111064720A (en) * | 2019-12-10 | 2020-04-24 | 大唐半导体科技有限公司 | Method and device for converting configuration gateway data protocol |
CN111932243A (en) * | 2020-07-15 | 2020-11-13 | 中国银联股份有限公司 | Riding code plug-in management method, device, server, terminal equipment and medium |
CN111142906B (en) * | 2019-12-25 | 2023-11-10 | 浙江大华技术股份有限公司 | Method, device and equipment for iterating equipment firmware upgrading scheme |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120222025A1 (en) * | 2011-02-25 | 2012-08-30 | Red Hat, Inc. | Version compatibility determination |
CN102707977A (en) * | 2012-05-17 | 2012-10-03 | 江苏中科梦兰电子科技有限公司 | Increment upgrading method based on Android application software |
CN103699410A (en) * | 2013-12-20 | 2014-04-02 | 北京奇虎科技有限公司 | Method and device for updating application programs |
CN106250148A (en) * | 2016-08-01 | 2016-12-21 | 浪潮软件集团有限公司 | ANT-based project difference upgrading method |
-
2017
- 2017-04-28 CN CN201710296360.4A patent/CN107239299B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120222025A1 (en) * | 2011-02-25 | 2012-08-30 | Red Hat, Inc. | Version compatibility determination |
CN102707977A (en) * | 2012-05-17 | 2012-10-03 | 江苏中科梦兰电子科技有限公司 | Increment upgrading method based on Android application software |
CN103699410A (en) * | 2013-12-20 | 2014-04-02 | 北京奇虎科技有限公司 | Method and device for updating application programs |
CN106250148A (en) * | 2016-08-01 | 2016-12-21 | 浪潮软件集团有限公司 | ANT-based project difference upgrading method |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108829419A (en) * | 2018-06-07 | 2018-11-16 | 安徽鼎龙网络传媒有限公司 | A kind of update of plug-in and self-measuring system in micro- scene management backstage mobile phone store |
CN109257228A (en) * | 2018-10-25 | 2019-01-22 | 网宿科技股份有限公司 | A kind of data-updating method and Edge Server |
CN111064720A (en) * | 2019-12-10 | 2020-04-24 | 大唐半导体科技有限公司 | Method and device for converting configuration gateway data protocol |
CN111064720B (en) * | 2019-12-10 | 2022-09-16 | 大唐半导体科技有限公司 | Method and device for converting configuration gateway data protocol |
CN111142906B (en) * | 2019-12-25 | 2023-11-10 | 浙江大华技术股份有限公司 | Method, device and equipment for iterating equipment firmware upgrading scheme |
CN111932243A (en) * | 2020-07-15 | 2020-11-13 | 中国银联股份有限公司 | Riding code plug-in management method, device, server, terminal equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN107239299B (en) | 2020-07-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107239299A (en) | Plug-in unit upgrade method and device | |
CN104346167B (en) | The method and device of channel bag is applied in generation | |
US10992482B2 (en) | Verified boot and key rotation | |
CN107194242B (en) | Firmware upgrade method and device | |
CN104052818B (en) | The version upgrading method and device of a kind of mobile terminal | |
CN105391717B (en) | A kind of APK signature authentication method and its system | |
US8560823B1 (en) | Trusted modular firmware update using digital certificate | |
CN102685727B (en) | Method for transmitting and operating application program, system for operating application program, server and terminal | |
CN103309768B (en) | Method and device for repairing system files | |
WO2009157133A1 (en) | Information processing device, information processing method, and computer program and integrated circuit for the realization thereof | |
CN106940651A (en) | POS terminal method for upgrading software and device | |
CN103530534A (en) | Android program ROOT authorization method based on signature verification | |
CN103761329A (en) | Method and device for flashing mobile device | |
WO2019080110A1 (en) | Apk signature authentication method and system | |
CN107797818A (en) | Application program updating method and device | |
CN109756340B (en) | Digital signature verification method, device and storage medium | |
CN106709281B (en) | Patch granting and acquisition methods, device | |
CN116451238A (en) | ECU firmware upgrading method, device, equipment and readable storage medium | |
CN107315945A (en) | The disk decryption method and device of a kind of electronic equipment | |
CN113849210A (en) | Firmware upgrading method and device based on TEE | |
CN107479923A (en) | Application program updating method, apparatus and display terminal | |
CN111400771A (en) | Target partition checking method and device, storage medium and computer equipment | |
CN104346299A (en) | Updating control method and device of mobile terminal | |
CN106569841A (en) | File loading method and device | |
CN105786641A (en) | Method, equipment and intelligent card for back-upping and recovery of intelligent card application data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |