Installation package generation method and device

By preconfiguring the channel access interface and generating intermediate installation packages, the problem of low multi-channel adaptation efficiency is solved, and efficient installation package generation and channel access is achieved.

CN112905194BActive Publication Date: 2025-02-14DOUYIN VISION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110289313.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-18
Publication Date
2025-02-14
Estimated Expiration
2041-03-18

AI Technical Summary

Technical Problem

Applications such as games running under Android need to be published on multiple channels, and login, payment and other functions are implemented through channels, resulting in developers needing to adapt to each channel, integrate SDK and configure installation packages, which is relatively low in efficiency .

Method used

By obtaining the basic installation package of the target application and the supplementary installation packages of multiple channels to be published, pre-configure the channel access interface, configure the call parameters to generate the intermediate installation package, and merge the intermediate installation package with the supplementary installation package to generate the target application Install packages in each channel.

Benefits of technology

Developers need to configure installation packages one by one according to the differences in each channel, which improves efficiency and simplifies the development process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112905194B_ABST
    Figure CN112905194B_ABST
Patent Text Reader

Abstract

The present disclosure provides an installation package generation method and device, which first obtains a basic installation package of a target application and a plurality of supplementary installation packages corresponding to channels to be released; then, configures the call parameters in the channel access interface in the basic installation package to generate an intermediate installation package corresponding to each channel to be released; finally, for each channel to be released, merges the intermediate installation package corresponding to the channel to be released and the supplementary installation package to generate a target installation package corresponding to the target application in the channel to be released. The embodiment of the present disclosure integrates the channel access interface in the original installation package of the target application first, and then automatically generates the installation packages for each channel. The developer does not need to configure the installation packages for different channels one by one according to the differences between the channels, and the efficiency is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method and device for generating an installation package. Background Art

[0002] At present, games and other applications running on the Android system need to be released on a variety of different channels, and use the channels to implement functions such as login and payment. In order to be released on the channels, it is necessary to access the corresponding software development kit (SDK) of the channel, and the corresponding application programming interface (API) of the channel can be called through the corresponding SDK to implement functions such as login and payment.

[0003] Due to the large number of channels on the market, after developers develop a new application, they need to adapt it for each channel to be released and integrate the SKD of each channel into the application's installation package, which is inefficient. Summary of the invention

[0004] The embodiments of the present disclosure at least provide a method and device for generating an installation package.

[0005] In a first aspect, an embodiment of the present disclosure provides a method for generating an installation package, comprising:

[0006] Obtain a basic installation package of a target application and a plurality of supplementary installation packages corresponding to the channels to be released; wherein the supplementary installation package includes a software development kit for connecting the target application to the application program interface corresponding to the channel to be released; and the basic installation package has a pre-configured channel access interface;

[0007] Configuring the calling parameters in the channel access interface in the basic installation package to generate an intermediate installation package corresponding to each channel;

[0008] For each of the to-be-released channels, the intermediate installation package corresponding to the channel and the supplementary installation package are merged to generate a target installation package corresponding to the channel for the target application.

[0009] In an optional implementation, the basic installation package is generated by the following steps:

[0010] Obtaining installation data of the target application;

[0011] The channel access interface is integrated into the installation data of the target application, and the installation data integrated with the channel access interface is compiled to generate the basic installation package.

[0012] In an optional implementation, configuring the calling parameters in the channel access interface in the basic installation package to generate an intermediate installation package corresponding to each channel includes:

[0013] For each of the channels to be released, based on the preset calling parameters corresponding to the type of the channel to be released, the calling parameters in the channel access interface in the basic installation package are configured to obtain the intermediate installation packages corresponding to each of the channels to be released.

[0014] In an optional implementation, for each channel to be released, merging the intermediate installation package and the supplementary installation package corresponding to the channel to generate a target installation package corresponding to the channel for the target application includes:

[0015] For each of the to-be-released channels, the intermediate installation package and the supplementary installation package are respectively decompiled to obtain code data and resource data of the intermediate installation package and the supplementary installation package;

[0016] Merging the acquired resource data of the supplementary installation package with the intermediate installation package, and merging the acquired code data of the supplementary installation package with the intermediate installation package;

[0017] Based on the merged resource data and the merged code data, a target installation package corresponding to the to-be-released channel is generated.

[0018] In an optional implementation manner, merging the resource data of the supplementary installation package corresponding to the to-be-released channel and the intermediate installation package includes:

[0019] Obtaining a file identifier of each resource file in the resource data of the intermediate installation package;

[0020] Based on the file identifier of each resource file in the resource data of the intermediate installation package, updating the file identifier of each resource file in the corresponding resource data of the supplementary installation package;

[0021] The updated resource data of the supplementary installation package is merged into the resource data of the corresponding intermediate installation package.

[0022] In an optional implementation, after updating the file identifier of each resource file in the resource data of the supplementary installation package corresponding to the channel to be released, and before merging the code data of the supplementary installation package corresponding to the channel to be released with the intermediate installation package, the method further includes:

[0023] Based on the file identifier of each resource file in the resource data of the supplementary installation package before updating and the file identifier after updating, the calling file identifier in the code data of the supplementary installation package is updated.

[0024] In an optional implementation, generating a target installation package corresponding to the to-be-released channel based on the merged resource data and the merged code data includes:

[0025] The merged resource data and the merged code data are compiled to obtain a target installation package corresponding to the channel to be released.

[0026] In a second aspect, the present disclosure also provides an installation package generation device, including:

[0027] An acquisition module, used to acquire a basic installation package of a target application and a plurality of supplementary installation packages corresponding to the channels to be released; wherein the supplementary installation package includes a software development kit for connecting the target application to the application program interface corresponding to the channel to be released; and the basic installation package has a pre-configured channel access interface;

[0028] A first generating module, configured to configure the calling parameters in the channel access interface in the basic installation package, and generate an intermediate installation package corresponding to each channel;

[0029] The second generation module is used to merge the intermediate installation package corresponding to each channel to be released with the supplementary installation package to generate a target installation package corresponding to the channel for the target application.

[0030] In an optional implementation manner, the device further includes a third generating module, configured to:

[0031] Obtaining installation data of the target application;

[0032] The channel access interface is integrated into the installation data of the target application, and the installation data integrated with the channel access interface is compiled to generate the basic installation package.

[0033] In an optional implementation manner, the first generating module is specifically configured to:

[0034] For each of the channels to be released, based on the preset calling parameters corresponding to the type of the channel to be released, the calling parameters in the channel access interface in the basic installation package are configured to obtain the intermediate installation packages corresponding to each of the channels to be released.

[0035] In an optional implementation manner, the second generating module is specifically configured to:

[0036] For each of the to-be-released channels, the intermediate installation package and the supplementary installation package are respectively decompiled to obtain code data and resource data of the intermediate installation package and the supplementary installation package;

[0037] Merging the acquired resource data of the supplementary installation package with the intermediate installation package, and merging the acquired code data of the supplementary installation package with the intermediate installation package;

[0038] Based on the merged resource data and the merged code data, a target installation package corresponding to the to-be-released channel is generated.

[0039] In an optional implementation manner, when the second generation module merges the resource data of the supplementary installation package corresponding to the to-be-released channel with the intermediate installation package, it is specifically used to:

[0040] Obtaining a file identifier of each resource file in the resource data of the intermediate installation package;

[0041] Based on the file identifier of each resource file in the resource data of the intermediate installation package, updating the file identifier of each resource file in the corresponding resource data of the supplementary installation package;

[0042] The updated resource data of the supplementary installation package is merged into the resource data of the corresponding intermediate installation package.

[0043] In an optional implementation manner, after updating the file identifier of each resource file in the resource data of the supplementary installation package corresponding to the channel to be released and before merging the code data of the supplementary installation package corresponding to the channel to be released with the intermediate installation package, the second generation module is further configured to:

[0044] Based on the file identifier of each resource file in the resource data of the supplementary installation package before updating and the file identifier after updating, the calling file identifier in the code data of the supplementary installation package is updated.

[0045] In an optional implementation manner, when the second generation module generates a target installation package corresponding to the to-be-released channel based on the merged resource data and the merged code data, it is specifically used to:

[0046] The merged resource data and the merged code data are compiled to obtain a target installation package corresponding to the channel to be released.

[0047] In a third aspect, an embodiment of the present disclosure further provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are performed.

[0048] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect or any possible implementation of the first aspect are executed.

[0049] The installation package generation method and device provided by the disclosed embodiment can obtain a basic installation package of a target application with a pre-configured channel access interface, and a supplementary installation package constructed based on a channel development toolkit, and then configure the call parameters in the channel access interface in the basic installation package to generate an intermediate installation package corresponding to each channel, and finally merge the supplementary installation package and the intermediate installation package corresponding to each channel to generate a target installation package corresponding to each channel of the target application. The disclosed embodiment integrates the channel access interface in the original installation package of the target application first, and then automatically generates the installation packages of each channel. The developer does not need to configure the installation packages of different channels one by one according to the differences of each channel, and the efficiency is high.

[0050] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0052] Figure 1 A flowchart of a method for generating an installation package provided by an embodiment of the present disclosure is shown;

[0053] Figure 2 A flowchart showing a specific method of using a channel access interface to call a channel application programming interface in the method provided by an embodiment of the present disclosure;

[0054] Figure 3 A flowchart of another installation package generation method provided by an embodiment of the present disclosure is shown;

[0055] Figure 4 A schematic diagram of an installation package generating device provided by an embodiment of the present disclosure is shown;

[0056] Figure 5 A schematic diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0058] Games and other applications running on the Android system need to be released on a variety of different channels, and use the channels to implement login, payment and other functions. Due to the large number of channels on the market, after developers develop a new application, they need to adapt each channel and integrate the SKD of each channel into the application's installation package before calling the login and payment APIs corresponding to the channel. This process is usually set up by developers for each channel one by one, which has high labor costs and low efficiency.

[0059] Based on the above research, the present disclosure provides an installation package generation method, which can first integrate the channel access interface in the original installation package of the target application, and then automatically generate installation packages for each channel. Developers do not need to configure installation packages for different channels one by one according to the differences between each channel, and the efficiency is higher.

[0060] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.

[0061] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0062] To facilitate understanding of this embodiment, a method for generating an installation package disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the method for generating an installation package provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities.

[0063] The following describes the installation package generation method provided by the embodiment of the present disclosure by taking the execution subject as a terminal device as an example.

[0064] See also Figure 1 FIG. 1 is a flowchart of a method for generating an installation package provided by an embodiment of the present disclosure, wherein the method comprises steps S101 to S103, wherein:

[0065] S101: Obtain a basic installation package of a target application and a plurality of supplementary installation packages corresponding to channels to be released; wherein the supplementary installation package includes a software development kit for connecting the target application to an application program interface corresponding to the channel to be released; and the basic installation package has a pre-configured channel access interface.

[0066] In this step, the terminal device can obtain the basic installation package of the target program transmitted by the user. The basic installation package can store the installation data of the target application and a pre-configured channel access interface. The installation data can be the files required to install the target program on the computer device. The target application can be an application such as games running on the Android system. The channel can be a distribution channel for the target application. The channel can provide services such as downloading, updating, payment, and logging in to the target application. There are many types of channels. Usually, the application needs to access the SDK corresponding to the channel to use the services provided by the channel.

[0067] In a possible implementation, the basic installation package may be generated by the following steps:

[0068] Obtaining installation data of the target application;

[0069] The channel access interface is integrated into the installation data of the target application, and the installation data integrated with the channel access interface is compiled to generate the basic installation package.

[0070] The channel access interface may be pre-configured, and the target application can call the corresponding API through the channel access interface and the SDK of the preset channel.

[0071] Here, the channel access interface can be set according to demand, and can include all APIs required by the SDKs of multiple channels to be released. When the channel access interface is run, it can identify the preset channel identifier and call the API of the channel corresponding to the channel identifier.

[0072] Furthermore, the terminal device can also obtain supplementary installation packages corresponding to multiple channels. The supplementary installation packages may contain a software development kit for connecting the target application to the application interface corresponding to the channel to be released, which is built based on the development kit SDK of the channel.

[0073] Here, the installation package can be in apk format.

[0074] S102: configuring the calling parameters in the channel access interface in the basic installation package to generate an intermediate installation package corresponding to each channel.

[0075] In a possible implementation, for each of the channels to be released, the calling parameters in the channel access interface in the basic installation package can be configured based on preset calling parameters corresponding to the type of the channel to be released, so as to obtain intermediate installation packages corresponding to each of the channels to be released.

[0076] In this step, the terminal device can configure the calling parameters in the channel access interface in the basic installation package, configure different types of channels for the basic installation package, and adjust the calling parameters to the parameters corresponding to the channel type to generate an intermediate installation package corresponding to each channel.

[0077] Here, the channel type may be Huawei, Tencent, etc. The number of generated intermediate installation packages may be the same as the number of channel types.

[0078] After the intermediate installation package is configured, the channel access interface is set to a state where the SDK of the channel corresponding to the calling parameter can be used to call the API of the channel corresponding to the calling parameter.

[0079] S103: For each channel to be released, merge the intermediate installation package corresponding to the channel with the supplementary installation package to generate a target installation package corresponding to the channel for the target application.

[0080] In this step, the terminal device can merge the intermediate installation package and the supplementary installation package corresponding to the channel to obtain the target installation package. In this way, when the target installation package is installed on the computer device, the target application can access the interface through the channel and use the SDK of the corresponding channel to make API calls.

[0081] In some possible implementations, S103 may include the following steps:

[0082] 1) For each of the to-be-released channels, the intermediate installation package and the supplementary installation package are respectively decompiled to obtain code data and resource data of the intermediate installation package and the supplementary installation package.

[0083] In this step, a preset compilation tool, such as apktool, can be used to decompile each intermediate installation package to obtain the code data and resource data of each intermediate installation package, where the code data can be the running logic code, library files, etc. of the target application, and the resource data can include the texture resources, sound resources, etc. of the target application.

[0084] Furthermore, the supplementary installation package may be decompiled using a preset compilation tool to obtain code data and resource data of each supplementary installation package.

[0085] 2) merging the acquired resource data of the supplementary installation package with the intermediate installation package, and merging the acquired code data of the supplementary installation package with the intermediate installation package.

[0086] In this step, the resource data of the supplementary installation package and the intermediate installation package corresponding to the channel may be merged respectively, and then the code data of the supplementary installation package and the intermediate installation package corresponding to the channel may be merged respectively.

[0087] Wherein, step 2) may include:

[0088] Obtaining a file identifier of each resource file in the resource data of the intermediate installation package;

[0089] Based on the file identifier of each resource file in the resource data of the intermediate installation package, updating the file identifier of each resource file in the corresponding resource data of the supplementary installation package;

[0090] The updated resource data of the supplementary installation package is merged into the resource data of the corresponding intermediate installation package.

[0091] In this step, since the intermediate installation package and the supplementary installation package are two independent installation packages, there may be resource files with the same file identifier between the two, and adaptive adjustments need to be made. After obtaining the resource data of the intermediate installation package and the supplementary installation package, the file identifier of each resource file in the intermediate installation package can be obtained. Specifically, the public.xml file generated during the decompilation process can be parsed to obtain the ID of each resource file; thereafter, the file identifier of the resource file in the resource data of the supplementary installation package can be updated based on the file identifier of the resource file in the resource data of the intermediate installation package. Specifically, the public.xml file in the supplementary installation package can be modified, and the file identifier of the resource file in the supplementary installation package can be modified according to the rule of incremental increase based on the maximum ID in the intermediate installation package; then, the intermediate installation package and the public.xml corresponding to the supplementary installation package are merged, and the resource file of the supplementary installation package is stored in the directory corresponding to the resource file of the intermediate installation package.

[0092] Here, after updating the file identifier of each resource file in the resource data of the supplementary installation package corresponding to the channel to be released, and before merging the code data of the supplementary installation package corresponding to the channel to be released with the intermediate installation package, the method may further include:

[0093] Based on the file identifier of each resource file in the resource data of the supplementary installation package before updating and the file identifier after updating, the calling file identifier in the code data of the supplementary installation package is updated.

[0094] In this step, since the file identifier of the resource file in the supplementary installation package is updated, the calling file identifier in the code data of the supplementary installation package needs to be updated so that the target application can correctly call the resource file when calling it using the SDK corresponding to the channel. Specifically, the smali file in the decompilation directory corresponding to the supplementary installation package can be scanned, and after detecting the call of R.java, the corresponding replacement can be performed.

[0095] 3) Based on the merged resource data and the merged code data, a target installation package corresponding to the to-be-released channel is generated.

[0096] Exemplarily, the merged resource data and the merged code data may be compiled to obtain a target installation package corresponding to the channel to be released.

[0097] In this step, a compilation tool may be used to compile the merged resource data and the merged code data to generate target installation packages corresponding to various channels to be released.

[0098] Before generating the target installation package, you can also replace specific resources required by the channel, such as icon resources, splash screen image resources, etc., according to the requirements of each channel to be released.

[0099] The installation package generation method provided by the disclosed embodiment can obtain a basic installation package of a target application with a pre-configured channel access interface, and a supplementary installation package constructed based on a channel development toolkit, and then configure the call parameters in the channel access interface in the basic installation package to generate an intermediate installation package corresponding to each channel, and finally merge the supplementary installation package and the intermediate installation package corresponding to each channel to generate a target installation package corresponding to each channel of the target application. The disclosed embodiment integrates the channel access interface in the original installation package of the target application first, and then automatically generates the installation packages of each channel to be released. The developer does not need to configure the installation packages of different channels one by one according to the differences of each channel, and the efficiency is high.

[0100] See also Figure 2 As shown, it is a flowchart of a specific method of using a channel access interface to call a channel application programming interface in the method provided by the embodiment of the present disclosure, and the method includes: when an application needs to call a channel interface, the application accesses IChannelApi (channel access interface), determines RealChannel (real access channel) based on the call parameters set by IChannelApi, and uses the SDK of RealChannel to call the channel interface. In this way, when the developer of the application develops an installation package for accessing a channel, he only needs to connect the application to the channel call interface, and does not need to develop for each channel, which is more efficient.

[0101] See also Figure 3 As shown, it is a flowchart of another installation package generation method provided by an embodiment of the present disclosure, the method comprising: inputting a mother package (intermediate installation package) containing a channel access interface, building a channel package body (supplementary installation package) based on a channel SDK, and decompiling the target and supplementary installation packages to obtain the resources and codes of the supplementary installation package and the intermediate installation package, then merging the resources of the supplementary installation package and the intermediate installation package, and finally compiling the merged resources and codes to obtain the target installation package containing the channel SDK.

[0102] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0103] Based on the same inventive concept, an installation package generation device corresponding to the installation package generation method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned installation package generation method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0104] Reference Figure 4 , which is a schematic diagram of the architecture of an installation package generation device provided by an embodiment of the present disclosure, the installation package generation device 400 includes: an acquisition module 410, a first generation module 420, and a second generation module 430; wherein,

[0105] The acquisition module 410 is used to acquire a basic installation package of a target application and a plurality of supplementary installation packages corresponding to the channels to be released; wherein the supplementary installation package includes a software development kit for connecting the target application to the application program interface corresponding to the channel to be released; and the basic installation package has a pre-configured channel access interface;

[0106] A first generating module 420, configured to configure the calling parameters in the channel access interface in the basic installation package, and generate an intermediate installation package corresponding to each channel;

[0107] The second generation module 430 is used to merge the intermediate installation package corresponding to each channel to be released with the supplementary installation package to generate a target installation package corresponding to the channel for the target application.

[0108] The disclosed embodiment can integrate the channel access interface into the original installation package of the target application first, and then automatically generate installation packages for each channel. This eliminates the need for developers to configure installation packages for different channels one by one based on the differences between the channels, and is highly efficient.

[0109] In an optional implementation, the installation package generating device 400 further includes a third generating module 440, which is used to:

[0110] Obtaining installation data of the target application;

[0111] The channel access interface is integrated into the installation data of the target application, and the installation data integrated with the channel access interface is compiled to generate the basic installation package.

[0112] In an optional implementation manner, the first generating module 420 is specifically configured to:

[0113] For each of the channels to be released, based on the preset calling parameters corresponding to the type of the channel to be released, the calling parameters in the channel access interface in the basic installation package are configured to obtain the intermediate installation packages corresponding to each of the channels to be released.

[0114] In an optional implementation manner, the second generating module 430 is specifically configured to:

[0115] For each of the to-be-released channels, the intermediate installation package and the supplementary installation package are respectively decompiled to obtain code data and resource data of the intermediate installation package and the supplementary installation package;

[0116] Merging the acquired resource data of the supplementary installation package with the intermediate installation package, and merging the acquired code data of the supplementary installation package with the intermediate installation package;

[0117] Based on the merged resource data and the merged code data, a target installation package corresponding to the to-be-released channel is generated.

[0118] In an optional implementation manner, when merging the resource data of the supplementary installation package corresponding to the to-be-released channel and the intermediate installation package, the second generation module 430 is specifically configured to:

[0119] Obtaining a file identifier of each resource file in the resource data of the intermediate installation package;

[0120] Based on the file identifier of each resource file in the resource data of the intermediate installation package, updating the file identifier of each resource file in the corresponding resource data of the supplementary installation package;

[0121] The updated resource data of the supplementary installation package is merged into the resource data of the corresponding intermediate installation package.

[0122] In an optional implementation manner, after updating the file identifier of each resource file in the resource data of the supplementary installation package corresponding to the channel to be released and before merging the code data of the supplementary installation package corresponding to the channel to be released with the intermediate installation package, the second generation module 430 is further configured to:

[0123] Based on the file identifier of each resource file in the resource data of the supplementary installation package before updating and the file identifier after updating, the calling file identifier in the code data of the supplementary installation package is updated.

[0124] In an optional implementation manner, when the second generation module 430 generates the target installation package corresponding to the to-be-released channel based on the merged resource data and the merged code data, it is specifically used to:

[0125] The merged resource data and the merged code data are compiled to obtain a target installation package corresponding to the channel to be released.

[0126] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0127] Based on the same technical concept, the embodiment of the present disclosure also provides a computer device. Figure 5 As shown, it is a schematic diagram of the structure of a computer device 500 provided in an embodiment of the present disclosure, including a processor 501, a memory 502, and a bus 503. Among them, the memory 502 is used to store execution instructions, including a memory 5021 and an external memory 5022; the memory 5021 here is also called an internal memory, which is used to temporarily store the operation data in the processor 501, and the data exchanged with the external memory 5022 such as a hard disk. The processor 501 exchanges data with the external memory 5022 through the memory 5021. When the computer device 500 is running, the processor 501 communicates with the memory 502 through the bus 503, so that the processor 501 executes the following instructions:

[0128] Obtain a basic installation package of a target application and a plurality of supplementary installation packages corresponding to the channels to be released; wherein the supplementary installation package includes a software development kit for connecting the target application to the application program interface corresponding to the channel to be released; and the basic installation package has a pre-configured channel access interface;

[0129] Configuring the calling parameters in the channel access interface in the basic installation package to generate an intermediate installation package corresponding to each channel;

[0130] For each of the to-be-released channels, the intermediate installation package corresponding to the channel and the supplementary installation package are merged to generate a target installation package corresponding to the channel for the target application.

[0131] In a possible implementation manner, the processor 501 is further configured to execute:

[0132] Obtaining installation data of the target application;

[0133] The channel access interface is integrated into the installation data of the target application, and the installation data integrated with the channel access interface is compiled to generate the basic installation package.

[0134] In a possible implementation manner, in the instructions executed by the processor 501, configuring the call parameters in the channel access interface in the basic installation package to generate an intermediate installation package corresponding to each channel includes:

[0135] For each of the channels to be released, based on the preset calling parameters corresponding to the type of the channel to be released, the calling parameters in the channel access interface in the basic installation package are configured to obtain the intermediate installation packages corresponding to each of the channels to be released.

[0136] In a possible implementation manner, the instructions executed by the processor 501, wherein for each channel to be released, merging the intermediate installation package and the supplementary installation package corresponding to the channel to generate a target installation package corresponding to the target application in the channel, includes:

[0137] For each of the to-be-released channels, the intermediate installation package and the supplementary installation package are respectively decompiled to obtain code data and resource data of the intermediate installation package and the supplementary installation package;

[0138] Merging the acquired resource data of the supplementary installation package with the intermediate installation package, and merging the acquired code data of the supplementary installation package with the intermediate installation package;

[0139] Based on the merged resource data and the merged code data, a target installation package corresponding to the to-be-released channel is generated.

[0140] In a possible implementation manner, in the instructions executed by the processor 501, merging the resource data of the supplementary installation package corresponding to the to-be-released channel and the intermediate installation package includes:

[0141] Obtaining a file identifier of each resource file in the resource data of the intermediate installation package;

[0142] Based on the file identifier of each resource file in the resource data of the intermediate installation package, updating the file identifier of each resource file in the corresponding resource data of the supplementary installation package;

[0143] The updated resource data of the supplementary installation package is merged into the resource data of the corresponding intermediate installation package.

[0144] In a possible implementation manner, after updating the file identifier of each resource file in the resource data of the supplementary installation package corresponding to the channel to be released and before merging the code data of the supplementary installation package corresponding to the channel to be released with the intermediate installation package, the processor 501 is further configured to execute:

[0145] Based on the file identifier of each resource file in the resource data of the supplementary installation package before updating and the file identifier after updating, the calling file identifier in the code data of the supplementary installation package is updated.

[0146] In a possible implementation manner, in the instructions executed by the processor 501, generating a target installation package corresponding to the to-be-released channel based on the merged resource data and the merged code data includes:

[0147] The merged resource data and the merged code data are compiled to obtain a target installation package corresponding to the channel to be released.

[0148] The present disclosure also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of the installation package generation method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0149] The computer program product of the installation package generation method provided in the embodiment of the present disclosure includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the steps of the installation package generation method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.

[0150] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0151] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0152] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0153] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0154] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0155] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for generating an installation package, characterized in that: include: Obtaining a basic installation package of a target application and a plurality of supplementary installation packages corresponding to the channels to be released; wherein the supplementary installation package includes a software development kit for connecting the target application to the application program interface corresponding to the channel to be released; and the basic installation package has a pre-configured integrated channel access interface; Configuring the calling parameters in the channel access interface in the basic installation package to generate an intermediate installation package corresponding to each channel to be released; For each of the channels to be released, merging the intermediate installation package corresponding to the channel to be released and the supplementary installation package to generate a target installation package of the target application corresponding to the channel to be released; Among them, the channel access interface in the basic installation package is set according to needs, and the channel access interface in the basic installation package includes all application program interfaces required by the software development kits of multiple channels to be released. When the channel access interface in the basic installation package is run, it identifies the preset channel identifier of each channel to be released, and calls the application program interface of the channel to be released corresponding to the channel identifier.

2. The installation package generation method according to claim 1, characterized in that: Generate the basic installation package by following the steps below: Obtaining installation data of the target application; The channel access interface is integrated into the installation data of the target application, and the installation data integrated with the channel access interface is compiled to generate the basic installation package.

3. The installation package generation method according to claim 1, characterized in that: The configuring of the calling parameters in the channel access interface in the basic installation package to generate an intermediate installation package corresponding to each channel to be released includes: For each of the channels to be released, based on the preset calling parameters corresponding to the type of the channel to be released, the calling parameters in the channel access interface in the basic installation package are configured to obtain the intermediate installation packages corresponding to each of the channels to be released.

4. The installation package generation method according to claim 1, characterized in that: For each of the channels to be released, merging the intermediate installation package and the supplementary installation package corresponding to the channel to be released to generate a target installation package of the target application corresponding to the channel to be released, including: For each of the to-be-released channels, the intermediate installation package and the supplementary installation package are respectively decompiled to obtain code data and resource data of the intermediate installation package and the supplementary installation package; Merging the acquired resource data of the supplementary installation package with the intermediate installation package, and merging the acquired code data of the supplementary installation package with the intermediate installation package; Based on the merged resource data and the merged code data, a target installation package corresponding to the to-be-released channel is generated.

5. The installation package generation method according to claim 4, characterized in that: The step of merging the resource data of the supplementary installation package corresponding to the to-be-released channel with the intermediate installation package includes: Obtaining a file identifier of each resource file in the resource data of the intermediate installation package; Based on the file identifier of each resource file in the resource data of the intermediate installation package, updating the file identifier of each resource file in the corresponding resource data of the supplementary installation package; The updated resource data of the supplementary installation package is merged into the resource data of the corresponding intermediate installation package.

6. The method for generating an installation package according to claim 5, characterized in that: After updating the file identifier of each resource file in the resource data of the supplementary installation package corresponding to the channel to be released, and before merging the code data of the supplementary installation package corresponding to the channel to be released with the intermediate installation package, the method further includes: Based on the file identifier of each resource file in the resource data of the supplementary installation package before updating and the file identifier after updating, the calling file identifier in the code data of the supplementary installation package is updated.

7. The installation package generation method according to claim 4, characterized in that: The generating a target installation package corresponding to the to-be-released channel based on the merged resource data and the merged code data includes: The merged resource data and the merged code data are compiled to obtain a target installation package corresponding to the channel to be released.

8. An installation package generating device, characterized in that: include: an acquisition module, for acquiring a basic installation package of a target application and a plurality of supplementary installation packages corresponding to channels to be released; wherein the supplementary installation package includes a software development kit for connecting the target application to an application program interface corresponding to the channel to be released; and the basic installation package has a pre-configured integrated channel access interface; A first generating module, configured to configure the calling parameters in the channel access interface in the basic installation package, and generate an intermediate installation package corresponding to each channel; A second generation module is used to merge the intermediate installation package corresponding to each channel to be released with the supplementary installation package to generate a target installation package corresponding to the channel for the target application; Among them, the channel access interface in the basic installation package is set according to needs, and the channel access interface in the basic installation package includes all application program interfaces required by the software development kits of multiple channels to be released. When the channel access interface in the basic installation package is run, it identifies the preset channel identifier of each channel to be released, and calls the application program interface of the channel to be released corresponding to the channel identifier.

9. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the installation package generation method as described in any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the installation package generation method according to any one of claims 1 to 7 are executed.

Citation Information

Patent Citations

  • Method and device for connecting game software into target channel SDK

    CN107145373A

  • Channel package generation method and device, storage medium and electronic device

    CN108829405A