CN106131612A - The method and system of Android app dynamic load resource function module - Google Patents

The method and system of Android app dynamic load resource function module Download PDF

Info

Publication number
CN106131612A
CN106131612A CN201610506610.8A CN201610506610A CN106131612A CN 106131612 A CN106131612 A CN 106131612A CN 201610506610 A CN201610506610 A CN 201610506610A CN 106131612 A CN106131612 A CN 106131612A
Authority
CN
China
Prior art keywords
subelement
module
resource function
function module
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610506610.8A
Other languages
Chinese (zh)
Other versions
CN106131612B (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.)
Urumqi Bangbangjun Technology Co ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201610506610.8A priority Critical patent/CN106131612B/en
Publication of CN106131612A publication Critical patent/CN106131612A/en
Application granted granted Critical
Publication of CN106131612B publication Critical patent/CN106131612B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26291Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for providing content or additional data updates, e.g. updating software modules, stored at the client
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/458Scheduling content for creating a personalised stream, e.g. by combining a locally stored advertisement with an incoming stream; Updating operations, e.g. for OS modules ; time-related management operations
    • H04N21/4586Content update operation triggered locally, e.g. by comparing the version of software modules in a DVB carousel to the version stored locally

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention provides the method and system of a kind of Android app dynamic load resource function module, generates process including module, is included in server end and generates single resource function module;Dynamic authentication renewal process, in safety and the renewal resource function module of client checkout resource functional module, safety and the renewal situation of networking judge module take the file that version is the highest;Loading procedure, for in client downloads and loading resource function module, including verification hash, in pressing from both sides according to scanning file, the version number of these resource function modules all is ranked up, delete the file of older version, until the file of remaining n resource function module, proceed by loading after having downloaded and point out user.The purposes of Android app dynamic loading function module provided by the present invention includes being not limited to direct broadcasting room dynamic load, has important market value.

Description

The method and system of Android app dynamic load resource function module
Technical field
The present invention relates to video applications field, especially relate to a kind of Android application dynamic load resource function module Method and system.
Background technology
Currently, net cast mode has been obtained for being widely applied.People can be by the Internet whenever and wherever possible flat The multiple clients such as plate computer, mobile phone, should be used for watching video live broadcast by install.
For net cast industry, before direct broadcasting room correcting and direct broadcasting room increase in demand, broadcast performance optimization is often to have Thing, but often develop a New function by existing technology and all will trigger upgrading and allow user go to experience these new merits Can, cause the New function cover time long, version fragmentation is serious.
In this time, Dynamic loading technique just seems extremely important, Consumer's Experience is risen to best in the case of, also Can the function of the most more new opplication itself and resource.
Relational language and being explained as follows:
App android system needs application to be installed, the abbreviation of Application
Url URL is the position to the resource that can obtain from the Internet and the one of access method Succinct expression, is the address of standard resource on the Internet.
The resource bundle that assert Android application bag carries
The version number of versioncode Android application, this version number of each redaction can increase therewith
File hash determines a string character of file uniqueness, in order to determine the uniqueness of this document
The general name of plugin Android app dynamic loading function module
Md5 Message Digest Algorithm MD5 (Chinese entitled Message Digest Algorithm 5) is computer The widely used a kind of hash function in security fields, in order to provide the integrity protection of message.
Api API (Application Programming Interface, application programming interface) be some in advance The function of definition, it is therefore an objective to provide application program and developer to be accessed the ability of one group of routine based on certain software or hardware
Summary of the invention
For the disadvantages described above of prior art, the invention provides a kind of Android app dynamic load resource function module Method and system.
Technical scheme includes a kind of method of Android app dynamic load resource function module, raw including module One-tenth process, dynamic authentication renewal process and loading procedure,
Described module generates process, is included in server end and generates single resource function module;
Described dynamic authentication renewal process, in the safety of client checkout resource functional module and more new resources merit Energy module,
Described loading procedure, in client downloads and loading resource function module.
And, described dynamic authentication renewal process comprises the following steps,
Step A1, when user opens resource function module, first judging whether to load by bag name, if loaded, entering Step A9, otherwise enters step A2;
Step A2, under scanning plugin catalogue, whether the file of this bag name exists, and there is then entrance step A3, otherwise enters Step A5;
Step A3, it is judged that have several file, takes up-to-date version and enters step A4, be otherwise directly entered step more than 1 A4;
Step A4, loads, and loads the most then entrance step A9, loads the most then entrance step A5;
Step A5, looks for whether to there is this document under assert catalogue, there is then entrance step A6, does not exists, enter Step A7;
Step A6, copies to plugin catalogue from assert catalogue, subsequently into step A4;
Step A7, asks api, adds bag name, enters step A8;
Step A8, lower download the plugin, enter step A4;
Step A9, networking judges safety and renewal;
Step A10, it is judged that return data, if plug-in unit is dangerous or has renewal to return step A8, if plug-in security and not having Update, open plug-in unit;
Described loading procedure comprises the following steps,
Step B1, incoming bag name, versioncode and channel number generate md5 character string, and incoming url download address, literary composition Part hash;
Step B2, in plugin catalogue, new name is the file of temp, and downloads this money according to url download address Source functional module, has downloaded, and enters step B3, failed download then task termination;
Step B3, verifies hash, and moves in plugin file;If verifying successfully, enter step B4, otherwise Task termination;
Step B4, under scanning plugin catalogue, whether the file of this bag name is more than the local cache module number n preset, and is Then enter step B5, otherwise enter step B6;
Step B5, the version number of these resource function modules all in pressing from both sides according to scanning file, and be ranked up, delete older The file of version, until the file of remaining n resource function module, enters step B6;
Step B6, carries out loading and pointing out user, it is achieved download readjustment.
And, when Android app opens resource function module as mastery routine, mastery routine and server interact, Mastery routine uploads module information, and server judges and return mark according to module information, and mastery routine determines follow-up place according to mark Reason logic.
And, server judges and to return the mode of mark as follows,
The module information that server is uploaded according to the mastery routine module information up-to-date with server local contrasts, first First, if md5 mates with the md5 of service, the most directly return mark 1, if it does not match, proceed by other Data Matching It is as follows,
If bag name is the most right, then return mark-2,
If signature or check code are the most right, then return mark-1, and correct module's address is handed down to mastery routine in the lump; If version is the most right, then needs to update, obtain the parameter that server background sets, determine this renewal be 2 " suggestion updates ", 3 " strong System updates " or 4 " renewals of mourning in silence ", descend the mastery routine of photos and sending messages machine in one's hands the most again;
Finally judge client release, the most consistent with the client release required for this module of server storage, as The most inconsistent, issue the mark 5 mastery routine to mobile phone, prompting user needs to update client just can open this resource function mould Block.
And, according to mark, mastery routine determines that the implementation of subsequent processing logic is as follows,
If returning is-1, then calls downloading process and be downloaded;
If returning is 1, then it is to call dynamic authentication renewal process to open;
If returning is 2, then it is to give user prompting, user selects to open or download;
If returning 3, then it is to allow user wait, first calls downloading process and be downloaded, after installation, recall dynamic authentication Renewal process is opened;
If returning 4, then directly invoke dynamic authentication renewal process and open, and carry out in Background scheduling downloading process Downloading, user's perception is less than download;
If returning 5, then prompting user needs with new client app;
If returning-2 or asking unsuccessfully, then terminate starting resource function module, and point out to user.
The present invention correspondingly provides the system of a kind of Android app dynamic load resource function module, is included in server end The module signal generating unit arranged, at dynamic authentication updating block and the loading unit of client setting,
Described direct broadcasting room module signal generating unit, for generating single resource function module at server end;
Described dynamic authentication updating block, in the safety of client checkout resource functional module and more new resources merit Energy module,
Described loading unit, in client downloads and loading resource function module.
And, described dynamic authentication updating block includes following subelement,
Subelement A1, for opening resource function module as user, first judges whether to load, if added by bag name Carrying, order subelement A9 works, otherwise order subelement A2 work;
, for scanning whether the file of this bag name under plugin catalogue exists, there is then order subelement A3 in subelement A2 Work, otherwise order subelement A5 work;
Subelement A3, has several file for judgement, takes up-to-date version command subelement A4 work more than 1, otherwise Direct command subelement A4 works;
Subelement A4, is used for loading, and loads the most then order subelement A9 work, loads the most then order subelement A5 works;
, for looking for whether to there is this document under assert catalogue, there is then order subelement A6 work in subelement A5, There is not then order subelement A7 work;
Subelement A6, for copying to plugin catalogue, then order subelement A4 work from assert catalogue;
Subelement A7, is used for asking api, adds bag name, and order subelement A8 works;
Subelement A8, for lower download the plugin, order subelement A4 works;
Subelement A9, being used for networking judges safety and renewal;
Subelement A10, is used for judging to return data, if plug-in unit is dangerous or has renewal to return subelement A8, if plug-in unit peace Entirely and do not update, open plug-in unit;
Described loading unit includes following subelement,
Subelement B1, generates md5 character string for incoming bag name, versioncode and channel number, and incoming url downloads Address, file hash;
Subelement B2, is the file of temp for new name in plugin catalogue, and according under url download address Carry this resource function module, download then order subelement B3 work, failed download then task termination;
Subelement B3, is used for verifying hash, and moves in plugin file;If verifying successfully, order subelement B4 works, otherwise task termination;
Subelement B4, for scanning whether the file of this bag name under plugin catalogue is more than the local cache number of modules preset Amount n, is then order subelement B5 work, otherwise order subelement B6 work;
Subelement B5, the version number of these resource function modules all in pressing from both sides according to scanning file, and be ranked up, delete Except the file of older version, until the file of remaining n resource function module, order subelement B6 works;
Subelement B6, is used for carrying out loading and pointing out user, it is achieved download readjustment.
And, when Android app opens resource function module as mastery routine, mastery routine and server interact, Mastery routine uploads module information, and server judges and return mark according to module information, and mastery routine determines follow-up place according to mark Reason logic.
And, server judges and to return the mode of mark as follows,
The module information that server is uploaded according to the mastery routine module information up-to-date with server local contrasts, first First, if md5 mates with the md5 of service, the most directly return mark 1, if it does not match, proceed by other Data Matching It is as follows,
If bag name is the most right, then return mark-2,
If signature or check code are the most right, then return mark-1, and correct module's address is handed down to mastery routine in the lump; If version is the most right, then needs to update, obtain the parameter that server background sets, determine this renewal be 2 " suggestion updates ", 3 " strong System updates " or 4 " renewals of mourning in silence ", descend the mastery routine of photos and sending messages machine in one's hands the most again;
Finally judge client release, the most consistent with the client release required for this module of server storage, as The most inconsistent, issue the mark 5 mastery routine to mobile phone, prompting user needs to update client just can open this resource function mould Block.
And, according to mark, mastery routine determines that the implementation of subsequent processing logic is as follows,
If returning is-1, then calls downloading process and be downloaded;
If returning is 1, then it is to call dynamic authentication renewal process to open;
If returning is 2, then it is to give user prompting, user selects to open or download;
If returning 3, then it is to allow user wait, first calls downloading process and be downloaded, after installation, recall dynamic authentication Renewal process is opened;
If returning 4, then directly invoke dynamic authentication renewal process and open, and carry out in Background scheduling downloading process Downloading, user's perception is less than download;
If returning 5, then prompting user needs with new client app;
If returning-2 or asking unsuccessfully, then terminate starting resource function module, and point out to user.
Resource file and new function are packaged into a resource function module file and are placed on server by the present invention, when with When family is by client request server, the information of this module file can be returned to client by server.If user needs When opening this new function, client can call download to download this module file, then in local verification safety And open.The purposes of Android app dynamic loading function module provided by the present invention includes being not limited to direct broadcasting room dynamic load, has Important market value.
Accompanying drawing explanation
Fig. 1 is the embodiment of the present invention with server interaction flow chart.
Fig. 2 is the module safety checking of the embodiment of the present invention and dynamically updates flow chart.
Fig. 3 is the flow chart of the embodiment of the present invention.
Detailed description of the invention
Below by embodiment and combine accompanying drawing, technical scheme is described in further detail.
In order to be able to better illustrate technical scheme, embodiment illustrates as a example by direct broadcasting room dynamic load, but Technical solution of the present invention includes, without being limited to direct broadcasting room dynamic load, chat, community, expanded function, advertisement, theme, game, work The resource function modules such as tool can be suitable for equally.
1. can be with the functional module of independent maintenance
The module of embodiment generates process, is included in server end and generates single resource function module.Under development, will Module individually made by direct broadcasting room, and when user needs to use direct broadcasting room, client can download this direct broadcasting room mould to server request Block.After downloading successfully, client will carry out safety verification to this module.After being verified, it will incoming room number in module, And user profile opens this direct broadcasting room.Other request service, barrage service etc. is all completed by this module.The most straight Allomeric function and resource between broadcasting just can separately maintain, and can be substantially reduced the size of the installation kit of main App.
Such benefit is in addition to can separately maintaining and reduce the installation kit size of main App, and it is exactly a little independent for also having The operation of module does not has any impact to main App.If module is because some reason goes wrong, main App will not be allowed to collapse Burst.And the automatic repair function of module can be started this time, allow module continue correct operation.
2. Android app dynamic load resource function module safety is verified and dynamically updates
In the development of App, always welcoming the renewal of function in App, such renewal is bringing new merit to user Not so good experience (user needs constantly to upgrade) can be also brought along while experiencing.If there being a kind of technology can allow user's App function is upgraded automatically, which solves the problem that this Consumer's Experience is not so good.In order to solve this problem, dynamically updating should Transport and give birth to.
User opens module when, program is by the bag name of module and other information is incoming judges.First pass through This bag name determining program has been loaded with this module.If being loaded with this module, then networking judges the safety of this module Property and update situation.Without loading this module, then go that module directory scans the most documentary bag name and meet therewith, as Really have if meeting, take version the highest.Without meet, then go assert catalogue looks for whether to meet, have It is loaded with, if again without, then band this bag name upper goes to ask api, returns the download information that this module is up-to-date, goes to download, under The process loaded then is repeated after load.
The dynamic authentication renewal process of embodiment, for providing in the safety of client checkout resource functional module and renewal Source functional module, idiographic flow is shown in Figure 2:
Step 1, when user opens module, first judges whether to load by bag name, if loaded, enters step 9, otherwise Enter step 2;
Step 2, under scanning plugin catalogue, whether the file of this bag name exists, and there is then entrance step 3, otherwise enters step Rapid 5;
Step 3, it is judged that have several file, takes up-to-date version and enters step 4, be otherwise directly entered step 4 more than 1;
Step 4, loads, and loads the most then entrance step 9, loads the most then entrance step 5;
Step 5, looks for whether to there is this document under assert catalogue, there is then entrance step 6, does not exists, enter step Rapid 7;
Step 6, copies to plugin catalogue from assert catalogue, subsequently into step 4;
Step 7, asks api, adds this bag name, enters step 8;
Step 8, lower download the plugin, enter step 4;
Step 9, networking judges safety and renewal;
Step 10, it is judged that return data, if plug-in unit is dangerous or has renewal to return step 8, if plug-in security and the most not more Newly, plug-in unit is opened.
3. load-on module
Direct broadcasting room module is to need to download, in order to unification user downloads this module using or update for the first time when Version and correctness, need agreement download logic.
Before needs are downloaded, developer needs incoming url download address, file hash, md5 (by bag name, Versioncode, channel number generate) these three parameter, and in plugin catalogue new name be temp file (if Existence then can be omitted the most newly-built).Then start to perform download, the named md5 of filename that will download, after download, detection The hash of this document is the most consistent with incoming hash, if consistent, moved in module directory by file, and detects Whether catalogue has the file more than n this bag name, if it has, then delete oldest version.By downloading after having performed operation Readjustment returns.
The loading procedure of embodiment, in client downloads and load resource function module, concrete logic such as Fig. 3 institute Show:
Step 1, incoming bag name, versioncode and channel number generate md5 character string, and incoming url download address, literary composition Part hash;
Step 2, in plugin catalogue, new name is the file of temp, and according to url download address, downloads this mould Block, has downloaded, and enters step 3, failed download then task termination;
Step 3, verifies hash, and moves in plugin file;If verifying successfully, entering step 4, otherwise appointing Business terminates;
Step 4, under scanning plugin catalogue the file of this bag name whether more than n (n is this module number of local cache, Can be adjusted according to different demands when being embodied as, those skilled in the art preset), it is to enter step 5, otherwise less than or equal to n, enter step 6;
Step 5, the version number of these modules all in pressing from both sides according to scanning file, and be ranked up, delete the mould of older version Block file, until the file of remaining n module, in order to fatal error occurs in the version after preventing customer upgrade, can do with rollback Backup, enters step 6;
Step 6, this has been downloaded, and proceeds by loading and points out user, it is achieved download readjustment.
Task termination is, can point out failed download with user, try.
4. that opens before module is mutual
Android app on mobile phone opens direct broadcasting room module as mastery routine, and this mastery routine and server are handed over Mutually.Distort and this module of module upgrade to solve malicious user, present invention further propose that, added before opening module The judgement of Fig. 1, this part needs, with server interaction, the various information of module to be uploaded onto the server and verify, test Card is operated to mobile phone accordingly by rear return information, if returning-2, or asks the most then to terminate starting module, And point out to user.
Seeing Fig. 2, network verification starts, and mobile phone mastery routine uploads module network information, including bag name, signature, check code, Version, channel, file hash, client release, then server judges and returns mark, and cell-phone customer terminal mastery routine is according to mark Know and determine subsequent processing logic:
If returning is-1, then calls flow process shown in Fig. 3 and download.
If returning is 1, then it is to call flow process shown in Fig. 2 to open.
If returning is 2, then it is to give user prompting, user selects to open or download.
If returning 3, being then to allow user wait, first calling flow process shown in Fig. 3 and downloading, after installation, recall stream shown in Fig. 2 Journey is opened.
If returning 4, then directly invoke flow process shown in Fig. 2 and open, and download in flow process shown in Background scheduling Fig. 3, User's perception is less than download.
If returning 5, then prompting user needs with new client app.
If returning-2 or asking unsuccessfully, then terminate starting module, and point out to user.
Server judges and returns the concrete mode of mark:
The module information that server is transmitted through according to the mobile phone module information up-to-date with server local contrasts, first First, if md5 mates with the md5 of service, the most directly return mark 1, if it does not match, proceed by other data Join:
If bag name is the most right, then return mark-2,
If signature or check code are the most right, then return mark-1, and correct module's address is handed down to mobile phone in the lump Mastery routine;
If version is the most right, then needs to update, obtain the parameter that server background sets, determine that this renewal is 2 " suggestions Update ", 3 " force update " or 4 " renewals of mourning in silence ", descend the mastery routine of photos and sending messages machine in one's hands the most again;
Finally can judge client release, the most consistent with the client release required for this module of server storage, If inconsistent, issuing the mark 5 mastery routine to mobile phone, prompting user needs to update client just can open this module.
When being embodied as, method provided by the present invention can realize automatic operational process based on software engineering, it is possible to uses mould Massing mode realizes corresponding system.
The present invention correspondingly provides the system of a kind of Android app dynamic load resource function module, is included in server end The module signal generating unit arranged, at dynamic authentication updating block and the loading unit of client setting,
Described direct broadcasting room module signal generating unit, for generating single resource function module at server end;
Described dynamic authentication updating block, in the safety of client checkout resource functional module and more new resources merit Energy module, this unit includes following subelement,
Subelement A1, for opening resource function module as user, first judges whether to load, if added by bag name Carrying, order subelement A9 works, otherwise order subelement A2 work;
, for scanning whether the file of this bag name under plugin catalogue exists, there is then order subelement A3 in subelement A2 Work, otherwise order subelement A5 work;
Subelement A3, has several file for judgement, takes up-to-date version command subelement A4 work more than 1, otherwise Direct command subelement A4 works;
Subelement A4, is used for loading, and loads the most then order subelement A9 work, loads the most then order subelement A5 works;
, for looking for whether to there is this document under assert catalogue, there is then order subelement A6 work in subelement A5, There is not then order subelement A7 work;
Subelement A6, for copying to plugin catalogue, then order subelement A4 work from assert catalogue;
Subelement A7, is used for asking api, adds bag name, and order subelement A8 works;
Subelement A8, for lower download the plugin, order subelement A4 works;
Subelement A9, being used for networking judges safety and renewal;
Subelement A10, is used for judging to return data, if plug-in unit is dangerous or has renewal to return subelement A8, if plug-in unit peace Entirely and do not update, open plug-in unit;
Described loading unit, in client downloads and loading resource function module, this unit includes following subelement,
Subelement B1, generates md5 character string for incoming bag name, versioncode and channel number, and incoming url downloads Address, file hash;
Subelement B2, is the file of temp for new name in plugin catalogue, and according under url download address Carry this resource function module, download then order subelement B3 work, failed download then task termination;
Subelement B3, is used for verifying hash, and moves in plugin file;If verifying successfully, order subelement B4 works, otherwise task termination;
Subelement B4, for scanning whether the file of this bag name under plugin catalogue is more than the local cache number of modules preset Amount n, is then order subelement B5 work, otherwise order subelement B6 work;
Subelement B5, the version number of these resource function modules all in pressing from both sides according to scanning file, and be ranked up, delete Except the file of older version, until the file of remaining n resource function module, order subelement B6 works;
Subelement B6, is used for carrying out loading and pointing out user, it is achieved download readjustment.
Each module implements and can be found in corresponding steps, and it will not go into details for the present invention.
Specific embodiment described herein is only to present invention spirit explanation for example.Technology neck belonging to the present invention Described specific embodiment can be made various amendment or supplements or use similar mode to replace by the technical staff in territory Generation, but without departing from the spirit of the present invention or surmount scope defined in appended claims.

Claims (10)

1. the method for an Android app dynamic load resource function module, it is characterised in that: include that module generates process, dynamically Checking renewal process and loading procedure,
Described module generates process, is included in server end and generates single resource function module;
Described dynamic authentication renewal process, for client checkout resource functional module safety and update resource function mould Block,
Described loading procedure, in client downloads and loading resource function module.
The method of Android app dynamic load resource function module the most according to claim 1, it is characterised in that: described dynamically Checking renewal process comprises the following steps,
Step A1, when user opens resource function module, first judging whether to load by bag name, if loaded, entering step A9, otherwise enters step A2;
Step A2, under scanning plugin catalogue, whether the file of this bag name exists, and there is then entrance step A3, otherwise enters step A5;
Step A3, it is judged that have several file, takes up-to-date version and enters step A4, be otherwise directly entered step A4 more than 1;
Step A4, loads, and loads the most then entrance step A9, loads the most then entrance step A5;
Step A5, looks for whether to there is this document under assert catalogue, there is then entrance step A6, does not exists, enter step A7;
Step A6, copies to plugin catalogue from assert catalogue, subsequently into step A4;
Step A7, asks api, adds bag name, enters step A8;
Step A8, lower download the plugin, enter step A4;
Step A9, networking judges safety and renewal;
Step A10, it is judged that return data, if plug-in unit is dangerous or has renewal to return step A8, if plug-in security and not renewal, Open plug-in unit;
Described loading procedure comprises the following steps,
Step B1, incoming bag name, versioncode and channel number generate md5 character string, and incoming url download address, file hash;
Step B2, in plugin catalogue, new name is the file of temp, and downloads this resource merit according to url download address Energy module, has downloaded, has entered step B3, failed download then task termination;
Step B3, verifies hash, and moves in plugin file;If verifying successfully, enter step B4, otherwise task Terminate;
Step B4, under scanning plugin catalogue, whether the file of this bag name is more than the local cache module number n preset, and is to enter Enter step B5, otherwise enter step B6;
Step B5, the version number of these resource function modules all in pressing from both sides according to scanning file, and be ranked up, delete older version File, until the file of remaining n resource function module, entrance step B6;
Step B6, carries out loading and pointing out user, it is achieved download readjustment.
The method of Android app dynamic load resource function module the most according to claim 2, it is characterised in that: when Android app When opening resource function module as mastery routine, mastery routine and server interact, and mastery routine uploads module information, service Device judges and returns mark according to module information, and mastery routine determines subsequent processing logic according to mark.
The method of Android app dynamic load resource function module the most according to claim 3, it is characterised in that: server is sentenced Break and to return the mode of mark as follows,
The module information that server is uploaded according to the mastery routine module information up-to-date with server local contrasts, first, as Really md5 mates with the md5 of service, the most directly returns mark 1, if it does not match, the Data Matching proceeding by other is as follows, If bag name is the most right, then return mark-2,
If signature or check code are the most right, then return mark-1, and correct module's address is handed down to mastery routine in the lump;
If version is the most right, then needs to update, obtain the parameter that server background sets, determine this renewal be 2 " suggestion updates ", 3 " forcing to update " or 4 " renewals of mourning in silence ", descend the mastery routine of photos and sending messages machine in one's hands the most again;
Finally judge client release, the most consistent, if not with the client release required for this module of server storage Consistent then issue mark 5 to the mastery routines of mobile phone, prompting user needs to update client just can open this resource function module.
The method of Android app dynamic load resource function module the most according to claim 4, it is characterised in that: mastery routine root Determine that the implementation of subsequent processing logic is as follows according to mark,
If returning is-1, then calls downloading process and be downloaded;
If returning is 1, then it is to call dynamic authentication renewal process to open;
If returning is 2, then it is to give user prompting, user selects to open or download;
If returning 3, then it is to allow user wait, first calls downloading process and be downloaded, recall dynamic authentication after installation and update Process is opened;
If returning 4, then directly invoke dynamic authentication renewal process and open, and under Background scheduling downloading process is carried out Carrying, user's perception is less than download;
If returning 5, then prompting user needs with new client app;
If returning-2 or asking unsuccessfully, then terminate starting resource function module, and point out to user.
6. the system of an Android app dynamic load resource function module, it is characterised in that: it is included in the mould that server end is arranged Block signal generating unit, at dynamic authentication updating block and the loading unit of client setting,
Described direct broadcasting room module signal generating unit, for generating single resource function module at server end;
Described dynamic authentication updating block, for client checkout resource functional module safety and update resource function mould Block,
Described loading unit, in client downloads and loading resource function module.
The system of Android app dynamic load resource function module the most according to claim 6, it is characterised in that: described dynamically Checking updating block includes following subelement,
Subelement A1, for opening resource function module as user, first judges whether to load by bag name, if loaded, and life Subelement A9 is made to work, otherwise order subelement A2 work;
, for scanning whether the file of this bag name under plugin catalogue exists, there is then order subelement A3 work in subelement A2, Otherwise order subelement A5 work;
Subelement A3, has several file for judgement, takes up-to-date version command subelement A4 work more than 1, the most directly Order subelement A4 works;
Subelement A4, is used for loading, and loads the most then order subelement A9 work, loads the most then order subelement A5 work Make;
, for looking for whether to there is this document under assert catalogue, there is then order subelement A6 work, do not deposit in subelement A5 Work at then order subelement A7;
Subelement A6, for copying to plugin catalogue, then order subelement A4 work from assert catalogue;
Subelement A7, is used for asking api, adds bag name, and order subelement A8 works;
Subelement A8, for lower download the plugin, order subelement A4 works;
Subelement A9, being used for networking judges safety and renewal;
Subelement A10, is used for judging returning data, if plug-in unit is dangerous or has renewal to return subelement A8, if plug-in security and Do not update, open plug-in unit;
Described loading unit includes following subelement,
Subelement B1, generates md5 character string, and incoming url download address for incoming bag name, versioncode and channel number, File hash;
Subelement B2, is the file of temp for new name in plugin catalogue, and should according to the download of url download address Resource function module, has downloaded then order subelement B3 work, failed download then task termination;
Subelement B3, is used for verifying hash, and moves in plugin file;If verifying successfully, order subelement B4 work Make, otherwise task termination;
Subelement B4, for scanning whether the file of this bag name under plugin catalogue is more than the local cache module number n preset, It is then order subelement B5 work, otherwise order subelement B6 work;
Subelement B5, the version number of these resource function modules all in pressing from both sides according to scanning file, and be ranked up, delete relatively The file of early version, until the file of remaining n resource function module, order subelement B6 works;
Subelement B6, is used for carrying out loading and pointing out user, it is achieved download readjustment.
The system of Android app dynamic load resource function module the most according to claim 7, it is characterised in that: when Android app When opening resource function module as mastery routine, mastery routine and server interact, and mastery routine uploads module information, service Device judges and returns mark according to module information, and mastery routine determines subsequent processing logic according to mark.
The system of Android app dynamic load resource function module the most according to claim 8, it is characterised in that: server is sentenced Break and to return the mode of mark as follows,
The module information that server is uploaded according to the mastery routine module information up-to-date with server local contrasts, first, as Really md5 mates with the md5 of service, the most directly returns mark 1, if it does not match, the Data Matching proceeding by other is as follows, If bag name is the most right, then return mark-2,
If signature or check code are the most right, then return mark-1, and correct module's address is handed down to mastery routine in the lump;
If version is the most right, then needs to update, obtain the parameter that server background sets, determine this renewal be 2 " suggestion updates ", 3 " forcing to update " or 4 " renewals of mourning in silence ", descend the mastery routine of photos and sending messages machine in one's hands the most again;
Finally judge client release, the most consistent, if not with the client release required for this module of server storage Consistent then issue mark 5 to the mastery routines of mobile phone, prompting user needs to update client just can open this resource function module.
The system of Android app dynamic load resource function module the most according to claim 9, it is characterised in that: mastery routine root Determine that the implementation of subsequent processing logic is as follows according to mark,
If returning is-1, then calls downloading process and be downloaded;
If returning is 1, then it is to call dynamic authentication renewal process to open;
If returning is 2, then it is to give user prompting, user selects to open or download;
If returning 3, then it is to allow user wait, first calls downloading process and be downloaded, recall dynamic authentication after installation and update Process is opened;
If returning 4, then directly invoke dynamic authentication renewal process and open, and under Background scheduling downloading process is carried out Carrying, user's perception is less than download;
If returning 5, then prompting user needs with new client app;
If returning-2 or asking unsuccessfully, then terminate starting resource function module, and point out to user.
CN201610506610.8A 2016-06-30 2016-06-30 The method and system of Android app dynamically load resource function module Active CN106131612B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610506610.8A CN106131612B (en) 2016-06-30 2016-06-30 The method and system of Android app dynamically load resource function module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610506610.8A CN106131612B (en) 2016-06-30 2016-06-30 The method and system of Android app dynamically load resource function module

Publications (2)

Publication Number Publication Date
CN106131612A true CN106131612A (en) 2016-11-16
CN106131612B CN106131612B (en) 2019-03-05

Family

ID=57467642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610506610.8A Active CN106131612B (en) 2016-06-30 2016-06-30 The method and system of Android app dynamically load resource function module

Country Status (1)

Country Link
CN (1) CN106131612B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107624211A (en) * 2017-06-09 2018-01-23 畅充科技(上海)有限公司 Charging method and device
CN108664265A (en) * 2018-05-15 2018-10-16 玩咖欢聚文化传媒(北京)有限公司 The interpolation method and system of Android application program
CN109213534A (en) * 2017-06-30 2019-01-15 武汉斗鱼网络科技有限公司 A kind of method and device of extension live streaming software function
CN109582684A (en) * 2018-11-30 2019-04-05 深圳市盟天科技有限公司 A kind of update method of local cache data, device, server and storage medium
CN110069505A (en) * 2017-09-21 2019-07-30 张锐 Off-line data processing method and off-line data updating device
CN110069729A (en) * 2017-11-15 2019-07-30 百度在线网络技术(北京)有限公司 A kind of offline cache method and system of application
CN110162727A (en) * 2019-05-29 2019-08-23 上海有谱网络科技有限公司 The method of android system HTML5 resource local cache
CN110417912A (en) * 2019-08-08 2019-11-05 成都九洲电子信息系统股份有限公司 A kind of method that file download is adjusted back after the completion
CN110784540A (en) * 2019-10-31 2020-02-11 四川巧夺天工信息安全智能设备有限公司 Method for reducing and accelerating flow of digital media distribution platform based on multi-terminal decision
CN111416842A (en) * 2020-03-06 2020-07-14 科大讯飞股份有限公司 Automatic resource cluster distribution and hot update system and method
CN113850941A (en) * 2021-09-08 2021-12-28 深圳柏成科技有限公司 Unattended access control system remote upgrading method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140173389A1 (en) * 2012-12-13 2014-06-19 Hon Hai Precision Industry Co., Ltd. Updating system and method
CN104699511A (en) * 2015-03-27 2015-06-10 北京奇虎科技有限公司 Plug-in upgrading method and plug-in upgrading device
CN104717301A (en) * 2015-03-27 2015-06-17 北京奇虎科技有限公司 Plug-in download method and device
CN104714828A (en) * 2015-03-31 2015-06-17 北京奇虎科技有限公司 Methods and devices for installing and operating application
CN105373396A (en) * 2015-08-14 2016-03-02 腾讯科技(深圳)有限公司 Method and device for updating plug-in in plug-in platform
CN105607935A (en) * 2015-12-24 2016-05-25 北京奇虎科技有限公司 Application updating method and terminal and server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140173389A1 (en) * 2012-12-13 2014-06-19 Hon Hai Precision Industry Co., Ltd. Updating system and method
CN104699511A (en) * 2015-03-27 2015-06-10 北京奇虎科技有限公司 Plug-in upgrading method and plug-in upgrading device
CN104717301A (en) * 2015-03-27 2015-06-17 北京奇虎科技有限公司 Plug-in download method and device
CN104714828A (en) * 2015-03-31 2015-06-17 北京奇虎科技有限公司 Methods and devices for installing and operating application
CN105373396A (en) * 2015-08-14 2016-03-02 腾讯科技(深圳)有限公司 Method and device for updating plug-in in plug-in platform
CN105607935A (en) * 2015-12-24 2016-05-25 北京奇虎科技有限公司 Application updating method and terminal and server

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107624211A (en) * 2017-06-09 2018-01-23 畅充科技(上海)有限公司 Charging method and device
CN109213534A (en) * 2017-06-30 2019-01-15 武汉斗鱼网络科技有限公司 A kind of method and device of extension live streaming software function
CN110069505A (en) * 2017-09-21 2019-07-30 张锐 Off-line data processing method and off-line data updating device
CN110069729B (en) * 2017-11-15 2022-07-01 上海优扬新媒信息技术有限公司 Offline caching method and system for application
CN110069729A (en) * 2017-11-15 2019-07-30 百度在线网络技术(北京)有限公司 A kind of offline cache method and system of application
CN108664265A (en) * 2018-05-15 2018-10-16 玩咖欢聚文化传媒(北京)有限公司 The interpolation method and system of Android application program
CN109582684A (en) * 2018-11-30 2019-04-05 深圳市盟天科技有限公司 A kind of update method of local cache data, device, server and storage medium
CN110162727A (en) * 2019-05-29 2019-08-23 上海有谱网络科技有限公司 The method of android system HTML5 resource local cache
CN110417912B (en) * 2019-08-08 2022-01-28 成都九洲电子信息系统股份有限公司 Method for calling back after file downloading is completed
CN110417912A (en) * 2019-08-08 2019-11-05 成都九洲电子信息系统股份有限公司 A kind of method that file download is adjusted back after the completion
CN110784540A (en) * 2019-10-31 2020-02-11 四川巧夺天工信息安全智能设备有限公司 Method for reducing and accelerating flow of digital media distribution platform based on multi-terminal decision
CN110784540B (en) * 2019-10-31 2022-03-04 四川巧夺天工信息安全智能设备有限公司 Method for reducing and accelerating flow of digital media distribution platform based on multi-terminal decision
CN111416842A (en) * 2020-03-06 2020-07-14 科大讯飞股份有限公司 Automatic resource cluster distribution and hot update system and method
CN113850941A (en) * 2021-09-08 2021-12-28 深圳柏成科技有限公司 Unattended access control system remote upgrading method

Also Published As

Publication number Publication date
CN106131612B (en) 2019-03-05

Similar Documents

Publication Publication Date Title
CN106131612A (en) The method and system of Android app dynamic load resource function module
CN100501675C (en) Method and apparatus used for upgrading software
KR101238511B1 (en) Publishing the status of and updating firmware components
TWI359597B (en) Method,computer system ,and computer-readable medi
US9792623B2 (en) Advertisement processing method and apparatus
CN101305555B (en) Multimedia middleware apparatus using metadata, method for controlling multimedia middleware
CN102300065A (en) Security authentication method for android-platform-based smart television software
CN103905651A (en) Method and system for application permission management in intelligent terminal
CN106027644B (en) Service verification method and system
CN102227732A (en) Method, apparatus, and computer program product for managing software versions
CN106919843A (en) Leak repair system, method and apparatus
US7558963B2 (en) Communication device and program
CN109863475A (en) The upgrade method and relevant device of a kind of application in safety element
US11003435B2 (en) Manifest trialing techniques
CN112650520A (en) Ammeter upgrading method and system, intelligent ammeter and storage medium
CN110879713A (en) Android-end strong encryption plug-in hot update management method
KR20130066901A (en) Apparatus and method for analyzing malware in data analysis system
CN105872842A (en) Multi-desktop independent upgrade method and device
CN108958785B (en) Application program upgrading method and device
EP1705919A1 (en) Method for signature authentication in a broadcast receiver
CN106708494B (en) JAR upgrading method and device
CN113572619A (en) Container cloud mirror image credible implementation method and system based on nottry
CN104158907A (en) Method and device of downloading application program file
CN105930730A (en) Terminal system security update method and apparatus in trusted execution environment
CN108259556A (en) Method for parameter configuration and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240306

Address after: 830000, Room 17A, Building 17, Block A, Times Square Community, No. 59 Guangming Road, Tianshan District, Urumqi, Xinjiang Uygur Autonomous Region BD00244

Patentee after: Urumqi Bangbangjun Technology Co.,Ltd.

Country or region after: China

Address before: 430000 East Lake Development Zone, Wuhan City, Hubei Province, China Science and Technology Park Innovation Enterprise Base 2 A Unit 2

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right