CN109213533A - A kind of advertisement SDK dynamic loading method, device and terminal - Google Patents

A kind of advertisement SDK dynamic loading method, device and terminal Download PDF

Info

Publication number
CN109213533A
CN109213533A CN201710513966.9A CN201710513966A CN109213533A CN 109213533 A CN109213533 A CN 109213533A CN 201710513966 A CN201710513966 A CN 201710513966A CN 109213533 A CN109213533 A CN 109213533A
Authority
CN
China
Prior art keywords
file
bundle
preset
configuration file
advertisement
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
CN201710513966.9A
Other languages
Chinese (zh)
Other versions
CN109213533B (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.)
TCL Corp
Original Assignee
TCL Corp
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 TCL Corp filed Critical TCL Corp
Priority to CN201710513966.9A priority Critical patent/CN109213533B/en
Publication of CN109213533A publication Critical patent/CN109213533A/en
Application granted granted Critical
Publication of CN109213533B publication Critical patent/CN109213533B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Abstract

The present invention is suitable for field of communication technology, provides a kind of advertisement SDK dynamic loading method, device and terminal, by loading preset service frame when system starts;Preset configuration file is obtained by the preset service frame;It is loaded according to the preset configuration file and starts bundle file corresponding with the advertisement SDK;The broadcast message comprising advertisement SDK starting is sent by the preset service frame so that the displaying information that default application obtains the advertisement SDK carries out advertising display, the starting that the corresponding bundle file of advertisement SDK realizes advertisement SDK is loaded and started by preset service frame, facilitate using the advertisement material called in bundle file, so that no longer needing to be intended to be packaged the corresponding jar packet of advertisement SDK in each application, reduce workload, improve work efficiency, and effectively prevent each application be packaged jar packet and caused by file increase the problem of.

Description

A kind of advertisement SDK dynamic loading method, device and terminal
Technical field
The invention belongs to advertisement SDK loading technique field more particularly to a kind of advertisement SDK dynamic loading method, device and Terminal.
Background technique
With universal and mobile application market the development of intelligent terminal, more and more businessman's selections are in intelligent terminal Equipment using upper dispensing advertisement with achieve the purpose that promote commodity.At this stage based on the intelligent terminal of Android platform On application generally by call advertisement SDK (Software Development Kit, software development kit) in interface connect The advertisement of advertising platform distribution is received, and the application is published to the Android application market, is given advertisement pushing by the application Terminal client.
Under normal circumstances, it if APP (Application, application program) needs to access third-party advertisement SDK, needs It is imported as the resource of engineering, is then encoded, recall the interface of external SDK, to realize the implantation of external advertisements. In this way, needing to beat in each respective engineering of leisure when multiple applications are needed using advertisement SDK for the same advertisement SDK The corresponding jar packet of advertisement SDK is wrapped, that is, needs to be embedded in an advertisement jar packet in each application for showing advertisement.
Also, when the APP for showing advertisement no longer shows advertisement, i.e., when no longer needing advertisement SDK, need to remove the advertisement Jar packet and again adaptation compiling application, so that workload is caused to increase, inefficiency.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of advertisement SDK dynamic loading method, device, terminal and computers Readable storage medium storing program for executing is needed respectively with solving in existing advertisement SDK loading method when multiple applications are needed using advertisement SDK It is packaged the corresponding jar packet of advertisement SDK in respective engineering, that is, needs to be embedded in one in each application for showing advertisement Advertisement jar packet, so that workload be caused to increase, the problem of inefficiency.
The first aspect of the embodiment of the present invention provides a kind of advertisement SDK dynamic loading method, comprising:
In system starting, preset service frame is loaded;
Preset configuration file is obtained by the preset service frame;
It is loaded according to the preset configuration file and starts bundle file corresponding with the advertisement SDK;
The broadcast message comprising advertisement SDK starting is sent by the preset service frame so that default application obtains The displaying information of the advertisement SDK is taken to carry out advertising display.
The second aspect of the embodiment of the present invention provides a kind of advertisement SDK dynamic loading device, comprising:
Frame loading unit, for loading preset service frame in system starting;
File obtaining unit, for obtaining preset configuration file by the preset service frame;
File loading unit, it is corresponding with the advertisement SDK for being loaded and being started according to the preset configuration file Bundle file;
Information transmitting unit is believed for sending the broadcast comprising advertisement SDK starting by the preset service frame Breath is so that the displaying information that default application obtains the advertisement SDK carries out advertising display.
The third aspect of the embodiment of the present invention provides a kind of terminal, comprising:
Memory, processor and storage are in the memory and the computer journey that can run on the processor Sequence, wherein the processor realizes the advertisement SDK that the first aspect of the embodiment of the present invention provides when executing the computer program The step of dynamic loading method.
Wherein, the computer program includes:
Frame loading unit, for loading preset service frame in system starting;
File obtaining unit, for obtaining preset configuration file by the preset service frame;
File loading unit, it is corresponding with the advertisement SDK for being loaded and being started according to the preset configuration file Bundle file;
Information transmitting unit is believed for sending the broadcast comprising advertisement SDK starting by the preset service frame Breath is so that the displaying information that default application obtains the advertisement SDK carries out advertising display.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, wherein the first of the embodiment of the present invention is realized when the computer program is executed by processor The step of advertisement SDK dynamic loading method that aspect provides.
Wherein, the computer program includes:
Frame loading unit, for loading preset service frame in system starting;
File obtaining unit, for obtaining preset configuration file by the preset service frame;
File loading unit, it is corresponding with the advertisement SDK for being loaded and being started according to the preset configuration file Bundle file;
Information transmitting unit is believed for sending the broadcast comprising advertisement SDK starting by the preset service frame Breath is so that the displaying information that default application obtains the advertisement SDK carries out advertising display.
Existing beneficial effect is the embodiment of the present invention compared with prior art: by loading preset service frame in systems Frame, and load by the preset service frame and start the corresponding bundle file of advertisement SDK to start advertisement SDK, so that Default application obtains the advertisement material information in bundle file by preset interface agreement, without beating in default application Advertisement SDK is wrapped, in this way when multiple applications need to load the same advertisement SDK, it is only necessary to load by preset service frame The corresponding bundle file of advertisement SDK calls the bundle file in preset service frame real according to preset interface agreement The displaying of existing advertisement reduces the work of advertisement SDK packing without being packaged jar packet in each engineering of each application Amount, improves the working efficiency of system, and effectively prevent each application be packaged jar packet and caused by file increase ask Topic.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is a kind of implementation flow chart of advertisement SDK dynamic loading method provided in an embodiment of the present invention;
Fig. 2 is a kind of method for obtaining preset configuration file by the preset service frame provided in an embodiment of the present invention Specific implementation flow chart;
Fig. 3 is provided in an embodiment of the present invention a kind of to be loaded and started corresponding with advertisement SDK according to preset configuration file The specific implementation flow chart of the method for bundle file;
Fig. 4 is a kind of specific implementation flow of advertisement SDK dynamic offloading method provided in an embodiment of the present invention;
Fig. 5 is a kind of schematic diagram of advertisement SDK dynamic loading device provided in an embodiment of the present invention;
Fig. 6 is a kind of schematic diagram of terminal provided in an embodiment of the present invention.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.Referring to FIG. 1, Fig. 1 shows a kind of implementation process of advertisement SDK dynamic loading method provided in an embodiment of the present invention, and details are as follows:
In step s101, when system starts, preset service frame is loaded.
In embodiments of the present invention, the preset service frame is specially OSGI (Open Service Gateway Initiative) service framework.Herein, OSGI service framework is also referred to as OSGI service platform, and OSGI service platform includes OSGI frame and OSGI standards service, wherein OSGI frame for realizing and the running environment of OSGI function, OSGI standard are provided Service for define execute usual task reusable API (Application Programming Interface, Application programming interface).
It is embedded in OSGI frame in android system, and in android system starting, loads OSGI service framework, it is real Now run the system service of OSGI frame.Specifically, increasing OsgiFramework service in android system, and by the clothes Business is registered in system administration services, and upon power-up of the system, which also correspondingly starts, and obtains OSGI in order to externally provide The interface of framework instance, the interface are also referred to as OSGI framework interface.
In step s 102, preset configuration file is obtained by the preset service frame.
Advertisement SDK is to write and compile the jar packet claimed using Java language, using by being packaged the jar packet The advertisement of the interface advertising platform distribution in advertisement SDK is called, and what is loaded in OSGI platform is bundle file, at this In inventive embodiments, needing first to convert corresponding bundle file for jar packet could be identified and be loaded by OSGI platform.? Here, bundle file can simply be interpreted as increasing the jar packet of metadata, and wherein metadata includes providing this for user The readable information of the dependent help information of bundle file, identify the bundle file necessary information file identification information and Code visibility information.
Wherein, the readable information may include:
Bundle-Name a: abbreviated name as bundle file;
Bundle-Description: the function of description bundle file;
Bundle-DocURL: the document in relation to bundle file is provided;
Bundle-Category: one group of systematic name separated by comma is defined;
Bundle-Vendor: the information in relation to bundle provider;
Bundle-ContactAddress: the information in relation to bundle provider;
Bundle-Copyright: the information in relation to bundle provider.
File identification information is specially the unique identification in bundle file, and each bundle file has a unique mark Know, which is made of the designation and bundle version number of bundle file.
Bundle-SymbolicName, the i.e. designation of bundle file, it is consistent with packet naming method in java, Packet name can be directlyed adopt as designation.Bundle-Version, i.e. bundle version number, the bundle of OSGI specification agreement Version number's format of file are as follows: the micro- version number qualifier of major version number secondary version number.
Herein, include at least one bundle the file information in the preset configuration file, be specially SDK pairs of advertisement The bundle the file information answered.It specifically, include advertisement SDK action which be to be, bundle in the preset configuration file File packet name and bundle file download address.
More specifically, the file format of preset configuration file is as follows:
Movement, bundle file packet name, the address bundle file url;
Advertisement id_1, advertised name, advertisement type, the address advertisement material url;
.........;
Advertisement id_n, advertised name, advertisement type, the address advertisement material url;
Wherein, advertisement type can be divided into ad display types, such as advertisement SDK_ picture _ bundle file, advertisement SDK_ text _ bundle file, advertisement SDK_ video _ bundle file etc.;It can also classify according to the position of displaying, draw Be divided into location advertising type, for example, advertisement SDK_ bumper advertisements _ bundle file, advertisement SDK_ startup advertisement _ bundle file, Advertisement SDK_ timed advertising _ bundle file etc..In practical applications, the SDK of respective advertisement can be realized as the case may be, compiled It is translated into jar packet and corresponding bundle file is converted it into according to above-mentioned file format.
The ad content that advertisement material is shown required for being specially, the displaying information of corresponding advertisement SDK.Advertisement material url Address is the network download address for the advertisement material being shown required for downloading.
Herein, it can be realized by the crossover tool in preset service frame and convert the corresponding jar packet of advertisement SDK to Bundle file, for example, increasing above-mentioned first number in the META-INF/MANIFEST.MF entry of jar file using bnd tool According to and be converted into bundle file.
It in another embodiment of the present invention, further include a kind of by preset service frame acquisition preset configuration file Method specific implementation flow, it is specific as shown in Figure 2:
In step s 201, the version number of the preset configuration file is obtained from cloud server.
In step S202, by the configuration text in the version number and local server of the acquired preset configuration file Part version number is compared.
In step S203, if the version number of the acquired preset configuration file is greater than matching in local server Fileversion number is set, is updated to the configuration file version number in local server by the preset service frame acquired Configuration file version number, and download the acquired corresponding configuration file of configuration file version number.
In embodiments of the present invention, the advertisement SDK of latest edition is stored in cloud server by advertisement developer, so as to Application in android system can easily obtain the advertisement SDK of latest edition.
Herein, if the version number of the configuration file in cloud server is equal to or less than the configuration in local server The version number of file illustrates that the configuration file of currently running bundle file is the configuration file of latest edition, does not need again It re-downloads.
In step s 103, it is loaded according to the preset configuration file and starts bundle corresponding with the advertisement SDK File.
In step S104, by the preset service frame send comprising the advertisement SDK starting broadcast message with So that the displaying information that default application obtains the advertisement SDK carries out advertising display.
In embodiments of the present invention, step S103 is loaded according to the preset configuration file and is started and the advertisement SDK The specific implementation flow of corresponding bundle file is as shown in Figure 3:
In step S301, the preset configuration file is parsed, the advertisement SDK obtained in the preset configuration file is corresponding Bundle file packet name.
In step s 302, it inquires and whether is stored with comprising the bundle file packet name from the database pre-established Bundle file.
In embodiments of the present invention, the relevant information of bundle file is stored in the database pre-established, it is specific to wrap Include bundle ID, the designation of bundle, version number and bundle operating status.
Wherein, bundle ID is the load in bundle file loading procedure by OSGI frame according to bundle file The precedence of time, it is ascending to be allocated.
It include bundle file packet name in each advertisement SDK, which is specially bundle file Relevant information in bundle designation, can be looked into from the database pre-established according to the bundle file packet name It askes and whether is stored with the bundle file comprising the bundle file packet name.
If being stored with the bundle file including the bundle file packet name in the database pre-established, illustrate at this Advertisement SDK was loaded in database, and the version of the corresponding configuration file of advertisement SDK is latest edition.
In embodiments of the present invention, the database pre-established is that OSGI service framework is loaded for the first time in Android In system, the number that is loaded by acquired OSGI framework interface and established when starting the corresponding bundle file of advertisement SDK According to library.Namely after android system starting, the corresponding bundle file of all advertisement SDK is in android system In starting state, that is, storage is all in starting state, and in the database established by advertisement SDK The information of bundle file, including bundle ID, the designation of bundle, version number and bundle operating status.
In step S303, if not being stored with the bundle file comprising the bundle file packet name, call pre- If the interface of service framework loads and starts the bundle file, and updates the database.
In embodiments of the present invention, if being stored with bundle text identical with the bundle file packet name in database Part illustrates to have loaded the corresponding advertisement SDK of the bundle file in system, does not need to load and start the bundle again File.
Herein, the step of calling the interface of preset service frame to load and start the bundle file specifically:
Preset service frame is bound, the BundleContext interface of the preset service frame is called, by described The bundle file is installed and activated in BundleContext interface, until all bundle files install.? When bundle file is installed and activated in android system for the first time, the database for storing the bundle the file information is established, so as to Realize the movements such as load (update), the unloading to bundle file.
In an application scenarios, certain advertisement developer advertisement SDK newly developed carries a certain brand television advertising, packet Last word containing the TV needs to carry out the displaying of the advertisement in certain applications in android system.Assuming that the advertisement The bundle file packet name that SDK includes is com.tv.xxx, it is now desired to three in android system are applied upper displaying, Be respectively using 1, using 2, using 3, can be achieved by the steps of:
A. the configuration file that fileversion number compiled in advance is 0.0.1 is deployed in cloud server, the configuration The specific format of file is as follows:
add、com.tv.xxx、http://xxx.xxx.xxx
1, TV, video, http://yyy.yyy.yyy
B. parse above-mentioned configuration file, obtain the corresponding bundle file packet name of advertisement SDK, inquired from database whether Comprising bundle file identical with the bundle file packet name, if not provided, executing step C;Otherwise it exits.
C. binding O SGI service framework obtains BundleContext;
D. by calling BundleContext.Install () and start () interface to load and starting bundle text Part.
E. by the relevant information of above-mentioned bundle file for example the designation of bundle ID, bundle, version number, Bundle starting state is updated in database.
F. the broadcast message of the bundle file start is sent by OSGI service framework.
G. the advertisement of the TV is inputted to the bundle file by preset interface agreement respectively using 1, using 2, using 3 Title, so that bundle file parses configuration file according to the advertised name, to obtain its corresponding address advertisement material url, The advertisement material in the address advertisement material url is downloaded, and returns to application using the advertisement material as output parameter, using connecing It receives and carries out advertising display in its corresponding position after the advertisement material.
Herein, specific step is as follows for the corresponding bundle file of starting advertisement SDK:
A. pass through the agency of the GetFrameworkSerivce service in OSGI service framework GetFrameworkSerivceProxy gets OSGI framework instance, such as GetFrameworkInstance () method.
B. by calling Framework.getBundleContext () method to obtain BundleContext.
C. by calling BundleContext.install (String location) method to install in local server Configuration file in bundle file.
D. obtain current Bundle's by calling the getBundleId () method for installing the Bundle successfully returned ID.And getSymbolicName () method and getVersion () by calling Bundle get bundle text respectively The designation of part and version number.
E. database purchase each bundle ID, the designation of bunlde, version number and bundle operation shape are established State.
F. bundle file is started by BundleContext.start () method.
Preferably, in order to reduce the operation resource of android system, operational efficiency is improved, when calling some wide in system The application used of SDK is accused not when showing advertisement, it can be by unloading the corresponding bundle file of advertisement SDK to reduce The operation resource of android system further includes specifically a kind of tool of advertisement SDK dynamic offloading method after step s 102 Body implementation process, as shown in Figure 4:
In step S401, the preset configuration file is parsed, the advertisement SDK obtained in the preset configuration file is corresponding Bundle file packet name.
In step S402, bundle file packet corresponding with the advertisement SDK is inquired from the database pre-established Corresponding bundle file, and obtain the bundle ID of the bundle file.
In step S403, by the preset service frame send the broadcast message comprising unloading the advertisement SDK with So that default application stops obtaining the corresponding displaying information of the advertisement SDK.
In step s 404, it calls preset interface to unload the bundle file by preset service frame, and updates institute State database.
In an application scenarios of the embodiment of the present invention, it is assumed that the advertisement that an advertisement SDK includes is the TV of certain brand Advertisement, the bundle file packet name for being included is com.xxx.xxx, is now using 1, using 2, application respectively there are three application 3 require to show the advertisement in the application of oneself, when because of certain business contract reason or other systems factor, now this three A application no longer needs to show the advertisement, then can be achieved by the steps of the unloading of advertisement SDK to reduce android system Operation resource:
A., fileversion number compiled in advance is higher than to the configuration text of local profile version number in android system Part is deployed in cloud server, and the specific format of the configuration file is as follows:
uninsatll、com.xxx.xxx、null
B. above-mentioned configuration file is parsed, the corresponding bundle file packet name of advertisement SDK in the configuration file is obtained, from number According to inquiry bundle file identical with the bundle file packet name in library.
C. the bundle ID of the bundle file is got from database
D. advertisement SDK notice (as by sending broadcast) relies on advertisement SDK and shows that the application of advertisement stops obtaining advertisement Material
E. BundleContext.uninstall (id) interface in OSGI service framework is called to unload bundle text Part.
F. by the designation of relevant information such as bundleID, bundle of above-mentioned bundle file, version number, bundle Unloaded state is updated in database.
In order to be further reduced the operation resources of android system, saves bandwidth resources and also wrapped after step S404 It includes:
The advertisement SDK unloading information is broadcasted by preset service frame, it is default unloaded using advertisement SDK to notify It finishes, so that the default application no longer corresponding bundle file of request advertisement SDK.
In embodiments of the present invention, by loading preset service frame in android system, and pass through the preset service Frame loads and starts the corresponding bundle file of advertisement SDK to start advertisement SDK, so that default application passes through preset interface Agreement obtains the advertisement material information in bundle file, without being packaged advertisement SDK in default application, in this way when more When a application needs to load the same advertisement SDK, it is only necessary to it is corresponding to load an advertisement SDK by preset service frame Bundle file calls the displaying of the bundle file realization advertisement in preset service frame according to preset interface agreement, without It needs to be packaged jar packet in each engineering of each application, reduces the workload of advertisement SDK packing, improve the work of system Make efficiency, and effectively prevent each application be packaged jar packet and caused by file increase the problem of.Further, work as displaying The application of advertisement is not when needing to show advertisement again, by preset service frame unload the corresponding bundle file of advertisement SDK without It needs to make adaptation modification to the application of displaying advertisement again, further reduces the workload of system, improve work efficiency.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
It shows the embodiment of the present invention corresponding to a kind of advertisement SDK dynamic loading method, Fig. 5 described in foregoing embodiments and mentions A kind of schematic diagram of the advertisement SDK dynamic loading device supplied illustrates only relevant to the embodiment of the present invention for ease of description Part.
Referring to Fig. 5, which includes:
Frame loading unit 51, for loading preset service frame in system starting;
File obtaining unit 52, for obtaining preset configuration file by the preset service frame;
File loading unit 53, it is corresponding with the advertisement SDK for being loaded and being started according to the preset configuration file Bundle file;
Information transmitting unit 54, for sending the broadcast comprising advertisement SDK starting by the preset service frame Information is so that the displaying information that default application obtains the advertisement SDK carries out advertising display.
Further, the file obtaining unit 52 includes:
Version number obtains subelement, for obtaining the version number of the preset configuration file from cloud server;
Version number's comparing subunit, for will be in the version number and local server of the acquired preset configuration file Configuration file version number be compared;
File acquisition subelement, if the version number for the acquired preset configuration file is greater than local server In configuration file version number, the configuration file version number in local server is updated to by institute by the preset service frame The configuration file version number of acquisition, and download the acquired corresponding configuration file of configuration file version number.
Specifically, the file loading unit 53 includes:
First document analysis subelement obtains in the preset configuration file for parsing the preset configuration file The corresponding bundle file packet name of advertisement SDK;
Whether the first file polling subelement is stored with for inquiring from the database pre-established comprising described The bundle file of bundle file packet name;
File loads subelement, if for not being stored with the bundle file comprising the bundle file packet name, It calls the interface of preset service frame to load and start the bundle file, and updates the database.
Specifically, the file load subelement is specifically used for:
Preset service frame is bound, the BundleContext interface of the preset service frame is called, by described The bundle file is installed and activated in BundleContext interface.
Further, described device further includes file unloading unit, and the file unloading unit includes:
Second document analysis subelement obtains in the preset configuration file for parsing the preset configuration file The corresponding bundle file packet name of advertisement SDK;
Second file polling subelement, it is corresponding with the advertisement SDK for being inquired from the database pre-established The corresponding bundle file of bundle file packet name, and obtain the bundle ID of the bundle file;
Broadcast notice subelement, for sending the broadcast comprising unloading the advertisement SDK by the preset service frame Information is so that default application stops obtaining the corresponding displaying information of the advertisement SDK;
File unloads subelements, for calling preset interface to unload the bundle file by preset service frame, and Update the database.
Fig. 6 is a kind of schematic diagram for terminal that one embodiment of the invention provides.As shown in fig. 6, the terminal 6 of the embodiment is wrapped It includes: processor 60, memory 61 and being stored in the computer that can be run in the memory 61 and on the processor 60 Program 62.The processor 60 realizes that above-mentioned each advertisement SDK dynamic loading method is implemented when executing the computer program 62 Step in example, such as step 101 shown in FIG. 1 is to 104.Alternatively, when the processor 60 executes the computer program 62 Realize the function of each unit in above-mentioned each Installation practice, such as the function of module 51 to 54 shown in Fig. 5.
Illustratively, the computer program 62 can be divided into one or more units, one or more of Unit is stored in the memory 61, and is executed by the processor 60, to complete the present invention.One or more of lists Member can be the series of computation machine program instruction section that can complete specific function, and the instruction segment is for describing the computer journey Implementation procedure of the sequence 62 in the terminal 6.For example, the computer program 62 can be divided into frame loading unit 51, File obtaining unit 52, file loading unit 53, information transmitting unit 54, each unit concrete function are as follows:
Frame loading unit 51, for loading preset service frame in system starting;
File obtaining unit 52, for obtaining preset configuration file by the preset service frame;
File loading unit 53, it is corresponding with the advertisement SDK for being loaded and being started according to the preset configuration file Bundle file;
Information transmitting unit 54, for sending the broadcast comprising advertisement SDK starting by the preset service frame Information is so that the displaying information that default application obtains the advertisement SDK carries out advertising display.
The terminal 6 can be the terminal devices such as desktop PC, notebook, palm PC and smart phone.It is described Terminal 6 may include, but be not limited only to, processor 60, memory 61.It will be understood by those skilled in the art that Fig. 6 is only terminal 6 example, the not restriction of structure paired terminal 6 may include than illustrating more or fewer components, or the certain portions of combination Part or different components, such as the terminal can also include input-output equipment, network access equipment, bus etc..
Alleged processor 60 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 61 can be the internal storage unit of the terminal 6, such as the hard disk or memory of terminal 6.It is described Memory 61 is also possible to the External memory equipment of the terminal 6, such as the plug-in type hard disk being equipped in the terminal 6, intelligence Storage card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) Deng.Further, the memory 61 can also both include the internal storage unit of the terminal 6 or set including external storage It is standby.The memory 61 is for other programs and data needed for storing the computer program and the terminal.It is described to deposit Reservoir 61 can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code Dish, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice Subtract, such as does not include electric carrier signal and electricity according to legislation and patent practice, computer-readable medium in certain jurisdictions Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of advertisement SDK dynamic loading method characterized by comprising
In system starting, preset service frame is loaded;
Preset configuration file is obtained by the preset service frame;
It is loaded according to the preset configuration file and starts bundle file corresponding with the advertisement SDK;
The broadcast message comprising advertisement SDK starting is sent by the preset service frame so that default application obtains institute The displaying information for stating advertisement SDK carries out advertising display.
2. the method as described in claim 1, which is characterized in that described to obtain preset configuration text by the preset service frame The step of part, further includes:
The version number of the preset configuration file is obtained from cloud server;
The acquired version number of the preset configuration file is compared with the configuration file version number in local server;
If the version number of the acquired preset configuration file is greater than the configuration file version number in local server, pass through Configuration file version number in local server is updated to acquired configuration file version number by the preset service frame, and The acquired corresponding configuration file of configuration file version number of downloading.
3. method according to claim 1 or 2, which is characterized in that described to load and start according to the preset configuration file The step of bundle file corresponding with the advertisement SDK, comprising:
The preset configuration file is parsed, the corresponding bundle file packet name of advertisement SDK in the preset configuration file is obtained;
It is inquired from the database pre-established and whether is stored with the bundle file comprising the bundle file packet name;
If not being stored with the bundle file comprising the bundle file packet name, the interface of preset service frame is called to add It carries and starts the bundle file, and update the database.
4. method according to claim 1 or 2, which is characterized in that preset in described obtained by the preset service frame After the step of configuration file, further includes:
The preset configuration file is parsed, the corresponding bundle file packet name of advertisement SDK in the preset configuration file is obtained;
The corresponding bundle text of inquiry bundle file packet name corresponding with the advertisement SDK from the database pre-established Part, and obtain the bundle ID of the bundle file;
The broadcast message comprising unloading the advertisement SDK is sent by the preset service frame so that default apply stops obtaining Take the corresponding displaying information of the advertisement SDK;
It calls preset interface to unload the bundle file by preset service frame, and updates the database.
5. method as claimed in claim 4, which is characterized in that the interface for calling preset service frame loads and starts institute The step of stating bundle file specifically:
Preset service frame is bound, the BundleContext interface of the preset service frame is called, by described The bundle file is installed and activated in BundleContext interface.
6. a kind of advertisement SDK dynamic loading device characterized by comprising
Frame loading unit, for loading preset service frame in system starting;
File obtaining unit, for obtaining preset configuration file by the preset service frame;
File loading unit, for bundle corresponding with the advertisement SDK to be loaded and started according to the preset configuration file File;
Information transmitting unit, for by the preset service frame send comprising the advertisement SDK starting broadcast message with So that the displaying information that default application obtains the advertisement SDK carries out advertising display.
7. device as claimed in claim 6, which is characterized in that the file obtaining unit further include:
Version number obtains subelement, for obtaining the version number of the preset configuration file from cloud server;
Version number's comparing subunit, for by matching in the version number and local server of the acquired preset configuration file Fileversion number is set to be compared;
File acquisition subelement, if the version number for the acquired preset configuration file is greater than in local server Configuration file version number in local server is updated to acquired by configuration file version number by the preset service frame Configuration file version number, and download the acquired corresponding configuration file of configuration file version number.
8. device as claimed in claims 6 or 7, which is characterized in that the file loading unit includes:
Document analysis subelement obtains SDK pairs of advertisement in the preset configuration file for parsing the preset configuration file The bundle file packet name answered;
Whether file polling subelement is stored with for inquiring from the database pre-established comprising the bundle file packet The bundle file of name;
File loads subelement, if called for not being stored with the bundle file comprising the bundle file packet name The interface of preset service frame loads and starts the bundle file, and updates the database.
9. a kind of terminal device, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 5 when executing the computer program The step of any one advertisement SDK dynamic loading method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In realization dynamically load side advertisement SDK as described in any one of claim 1 to 5 when the computer program is executed by processor The step of method.
CN201710513966.9A 2017-06-29 2017-06-29 Advertisement SDK dynamic loading method, device and terminal Active CN109213533B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710513966.9A CN109213533B (en) 2017-06-29 2017-06-29 Advertisement SDK dynamic loading method, device and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710513966.9A CN109213533B (en) 2017-06-29 2017-06-29 Advertisement SDK dynamic loading method, device and terminal

Publications (2)

Publication Number Publication Date
CN109213533A true CN109213533A (en) 2019-01-15
CN109213533B CN109213533B (en) 2021-08-06

Family

ID=64960561

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710513966.9A Active CN109213533B (en) 2017-06-29 2017-06-29 Advertisement SDK dynamic loading method, device and terminal

Country Status (1)

Country Link
CN (1) CN109213533B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240733A (en) * 2017-07-03 2019-01-18 Tcl集团股份有限公司 A kind of method and terminal updating advertisement SDK based on Android system
CN111970542A (en) * 2020-08-21 2020-11-20 广州欢网科技有限责任公司 System and method for supporting SDK monitoring without upgrading self-advertising app compatibility of smart television
CN113377432A (en) * 2021-06-17 2021-09-10 上海臣星软件技术有限公司 Advertisement running method, device, equipment and storage medium
WO2022088940A1 (en) * 2020-10-28 2022-05-05 华为技术有限公司 Data processing system and method, terminal device, and server

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101571876A (en) * 2009-05-26 2009-11-04 华为技术有限公司 Script program operation logic expansion method, server and client
US20110161954A1 (en) * 2009-12-28 2011-06-30 Samsung Electronics Co., Ltd. Image forming apparatus operating based on framework capable of sharing function among a plurality of bundles and method of installing bundle in image forming apparatus
US20140316870A1 (en) * 2013-02-28 2014-10-23 Zynga Inc. Promotion of customer acquisition engagements with online accessing content
US20140358983A1 (en) * 2013-05-29 2014-12-04 Universite De Pau Et Des Pays De L'adour Dynamic Loading of Application Components
US20150134763A1 (en) * 2013-11-12 2015-05-14 Software Ag Techniques for creating and/or maintaining scalable heterogeneous read-only federations of registries
CN104780449A (en) * 2015-03-18 2015-07-15 福建新大陆通信科技股份有限公司 Method and system for screening unidirectional set-top box advertisement
CN105335289A (en) * 2015-11-05 2016-02-17 浙江大学 Rapid customization method of configuration driven testing platform software system
CN105511902A (en) * 2015-11-09 2016-04-20 Tcl集团股份有限公司 Android platform module dynamic loading method and system
CN105592086A (en) * 2015-12-22 2016-05-18 Tcl集团股份有限公司 Method and apparatus of managing firewall specific to Android platform
CN105759965A (en) * 2016-02-16 2016-07-13 广东工业大学 Mobile advertisement interactive system and method based on Internet of Things
CN105843654A (en) * 2016-04-14 2016-08-10 广州市久邦数码科技有限公司 Method and system for implementing dynamic loading of advertisement SDK (software development kit)

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101571876A (en) * 2009-05-26 2009-11-04 华为技术有限公司 Script program operation logic expansion method, server and client
US20110161954A1 (en) * 2009-12-28 2011-06-30 Samsung Electronics Co., Ltd. Image forming apparatus operating based on framework capable of sharing function among a plurality of bundles and method of installing bundle in image forming apparatus
US20140316870A1 (en) * 2013-02-28 2014-10-23 Zynga Inc. Promotion of customer acquisition engagements with online accessing content
US20140358983A1 (en) * 2013-05-29 2014-12-04 Universite De Pau Et Des Pays De L'adour Dynamic Loading of Application Components
US20150134763A1 (en) * 2013-11-12 2015-05-14 Software Ag Techniques for creating and/or maintaining scalable heterogeneous read-only federations of registries
CN104780449A (en) * 2015-03-18 2015-07-15 福建新大陆通信科技股份有限公司 Method and system for screening unidirectional set-top box advertisement
CN105335289A (en) * 2015-11-05 2016-02-17 浙江大学 Rapid customization method of configuration driven testing platform software system
CN105511902A (en) * 2015-11-09 2016-04-20 Tcl集团股份有限公司 Android platform module dynamic loading method and system
CN105592086A (en) * 2015-12-22 2016-05-18 Tcl集团股份有限公司 Method and apparatus of managing firewall specific to Android platform
CN105759965A (en) * 2016-02-16 2016-07-13 广东工业大学 Mobile advertisement interactive system and method based on Internet of Things
CN105843654A (en) * 2016-04-14 2016-08-10 广州市久邦数码科技有限公司 Method and system for implementing dynamic loading of advertisement SDK (software development kit)

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ZHI LI ET AL: "Design of an OSGi-Based WSN Gateway", 《 2013 IEEE 9TH INTERNATIONAL CONFERENCE ON MOBILE AD-HOC AND SENSOR NETWORKS》 *
杨林等: "基于OSGi的移动广告平台订单系统", 《计算机系统应用》 *
胡必玲等: "ios下动态加载系统库文件的方法", 《合肥师范学院学报》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109240733A (en) * 2017-07-03 2019-01-18 Tcl集团股份有限公司 A kind of method and terminal updating advertisement SDK based on Android system
CN111970542A (en) * 2020-08-21 2020-11-20 广州欢网科技有限责任公司 System and method for supporting SDK monitoring without upgrading self-advertising app compatibility of smart television
WO2022088940A1 (en) * 2020-10-28 2022-05-05 华为技术有限公司 Data processing system and method, terminal device, and server
EP4216055A4 (en) * 2020-10-28 2024-03-06 Petal Cloud Tech Co Ltd Data processing system and method, terminal device, and server
CN113377432A (en) * 2021-06-17 2021-09-10 上海臣星软件技术有限公司 Advertisement running method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN109213533B (en) 2021-08-06

Similar Documents

Publication Publication Date Title
CN102413022B (en) Application debugging method and system
CN102855152B (en) The method and system of resource file in upgrade applications
CN109213533A (en) A kind of advertisement SDK dynamic loading method, device and terminal
CN108319463A (en) A kind of application upgrade method, apparatus
CN104077162A (en) Mobile terminal application template updating and issuing method and device
CN103491111A (en) Wireless application release method, wireless application implementation method, wireless application release device and wireless application implementation device
CN109144533A (en) A kind of method, system and the computer installation of update and the load of application program
US8387039B2 (en) System and method for customized provisioning of application content
CN109039730B (en) Server cluster and server cluster configuration information management method
CN111367685B (en) Interface calling method and device, computer equipment and storage medium
CN106775952A (en) A kind of process management method and device of Android application
CN109343970B (en) Application program-based operation method and device, electronic equipment and computer medium
CN101964742B (en) Method, system and device for using network open ability
CN109683992B (en) Method and apparatus for managing objects
CN113220339A (en) Page generation method and device
CN109951528B (en) Service processing method, device and system supporting multiple deployment modes
CN113535419A (en) Service arranging method and device
CN109298889A (en) A kind of method, startup advertisement update method and terminal device generating bootstrap
CN109949039A (en) A kind of block chain node outside introduces the reasonable employment distribution method of mobile computing resource
US8374593B2 (en) Method of providing mobile application
CN109697076A (en) A kind of dynamic updating method of application software resources, device and equipment
CN112905273A (en) Service calling method and device
CN113765983A (en) Site service deployment method and device
CN115857878A (en) Development framework generation method and application method
CN113821352A (en) Remote service calling method and device

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 516006 TCL science and technology building, No. 17, Huifeng Third Road, Zhongkai high tech Zone, Huizhou City, Guangdong Province

Applicant after: TCL Technology Group Co.,Ltd.

Address before: 516006 Guangdong province Huizhou Zhongkai hi tech Development Zone No. nineteen District

Applicant before: TCL RESEARCH AMERICA Inc.

GR01 Patent grant
GR01 Patent grant