CN112286586A - Configuration method of plug-in and related equipment - Google Patents

Configuration method of plug-in and related equipment Download PDF

Info

Publication number
CN112286586A
CN112286586A CN201910634203.9A CN201910634203A CN112286586A CN 112286586 A CN112286586 A CN 112286586A CN 201910634203 A CN201910634203 A CN 201910634203A CN 112286586 A CN112286586 A CN 112286586A
Authority
CN
China
Prior art keywords
plug
target
plugin
package configuration
configuration file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910634203.9A
Other languages
Chinese (zh)
Other versions
CN112286586B (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

Images

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 configuration method of a plug-in and related equipment, which can reduce the cost of network bandwidth, reduce the storage space of a user and reduce the 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-ins in the local database, acquiring a first installation package configuration file of the N plug-ins according to the plug-in identification of the target plug-in; acquiring a second installation package configuration file excluding N plug-ins in the target sub-application program according to the information of the installation package configuration file excluding N plug-ins in the target sub-application program; and injecting corresponding codes into the first installation package configuration file and the second installation package configuration file respectively to complete the configuration of the plug-in of the target sub application program.

Description

Configuration method of plug-in and related equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a configuration method of a plug-in and a related device.
Background
With the development of instant messaging, some small games or small programs in instant messaging have been developed.
At present, when some mini games or mini programs in instant messaging are developed and certain universal codes are needed, only codes can be written by themselves or downloaded from related sites and packaged into mini games or mini program code packages, and terminal equipment in instant messaging caches the mini games or the mini programs containing the same or similar universal codes and the codes of the terminal equipment.
However, the current scheme increases the development cost of developers on one hand, and energy is consumed if all codes are rewritten; on the other hand, if all the code plug-ins in the mini-game or the mini-program code stored in the terminal equipment for instant messaging are downloaded, not only is the network bandwidth cost high, but also the storage space of the user is occupied, and the time consumption for downloading is increased.
Disclosure of Invention
The application provides a configuration method of a plug-in and related equipment, which can reduce the cost of network bandwidth, reduce the storage space of a user and reduce the time consumption of downloading.
A first aspect of 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 of installation package configuration files excluding 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 a first installation package configuration file of the N plug-ins according to the plug-in identification of the target plug-in, wherein the target plug-in is any one plug-in of the N plug-ins;
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 injecting corresponding codes into the first installation package configuration file and the second installation package configuration file respectively to complete the configuration of the plug-in of the target sub-application program.
Optionally, when each of the N plug-ins is successfully matched with the version number of a plug-in a first target plug-in, determining an installation package configuration file corresponding to the plug-in the first target plug-in, which is successfully matched with the version number of the N plug-ins, as a first installation package configuration file of the N plug-ins, where the first target plug-in is a plug-in the local database, which is matched with the identifier of the N plug-ins.
Optionally, when the version numbers of each of the N plug-ins and the plug-in the first target plug-in are not successfully matched, obtaining the delta package configuration file 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 increment package configuration files corresponding to the N plugins and the installation package configuration file of the plugin in the first target plugin, wherein the increment package configuration file is not matched with the version numbers of the N plugins.
Optionally, when the N plugins include a first plugin which matches with the version number of a plugin in the first target plugin and a second plugin which does not match with the version number of a plugin in the first target plugin, determining the installation package configuration file of the plugin which matches with the version number of the first plugin in the first target plugin as the 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 increment package configuration file of the second plug-in and the installation package configuration file of the plug-in which the version number of the first target plug-in does not match with the version number of the second plug-in.
Optionally, when the N plug-ins include M plug-ins matching plug-in identifiers of plug-ins in the local database and P plug-ins not matching plug-in identifiers of plug-ins in the local database, obtaining first installation package configuration files of the P plug-ins from a database corresponding to the target application program, where M is greater than or equal to 1 and less than N, 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 plugins with the version numbers of the plugins in a second target plugin to obtain a matching result, wherein the second target plugin is the plugin in the local database, and the plugin numbers of the plugins are matched with the plugin identifiers of the M plugins;
and acquiring the first installation package configuration files of the M plug-ins according to the matching result.
Optionally, when the matching result indicates that the version numbers of the M plug-ins do not match the version numbers of the plug-ins in the second target plug-in, obtaining the incremental package configuration files of the M plug-ins from the database corresponding to the target application program, and generating a first installation package configuration file of the M plug-ins according to the incremental package configuration files of the M plug-ins and the installation package configuration file of the plug-in, of the second target plug-in, that does not match the version numbers of the M plug-ins;
when the matching result is that the version numbers of the M plug-ins and the version numbers of the plug-ins in the local database are successfully matched, determining the installation package configuration file of the plug-in which the matching with the version numbers of the M plug-ins is successful in the second target plug-in as a first installation package configuration file of the M plug-ins;
when the M plugins include 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 increment package configuration file of the fourth plug-in and the installation package configuration file of the plug-in the second target plug-in, which does not match with the version number of the fourth plug-in.
A second aspect of the embodiments of the present application provides a device for configuring a plug-in, including:
the system comprises a first obtaining unit, a second obtaining unit and a third obtaining unit, wherein the first obtaining unit is used for obtaining attribute information corresponding to a target sub application program, the attribute information comprises version information of N plug-ins corresponding to the target sub application program and information of installation package configuration files excluding the N plug-ins in the target sub application program, and N is a positive integer greater than or equal to 1;
a second obtaining unit, configured to obtain, according to the plug-in identifier of the target plug-in, a first installation package configuration file of the N plug-ins when the plug-in identifier of the target plug-in matches with the plug-in identifier of a plug-in a local database, where the target plug-in is any one of the N plug-ins;
a third obtaining unit, configured to obtain, according to the information of the installation package configuration file excluding the N plug-ins in the target sub-application, a second installation package configuration file excluding the N plug-ins in the target sub-application;
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:
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 the installation package configuration file corresponding to the plug-in which the version number of the N plug-ins is successfully matched in the first target plug-in as the first installation package configuration file, wherein the first target plug-in is the plug-in which the plug-in identification of the N plug-ins is matched in the local database.
Optionally: the second obtaining 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, obtaining the incremental package configuration file 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 a first installation package configuration file of the N plugins according to the increment package configuration file corresponding to the N plugins and the installation package configuration file of the plugin which is not matched with the version numbers of the N plugins in the first target plugin.
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 the 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 increment package configuration file of the second plug-in and the installation package configuration file of the plug-in which the version number of the first target plug-in does not match with the version number of the second plug-in.
Optionally, the second obtaining unit is further specifically configured to:
when the N plugins comprise M plugins matched with the plugin identifiers of the plugins in the local database and P plugins not matched with the plugin identifiers 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 plugins with the version numbers of the plugins in a second target plugin to obtain a matching result, wherein the second target plugin is the plugin in the local database, and the plugin numbers of the plugins are matched with the plugin identifiers of the M plugins;
and acquiring the 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 number of the plugin in the second target plugin, obtaining the incremental package configuration files of the M plugins from the database corresponding to the target application program, and generating a first installation package configuration file of the M plugins according to the incremental package configuration files of the M plugins and the installation package configuration file of the plugin in the second target plugin, wherein the installation package configuration file of the plugin in the second target plugin is not matched with the version numbers of the M plugins;
when the matching result is that the version numbers of the M plug-ins and the version numbers of the plug-ins in the local database are successfully matched, determining the installation package configuration file of the plug-in which the matching with the version numbers of the M plug-ins is successful in the second target plug-in as a first installation package configuration file of the M plug-ins;
when the M plugins include 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 increment package configuration file of the fourth plug-in and the installation package configuration file of the plug-in the second target plug-in, which does not match with the version number of the fourth plug-in.
A fourth aspect of the embodiments of the present application provides a computer apparatus, which includes at least one connected processor, a memory and a transceiver, where the memory is configured to store program code, and the processor is configured to call the program code in the memory to perform the operations in the above aspects.
A fifth aspect of embodiments of the present application provides a computer storage medium including instructions that, when executed on a computer, cause the computer to perform the operations of the above-described aspects.
In summary, it can be seen that, in the embodiment provided by the 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, and when the plug-in identifiers of the N plug-ins are all matched with the plug-in identifiers of the plug-ins in the local database, the 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 is general, time consumed for downloading a mini game or a mini-program is reduced, and user experience is improved.
Drawings
Fig. 1 is a schematic flow diagram of application, development and uploading of a plug-in of a mini game or a mini program provided in an embodiment of the present application:
FIG. 2 is a diagram illustrating a compilation rule of a plug-in provided in an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a packaging manner of plug-ins according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of a configuration method of a plug-in provided in an embodiment of the present application;
fig. 5 is a schematic interface diagram of an application scenario provided in the embodiment of the present application;
fig. 6 is another interface diagram of an application scenario provided in an embodiment of the present application;
fig. 7 is a schematic virtual structure diagram of a configuration apparatus of a plug-in provided in an embodiment of the present application;
fig. 8 is a schematic diagram of a hardware structure of a terminal device according to an embodiment of the present application.
Detailed Description
The application provides a configuration method of a plug-in and related equipment, which can reduce the cost of network bandwidth, reduce the storage space of a user and reduce the time consumption for downloading.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
The terms "first," "second," and the like in the description and in the claims of the present application and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprise," "include," and "have," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules expressly listed, but may include other steps or modules not expressly listed or inherent to such process, method, article, or apparatus, the division of modules presented herein is merely a logical division that may be implemented in a practical application in a further manner, such that a plurality of modules may be combined or integrated into another system, or some features may be omitted, or not implemented, and such that couplings or direct couplings or communicative coupling between each other as shown or discussed may be through some interfaces, indirect couplings or communicative coupling between modules may be electrical or other similar forms, this application is not intended to be limiting. The modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, 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 purpose of the present disclosure.
In the embodiment of the application, different mini-games or mini-programs of the application use a plurality of same universal codes (components), and the universal codes can be provided for developers in a plug-in mode. The mini-game or mini-program developer can conveniently use the same plug-in or plug-ins through simple configuration, and the terminal equipment of instant messaging can cache the plug-ins in a strategic manner, so that the aims 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 mini-game or the mini-program are fulfilled.
Some of the nouns involved in this application will be explained first:
application public platform: the system 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 a developer tool simulator to use a local plug-in and a remote plug-in;
application developer tool compilation background: providing a compiling function for a plug-in developer, and providing a compiling (compatible with all base library versions and re-realizing requirePlugin) and packaging function (compatible with the previous application program version) for a mini game or a mini program using the plug-in;
application public library: realizing requirePlugin;
application terminal equipment: 1. compatible with the old version application program, and the new version application program pulls the configuration downloading cache plug-in of the plug-in from the background; 2. and reusing, managing and eliminating the plug-in.
The following describes the application, development and upload of the mini-game of the application program or the plug-in of the mini-program with reference to fig. 1:
a developer 102 of the mini game or the mini program applies for app id of a plug-in class on an application platform 101, utilizes a developer tool 103 to develop and debug the plug-in, a compiling background provides compiling support, the plug-in with complete development and debugging is uploaded to an auditing platform 104 after the development and debugging are completed, a general plug-in 105 available for use can be obtained after the auditing platform 104 finishes auditing, and the general plug-in is stored in a database.
In addition, the uploaded plug-ins can be managed, submitted, checked (the check is to check whether the uploaded plug-ins are in compliance or not, whether the uploaded plug-ins have the same plug-ins or the plug-ins of other persons are copied) and released in the application program public platform interface. After the verification is passed, a developer using the plug-in can search the plug-in on an application program public platform, and select a proper plug-in for use according to requirements. The development flow of the plug-in developer is described in detail below by taking a mini game as an example:
each plug-in has a separate plug-in code directory, which needs to contain plugin.json in addition to plug-in implementation code, and the major configuration of plugin.json of mini-game plug-ins is as follows:
Figure BDA0002128808820000081
after a developer tool is used for debugging and developing the plug-in and configuring the plug-in, the plug-in developer uploads plug-in codes through the developer tool, the developer who passes the mini game is checked for applying for authorization, and the mini game can be used after the authorization passes.
Secondly, for the use of plug-ins, the mini game developer uses plug-ins by simple configuration in the game json (applet developer through app json), and the configuration information is as follows:
Figure BDA0002128808820000082
wherein, the plugins (plug-ins) support to configure a plurality of;
alias is an Alias of the plug-in (aaa in the above example), meaning that the long path of the plug-in can be replaced with a short Alias way;
provider is app id (application identity) of the plug-in applied by the developer on 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 tailored version (which refers to tailoring the number of plug-in files or the content to the developer's usage). In this case, adding path in the configuration can calculate the cropping version when calculating the plug-in size, and the path is a complete folder path. In addition, for a plug-in provider configured with a path, a signature needs to be additionally provided under a plug-in directory of a cutting version, and the specific configuration is as follows:
Figure BDA0002128808820000091
a provider in signature is completely the same as an app id of a plug-in previously applied to an application public platform, a path under a signature path corresponds to a specific js file under a plug-in directory (the path herein may also include other types of plug-in files under the plug-in directory, and is not limited specifically), an absolute path is adopted, and if the plug-in directory includes multiple js, the path of each file and a corresponding md5 need to be configured (Message Digest Algorithm 5, Message-Digest Algorithm).
When a developer of a mini-game or a mini-program wants to use a plug-in, the developer only needs to fill a complete path requireplug ('alias/a.js') of the plug-in the game.js or app-service.js or directly use the alias requireplug ('aaa') of the plug-in.
It should be noted that the alias, the path, and the md5 in the above example are only examples, and do not represent limitations thereof.
It should be further noted that, the new version base of the application realizes a requireplug interface, and the new 'requireplug' is added, so that the real plug-in file is found according to alias and filename through configuration, as described above when configuring in the volume.
Requireplugin (' aaa ')// equivalent to requirePlugin (' aaa/index
// analysis in >
require ('__ plugin __/wx123456789/index. js')// is localized to index. js by main in plugin. json.
When compiling the code packet, the compiling background needs to modify correspondingly, modifies the original define implementation, and adds a prefix of __ plugin __/{ appid }/"on the basis of the define.
That is, in order to be compatible with the old base library version and the old application program version, the developer tool compiling background needs to be compatible with the implementation of requirePlugin, and when no new base library is available, the default implementation of the requirePlugin is added to the new base library. When a new version of the basic library exists, the basic library is used for realizing, namely, the compatibility between the application programs of different versions and the basic libraries of different versions can be achieved.
It should be noted that the old version and the new version may be set manually, for example, the application program of the current latest version is considered to be the application program of the new version, the base library corresponding to the application program of the current latest version is a base library of the new version, and the versions before the application program of the current latest version are all old versions, which is not limited specifically as long as the distinction can be achieved.
The compiling rules of the plug-ins provided in the embodiment of the present application are explained with reference to fig. 2:
referring to fig. 2, fig. 2 is a schematic diagram of a compiling rule of a plug-in provided in an embodiment of the present application, including:
201. and judging whether the path of the local plug-in is configured by the plug-in the mini game or the mini program, if so, executing the step 202, and if not, executing the step 203.
202. If the path of the native plug-in is configured by the plug-in the mini-game or the applet and the native plug-in is determined to be used, the native plug-in is used for direct compiling.
203. And if the path of the local plug-in is not configured by the plug-in of the mini game or the mini program, downloading the code and putting the code into the memory for compiling.
In this embodiment, before compiling the plug-in, the compiling mode may be determined according to whether the path of the local plug-in is configured for the plug-in the mini game or the applet, 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 a code needs to be downloaded and placed in the memory for compiling. That is to say, plug-ins in the mini-game or the mini-program have two different compiling rules, for most plug-ins, plug-in codes are stored in an application program public platform, developers developing the mini-game or the mini-program only need to configure the plug-ins used in the game.json or app.json, and when compiling is carried out, the codes are pulled from the application program public platform background and are placed in a local memory for compiling; and for the special plug-in type configured with the path, two modes are supported, namely local compiling according to the path is supported, and configuration of background pulling from an application program public platform for compiling on a development tool side is also supported.
Referring to fig. 3, please refer to fig. 3, which illustrates a packaging method of the plug-in provided in this embodiment, and fig. 3 is a schematic diagram of the packaging method of the plug-in provided in this embodiment, including:
301. and judging whether the path of the local plug-in is configured by the plug-in the mini game or the mini program, if so, executing the step 302, and if not, executing the step 303.
302. Pkg that packages to contain path plug-ins and pkg that packages to exclude path plug-ins.
303. The download plug-in code is packaged as complete pkg and the packaging excludes the native code of the plug-in.
That is, when packaging plug-ins, two ways are supported: one way is to package the plug-ins directly in the code of the mini-game or applet; one way is to package only native code, with plug-in code relying on remote downloads. That is, it is possible to determine whether a path is allocated to a plug-in, and if the path is allocated to the plug-in, the plug-in is packaged into pkg containing a path clip mini game or applet plug-in and into pkg not containing a path clip mini game or applet plug-in; if the plug-in has no path, the plug-in code is downloaded from the application public platform background and packaged into a complete pkg and the native code containing no plug-in is packaged directly. In the two modes, the plug-in is obtained by downloading from the application program public platform.
After uploading the mini-game or the plug-in of the mini-program is completed, other developers can search and use the application program public platform. When a terminal device corresponding to the application program opens a mini game or a mini program, the new version application program can issue plug-in information used by the mini game, and the corresponding plug-in code package and the code package with the plug-ins removed are downloaded according to the plug-in information. For older versions of applications, the complete code package containing the plug-in is downloaded directly.
For the new version application program, firstly, a plug-in list used by the mini game or the mini program is pulled from the background of the application program development platform, and then the downloading of the single plug-in and the downloading of the code package excluding the plug-in are carried out. When a mini game or a mini program uses the same plug-in, the locally downloaded plug-in can be reused without repeated downloading. Therefore, plug-ins required by the mini-game or the mini-program do not need to be downloaded completely, network resources can be saved, and the downloading speed can be improved.
With reference to fig. 4, fig. 4 is a schematic flow chart of a configuration method of a plug-in provided in an embodiment of the present application, and the detailed description 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, a terminal device may determine, according to a version number of the target application, whether the current target application is an application having a plug-in separation function, and when the target application is an application having 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, whether the application has the plug-in separation function or not may be determined by the version number of the application, and when the application has the plug-in separation function, attribute information of the target sub-application corresponding to the operation request may be acquired, where the attribute information includes version information of a plug-in of a mini game or a mini program and information of an installation package configuration file pkg excluding the plug-in, and the attribute information includes information such as app id of the mini game or the mini program, the version number, app id of a used plug-in, the version number of the plug-in, verification information, and verification information of pkg excluding the plug-in. And the information of the use and version of the plug-in is configured in the game.
It should be noted that, when a developer applies for a plug-in by the plug-in application method described in fig. 1, the app id of the mini game or the mini program is an identifier assigned to the mini game or the mini program by the background of the target application program, and when the mini game or the mini program is updated each time, the version number of the mini game or the mini program is recorded, and in addition, before the use of the plug-in of the mini game or the mini program, the plug-in may be used by configuring in the game json of the plug-in, which has been described above in detail, and is not described here again.
402. And 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 the step 403, and if not, executing the step 406.
In this embodiment, after obtaining the attribute information corresponding to the target sub-application program, a plug-in identifier app id of the target plug-in the version information of the N plug-ins corresponding to the target sub-application program may be extracted to match with a plug-in identifier app id of a plug-in the local database, when matching is successful, step 403 is executed, and when matching is unsuccessful, step 406 is executed, where the target plug-in is any one of the N plug-ins. That is, here, the purpose of reusing the plug-ins having the same local plug-in identifier can be achieved by matching the identifiers of the N plug-ins required for opening the mini game or the mini program with the identifiers of the plug-ins stored locally.
It should be noted that all the plug-ins in the local database are plug-ins that are compiled according to the compiling rule described in fig. 2 by the developer tool after the developer has applied for, configured, and checked in the target application program public platform, and all the plug-ins are plug-ins configured with a local path. That is, when compiling the mini-game or the mini-program, the developer may determine whether the plug-in the mini-game or the mini-program accompanies the path of the local plug-in, if the plug-in the mini-game or the mini-program configures the path of the local plug-in and determines to use the local plug-in, the local plug-in is used for direct compiling, and if the plug-in of the mini-game or the mini-program does not configure the path of the local plug-in, the corresponding code is downloaded and placed in 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-ins in the local database, acquiring a first installation package configuration file 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 is matched with the plug-in identifier appid of the plug-ins 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, it may be first determined whether the version number of the target plug-in matches the version number of the plug-in the first target plug-in, where the first target plug-in is a plug-in the local database that matches the plug-in identifiers of the N plug-ins, and when the plug-in identifier of each plug-in the N plug-ins matches the version number of the plug-in the first target plug-in successfully, the installation package configuration file of the plug-in that matches the version number of the N plug-ins successfully in the first target plug-in is determined as the first installation package configuration file of the N plug-ins. That is to say, 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, the plug-in matching the version number of the target plug-in is searched from the matched plug-ins, and the first installation package configuration file of the plug-in matching the plug-in identification and the plug-in version number at the same time 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, obtaining the incremental package configuration files corresponding to the N plug-ins from the database corresponding to the target application program, and generating the 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 in the first target plug-in, which are not matched with the version numbers of the N plug-ins.
That is to say, if the version number of each plug-in the N plug-ins is different from the version number of the plug-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 incremental package configuration files and the plug-ins with different version numbers. Because only the incremental package configuration files (namely the update files) need 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 plugins include a first plugin which matches with the version number of the plugin in the first target plugin and a second plugin which does not match with the version number of the plugin in the first target plugin, the installation package configuration file of the plugin which matches with the version number of the first plugin in the first target plugin is determined as the 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 increment package configuration file of the second plug-in and the installation package configuration file of the plug-in which the version number of the first target plug-in does not match with that of the second plug-in.
That is, if there is not only a first plug-in with the same version number of a plug-in the first target plug-in but also a second plug-in with a different version number from the plug-in the first target plug-in among the N plug-ins, for the second plug-in with a different version number, the corresponding incremental package configuration file is directly downloaded from the database of the application public platform, and a complete installation package configuration file is generated according to the incremental package configuration file and the plug-in with a different version number, and 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. Therefore, the downloading speed can be improved, and the network cost can be reduced.
When N is equal to 1, determining whether the version number of the plug-in matches the version number of the corresponding plug-in the local database, if so, directly multiplexing the installation package configuration file of the local plug-in, if not, downloading the incremental package configuration file corresponding to the plug-in, and then generating a corresponding first installation package configuration file.
It should be noted that, when using the plug-in, the mini-game developer uses the plug-in the volume.json (through app.json) through simple configuration (the details have already been described above, and are not described here in detail), and when multiplexing the local plug-in, it is also necessary to fill the complete path requireplug in ('alias/a.js') of the plug-in the volume.js or app-service.js corresponding to the plug-in or directly use the alias requireplug in ('aa') of the plug-in.
404. And 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.
In this embodiment, the installation package configuration information excluding the N plug-ins may be extracted from the attribute information corresponding to the target sub-application, and the second installation package configuration file excluding the N plug-ins in the target sub-application may be obtained according to the information of the installation package configuration file excluding the N plug-ins in the target sub-application. That is, the plug-in excluded pkg for the mini-game 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, or step 404 may be executed first, or executed simultaneously, which is not limited specifically.
405. And injecting corresponding codes into the first installation package configuration file and the second installation package configuration file respectively to complete the configuration of the plug-in of the target sub application program.
In this embodiment, after obtaining the first installation package configuration file of the N plug-ins and the second installation package configuration file excluding the N plug-ins in the target sub-application, respectively injecting corresponding JS codes to complete configuration of the plug-ins of the target sub-application, and displaying an interface of the target sub-application.
It should be noted that, the configuration of the plug-in of the target sub-application is to package the plug-ins of the target sub-application, and two different ways of packaging can be determined according to whether the plug-ins configure the path, when the plug-ins of the mini-game or the mini-program accompany the path of the local plug-ins, the plug-ins are directly packaged into pkg containing the path plug-ins and pkg packaging the path plug-ins excluded, and when the plug-ins of the mini-game or the mini-program do not configure the path of the local plug-ins, the plug-in codes are directly downloaded and packaged into pkg completed and the local codes excluding the plug-ins are packaged.
In one embodiment, when the N plug-ins include M plug-ins matched with plug-in identifiers of plug-ins in a local database and P plug-ins not matched with plug-in identifiers of plug-ins in the local database, acquiring first installation package configuration files of the P plug-ins from a database corresponding to a 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 plugins with the version numbers of the plugins in a second target plugin to obtain a matching result, wherein the second target plugin is a plugin in the local database, and the plugin number is matched with the plugin identifiers of the M plugins;
and acquiring the first installation package configuration files of the M plug-ins according to the matching result.
In the embodiment, if M plugins matched with the plugin identifiers in the local database and P plugins not matched with the plugin identifiers in the local database exist in the N plugins, the M plugins matched with the plugin identifiers in the database are played, the version numbers of the M plugins are matched with the version number of the plugin in the second target plugin to obtain a matching result, and a first installation package configuration file of the M plugins is obtained according to the matching result; and for P plug-ins which are not matched with the plug-in identifiers of the plug-ins in the local database, directly downloading corresponding installation package configuration files from the database of the application program public platform. Therefore, the downloading speed can be improved, and the network cost can be reduced.
It should be noted that, when N is 1, directly determining whether the plugin identifier of the 1 plugin is matched with the plugin identifier of the plugin in the local database, when N is not 1, directly downloading the complete installation package configuration file containing the plugin corresponding to the target application and the installation package configuration file excluding the plugin from the database corresponding to the target application, then injecting a code to complete the configuration of the plugin, when N is matched, determining whether the version number of the plugin is matched with the local database and the version number of the plugin corresponding to the plugin, when N is matched, multiplexing the locally existing plugin installation package configuration file, when N is not matched, after the corresponding plugin increment package configuration file is downloaded, generating a complete installation package configuration file with the plugin in the local database and the plugin corresponding to the plugin, and then injecting a code to complete the configuration of the plugin.
In one embodiment, when the matching result is that the version numbers of the M plugins do not match the version number of the plugin in the second target plugin, obtaining the incremental package configuration files of the M plugins from the 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 in the second target plugin, which do not match the version numbers of the M 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 plugin, which is 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 increment package configuration file of the fourth plug-in and the installation package configuration file of the plug-in the second target plug-in, wherein the installation package configuration file of the plug-in does not match with the version number of the fourth plug-in.
That is, the matching between the version numbers of the M plug-ins and the version number of the plug-in the second target plug-in obtains a matching result, 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 plug-ins include both a third plug-in with a successfully matched version number and a fourth plug-in with an unsuccessfully matched version number, which are described below:
1. and 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, directly downloading the incremental package configuration files corresponding to the M plug-ins from the database of the target application program public platform, and generating a complete first installation package configuration file according to the incremental package configuration files and the plug-ins with different version numbers. Because only the incremental package configuration files (namely the update files) need 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 at the same time without downloading from a database of a target application program public platform, and also achieving the purpose of reducing the network cost.
3. The M plug-ins comprise a third plug-in with successfully matched version number and a fourth plug-in with unsuccessfully matched version number, for the third plug-in with successfully matched version number, the first installation package configuration file of the plug-in with the same version number as the third plug-in the second target plug-in is directly multiplexed, for the fourth plug-in with different version numbers, the corresponding incremental package configuration file is directly downloaded from a database of an application program public platform, the complete first installation package configuration file is generated according to the incremental package configuration file and the installation package configuration file of the plug-in with the different version number in the second target plug-in, the incremental package configuration file does not need to be downloaded again or only needs to be downloaded, and therefore the purposes of reducing the number of downloaded files and reducing network cost can be achieved.
It should be noted that the interpretation and execution order of the JS code is as follows: and after the JS files excluding the plug-in codes are successfully injected, the corresponding page can be normally displayed by the mini game or the mini program.
406. Other operations are performed.
In this embodiment, when the local database does not have the plug-in that matches the plug-in identifiers of the N plug-ins, the complete installation package configuration files corresponding to the N plug-ins are downloaded from the database corresponding to the target application program, and the corresponding JS code is injected, so that the purpose of configuring the plug-ins of the target sub-application program and displaying the corresponding page is achieved.
And for the target application program without the plug-in separation function, directly downloading the plug-in codes corresponding to the target sub application program and the complete installation package configuration file of the developer codes, and injecting the corresponding JS codes 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 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, and when the plug-in identifiers of the N plug-ins are all matched with the plug-in identifiers of the plug-ins in the local database, the 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 is general, time consumed for downloading a mini game or a mini-program is reduced, and user experience is improved.
The following describes a plug-in configuration method in an embodiment of the present application in an application scenario with reference to fig. 5 and fig. 6:
the target sub-application is used as the riding code for explanation:
displaying an applet page, namely the page shown in fig. 5, on a current page of a target application program, then when a plug-in a riding code 501 of a target sub-application program needs to be configured, judging whether the target application program has a plug-in separation function according to a version number of the target application program, when the target application program has the plug-in separation function, acquiring version information of N plug-ins corresponding to the riding code and information of an installation package configuration file excluding the plug-ins, then judging whether the N plug-ins are matched with plug-in identifiers of the plug-ins stored in a local database, when the N plug-ins are matched with the plug-in identifiers of the plug-ins stored in the local database, judging whether the plug-in version numbers of the N plug-ins are matched with the plug-in version numbers of the plug-ins in the plug-ins successfully matched with the plug-in the local database, if the plug-in version numbers are also successfully matched, directly multiplexing the plug-in interfaces, and acquiring, and corresponding codes are respectively injected to complete the configuration of the plug-in of the riding code, and a two-dimensional code 601 corresponding to the riding code 501 shown in fig. 6 is displayed. Therefore, all the plug-ins of the riding codes 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 small programs can be increased, 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 of arranging a card, and are described below from the perspective of an apparatus for arranging a card.
Referring to fig. 7, fig. 7 is a schematic view of a virtual structure of a configuration device of a plug-in an 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 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;
a second obtaining unit 702, configured to obtain, according to the plug-in identifier of the target plug-in, a first installation package configuration file of the N plug-ins when the plug-in identifier of the target plug-in is matched with the plug-in identifier of a plug-in a local database, where the target plug-in is any one of the N plug-ins;
a third obtaining unit 703, configured to obtain, according to the information of the installation package configuration file excluding the N plug-ins in the target sub-application, a second installation package configuration file excluding the N plug-ins in the target sub-application;
a configuration unit 704, configured to inject corresponding codes into the first installation package configuration file and the second installation package configuration file, respectively, so as to complete configuration of the plug-in of the target sub application.
Optionally, the second obtaining unit 702 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 the installation package configuration file corresponding to the plug-in which the version number of the N plug-ins is successfully matched in the first target plug-in as the first installation package configuration file, wherein the first target plug-in is the plug-in which the plug-in identification of the N plug-ins is matched in the local database.
Optionally: the second obtaining unit 702 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, obtaining the incremental package configuration file 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 increment package configuration files corresponding to the N plugins and the installation package configuration file of the plugin in the first target plugin, wherein the increment package configuration file is not matched with the version numbers of the N plugins.
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 the 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 increment package configuration file of the second plug-in and the installation package configuration file of the plug-in which the version number of the first target plug-in does not match with the version number of the second plug-in.
Optionally, the second obtaining unit 702 is further specifically configured to:
when the N plugins comprise M plugins matched with the plugin identifiers of the plugins in the local database and P plugins not matched with the plugin identifiers of the plugins in the local database, acquiring a first installation package configuration file 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 plugins with the version numbers of the plugins in a second target plugin to obtain a matching result, wherein the second target plugin is the plugin in the local database, and the plugin numbers of the plugins are matched with the plugin identifiers of the M plugins;
and acquiring the 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 number of the plugin in the second target plugin, obtaining the incremental package configuration files of the M plugins from the database corresponding to the target application program, and generating a first installation package configuration file of the M plugins according to the incremental package configuration files of the M plugins and the installation package configuration file of the plugin in the second target plugin, wherein the installation package configuration file of the plugin in the second target plugin is not matched with the version numbers of the M plugins;
when the matching result is that the version numbers of the M plug-ins and the version numbers of the plug-ins in the local database are successfully matched, determining the installation package configuration file of the plug-in which the matching with the version numbers of the M plug-ins is successful in the second target plug-in as a first installation package configuration file of the M plug-ins;
when the M plugins include 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 increment package configuration file of the fourth plug-in and the installation package configuration file of the plug-in the second target plug-in, which does not match with the version number of the fourth 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, and when the plug-in identifiers of the N plug-ins are all matched with plug-in identifiers of plug-ins in the local database, the plug-ins stored in the local database are directly multiplexed, and corresponding codes are injected, so that it is not necessary to download a complete installation package configuration file from the database corresponding to the target application, which does not reduce network bandwidth, optimizes storage space of a user, generally multiplexes the same plug-ins, and also reduces download time consumption of a mini game or a mini-program, and improves user experience.
The configuration apparatus of the plug-in the embodiment of the present application is described above from the perspective of the modular functional entity, and the servers in the embodiment of the present application are described below from the perspective of hardware processing.
As shown in fig. 8, for convenience of description, only the parts related to the embodiments of the present application are shown, and details of the specific technology are not disclosed, please refer to the method part of the embodiments 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 the mobile phone as an example:
fig. 8 is a block diagram illustrating a partial structure of a mobile phone related to a terminal provided in an embodiment of the present application. Referring to fig. 8, the handset includes: radio Frequency (RF) circuit 810, memory 820, input unit 830, display unit 840, sensor 850, audio circuit 860, 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 intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 8:
the RF circuit 810 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, for processing downlink information of a base station after receiving the downlink information to the processor 880; in addition, the data for designing uplink is transmitted to the base station. In general, RF circuit 810 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 810 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The memory 820 may be used to store software programs and modules, and the processor 880 executes various functional applications and data processing of the cellular phone by operating the software programs and modules stored in the memory 820. The memory 820 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the 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 generate key signal inputs related to user settings and function control of the cellular phone. Specifically, 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, can collect touch operations performed by a user on or near the touch panel 831 (e.g., operations performed by the user on the touch panel 831 or near the touch panel 831 using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 831 may include two portions, i.e., a touch detection device and a touch controller. The touch detection device detects the touch direction 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 sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 880, and can receive and execute commands from the processor 880. In addition, the touch panel 831 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. 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 (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 840 may be used to display information input by the user or information provided to the user and various menus of the cellular phone. The Display unit 840 may include a Display panel 841, and the Display panel 841 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like, as an option. Further, touch panel 831 can overlay display panel 841, and when touch panel 831 detects a touch operation thereon or nearby, communicate to processor 880 to determine the type of touch event, and processor 880 can then provide a corresponding visual output on display panel 841 based on the type of touch event. Although in fig. 8, the touch panel 831 and the display panel 841 are two separate components to implement the input and output 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 light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 841 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 841 and/or the backlight when the mobile phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 860, speaker 861, microphone 862 may provide an audio interface between the user and the handset. The audio circuit 860 can transmit the electrical signal converted from the received audio data to the speaker 861, and the electrical signal is converted into a sound signal by the speaker 861 and output; on the other hand, the microphone 862 converts collected sound signals into electrical signals, which are received by the audio circuit 860 and converted into audio data, which are then processed by the audio data output processor 880 and transmitted to, for example, another cellular phone via the RF circuit 810, or output to the memory 820 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to send and receive e-mails, browse webpages, access streaming media and the like through the WiFi module 870, and provides wireless broadband Internet access for the user. Although fig. 8 shows WiFi module 870, it is understood that it does not belong to the essential constitution of the handset, and may be omitted entirely as needed within the scope 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 operating or executing software programs and/or modules stored in the memory 820 and calling data stored in the memory 820, thereby integrally monitoring the mobile phone. Optionally, processor 880 may include one or more processing units; preferably, the processor 880 may integrate an application processor, which mainly handles operating systems, user interfaces, applications, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 880.
The handset also includes a power supply 890 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 880 via a power management system to manage charging, discharging, and power consumption.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not 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 of installation package configuration files excluding 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 a first installation package configuration file of the N plug-ins according to the plug-in identification of the target plug-in, wherein the target plug-in is any one plug-in of the N plug-ins;
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 injecting corresponding codes into the first installation package configuration file and the second installation package configuration file respectively 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, wherein a program is stored on the computer storage medium, and the program realizes the configuration method of the plug-in when being executed by a processor.
The embodiment of the application also provides a processor, wherein the processor is used for running the program, and the configuration method of the plug-in is executed when the program runs.
The embodiment of the application also provides terminal equipment, the equipment comprises a processor, a memory and a program which is stored on the memory and can run on the processor, and the step of the configuration method of the plug-in is realized when the processor executes the program.
The present application also provides a computer program product adapted to perform the steps of the method of configuring a plug-in as described above when executed on a data processing device.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the apparatus and the module described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The 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 computer storage media 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 that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
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 an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, 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 above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in 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 of installation package configuration files excluding 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 a first installation package configuration file of the N plug-ins according to the plug-in identification of the target plug-in, wherein the target plug-in is any one plug-in of the N plug-ins;
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 injecting corresponding codes into the first installation package configuration file and the second installation package configuration file respectively to complete the configuration of the plug-in of the target sub-application program.
2. The method according to claim 1, wherein the obtaining the first installation package configuration file of the N plug-ins according to the plug-in identifier of the target plug-in comprises:
when the version number of each plug-in the N plug-ins is successfully matched with the version number of a plug-in a first target plug-in, determining an installation package configuration file corresponding to the plug-in the first target plug-in successfully matched with the version number of the N plug-ins 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 of claim 2, further comprising:
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, obtaining the incremental package configuration file corresponding to the N plug-ins from a database corresponding to a target application program, wherein the target application subprogram is contained in the target application program;
and generating a first installation package configuration file of the N plugins according to the increment package configuration file corresponding to the N plugins and the installation package configuration file of the plugin which is not matched with the version numbers of the N plugins in the first target plugin.
4. The method of claim 2, further comprising:
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 the 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 increment package configuration file of the second plug-in and the installation package configuration file of the plug-in which the version number of the first target plug-in does not match with the version number of the second plug-in.
5. The method of claim 1, further comprising:
when the N plugins comprise M plugins matched with the plugin identifiers of the plugins in the local database and P plugins not matched with the plugin identifiers of the plugins in the local database, acquiring a first installation package configuration file 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 plugins with the version numbers of the plugins in a second target plugin to obtain a matching result, wherein the second target plugin is the plugin in the local database, and the plugin numbers of the plugins are matched with the plugin identifiers of the M plugins;
and acquiring the first installation package configuration files of the M plug-ins according to the matching result.
6. The method of claim 5, further comprising:
when the matching result is that the version numbers of the M plugins are not matched with the version number of the plugin in the second target plugin, obtaining the incremental package configuration files of the M plugins from the database corresponding to the target application program, and generating a first installation package configuration file of the M plugins according to the incremental package configuration files of the M plugins and the installation package configuration file of the plugin in the second target plugin, wherein the installation package configuration file of the plugin in the second target plugin is not matched with the version numbers of the M plugins;
when the matching result is that the version numbers of the M plug-ins and the version numbers of the plug-ins in the local database are successfully matched, determining the installation package configuration file of the plug-in which the matching with the version numbers of the M plug-ins is successful in the second target plug-in as a first installation package configuration file of the M plug-ins;
when the M plugins include 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 increment package configuration file of the fourth plug-in and the installation package configuration file of the plug-in the second target plug-in, which does not match with the version number of the fourth plug-in.
7. An arrangement for deploying a plug-in, comprising:
the system comprises a first obtaining unit, a second obtaining unit and a third obtaining unit, wherein the first obtaining unit is used for obtaining attribute information corresponding to a target sub application program, the attribute information comprises version information of N plug-ins corresponding to the target sub application program and information of installation package configuration files excluding the N plug-ins in the target sub application program, and N is a positive integer greater than or equal to 1;
a second obtaining unit, configured to obtain, according to the plug-in identifier of the target plug-in, a first installation package configuration file of the N plug-ins when the plug-in identifier of the target plug-in matches with the plug-in identifier of a plug-in a local database, where the target plug-in is any one of the N plug-ins;
a third obtaining unit, configured to obtain, according to the information of the installation package configuration file excluding the N plug-ins in the target sub-application, a second installation package configuration file excluding the N plug-ins in the target sub-application;
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 according to claim 7, wherein the second obtaining 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 a plug-in a first target plug-in, determining an installation package configuration file corresponding to the plug-in the first target plug-in successfully matched with the version number of the N plug-ins 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 configured to store program code and the processor is configured to invoke the program code stored in the memory to perform the method of any of claims 1-6.
10. A computer storage medium characterized in that it comprises instructions which, when run on a computer, cause the computer to perform the method of any one 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 true CN112286586A (en) 2021-01-29
CN112286586B 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783515A (en) * 2021-02-08 2021-05-11 腾讯科技(深圳)有限公司 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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090785B (en) * 2014-06-19 2017-12-29 小米科技有限责任公司 Application program provides method, apparatus and system
CN105407130A (en) * 2015-09-25 2016-03-16 成都趣点科技有限公司 Mobile client plug-in system and mobile client plug-in processing method
CN106095458B (en) * 2016-06-20 2018-12-11 腾讯科技(深圳)有限公司 The management method and device of plug-in unit in a kind of application program
CN109032691B (en) * 2018-06-25 2020-12-15 腾讯科技(深圳)有限公司 Applet running method and device and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783515A (en) * 2021-02-08 2021-05-11 腾讯科技(深圳)有限公司 Plug-in control method and device and storage medium
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

Also Published As

Publication number Publication date
CN112286586B (en) 2024-02-27

Similar Documents

Publication Publication Date Title
CN105302587B (en) Data-updating method and device
CN108897562B (en) Installation package updating method, device, medium and equipment
CN106598584B (en) Method, device and system for processing resource file
CN109857403B (en) Page updating method and device, page processing method and device
CN106502703B (en) Function calling method and device
EP3174253A1 (en) Message withdrawal method and apparatus, computer program and recording medium
CN104252364A (en) Increment updating method, equipment and system
CN111142930B (en) Installation package file packaging method and device, terminal device and storage medium
CN106095458A (en) The management method of plug-in unit and device in a kind of application program
WO2011095914A1 (en) Systems, methods, and apparatuses for facilitating distribution of firmware updates
CN110058850B (en) Application development method and device and storage medium
CN112286586B (en) Plug-in configuration method and related equipment
US9742900B2 (en) Method, terminal device and storage medium for displaying information
CN114185491B (en) Partition file downloading method and device, storage medium and computer equipment
CN106713608B (en) Application function state modification method and device and terminal
CN112579264B (en) Application program jumping method, terminal and computer storage medium
CN108228230A (en) Upgrade method, terminal and the computer readable storage medium of UFS firmwares
CN106953898B (en) Method and device for acquiring software package
CN108090345B (en) Linux system external command execution method and device
CN107992498B (en) Method and system for importing data into data warehouse
CN103607431B (en) Mobile terminal resource processing method, device and equipment
CN105530239A (en) Multimedia data obtaining method and device
CN107277031A (en) A kind of Internet video method for down loading, device, storage medium and terminal
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

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