CN112286586B - Plug-in configuration method and related equipment - Google Patents

Plug-in configuration method and related equipment Download PDF

Info

Publication number
CN112286586B
CN112286586B CN201910634203.9A CN201910634203A CN112286586B CN 112286586 B CN112286586 B CN 112286586B CN 201910634203 A CN201910634203 A CN 201910634203A CN 112286586 B CN112286586 B CN 112286586B
Authority
CN
China
Prior art keywords
plug
target
package configuration
ins
plugins
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910634203.9A
Other languages
Chinese (zh)
Other versions
CN112286586A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910634203.9A priority Critical patent/CN112286586B/en
Publication of CN112286586A publication Critical patent/CN112286586A/en
Application granted granted Critical
Publication of CN112286586B publication Critical patent/CN112286586B/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
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a plug-in configuration method and related equipment, which can reduce network bandwidth cost, reduce storage space of a user and reduce time consumption of downloading. The method comprises the following steps: acquiring attribute information corresponding to a target sub-application program; when the plug-in identification of the target plug-in is matched with the plug-in identification of the plug-in the local database, acquiring first installation package configuration files of N plug-ins according to the plug-in identification of the target plug-in; acquiring second installation package configuration files excluding N plug-ins from the target sub-application according to the information of the installation package configuration files excluding N plug-ins from the target sub-application; and respectively injecting corresponding codes for the first installation package configuration file and the second installation package configuration file to complete the configuration of the plug-in of the target sub-application program.

Description

Plug-in configuration method and related equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method for configuring a plug-in and related devices.
Background
With the development of instant messaging, some small games or small programs in instant messaging have also been developed.
At present, when a certain general code is needed in development of some small games or small programs in instant messaging, the code can only be written or downloaded from a related site and packaged into a small game or small program code package, and the small games or small programs containing the same or identical general code and the code of the small games or small programs can be cached by the terminal equipment of the instant messaging.
However, the current scheme increases the development cost of the developer on one hand, and all codes need to be rewritten with effort; on the other hand, if the code plug-in the small game or the small program code stored in the instant messaging terminal equipment is downloaded in the whole part, the network bandwidth cost is high, the storage space of the user is occupied, and the downloading time consumption is increased.
Disclosure of Invention
The application provides a plug-in configuration method and related equipment, which can reduce network bandwidth cost, reduce storage space of a user and reduce time consumption of downloading.
An embodiment of the present application provides a method for configuring a plug-in, where the method includes:
acquiring attribute information corresponding to a target sub-application program, wherein the attribute information comprises version information of N plugins corresponding to the target sub-application program and information excluding installation package configuration files of the N plugins in the target sub-application program, and N is a positive integer greater than or equal to 1;
when the plug-in identification of the target plug-in is matched with the plug-in identification in the local database, acquiring first installation package configuration files of the N plug-ins according to the plug-in identification of the target plug-in, wherein the target plug-in is any plug-in the N plug-ins;
Acquiring a second installation package configuration file excluding the N plug-ins from the target sub-application according to the information of the installation package configuration file excluding the N plug-ins from the target sub-application;
and respectively injecting corresponding codes into the first installation package configuration file and the second installation package configuration file to complete the configuration of the plug-in of the target sub-application program.
Optionally, when the version numbers of each of the N plug-ins and the plug-ins in the first target plug-in are successfully matched, determining an installation package configuration file corresponding to the plug-ins with the successfully matched version numbers of the N plug-ins in the first target plug-in as a first installation package configuration file of the N plug-ins, where the first target plug-in is a plug-in matched with the N plug-in identifications in the local database.
Optionally, when the version numbers of each plug-in the N plug-ins and the plug-in the first target plug-in are not successfully matched, acquiring incremental package configuration files corresponding to the N plug-ins from a database corresponding to a target application program, where the target sub-application program is included in the target application program;
and generating the first installation package configuration file according to the incremental package configuration files corresponding to the N plug-ins and the installation package configuration files of the plug-ins, which are not matched with the version numbers of the N plug-ins, in the first target plug-ins.
Optionally, when the N plugins include a first plugin that matches the version number of the plugin in the first target plugin and a second plugin that does not match the version number of the plugin in the first target plugin, determining an installation package configuration file of the plugin that matches the version number of the first plugin in the first target plugin as a first installation package configuration file of the first plugin;
acquiring an incremental package configuration file of the second plug-in according to the version number of the second plug-in;
and generating a first installation package configuration file of the second plug-in according to the incremental package configuration file of the second plug-in and the installation package configuration file of the plug-in which is not matched with the version number of the second plug-in the first target plug-in.
Optionally, when the N plugins include M plugins that are matched with the plugin identifier of the plugin in the local database and P plugins that are not matched with the plugin identifier of the plugin in the local database, acquiring a first installation package configuration file of the P plugins from a database corresponding to the target application program, where M is greater than or equal to 1 and less than N, and P is greater than or equal to 1 and less than N, where M and P are both positive integers;
matching the version numbers of the M plug-ins with the version numbers of the plug-ins in a second target plug-in to obtain a matching result, wherein the second target plug-in is a plug-in matched with the plug-in identifications of the M plug-ins in the local database;
And acquiring first installation package configuration files of the M plug-ins according to the matching result.
Optionally, when the matching result is that the version numbers of the M plugins are not matched with the version numbers of the plugins in the second target plugin, acquiring incremental package configuration files of the M plugins from a database corresponding to the target application program, and generating first installation package configuration files of the M plugins according to the incremental package configuration files of the M plugins and the installation package configuration files of the plugins, which are not matched with the version numbers of the M plugins, in the second target plugin;
when the matching result is that the version numbers of the M plugins are successfully matched with the version numbers of the plugins in the local database, determining the installation package configuration file of the plugins successfully matched with the version numbers of the M plugins in the second target plugin as a first installation package configuration file of the M plugins;
when the M plugins comprise a third plugin successfully matched with the version number of the plugin in the second target plugin and a fourth plugin unsuccessfully matched with the version number of the plugin in the second target plugin, determining an installation package configuration file of the plugin matched with the version number of the third plugin in the second target plugin as a first installation package configuration file of the third plugin;
Acquiring an incremental package configuration file of the fourth plug-in from a database corresponding to the target application program according to the version number of the fourth plug-in;
and generating a first installation package configuration file of the fourth plug-in according to the incremental package configuration file of the fourth plug-in and the installation package configuration file of the plug-in which is not matched with the version number of the fourth plug-in the second target plug-in.
A second aspect of an embodiment of the present application provides a configuration device of a plug-in, including:
a first obtaining unit, configured to obtain attribute information corresponding to a target sub-application, where the attribute information includes version information of N plugins corresponding to the target sub-application and information excluding installation package configuration files of the N plugins in the target sub-application, where N is a positive integer greater than or equal to 1;
the second obtaining unit is used for obtaining the first installation package configuration files of the N plugins according to the plugin identifications of the target plugins when the plugin identifications of the target plugins are matched with the plugin identifications of the plugins in the local database, wherein the target plugins are any plugins in the N plugins;
the third acquisition unit is used for acquiring a second installation package configuration file excluding the N plug-ins in the target sub-application program according to the information of the installation package configuration file excluding the N plug-ins in the target sub-application program;
And the configuration unit is used for respectively injecting corresponding codes into the first installation package configuration file and the second installation package configuration file so as to complete the configuration of the plug-in of the target sub-application program.
Optionally, the second obtaining unit is specifically configured to:
and when the version numbers of the plug-ins in the N plug-ins are successfully matched with the version numbers of the plug-ins in the first target plug-ins, determining the installation package configuration file corresponding to the plug-ins with the successfully matched version numbers of the N plug-ins in the first target plug-ins as the first installation package configuration file, wherein the first target plug-ins are plug-ins matched with the plug-in identifications of the N plug-ins in the local database.
Optionally: the second acquisition unit is further specifically configured to:
when the version number of each plug-in the N plug-ins is not successfully matched with the version number of the plug-in the first target plug-in, acquiring incremental package configuration files corresponding to the N plug-ins from a database corresponding to a target application program, wherein the target sub-application program is contained in the target application program;
and generating first installation package configuration files of the N plug-ins according to the incremental package configuration files corresponding to the N plug-ins and the installation package configuration files of the plug-ins, which are not matched with the version numbers of the N plug-ins, in the first target plug-ins.
Optionally, the second obtaining unit is further specifically configured to:
when the N plugins comprise a first plugin matched with the version number of the plugin in the first target plugin and a second plugin not matched with the version number of the plugin in the first target plugin, determining an installation package configuration file of the plugin matched with the version number of the first plugin in the first target plugin as a first installation package configuration file of the first plugin;
acquiring an incremental package configuration file of the second plug-in according to the version number of the second plug-in;
and generating a first installation package configuration file of the second plug-in according to the incremental package configuration file of the second plug-in and the installation package configuration file of the plug-in which is not matched with the version number of the second plug-in the first target plug-in.
Optionally, the second obtaining unit is further specifically configured to:
when the N plugins comprise M plugins matched with the plugin identifications of the plugins in the local database and P plugins not matched with the plugin identifications of the plugins in the local database, acquiring installation package configuration files of the P plugins from a database corresponding to the target application program, wherein M is more than or equal to 1 and less than N, P is more than or equal to 1 and less than N, and M and P are positive integers;
Matching the version numbers of the M plug-ins with the version numbers of the plug-ins in a second target plug-in to obtain a matching result, wherein the second target plug-in is a plug-in matched with the plug-in identifications of the M plug-ins in the local database;
and acquiring first installation package configuration files of the M plug-ins according to the matching result.
Optionally, the second obtaining unit is further specifically configured to:
when the matching result is that the version numbers of the M plugins are not matched with the version numbers of plugins in the second target plugin, acquiring incremental package configuration files of the M plugins from a database corresponding to the target application program, and generating first installation package configuration files of the M plugins according to the incremental package configuration files of the M plugins and the installation package configuration files of plugins, which are not matched with the version numbers of the M plugins, in the second target plugin;
when the matching result is that the version numbers of the M plugins are successfully matched with the version numbers of the plugins in the local database, determining the installation package configuration file of the plugins successfully matched with the version numbers of the M plugins in the second target plugin as a first installation package configuration file of the M plugins;
When the M plugins comprise a third plugin successfully matched with the version number of the plugin in the second target plugin and a fourth plugin unsuccessfully matched with the version number of the plugin in the second target plugin, determining an installation package configuration file of the plugin matched with the version number of the third plugin in the second target plugin as a first installation package configuration file of the third plugin;
acquiring an incremental package configuration file of the fourth plug-in from a database corresponding to the target application program according to the version number of the fourth plug-in;
and generating a first installation package configuration file of the fourth plug-in according to the incremental package configuration file of the fourth plug-in and the installation package configuration file of the plug-in which is not matched with the version number of the fourth plug-in the second target plug-in.
A fourth aspect of the embodiments provides a computer apparatus comprising at least one connected processor, a memory and a transceiver, wherein the memory is configured to store program code, and the processor is configured to invoke the program code in the memory to perform the operations described in the above aspects.
A fifth aspect of the embodiments provides a computer storage medium comprising instructions which, when run on a computer, cause the computer to perform the operations described in the above aspects.
In summary, it can be seen that in the embodiment provided by the application, when the plug-in of the target sub-application needs to be configured, N plug-ins corresponding to the target sub-application are obtained according to the attribute information of the target sub-application, the plug-in identifications of the N plug-ins are matched with the plug-in identifications of the plug-ins in the local database, and when the plug-in identifications of the N plug-ins are matched with the plug-in identifications of the plug-ins in the local database, the plug-ins stored in the local database are directly multiplexed, and the corresponding codes are injected, so that the complete installation package configuration file does not need to be downloaded from the database corresponding to the target application, the network bandwidth is not reduced, the storage space of a user is optimized, the multiplexing of the same plug-ins is generally reduced, the downloading time consumption of starting a small game or a small program is also reduced, and the user experience is improved.
Drawings
Fig. 1 is a schematic flow chart of application, development and uploading of a small game or a small program in the embodiment of the present application:
FIG. 2 is a schematic diagram of compiling rules of a plug-in provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of a packing manner of plug-ins according to an embodiment of the present disclosure;
fig. 4 is a flow chart of a configuration method of a plug-in provided in an embodiment of the present application;
Fig. 5 is an interface schematic diagram of an application scenario provided in an embodiment of the present application;
fig. 6 is another interface schematic diagram of an application scenario provided in an embodiment of the present application;
fig. 7 is a schematic virtual structure diagram of a configuration device of a plug-in unit according to an embodiment of the present application;
fig. 8 is a schematic hardware structure of a terminal device according to an embodiment of the present application.
Detailed Description
The application provides a plug-in configuration method and related equipment, which can reduce network bandwidth cost, reduce storage space of a user and reduce time consumption of downloading.
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application.
The terms first, second and the like in the description and in the claims of the present application and in the above-described figures, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those explicitly listed but may include other steps or modules not expressly listed or inherent to such process, method, article, or apparatus, such that the partitioning of modules by means of such process, method, article, or apparatus is not limited to only one logical partitioning, such that a plurality of modules may be combined or integrated in another system, or some features may be omitted, or not implemented, and such that the coupling or direct coupling or communication between modules may be via some interfaces, such that indirect coupling or communication between modules may be electrical or other like. The modules or sub-modules described as separate components may or may not be physically separate, or may be distributed in a plurality of circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purposes of the present application.
In the embodiment of the application, different applets or applets of the application can use a plurality of identical general-purpose codes (components), and the general-purpose codes can be provided to a developer in a plug-in manner. The small game or small program developer can use the same plug-in unit or plug-ins conveniently and rapidly through simple configuration, and the instant communication terminal equipment can strategically cache the plug-ins, so that the purposes of facilitating the use of the developer, reducing the development cost of the developer, reducing the network bandwidth and improving the starting speed of the small game or small program are achieved.
Some terms involved in the present application will be explained first:
application community platform: the method is used for applying, configuring, auditing and managing the plug-in;
application developer tool: providing basic support for plug-in development, uploading plug-ins, and supporting the use of local plug-ins and remote plug-ins by a developer tool simulator;
application developer tool compilation background: providing compiling function for plug-in developer, compiling (compatible with all base library versions, re-implementing requireplupin) for small games or small programs using plug-ins, packaging function (compatible with previous application versions);
Application public library: realizing requirePlugin;
application terminal device: 1. the method comprises the steps that an old version application program is compatible, and the new version application program pulls a configuration download cache plug-in using the plug-in from the background; 2. and multiplexing, managing and eliminating the plug-ins.
The following is a description of the application, development, and uploading of a applet or applet plug-in to the application program of fig. 1:
the developer 102 of the small game or the small program applies for the app id of the plug-in class in the application platform 101, the developer tool 103 is utilized for developing and debugging the plug-in, the compiling background provides compiling support, after the development and the debugging are completed, the developed and debugged complete plug-in is uploaded to the auditing platform 104, after the auditing platform 104 is finished, the available universal plug-in 105 can be obtained, and the universal plug-in is stored in the database.
In addition, the uploaded plug-in can be managed, submitted and submitted (the auditing is to check whether the uploaded plug-in is compliant, whether the uploaded plug-in has the same plug-in or is a plug-in of a plagiarism person) and released at the application public platform interface. After the verification is passed, a developer using the plug-in can search the plug-in on the application program public platform, and select a proper plug-in for use according to the requirement. The following describes in detail the development flow of a plug-in developer taking a mini-game as an example:
Each plug-in has a separate plug-in code catalog that needs to contain plug-in. Json in addition to plug-in implementation code, the main configuration of plug-in. Json for small game plug-ins is as follows:
after debugging and developing the plugin by using a developer tool and configuring plugin. Json, uploading plugin codes by a plugin developer through the developer tool, checking that the plugin passes through a small game developer to apply for authorization, and using the plugin after the authorization passes.
Second, for plug-in usage, the applet developer uses the plug-in through simple configuration in the game. Json (applet developer through app. Json), the configuration information is as follows:
wherein plug ins support configuration of a plurality of plug ins;
alias is an Alias of the plugin (aaa in the example above), meaning that the long path of the plugin can be replaced with a short Alias;
provider is the app id (application identifier) of the plug-in that the developer applies for in the application public platform;
version is the version of the plug-in itself;
the configuration of the path field is only for a portion of the plug-ins that have a clipping version (the clipping version refers to clipping the number or content of plug-in files for the use case of the developer). In this case, adding a path to the configuration may calculate a clipping version when calculating the plug-in size, the path being a complete folder path. In addition, for a plugin provider configured with a path, a signature. Json needs to be additionally provided under a plugin directory of a clipping version, and the specific configuration is as follows:
The provider in the signature. Json is identical to the plug-in app id applied by the application public platform, and the path under the signature path corresponds to a specific js file under the plug-in directory (the path herein corresponds to the plug-in directory and may also include other types of plug-in files, which are not specifically limited), and an absolute path is adopted, if the plug-in directory includes a plurality of js, the path of each file and the corresponding md5 (message-Digest algorism) need to be configured.
When the small game or small program developer wants to use the plug-in, the complete path requireplug ('alias/a.js') of the plug-in is only filled in the name.js or app-service.js, or the alias requireplug ('aaa') of the plug-in is directly used.
The aliases, paths, and md5 in the above examples are only examples, and are not meant to be limiting.
It should be further noted that, the new version base library of the application program implements a requireplug interface, and newly adds 'requireplug', so as to find a real plug-in file according to the alias and filename through configuration, when the configuration is performed in the game. Json as described above:
the requirePlugin ('aaa')/(equivalently to requirePlugin ('aaa/index. Js')
Resolution of/= >
Require ('__ plug in __/wx123456789/index. Js')/(index. Js) is located according to main in plug in. Json.
The compiling background needs to carry out corresponding modification when compiling the code package, modifies the original defined realization, and adds '__ plug in __/{ app id }/' prefix on the basis of defined.
That is, in order to be compatible with the old base library version and the old application version, the developer tool compilation background needs to be compatible with the requisetplug in implementation, and when no new version base library exists, default implementation with the new version base library is added. When the new version of the base library exists, the base library is used for realizing, and the compatibility between the application programs of different versions and the base libraries of different versions can be achieved.
It should be noted that the old version and the new version may be manually set, for example, the current latest version application program is considered to be a new version application program, the base corresponding to the current latest version application program is considered to be a new version base, and the version before the current latest version application program is the old version.
The compiling rule of the plug-in provided in the embodiment of the present application is described with reference to fig. 2:
Referring to fig. 2, fig. 2 is a schematic diagram of compiling rules of a plug-in provided in an embodiment of the present application, including:
201. whether the plug-in the applet or the applet configures the path of the local plug-in is determined, if yes, step 202 is executed, and if not, step 203 is executed.
202. If the plug-in the applet or applet configures the path of the local plug-in and determines to use the local plug-in, then the local plug-in is used for direct compilation.
203. If the path of the local plug-in is not configured by the plug-in of the small game or the small program, the downloaded code is put into a memory for compiling.
In this embodiment, before compiling the plug-in, the compiling mode may be determined according to whether the plug-in the mini-game or the applet configures the path of the local plug-in, when the path of the local plug-in is configured and the local plug-in is determined to be used, the local plug-in is used for direct compiling, and if the path of the local plug-in is not configured, the local plug-in cannot be used for direct compiling, and the code needs to be downloaded to be put into the memory for compiling. That is, the plug-in the small game or the small program has two different compiling rules, for most plug-ins, plug-in codes are stored in an application program public platform, a developer who develops the small game or the small program only needs to configure the plug-in the game. Json or the app. Json for use, and when compiling, the plug-in codes are pulled from the background of the application program public platform to replace the code to be stored in a local memory for compiling; for the special plug-in type configured with the path, two modes are supported, namely, the local compiling according to the path is supported, and the compiling from the background pulling of the application program public platform is supported by the configuration at the development tool side.
Referring to fig. 3, fig. 3 is a schematic diagram of a packing manner of an insert provided in an embodiment of the present application, where the packing manner of the insert includes:
301. whether the plug-in the applet or the applet configures the path of the local plug-in is determined, if yes, step 302 is executed, and if not, step 303 is executed.
302. Packaging into pkg containing path plug-ins and packaging into pkg excluding path plug-ins.
303. Downloading plug-in code packages into a complete pkg and packaging excludes plug-in native code.
That is, when packaging the plug-ins, two modes are supported: one way is to package the plug-in directly in the code of the applet or applet; one way is to package only native code, plug-in code relies on remote downloads. That is, it may be determined whether the plug-in configures a path, and if the plug-in configures a path, packaging into a pkg containing a path cut mini-game or applet plug-in and packaging into a pkg not containing a path cut mini-game or applet plug-in; if the plug-in is not provided with a path, the plug-in code is downloaded from the background of the application program public platform and packaged into a complete pkg, and the local code without the plug-in is directly packaged. In the two modes, the plug-in is downloaded from the application program public platform.
After the small games or small program plug-ins are uploaded, other developers can search from the application public platform and use the small games or small program plug-ins. When a small game or a small program is opened, the terminal equipment corresponding to the application program can issue plug-in information used by the small game by the new version application program, and the corresponding plug-in code package and the code package excluding the plug-in are downloaded aiming at the plug-in information. For older version applications, the complete code package containing the plug-in is downloaded directly.
For new version applications, the plug-in list used by the applet or applet is pulled from the application development platform background first, then the individual plug-ins are downloaded and the code package excluding the plug-ins is downloaded. When the same plug-in is used by the small game or the small program, the plug-in which is downloaded locally can be reused without repeated downloading. Therefore, the whole plug-in unit needed by the small game or the small program is not needed to be downloaded, the network resource can be saved, and the downloading speed can be improved.
In the following, from the perspective of the terminal device, a detailed description will be given of a configuration method of the plug-in the present application, referring to fig. 4, fig. 4 is a schematic flow chart of a configuration method of the plug-in the present application, which specifically includes:
401. And acquiring attribute information corresponding to the target sub-application program.
In this embodiment, when a plug-in a target sub-application needs to be configured, the terminal device may determine whether the current target application is an application with a plug-in separation function according to a version number of the target application, and when the target application is an application with a plug-in separation function, obtain attribute information corresponding to the target sub-application, where the attribute information includes version information of N plug-ins corresponding to the target sub-application and information of an installation package configuration file excluding the N plug-ins in the target sub-application, where N is a positive integer greater than or equal to 1, and the target sub-application is a sub-application in the target application. That is, first, whether the application has the plug-in separation function may be determined by the version number of the application, and when the application has the plug-in separation function, attribute information of a target sub-application corresponding to the running request may be obtained, where the attribute information includes version information of a plug-in of a mini-game or a mini-program and ppg information of an installation package configuration file excluding the plug-in, where the attribute information includes information such as app id, version number, app id using the plug-in, version number of the plug-in, verification information, and verification information excluding ppg of the plug-in. The information of plug-in use and version is configured in the game. Json, and the background of the terminal equipment is analyzed and stored.
It should be noted that, when the app id of the applet or applet applies for the plug-in by the developer through the plug-in application described in fig. 1, an identifier is allocated to the applet or applet by the background of the target application, and the version number of the applet or applet is recorded each time the applet or applet is updated, and in addition, before the applet or applet is used, the plug-in may be configured in the game. Json of the plug-in, which has been described in detail herein, and is not repeated herein.
402. Judging whether the plug-in identification of the target plug-in is matched with the plug-in identification of the plug-in the local database, if so, executing step 403, and if not, executing step 406.
In this embodiment, after the attribute information corresponding to the target sub-application is obtained, the plug-in identifier app id of the target plug-in the version information of the N plug-ins corresponding to the target sub-application may be extracted to match the plug-in identifier app id of the plug-in the local database, and when the matching is successful, step 403 is executed, and when the matching is unsuccessful, step 406 is executed, where the target plug-in is any plug-in of the N plug-ins. That is, here, the purpose of multiplexing plug-ins with locally identical plug-in identifications can be achieved by matching the identifications of N plug-ins required to open the applet or the applet with the identifications of plug-ins of the locally stored plug-ins, respectively.
It should be noted that, the plug-ins in the local database are all plug-ins after the developer has applied, configured and audited in the public platform of the target application program, and compiled by the developer tool according to the compiling rule described in fig. 2, and the plug-ins are all plug-ins configured with the local path. That is, when compiling the applet or applet, a developer can determine whether the plugin in the applet or applet accompanies the path of the local plugin, if the plugin in the applet or applet configures the path of the local plugin and determines to use the local plugin, the local plugin is used for direct compiling, and if the plugin in the applet or applet does not configure the path of the local plugin, the corresponding code is downloaded and put into the local memory for compiling.
403. And when the plug-in identification of the target plug-in is matched with the plug-in identification of the plug-in the local database, acquiring first installation package configuration files of the N plug-ins according to the plug-in identification of the target plug-in.
In this embodiment, when the plug-in identifier of the target plug-in matches with the plug-in identifier app id of the plug-in the local database, the first installation package configuration files of the N plug-ins are obtained according to the plug-in identifier app id of the target plug-in. Specifically, whether the version number of the target plugin is matched with the version number of the plugin in the first target plugin can be judged first, the first target plugin is a plugin matched with the plugin identifications of the N plugins in the local database, and when the plugin identifications of each plugin in the N plugins are successfully matched with the version number of the plugin in the first target plugin, the installation package configuration file of the plugin successfully matched with the version number of the N plugins in the first target plugin is determined to be the first installation package configuration file of the N plugins. That is, when it is determined that the plug-in identification app id of the target plug-in matches the plug-in identification app id of the plug-in the local database, a plug-in matching the version number of the target plug-in is searched for from the matched plug-in, and the first installation package configuration file of the plug-in with the plug-in identification and the plug-in version number matching simultaneously is directly multiplexed.
In one embodiment, when the version number of each plug-in the N plug-ins is not successfully matched with the version number of the plug-in the first target plug-in, incremental package configuration files corresponding to the N plug-ins are obtained from a database corresponding to the target application program, and a first installation package configuration file of the N plug-ins is generated according to the incremental package configuration files corresponding to the N plug-ins and the installation package configuration files of the plug-ins, which are not matched with the version numbers of the N plug-ins, in the first target plug-in.
That is, if the version numbers of each of the N plug-ins are different in the version numbers of the plug-ins in the first target plug-in, the incremental package configuration files corresponding to the N plug-ins are directly downloaded from the database of the application public platform, and the first installation package configuration file is generated according to the plug-ins with the different version numbers. Because only the incremental package configuration file (i.e. the update file) needs to be downloaded, all the installation package configuration files do not need to be downloaded, and the purposes of improving the downloading speed and reducing the network cost can be achieved.
In one embodiment, when the N plug-ins include a first plug-in that matches the version number of the plug-in the first target plug-in and a second plug-in that does not match the version number of the plug-in the first target plug-in, determining the installation package configuration file of the plug-in that matches the version number of the first plug-in the first target plug-in as the first installation package configuration file of the first plug-in;
Acquiring an incremental package configuration file of the second plug-in according to the version number of the second plug-in;
and generating a first installation package configuration file of the second plug-in according to the incremental package configuration file of the second plug-in and the installation package configuration file of the plug-in which is not matched with the version number of the second plug-in the first target plug-in.
That is, if there is both the first plug-in with the same version number as the plug-in the first target plug-in and the second plug-in with the different version number as the plug-in the first target plug-in, for the second plug-in with the different version number, the corresponding incremental package configuration file is directly downloaded from the database of the application public platform, and the complete installation package configuration file is generated according to the incremental package configuration file and the plug-in with the different version number, for the first plug-in, the installation package configuration file of the plug-in with the same version number as the first plug-in the first target plug-in is directly used without re-downloading. Thus, the downloading speed can be improved, and the network cost can be reduced.
It should be noted that, when n=1, it is determined whether the version number of the plug-in matches with the version number of the corresponding plug-in the local database, if so, the installation package configuration files of the local plug-in are directly multiplexed, if not, the incremental package configuration files corresponding to the plug-in are downloaded, and then the corresponding first installation package configuration files are generated.
It should be noted that, when using the plug-in, the small game developer uses the plug-in (the details have been described above and will not be repeated here) through a simple configuration in the game. Json (the small program developer uses the app. Json), and when multiplexing the local plug-in, it is also necessary to fill in the complete path required plug-in ('alias/a. Js') of the plug-in corresponding to the game. Js or the app-service. Js, or directly use the alias required plug-in ('aaa') of the plug-in.
404. And acquiring second installation package configuration files excluding the N plug-ins from the target sub-application according to the information of the installation package configuration files excluding the N plug-ins from the target sub-application.
In this embodiment, the installation package configuration information excluding N plug-ins may be extracted from the attribute information corresponding to the target sub-application, and the second installation package configuration file excluding N plug-ins in the target sub-application may be obtained according to the information excluding the installation package configuration files of N plug-ins in the target sub-application. That is, the plug-in-removed pkg of the applet or applet can be downloaded directly from the application community platform.
It should be noted that, the first installation package configuration file may be obtained through steps 402 to 403, the second installation package configuration file may be obtained through step 404, and then there is no limitation on the execution sequence between steps 402 to 403 and step 404, and steps 402 to 403 may be executed first, step 404 may be executed first, or both may be executed simultaneously, which is not limited in particular.
405. And respectively injecting corresponding codes for the first installation package configuration file and the second installation package configuration file to complete the configuration of the plug-in of the target sub-application program.
In this embodiment, after the first installation package configuration files of the N plug-ins and the second installation package configuration files of the target sub-application excluding the N plug-ins are obtained, corresponding JS codes are respectively injected to complete the configuration of the plug-ins of the target sub-application, and the interface of the target sub-application is displayed.
It should be noted that, the configuration of the plug-in of the target sub-application program is that the plug-in of the target sub-application program is packaged, two different modes can be determined according to whether the plug-in is configured with a path, when the plug-in of the small game or the small program accompanies the path of the local plug-in, the plug-in is directly packaged into a ppg containing the path plug-in and a ppg with the path plug-in removed by packaging, when the plug-in of the small game or the small program does not configure the path of the local plug-in, the plug-in code is directly downloaded and packaged into a completed ppg and the local code with the path plug-in removed by packaging.
In one embodiment, when the N plugins comprise M plugins matched with the plugin identifications of the plugins in the local database and P plugins not matched with the plugin identifications of the plugins in the local database, acquiring first installation package configuration files of the P plugins from a database corresponding to the target application program, wherein M is more than or equal to 1 and less than N, and P is more than or equal to 1 and less than N;
Matching the version numbers of the M plug-ins with the version numbers of the plug-ins in the second target plug-ins to obtain a matching result, wherein the second target plug-ins are plug-ins matched with the plug-in identifiers of the M plug-ins in the local database;
and acquiring first installation package configuration files of the M plug-ins according to the matching result.
In this embodiment, if there are M plugins that are not matched with the plugin identifier in the local database, but also there are P plugins that are not matched with the plugin identifier in the local database, playing chess and M plugins that are matched with the plugin identifier in the database, matching version numbers of the M plugins with version numbers of plugins in the second target plugin to obtain a matching result, and obtaining a first installation package configuration file of the M plugins according to the matching result; and for P plugins which are not matched with the plugin identifications of the plugins in the local database, directly downloading corresponding installation package configuration files from the database of the application program public platform. Thus, the downloading speed can be improved, and the network cost can be reduced.
It should be noted that, when n=1, it is directly determined whether the card identifier of the 1 card is matched with the card identifier of the card in the local database, when not matched, the complete installation package configuration file corresponding to the card and the installation package configuration file excluding the card are directly downloaded from the database corresponding to the target application program, then the code is injected, the configuration of the card is completed, when matched, it is determined whether the version number of the card is matched with the version numbers of the local database and the card corresponding to the card, when matched, the local existing card installation package configuration file is multiplexed, when not matched, after the corresponding card incremental package configuration file is downloaded, the complete installation package configuration file is generated with the card corresponding to the card in the local database, and then the code is injected, so as to complete the configuration of the card.
In one embodiment, when the matching result is that the version numbers of the M plugins are not matched with the version numbers of the plugins in the second target plugins, acquiring incremental package configuration files of the M plugins from a database corresponding to the target application program, and generating first installation package configuration files of the M plugins according to the incremental package configuration files of the M plugins and the installation package configuration files of the plugins, which are not matched with the version numbers of the M plugins, in the second target plugins;
when the matching result is that the version numbers of the M plugins are successfully matched with the version numbers of the plugins in the local database, determining the installation package configuration file of the plugins successfully matched with the version numbers of the M plugins in the second target plugins as the first installation package configuration file of the M plugins;
when the M plug-ins comprise a third plug-in which is successfully matched with the version number of the plug-in the second target plug-in and a fourth plug-in which is unsuccessfully matched with the version number of the plug-in the second target plug-in, determining an installation package configuration file of the plug-in which is matched with the version number of the third plug-in the second target plug-in as a first installation package configuration file of the third plug-in;
acquiring an incremental package configuration file of the fourth plug-in from a database corresponding to the target application program according to the version number of the fourth plug-in;
And generating a first installation package configuration file of the fourth plug-in according to the increment package configuration file of the fourth plug-in and the installation package configuration file of the plug-in which is not matched with the version number of the fourth plug-in the second target plug-in.
That is, the matching result is obtained by matching the version numbers of the M plug-ins with the version numbers of the plug-ins in the second target plug-ins, and the matching result may have three cases: 1. the version number of each plug-in the M plug-ins is not successfully matched with the version number of the plug-in the second target plug-in; 2. the version number of each plug-in the M plug-ins is successfully matched with the version number of the plug-in the second target plug-in; 3. the M cards include a third card with successfully matched version numbers and a fourth card with unsuccessfully matched version numbers, and are described below:
1. if the version number of each plug-in the M plug-ins is not successfully matched with the version number of the plug-in the second target plug-in, the incremental package configuration files corresponding to the M plug-ins are directly downloaded from the database of the public platform of the target application program, and a complete first installation package configuration file is generated according to the incremental package configuration files and plug-ins with different version numbers. Because only the incremental package configuration file (i.e. the update file) needs to be downloaded, all the installation package configuration files do not need to be downloaded, and the purposes of improving the downloading speed and reducing the network cost can be achieved.
2. And if the version number of each plug-in the M plug-ins is successfully matched with the version number of the plug-in the second target plug-in, directly multiplexing the first installation package configuration file of the plug-in with the plug-in identifier and the plug-in version number matched simultaneously, and not downloading from a database of a public platform of the target application program, so that the aim of reducing the network cost can be achieved.
3. The M plugins comprise a third plugin with successfully matched version numbers and a fourth plugin with unsuccessfully matched version numbers, and for the third plugin with successfully matched version numbers, the first installation package configuration files of plugins with the same version numbers as the third plugin in the second target plugin are directly multiplexed, and for the fourth plugins with different version numbers, the corresponding incremental package configuration files are directly downloaded from a database of an application program public platform, and the complete first installation package configuration files are generated according to the incremental package configuration files and the installation package configuration files of plugins with different version numbers in the second target plugin, so that the purposes of reducing the number of downloaded files and network cost can be achieved.
Note that, the explanation execution sequence of the JS code is: the plug-in code is firstly interpreted and executed, then the JS file excluding the plug-in code is interpreted and executed, and after the plug-in code is successfully injected, the corresponding page can be normally displayed by the small game or the small program.
406. Other operations are performed.
In this embodiment, when there is no plug-in matching with the plug-in identifiers of the N plug-ins in the local database, the complete installation package configuration file corresponding to the N plug-ins is downloaded from the database corresponding to the target application program, and the corresponding JS code is injected, so as to achieve the purposes of configuring the plug-ins of the target sub-application program and displaying the corresponding page.
For the target application program without the plug-in separation function, directly downloading the complete installation package configuration file of the plug-in code and the developer code corresponding to the target sub-application program, and injecting the corresponding JS code to achieve the purpose of displaying the page of the target sub-application program.
In summary, it can be seen that in the embodiment provided by the application, when the plug-in of the target sub-application needs to be configured, N plug-ins corresponding to the target sub-application are obtained according to the attribute information of the target sub-application, the plug-in identifications of the N plug-ins are matched with the plug-in identifications of the plug-ins in the local database, and when the plug-in identifications of the N plug-ins are matched with the plug-in identifications of the plug-ins in the local database, the plug-ins stored in the local database are directly multiplexed, and the corresponding codes are injected, so that the complete installation package configuration file does not need to be downloaded from the database corresponding to the target application, the network bandwidth is not reduced, the storage space of a user is optimized, the multiplexing of the same plug-ins is generally reduced, the downloading time consumption of starting a small game or a small program is also reduced, and the user experience is improved.
The following describes a plug-in configuration method in an embodiment of the present application with reference to fig. 5 and fig. 6 in an application scenario:
the following description describes the target sub-application as a ride code:
and when the current page of the target application program is displayed with a applet page, namely a page shown in fig. 5, and then, when the plug-in the car taking code 501 of the target sub application program is required to be configured, the mobile terminal judges whether the target application program has a plug-in separation function according to the version number of the target application program, when the target application program has the plug-in separation function, obtains the version information of N plug-ins corresponding to the car taking code and the information of the installation package configuration file of the plug-in, can judge whether the plug-in identifications of the N plug-ins are matched with plug-in identifications of the plug-ins stored in a local database, and when the plug-in identifications of the N plug-ins are matched with the plug-in identifications of the local database, judges whether the plug-in version numbers of the N plug-ins are matched with the plug-in identifications of the plug-in modules successfully, if the plug-in version numbers are matched with the plug-in identifications of the plug-in modules successfully, directly multiplexes the plug-in interfaces, obtains the installation package configuration file of the N plug-in from the database corresponding to the target application program, and respectively injects corresponding codes, so as to complete the configuration of the plug-in of the car taking code, and display of the corresponding two-in codes 601 shown in the car taking code 501. Therefore, all plug-ins of the riding code do not need to be downloaded from the database corresponding to the target application program, plug-in identifiers stored in the local database and plug-ins with the same plug-in version numbers can be reused, the running speed of the applet can be improved, the use of storage space is reduced, and the user experience is improved.
The embodiments of the present application are described above from the perspective of a method for configuring a card, and the embodiments of the present application are described below from the perspective of a device for configuring a card.
Referring to fig. 7, fig. 7 is a schematic view of a virtual structure of a configuration device of a plug-in the embodiment of the present application, where the configuration device of the plug-in includes:
a first obtaining unit 701, configured to obtain attribute information corresponding to a target sub-application, where the attribute information includes version information of N packages corresponding to the target sub-application and information excluding installation package configuration files of the N packages in the target sub-application, where N is a positive integer greater than or equal to 1;
a second obtaining unit 702, configured to obtain, when the card identifier of the target card matches with a card identifier of a card in the local database, a first installation package configuration file of the N cards according to the card identifier of the target card, where the target card is any card in the N cards;
a third obtaining unit 703, configured to obtain a second installation package configuration file excluding the N plug-ins in the target sub-application according to information of the installation package configuration file excluding the N plug-ins in the target sub-application;
And a configuration unit 704, configured to inject corresponding codes into the first installation package configuration file and the second installation package configuration file, so as to complete configuration of the plug-in of the target sub-application program.
Optionally, the second obtaining unit 702 is specifically configured to:
and when the version numbers of the plug-ins in the N plug-ins are successfully matched with the version numbers of the plug-ins in the first target plug-ins, determining the installation package configuration file corresponding to the plug-ins with the successfully matched version numbers of the N plug-ins in the first target plug-ins as the first installation package configuration file, wherein the first target plug-ins are plug-ins matched with the plug-in identifications of the N plug-ins in the local database.
Optionally: the second obtaining unit 702 is specifically further configured to:
when the version number of each plug-in the N plug-ins is not successfully matched with the version number of the plug-in the first target plug-in, acquiring incremental package configuration files corresponding to the N plug-ins from a database corresponding to a target application program, wherein the target sub-application program is contained in the target application program;
and generating the first installation package configuration file according to the incremental package configuration files corresponding to the N plug-ins and the installation package configuration files of the plug-ins, which are not matched with the version numbers of the N plug-ins, in the first target plug-ins.
Optionally, the second obtaining unit 702 is further specifically configured to:
when the N plugins comprise a first plugin matched with the version number of the plugin in the first target plugin and a second plugin not matched with the version number of the plugin in the first target plugin, determining an installation package configuration file of the plugin matched with the version number of the first plugin in the first target plugin as a first installation package configuration file of the first plugin;
acquiring an incremental package configuration file of the second plug-in according to the version number of the second plug-in;
and generating a first installation package configuration file of the second plug-in according to the incremental package configuration file of the second plug-in and the installation package configuration file of the plug-in which is not matched with the version number of the second plug-in the first target plug-in.
Optionally, the second obtaining unit 702 is further specifically configured to:
when the N plugins comprise M plugins matched with the plugin identifications of the plugins in the local database and P plugins not matched with the plugin identifications of the plugins in the local database, acquiring first installation package configuration files of the P plugins from a database corresponding to the target application program, wherein M is more than or equal to 1 and less than N, P is more than or equal to 1 and less than N, and M and P are positive integers;
Matching the version numbers of the M plug-ins with the version numbers of the plug-ins in a second target plug-in to obtain a matching result, wherein the second target plug-in is a plug-in matched with the plug-in identifications of the M plug-ins in the local database;
and acquiring first installation package configuration files of the M plug-ins according to the matching result.
Optionally, the second obtaining unit 702 is further specifically configured to:
when the matching result is that the version numbers of the M plugins are not matched with the version numbers of plugins in the second target plugin, acquiring incremental package configuration files of the M plugins from a database corresponding to the target application program, and generating first installation package configuration files of the M plugins according to the incremental package configuration files of the M plugins and the installation package configuration files of plugins, which are not matched with the version numbers of the M plugins, in the second target plugin;
when the matching result is that the version numbers of the M plugins are successfully matched with the version numbers of the plugins in the local database, determining the installation package configuration file of the plugins successfully matched with the version numbers of the M plugins in the second target plugin as a first installation package configuration file of the M plugins;
When the M plugins comprise a third plugin successfully matched with the version number of the plugin in the second target plugin and a fourth plugin unsuccessfully matched with the version number of the plugin in the second target plugin, determining an installation package configuration file of the plugin matched with the version number of the third plugin in the second target plugin as a first installation package configuration file of the third plugin;
acquiring an incremental package configuration file of the fourth plug-in from a database corresponding to the target application program according to the version number of the fourth plug-in;
and generating a first installation package configuration file of the fourth plug-in according to the incremental package configuration file of the fourth plug-in and the installation package configuration file of the plug-in which is not matched with the version number of the fourth plug-in the second target plug-in.
In summary, it can be seen that, in the embodiment provided by the present application, when a plug-in of a target sub-application needs to be configured, N plug-ins corresponding to the target sub-application are obtained according to attribute information of the target sub-application, plug-in identifiers of the N plug-ins are matched with plug-in identifiers of plug-ins in a local database, when all plug-in identifiers of the N plug-ins are matched with plug-in identifiers of the plug-ins in the local database, plug-ins stored in the local database are directly multiplexed, and corresponding codes are injected, so that a complete installation package configuration file does not need to be downloaded from the database corresponding to the target application, network bandwidth is not reduced, storage space of a user is optimized, multiplexing of the same plug-ins in general use is also reduced, downloading time consumption of a small game or a small program is started, and user experience is improved.
The configuration device of the plug-in the embodiment of the present application is described above from the point of view of the modularized functional entity, and the server in the embodiment of the present application is described below from the point of view of hardware processing, respectively.
The embodiment of the present application further provides a terminal device, as shown in fig. 8, for convenience of explanation, only the portion relevant to the embodiment of the present application is shown, and specific technical details are not disclosed, please refer to the method portion of the embodiment of the present application. The terminal device may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant ), a POS (Point of Sales), a vehicle-mounted computer, and the like, taking the terminal device as an example of the mobile phone:
fig. 8 is a block diagram showing a part of the structure of a mobile phone related to a terminal provided in an embodiment of the present application. Referring to fig. 8, the mobile phone includes: radio frequency (RadioFrequency, RF) circuitry 810, memory 820, input unit 830, display unit 840, sensor 850, audio circuit 860, wireless fidelity (wireless fidelity, wiFi) module 870, processor 880, and power supply 890. Those skilled in the art will appreciate that the handset configuration shown in fig. 8 is not limiting of the handset and may include more or fewer components than shown, or may combine certain components, or may be arranged in a different arrangement of components.
The following describes the components of the mobile phone in detail with reference to fig. 8:
the RF circuit 810 may be used for receiving and transmitting signals during a message or a call, and in particular, after receiving downlink information of a base station, it is processed by the processor 880; in addition, the data of the design uplink is sent to the base station. Typically, the RF circuitry 810 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, and the like. In addition, the RF circuitry 810 may also communicate with networks and other devices via wireless communications. The wireless communications may use any communication standard or protocol including, but not limited to, global system for mobile communications (Global System of Mobile communication, GSM), general packet radio service (General Packet Radio Service, GPRS), code division multiple access (Code Division Multiple Access, CDMA), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution, LTE), email, short message service (Short Messaging Service, SMS), and the like.
The memory 820 may be used to store software programs and modules, and the processor 880 performs various functional applications and data processing of the cellular phone by executing the software programs and modules stored in the memory 820. The memory 820 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 820 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 830 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset. In particular, the input unit 830 may include a touch panel 831 and other input devices 832. The touch panel 831, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 831 or thereabout using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection device according to a predetermined program. Alternatively, the touch panel 831 may include two portions of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 880 and can receive commands from the processor 880 and execute them. In addition, the touch panel 831 may be implemented in various types of resistive, capacitive, infrared, surface acoustic wave, and the like. The input unit 830 may include other input devices 832 in addition to the touch panel 831. In particular, other input devices 832 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 840 may be used to display information input by a user or information provided to the user and various menus of the mobile phone. The display unit 840 may include a display panel 841, and optionally, the display panel 841 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 831 may overlay the display panel 841, and when the touch panel 831 detects a touch operation thereon or thereabout, the touch operation is transferred to the processor 880 to determine the type of touch event, and the processor 880 then provides a corresponding visual output on the display panel 841 according to the type of touch event. Although in fig. 8, the touch panel 831 and the display panel 841 are implemented as two separate components to implement the input and input functions of the mobile phone, in some embodiments, the touch panel 831 and the display panel 841 may be integrated to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 850, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 841 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 841 and/or the backlight when the mobile phone moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured with the handset are not described in detail herein.
Audio circuitry 860, speaker 861, microphone 862 may provide an audio interface between the user and the handset. The audio circuit 860 may transmit the received electrical signal converted from audio data to the speaker 861, and the electrical signal is converted into a sound signal by the speaker 861 to be output; on the other hand, microphone 862 converts the collected sound signals into electrical signals, which are received by audio circuit 860 and converted into audio data, which are processed by audio data output processor 880 for transmission to, for example, another cell phone via RF circuit 810, or which are output to memory 820 for further processing.
WiFi belongs to a short-distance wireless transmission technology, and a mobile phone can help a user to send and receive emails, browse webpages, access streaming media and the like through a WiFi module 870, so that wireless broadband Internet access is provided for the user. Although fig. 8 shows a WiFi module 870, it is understood that it does not belong to the necessary constitution of the handset, and can be omitted entirely as needed within the scope of not changing the essence of the invention.
The processor 880 is a control center of the mobile phone, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the mobile phone and processes data by running or executing software programs and/or modules stored in the memory 820 and calling data stored in the memory 820, thereby performing overall monitoring of the mobile phone. In the alternative, processor 880 may include one or more processing units; preferably, the processor 880 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 880.
The handset further includes a power supply 890 (e.g., a battery) for powering the various components, which may be logically connected to the processor 880 through a power management system, as well as performing functions such as managing charge, discharge, and power consumption by the power management system.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which will not be described herein.
In the embodiment of the present application, the processor 880 included in the terminal further has the following functions:
acquiring attribute information corresponding to a target sub-application program, wherein the attribute information comprises version information of N plugins corresponding to the target sub-application program and information excluding installation package configuration files of the N plugins in the target sub-application program, and N is a positive integer greater than or equal to 1;
when the plug-in identification of the target plug-in is matched with the plug-in identification in the local database, acquiring first installation package configuration files of the N plug-ins according to the plug-in identification of the target plug-in, wherein the target plug-in is any plug-in the N plug-ins;
acquiring a second installation package configuration file excluding the N plug-ins from the target sub-application according to the information of the installation package configuration file excluding the N plug-ins from the target sub-application;
And respectively injecting corresponding codes into the first installation package configuration file and the second installation package configuration file to complete the configuration of the plug-in of the target sub-application program.
The embodiment of the application also provides a computer storage medium, and a program is stored on the computer storage medium, and the program is executed by a processor to realize the configuration method of the plug-in.
The embodiment of the application also provides a processor, which is used for running a program, wherein the program runs to execute the configuration method of the plug-in.
The embodiment of the application also provides a terminal device, which comprises a processor, a memory and a program stored in the memory and capable of running on the processor, wherein the processor executes the program to realize the steps of the configuration method of the plug-in.
The present application also provides a computer program product adapted to perform the steps of the above-described plug-in configuration method when executed on a data processing device.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, apparatuses and modules described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A method for configuring a plug-in, comprising:
acquiring attribute information corresponding to a target sub-application program, wherein the attribute information comprises version information of N plugins corresponding to the target sub-application program and information excluding installation package configuration files of the N plugins in the target sub-application program, and N is a positive integer greater than or equal to 1;
When the plug-in identification of the target plug-in is matched with the plug-in identification in the local database, acquiring first installation package configuration files of the N plug-ins according to the plug-in identification of the target plug-in, wherein the target plug-in is any plug-in the N plug-ins;
acquiring a second installation package configuration file excluding the N plug-ins from the target sub-application according to the information of the installation package configuration file excluding the N plug-ins from the target sub-application;
and respectively injecting corresponding codes into the first installation package configuration file and the second installation package configuration file to complete the configuration of the plug-in of the target sub-application program.
2. The method of claim 1, wherein the obtaining the first installation package configuration file of the N plugins according to the plugin identifier of the target plugin includes:
when the version number of each plug-in the N plug-ins is successfully matched with the version number of the plug-in the first target plug-in, determining an installation package configuration file corresponding to the plug-in with the successfully matched version number of the N plug-ins in the first target plug-in as a first installation package configuration file of the N plug-ins, wherein the first target plug-in is the plug-in matched with the plug-in identification of the N plug-ins in the local database.
3. The method according to claim 2, wherein the method further comprises:
when the version number of each plug-in the N plug-ins is not successfully matched with the version number of the plug-in the first target plug-in, acquiring incremental package configuration files corresponding to the N plug-ins from a database corresponding to a target application program, wherein the target sub-application program is contained in the target application program;
and generating first installation package configuration files of the N plug-ins according to the incremental package configuration files corresponding to the N plug-ins and the installation package configuration files of the plug-ins, which are not matched with the version numbers of the N plug-ins, in the first target plug-ins.
4. The method according to claim 2, wherein the method further comprises:
when the N plugins comprise a first plugin matched with the version number of the plugin in the first target plugin and a second plugin not matched with the version number of the plugin in the first target plugin, determining an installation package configuration file of the plugin matched with the version number of the first plugin in the first target plugin as a first installation package configuration file of the first plugin;
acquiring an incremental package configuration file of the second plug-in according to the version number of the second plug-in;
And generating a first installation package configuration file of the second plug-in according to the incremental package configuration file of the second plug-in and the installation package configuration file of the plug-in which is not matched with the version number of the second plug-in the first target plug-in.
5. A method according to claim 3, characterized in that the method further comprises:
when the N plugins comprise M plugins matched with the plugin identifications of the plugins in the local database and P plugins not matched with the plugin identifications of the plugins in the local database, acquiring first installation package configuration files of the P plugins from a database corresponding to the target application program, wherein M is more than or equal to M and less than N, P is more than or equal to 1 and less than N, and M and P are positive integers;
matching the version numbers of the M plug-ins with the version numbers of the plug-ins in a second target plug-in to obtain a matching result, wherein the second target plug-in is a plug-in matched with the plug-in identifications of the M plug-ins in the local database;
and acquiring first installation package configuration files of the M plug-ins according to the matching result.
6. The method of claim 5, wherein the method further comprises:
when the matching result is that the version numbers of the M plugins are not matched with the version numbers of plugins in the second target plugin, acquiring incremental package configuration files of the M plugins from a database corresponding to the target application program, and generating first installation package configuration files of the M plugins according to the incremental package configuration files of the M plugins and the installation package configuration files of plugins, which are not matched with the version numbers of the M plugins, in the second target plugin;
When the matching result is that the version numbers of the M plugins are successfully matched with the version numbers of the plugins in the local database, determining the installation package configuration file of the plugins successfully matched with the version numbers of the M plugins in the second target plugin as a first installation package configuration file of the M plugins;
when the M plugins comprise a third plugin successfully matched with the version number of the plugin in the second target plugin and a fourth plugin unsuccessfully matched with the version number of the plugin in the second target plugin, determining an installation package configuration file of the plugin matched with the version number of the third plugin in the second target plugin as a first installation package configuration file of the third plugin;
acquiring an incremental package configuration file of the fourth plug-in from a database corresponding to the target application program according to the version number of the fourth plug-in;
and generating a first installation package configuration file of the fourth plug-in according to the incremental package configuration file of the fourth plug-in and the installation package configuration file of the plug-in which is not matched with the version number of the fourth plug-in the second target plug-in.
7. A card arrangement, comprising:
A first obtaining unit, configured to obtain attribute information corresponding to a target sub-application, where the attribute information includes version information of N plugins corresponding to the target sub-application and information excluding installation package configuration files of the N plugins in the target sub-application, where N is a positive integer greater than or equal to 1;
the second acquisition unit is used for acquiring the first installation package configuration files of the N plugins according to the plugin identifications of the target plugins when the plugin identifications of the target plugins are matched with the plugin identifications of the plugins in the local database, wherein the target plugins are any plugins in the N plugins;
the third acquisition unit is used for acquiring a second installation package configuration file excluding the N plug-ins in the target sub-application program according to the information of the installation package configuration file excluding the N plug-ins in the target sub-application program;
and the configuration unit is used for respectively injecting corresponding codes into the first installation package configuration file and the second installation package configuration file so as to complete the configuration of the plug-in of the target sub-application program.
8. The apparatus of claim 7, wherein the second acquisition unit is specifically configured to:
When the version number of each plug-in the N plug-ins is successfully matched with the version number of the plug-in the first target plug-in, determining an installation package configuration file corresponding to the plug-in with the successfully matched version number of the N plug-ins in the first target plug-in as a first installation package configuration file of the N plug-ins, wherein the first target plug-in is the plug-in matched with the plug-in identification of the N plug-ins in the local database.
9. A computer apparatus, the apparatus comprising:
at least one processor, memory, and transceiver;
wherein the memory is for storing program code and the processor is for invoking the program code stored in the memory to perform the method of any of claims 1-6.
10. A computer storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of any of claims 1-6.
CN201910634203.9A 2019-07-12 2019-07-12 Plug-in configuration method and related equipment Active CN112286586B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910634203.9A CN112286586B (en) 2019-07-12 2019-07-12 Plug-in configuration method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910634203.9A CN112286586B (en) 2019-07-12 2019-07-12 Plug-in configuration method and related equipment

Publications (2)

Publication Number Publication Date
CN112286586A CN112286586A (en) 2021-01-29
CN112286586B true CN112286586B (en) 2024-02-27

Family

ID=74419514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910634203.9A Active CN112286586B (en) 2019-07-12 2019-07-12 Plug-in configuration method and related equipment

Country Status (1)

Country Link
CN (1) CN112286586B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783515B (en) * 2021-02-08 2023-08-25 腾讯科技(深圳)有限公司 Plug-in control method and device and storage medium
CN113509735A (en) * 2021-03-30 2021-10-19 成都完美天智游科技有限公司 Game editing system
CN114172876A (en) * 2021-11-29 2022-03-11 阿里巴巴(中国)有限公司 Data transmission method, device and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090785A (en) * 2014-06-19 2014-10-08 小米科技有限责任公司 Method, device and system for providing application program
CN105407130A (en) * 2015-09-25 2016-03-16 成都趣点科技有限公司 Mobile client plug-in system and mobile client plug-in processing method
CN106095458A (en) * 2016-06-20 2016-11-09 腾讯科技(深圳)有限公司 The management method of plug-in unit and device in a kind of application program
CN109032691A (en) * 2018-06-25 2018-12-18 腾讯科技(深圳)有限公司 A kind of small routine operation method, device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090785A (en) * 2014-06-19 2014-10-08 小米科技有限责任公司 Method, device and system for providing application program
CN105407130A (en) * 2015-09-25 2016-03-16 成都趣点科技有限公司 Mobile client plug-in system and mobile client plug-in processing method
CN106095458A (en) * 2016-06-20 2016-11-09 腾讯科技(深圳)有限公司 The management method of plug-in unit and device in a kind of application program
CN109032691A (en) * 2018-06-25 2018-12-18 腾讯科技(深圳)有限公司 A kind of small routine operation method, device and storage medium

Also Published As

Publication number Publication date
CN112286586A (en) 2021-01-29

Similar Documents

Publication Publication Date Title
CN105302587B (en) Data-updating method and device
US20110191764A1 (en) Systems, methods, and apparatuses for facilitating distribution of firmware updates
CN106598584B (en) Method, device and system for processing resource file
CN114124930B (en) Configuration file transmission method, terminal, server and storage medium
CN112286586B (en) Plug-in configuration method and related equipment
CN110869907B (en) Method and terminal for browsing application page
CN107741844B (en) Method and device for generating application installation package
CN109857403B (en) Page updating method and device, page processing method and device
CN106502703B (en) Function calling method and device
CN106095458A (en) The management method of plug-in unit and device in a kind of application program
CN106681749B (en) Local code patch updating method and device based on android platform
CN107766358B (en) Page sharing method and related device
CN107370804B (en) Software application processing method and device
CN106713608B (en) Application function state modification method and device and terminal
CN108228230A (en) Upgrade method, terminal and the computer readable storage medium of UFS firmwares
CN114185491B (en) Partition file downloading method and device, storage medium and computer equipment
CN102469114A (en) Open mobile terminal widget application platform, realization method thereof and server
CN108090345B (en) Linux system external command execution method and device
CN112130866A (en) Application deployment method and related device
CN109814930A (en) A kind of application loading method, device and mobile terminal
CN103607431B (en) Mobile terminal resource processing method, device and equipment
JP5945078B2 (en) Application installation method, application installation apparatus, facility, program, and recording medium
CN107465646B (en) A kind of application method for down loading, system and relevant device
CN108182090B (en) Flash plug-in loading method and device based on blink kernel
CN106095423B (en) Method, terminal and server for providing browsing service

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant