A resource providing method and device

By combining and merging the basic SDKs of resource providers, a merged SDK is generated, which solves the problems of high SDK access threshold and long time in the existing technology, improves access efficiency, and simplifies the access process.

CN113934460BActive Publication Date: 2024-09-13ZHENGZHOU APUS DIGITAL CLOUD INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111189250.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-12
Publication Date
2024-09-13
Estimated Expiration
2041-10-12

AI Technical Summary

Technical Problem

In the existing technology, demanders have high access thresholds, long access times, and low access efficiency when accessing SDKs. They need to manually add multiple basic SDKs one by one, which is complex and time-consuming.

Method used

By obtaining multiple basic SDKs from the resource provider, combining and merging them according to the business needs of the demander, a merged SDK is generated and provided to the demander to implement specific functions and reduce the access threshold and time.

Benefits of technology

It improves the efficiency of SDK access, reduces the access threshold and time, and simplifies the access process of the demand side, allowing the demand side to realize business needs more quickly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113934460B
    Figure CN113934460B
Patent Text Reader

Abstract

The present application discloses a resource provision method and device, the method can obtain multiple basic SDKs provided by a resource provider, one basic SDK is used to implement a preset function; based on the business needs of at least one resource demander, the multiple basic SDKs are combined to obtain at least one SDK combination, one SDK combination is used to implement at least one preset function under a business need; the basic SDKs in the at least one SDK combination are merged respectively to obtain at least one merged SDK, one merged SDK is used to implement at least one preset function under a business need; the at least one merged SDK is provided to the at least one resource demander, so that the target resource demander can realize at least one preset function required for its own business by accessing the target merged SDK. The method and device can lower the threshold for resource demanders to access SDKs, reduce access time, and improve access efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource providing method and device. Background Art

[0002] A software development kit (SDK) is generally a collection of development tools for building application software, including specific software packages, software frameworks, hardware platforms, operating systems, etc. In specific applications, resource providers provide SDKs to external parties for access and use.

[0003] Currently, when resource providers provide SDKs to the outside world, they either put them in a designated warehouse (such as a Maven warehouse), and the demander goes to the designated warehouse to add dependencies for the SDKs they need to use one by one to access the corresponding SDKs, or they put them on the official website, and the user downloads them locally and manually adds dependencies one by one to access the corresponding SDKs.

[0004] It is not difficult to find that in the current resource provision solution, the demander needs to add as many dependencies as the SDKs they need to access. The access threshold is high, the access time is long, and the access efficiency is low. Summary of the invention

[0005] The embodiments of the present application provide a resource provision method and device to improve the access efficiency of SDK.

[0006] In a first aspect, an embodiment of the present application provides a resource providing method, including:

[0007] Obtain multiple basic SDKs provided by the resource provider, where one basic SDK is used to implement a preset function;

[0008] Based on the business needs of at least one resource demander, the multiple basic SDKs are combined to obtain at least one SDK combination, wherein one SDK combination includes at least one basic SDK, and at least one basic SDK in one SDK combination contains resources, and one SDK combination is used to implement at least one preset function under one business need;

[0009] Merging the basic SDKs in the at least one SDK combination respectively to obtain at least one merged SDK, wherein one SDK combination corresponds to one merged SDK, and one merged SDK is used to implement at least one preset function under one business requirement;

[0010] The at least one merged SDK is provided to the at least one resource demander so that the target resource demander can implement at least one preset function required for its own business by accessing the target merged SDK, wherein the target resource demander is one of the at least one resource demander and the target merged SDK is one of the at least one merged SDK.

[0011] In a second aspect, an embodiment of the present application further provides a resource providing device, including:

[0012] The resource acquisition module is used to obtain multiple basic SDKs provided by the resource provider, wherein one basic SDK is used to implement a preset function;

[0013] A resource combination module, used to combine the multiple basic SDKs to obtain at least one SDK combination based on the business needs of at least one resource demander, wherein one SDK combination includes at least one basic SDK, and at least one basic SDK in one SDK combination contains resources, and one SDK combination is used to implement at least one preset function under one business need;

[0014] A resource merging module, used to merge the basic SDKs in the at least one SDK combination respectively to obtain at least one merged SDK, wherein one SDK combination corresponds to one merged SDK, and one merged SDK is used to implement at least one preset function under one business requirement;

[0015] A resource provision module is used to provide the at least one merged SDK to the at least one resource demander, so that the target resource demander can realize at least one preset function required for its own business by accessing the target merged SDK, wherein the target resource demander is one of the at least one resource demander, and the target merged SDK is one of the at least one merged SDK.

[0016] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the method described in the first aspect are implemented.

[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0018] At least one of the above-mentioned technical solutions adopted in the embodiments of the present application can merge at least one basic SDK of the resource provider into one SDK and provide it to the resource demander according to the business needs of the resource demander, instead of directly providing multiple basic SDKs. Therefore, it is possible to lower the access threshold for the resource demander to access the SDK, reduce the access time, and improve the access efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0020] Figure 1 It is a flowchart of a resource providing method provided in an embodiment of the present application.

[0021] Figure 2 It is a flowchart of a resource providing method provided in another embodiment of the present application.

[0022] Figure 3 yes Figure 1 or Figure 2 A detailed flow chart of step 102 in FIG.

[0023] Figure 4 yes Figure 1 or Figure 2 A detailed flow chart of step 103 in FIG.

[0024] Figure 5 It is a structural diagram of a resource providing device provided in an embodiment of the present application.

[0025] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0027] In order to solve the problem in the related art that when the demander needs to access the SDK, the access threshold is high, the access time is long, and the access efficiency is low, the embodiment of the present application provides a resource provision method and device, which can be implemented by the resource provider to provide resources to the resource demander, and specifically can provide the resource demander with an SDK. The method and device can be executed by an electronic device, such as a terminal device or a server, or the method can be executed by software installed in an electronic device. Among them, the terminal device includes but is not limited to: any one of the smart terminal devices such as a smart phone, a personal computer (PC), a laptop, a tablet computer, an e-reader, an Internet TV, a wearable device, etc.; the server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0028] The following first describes a resource provision method provided in an embodiment of the present application.

[0029] like Figure 1 As shown, a resource providing method provided in an embodiment of the present application may include:

[0030] Step 101: Acquire multiple basic SDKs provided by a resource provider, wherein one basic SDK is used to implement a preset function.

[0031] The resource provider can be any platform that provides SDKs to the outside world. A basic SDK can be an SDK developed by a resource provider to implement a preset function, such as an SDK for network communication, an SDK for cloud control, an SDK for advertising, an SDK for reporting data, an SDK for account management, an SDK for searching, an SDK for downloading, an SDK for dotting, an SDK for upgrading, an SDK for pushing messages, and so on.

[0032] The multiple basic SDKs provided by the resource provider to the outside may be all or part of the basic SDKs of the resource provider. The number of the multiple basic SDKs may be represented by n, where n is an integer greater than 0.

[0033] Optionally, a unique identifier (ID) may be set for each of the above-mentioned multiple basic IDs to distinguish different basic SDKs.

[0034] As an example, the multiple basic SDKs can be numbered according to the number of the multiple basic SDKs, and the basic SDK number can be used as its unique identifier. For example, assuming there are 6 basic SDKs: SDK1, SDK2, SDK3, SDK4, SDK5, their unique identifiers can be: 1, 2, 3, 4, 5, 6 respectively.

[0035] As another example, if the unique identifier of a base SDK is used to determine the unique identifier of the combined SDK, then in order to avoid duplication of the combined unique identifier, the unique identifiers of the above multiple base SDKs can be taken as the factorial of a preset value (such as 2). For example, assuming there are 6 base SDKs: SDK1, SDK2, SDK3, SDK4, SDK5, SDK6, then their unique identifiers can be:

[0036] SDK1:1

[0037] SDK2:2

[0038] SDK3:4

[0039] SDK4:8

[0040] SDK5:16

[0041] SDK6:32

[0042] Optionally, each basic SDK provided by the resource provider may or may not contain resources, and the resources here may be any resources such as pictures, videos, and files.

[0043] Step 102: Based on the business needs of at least one resource demander, the multiple basic SDKs are combined to obtain at least one SDK combination, wherein one SDK combination includes at least one basic SDK, and one SDK combination is used to implement at least one preset function under one business need.

[0044] Optionally, at least one base SDK in an SDK combination contains resources.

[0045] Generally speaking, a resource demander corresponds to a business demand, and this business demand may require access to multiple basic SDKs to achieve. For example, for a certain application (Application, APP) development company, it may be necessary to access a basic SDK for collecting data, a basic SDK for network communication, a basic SDK for cloud control, a basic SDK for publishing advertisements, and a basic SDK for reporting data. If the existing one-to-one access method is used, the access threshold is high, the access time is long, and the access efficiency is low. If these basic SDKs are merged and then provided to the resource demander, these problems can be avoided. Therefore, according to the business needs of a certain resource demander, all the basic SDKs required by the resource demander can be combined into an SDK combination, and the SDK combination can be merged and provided to the resource provider to avoid these problems.

[0046] A resource provider often provides resources to multiple resource providers, and the business needs of different resource demanders may be different. Therefore, the above-mentioned multiple basic SDKs provided by the resource providers can be combined according to the business needs of different resource demanders to obtain at least one SDK combination. Generally speaking, one SDK combination is obtained for one business need of a resource demander. Since one SDK combination integrates all the functions of the basic SDKs contained therein, one SDK combination can be used to implement at least one preset function under one business need.

[0047] Optionally, the above multiple basic SDKs can be combined in a permutation and combination manner to obtain all possible basic SDK combinations, so that resource demanders can freely choose the corresponding SDK combination for use according to their own business needs. For example, assuming that the number of the above multiple basic SDKs is n, there are a total of n! possible combinations.

[0048] In a specific implementation, an SDK combination list may be generated to store different SDK combinations. For example, the SDK combinations shown in Table 1 may be generated.

[0049] Table 1

[0050] Serial number SDK Combination 1 SDK1, SDK2, SDK3 2 SDK1, SDK5, SDK6 3 SDK1, SDK2, SDK3 SDK5, SDK6, … …

[0051] Step 103: Merge the basic SDKs in the at least one SDK combination respectively to obtain at least one merged SDK, wherein one SDK combination corresponds to one merged SDK.

[0052] Since a merged SDK is obtained by merging the basic SDKs in a corresponding SDK combination, similar to the functions of an SDK combination, a merged SDK can also be used to implement at least one preset function under a business requirement.

[0053] In this step, the basic SDKs in all or part of the SDK combinations stored in the SDK combination list can be merged separately to obtain at least one merged SDK. For an SDK combination, when merging, two SDKs are merged at a time to obtain a new SDK, and then the new SDK is merged with one of the remaining SDKs in the SDK combination to obtain another new SDK, and so on, until all the SDKs in the SDK combination are merged; or the SDKs in the SDK combination can be merged two by two first, and then the merged SDKs are merged two by two again, until all the SDKs in the SDK combination are merged. The specific merging process will be described in detail below and will not be repeated here.

[0054] Optionally, a unique identifier (ID) may be set for the at least one merged SDK so that the resource demander can find the merged SDK they want when acquiring the merged SDK, for example, so that the target resource demander can acquire the target merged SDK according to the unique identifier of the target merged SDK, wherein the target resource demander is one of the at least one resource demander, and the target merged SDK is one of the at least one merged SDK. Of course, the target resource demander may also be a resource demander other than the at least one resource demander, as long as its business needs match the target merged SDK.

[0055] As an example, any method capable of distinguishing different merged SDKs may be used to set a unique identifier for the at least one merged SDK, that is, to ensure that the unique identifiers of different merged SDKs are different.

[0056] As another example, for any merged SDK among the at least one merged SDK, unique identifiers of all base SDKs merged to obtain the merged SDK are determined; and based on the unique identifiers of all base SDKs, the unique identifier of the merged SDK is determined.

[0057] Furthermore, when the unique identifiers of all base SDKs in a merged SDK are numeric, the unique identifiers of all base SDKs in the merged SDK can be summed to obtain the unique identifier of the merged SDK. For example, when the unique identifiers of the above multiple base SDKs are the factorial of 2, for a merged SDK obtained by merging SDK1 and SDK2, its unique identifier is: 1+2=3.

[0058] There are many ways to set the unique identifier of the merged SDK, which are not listed here.

[0059] Step 104: provide the at least one merged SDK to the at least one resource demander, so that the target resource demander can implement at least one preset function required for its own business by accessing the target merged SDK, wherein the target resource demander is one of the at least one resource demander, and the target merged SDK is one of the at least one merged SDK.

[0060] Specifically, the at least one merged SDK can be published to a preset server, and a download link can be generated for the at least one merged SDK; a correspondence between the unique identifier of the at least one merged SDK and the download link can be established; the correspondence can be provided to the target resource demander so that the target resource demander can search for the download link of the target merged SDK based on the correspondence and download the target merged SDK.

[0061] Optionally, when providing the at least one merged SDK to the at least one resource demander, the correspondence between the unique identifier of the at least one merged SDK and the functions that can be implemented by the at least one merged SDK can also be provided to the target resource demander, so that the target resource demander can select the target merged SDK that matches its own business needs based on the correspondence.

[0062] Optionally, when providing the at least one merged SDK to the at least one resource demander, the unique identifier of the basic SDK obtained by merging the target merged SDK can also be provided to the target resource demander, so that the target resource demander can clearly identify the basic SDK obtained by merging the target merged SDK, and further clarify which functions the target merged SDK can achieve, and confirm whether these functions match its own business needs.

[0063] A resource provision method provided in an embodiment of the present application can merge at least one basic SDK of a resource provider into one SDK and provide it to the resource demander according to the business needs of the resource demander, rather than directly providing multiple basic SDKs. Therefore, it can lower the access threshold for the resource demander to access the SDK, reduce the access time, and improve the access efficiency.

[0064] like Figure 2 As shown, a resource providing method provided in another embodiment of the present application may include:

[0065] Step 101: Acquire multiple basic SDKs provided by a resource provider.

[0066] Among them, a basic SDK is used to implement a preset function.

[0067] Step 102: Based on the business needs of at least one resource demander, the multiple basic SDKs are combined to obtain at least one SDK combination, wherein one SDK combination includes at least one basic SDK, and one SDK combination is used to implement at least one preset function under one business need.

[0068] Optionally, at least one base SDK in an SDK combination contains resources.

[0069] Step 105 , traverse the at least one SDK combination, determine whether there is a mutually exclusive SDK in each SDK combination, and if so, delete the SDK group from the multiple SDK groups, and proceed to step 106 .

[0070] Some SDKs cannot coexist, so a mutually exclusive relationship needs to be established. For example, SDK1 and SDK4 cannot coexist, so the following dependency relationship is established:

[0071] SDK≠SDK4

[0072] Mutually exclusive relations are not transitive.

[0073] In specific implementation, a mutually exclusive relationship list may be established in advance, and then it is determined whether at least one mutually exclusive relationship in the mutually exclusive list exists in each SDK combination. If so, the SDK combination is deleted.

[0074] Step 106, determine whether the traversal of the at least one SDK combination is completed, if it is completed, execute step 107, if it is not completed, execute step 105 to continue the traversal.

[0075] Step 107: traverse the at least one SDK combination, determine whether there is a dependent SDK in each SDK combination, and if so, add the dependent SDK to the SDK group.

[0076] Some SDKs need to rely on other SDKs, so you need to establish dependencies. For example, if SDK1 depends on SDK2, then establish the following dependencies:

[0077] SDK1-->SDK2

[0078] An SDK can also depend on multiple other SDKs:

[0079] SDK1-->SDK2,SDK3

[0080] Dependencies are transitive. For example, if you add SDK3-->SDK5, SDK1 will indirectly depend on SDK5.

[0081] In specific implementation, a dependency list may be established in advance, and then it is determined whether each SDK combination has one or more dependencies in the mutually exclusive list. If so, the dependent SDKs in these dependencies are added to the SDK combination.

[0082] Step 108, determine whether the traversal of the at least one SDK combination is completed, if it is completed, execute step 103, if it is not completed, execute step 107 to continue the traversal.

[0083] Assuming there are n basic SDKs, there are n! possible combinations. After removing the mutually exclusive combinations, the number of SDK combinations will be less than n!. For SDK combinations with dependencies, the dependent basic SDKs must be added to the SDK combination.

[0084] Step 103: merge the basic SDKs in the at least one SDK combination respectively to obtain at least one merged SDK, wherein one SDK combination corresponds to one merged SDK, and one merged SDK is used to implement at least one preset function under one business requirement.

[0085] Step 104: provide the at least one merged SDK to the at least one resource demander, so that the target resource demander can implement at least one preset function required for its own business by accessing the target merged SDK, wherein the target resource demander is one of the at least one resource demander, and the target merged SDK is one of the at least one merged SDK.

[0086] A resource providing method provided in an embodiment of the present application is Figure 1 The difference of a resource provision method provided by the illustrated embodiment is that after obtaining possible SDK combinations, it is also necessary to delete combinations with mutually exclusive SDKs and add SDKs with dependent relationships to the corresponding SDK combinations to ensure that the resource demander can use it normally after downloading the corresponding merged SDK in the future.

[0087] Figure 3 A detailed flow chart of step 103 is shown. Figure 3 As shown, the above step 103 may include:

[0088] Step 30, start.

[0089] Step 31, traverse the at least one SDK combination, and execute the first specifying step 32 for the current SDK combination.

[0090] The first specifying step 32 includes:

[0091] Step 321: Take out the first basic SDK from the current SDK combination.

[0092] Step 322, determine whether the number of basic SDKs remaining in the current SDK combination is 0; if it is 0, execute step 34, otherwise execute step 323.

[0093] Step 323: Take out a second basic SDK from the current SDK combination.

[0094] Step 314: merge the first basic SDK and the second basic SDK to obtain a first merged SDK.

[0095] Then, the second designated step may be executed in a loop until the number of basic SDKs remaining in the current SDK combination is 0, and the n-1th merged SDK is determined as the merged SDK of the current SDK combination, where n is the total number of basic SDKs when the basic SDKs in the current SDK combination are not merged.

[0096] The second specifying step 302 includes:

[0097] Step 3251, determine whether the number of basic SDKs remaining in the current SDK combination is 0; if it is 0, execute step 34, otherwise execute step 3252.

[0098] Step 3252: Take out the i-th basic SDK from the current SDK combination.

[0099] Among them, i=3,4,…,n.

[0100] Step 3253: merge the i-th basic SDK and the j-th merged SDK to obtain the j+1-th merged SDK.

[0101] Among them, j=1,2,…,n-1.

[0102] Step 33, determine whether the traversal of the at least one SDK combination is completed; if completed, execute step 34, otherwise, return to step 31 to continue traversal.

[0103] Step 34, end.

[0104] When one SDK is merged with another SDK, different types of SDKs have different merging methods. The two SDKs to be merged are respectively referred to as the first SDK and the second SDK, and the SDK obtained by merging the two is referred to as the target merged SDK.

[0105] It can be understood that, for the above-mentioned current SDK combination, when the first basic SDK is the first SDK, the second basic SDK is the second SDK, and the first merged SDK is the target merged SDK; when the i-th basic SDK is the first SDK, the j-th merged SDK is the second SDK, and the j+1-th merged SDK is the target merged SDK.

[0106] Generally speaking, for Java, its SDK includes four types: aar package with resources, aar package without resources, jar package and zip package. Therefore, the corresponding merging methods may include the following:

[0107] AAR package a containing resources (first SDK) + AAR package b containing resources (second SDK);

[0108] AAR package a with resources (first SDK) + AAR package b without resources (second SDK);

[0109] AAR package a without resources (first SDK) + AAR package b without resources (second SDK);

[0110] Aar package a (first SDK) + jar package b (second SDK) containing resources;

[0111] Aar package a (first SDK) + jar package b (second SDK) without resources;

[0112] jar package a (first SDK) + jar package b (second SDK).

[0113] The following explains them one by one.

[0114] (1) aar package a containing resources (first SDK) + aar package b containing resources (second SDK)

[0115] like Figure 4 As shown, the first SDK and the second SDK are merged to obtain a target merged SDK, including:

[0116] Step 400, start.

[0117] Step 401: decompress the first SDK to obtain a first resource file and a first jar package.

[0118] That is, decompress the aar package a.

[0119] Step 402: decompress the second SDK to obtain a second resource file and a second jar package.

[0120] That is, decompress the aar package b.

[0121] Optionally, copy the files in the libs directory, the jni directory, and the assets directory of the decompressed directory of aar package b to the directories corresponding to the decompressed directory of aar package a in sequence.

[0122] Optionally, parse the package name package from AndroidManifest.xml in the directory where the aar package a is decompressed. For example, as shown in the following code, the parsed package name is com.a:

[0123] <? xml version="1.0" encoding="utf-8"? >

[0124] <manifest xmlns:android=http: / / schemas.android.com / apk / res / androidpackage=”com.a”>

[0125] Parse the package name package from AndroidManifest.xml in the directory where aar package b is unzipped. For example, as shown in the following code, the parsed package name is com.b:

[0126] <? xml version="1.0" encoding="utf-8"? >

[0127] <manifest xmlns:android=http: / / schemas.android.com / apk / res / androidpackage=”com.b”>

[0128] Optionally, parse all resource names from R.txt (the second resource file) in the directory where the aar package b is unzipped and rename them. R.txt is a resource index file in the following format:

[0129] int resource type resource name 0x0

[0130] For example:

[0131] int anim abc_fade_in 0x0

[0132] int anim btn_checkbox_to_checked_box_inner_merged_animation 0x0

[0133] int animator mtrl_fab_transformation_sheet_collapse_spec 0x0

[0134] int animator mtrl_fab_transformation_sheet_sepand_spec 0x0

[0135] int array subscribe_privilege_icon 0x0

[0136] int array user_report 0x0

[0137] int attr yearTodayStyle 0x0

[0138] int attr zOrderOnTop 0x0

[0139] Among them, anim indicates that the resource abc_fade_in is an animation resource, array indicates that the resource subscribe_privilege_icon is a resource array, and attr indicates that the resource yearTodayStyle is an attribute. It should be understood that the types of resources are not limited to these types, and they are just examples here.

[0140] Optionally, parse R.txt (the second resource file) of aar package b to create an index of resource name and type, for example:

[0141] abc_fade_in->anim

[0142] mtrl_fab_transformation_sheet_collapse_spec->animator

[0143] subscribe_privilege_icon->array

[0144] yearTodayStyle->attr

[0145] Furthermore, the second resource index file is parsed to obtain the resource names in the second resource index file, and the resource names in the second resource index file are modified to add the package name of the second SDK before the resource names in the second resource index file. Specifically, all resource names are renamed and prefixed with the package name, for example:

[0146] abc_fade_in renamed to com_b_abc_fade_in

[0147] mtrl_fab_transformation_sheet_collapse_spec renamed to:

[0148] com_b_mtrl_fab_transformation_sheet_collapse_spec

[0149] subscribe_privilege_icon renamed to:

[0150] com_b_subscribe_privilege_icon

[0151] yearTodayStyle is renamed to:

[0152] com_b_yearTodayStyle

[0153] It can be understood that the reason for renaming the resources in the second resource file is to prevent the existence of resources with the same name in aar package b and aar package b, which will cause errors when the resource demander uses the merged SDK.

[0154] Step 403: merge the first resource file and the second resource file to obtain a merged resource file.

[0155] Step 404: Replace the first resource file in the decompressed directory of the first SDK with the merged resource file.

[0156] Merge the R.txt (second resource file) with the modified resource name and the R.txt (first resource file) in the directory unzipped from aar package a (first SDK) into one R.txt (merged resource file), and use the merged resource file to replace the R.txt (first resource file) in the directory unzipped from aar package a (first SDK).

[0157] Step 405: decompress the second jar package to obtain a class file, and convert the class file into a java file.

[0158] Step 406: Parse the java file, and modify the target code in the java file according to the merged resource file, wherein the target code includes the code related to the second resource file.

[0159] Step 407: Package the modified java file to obtain a third jar package.

[0160] Step 408: copy the third jar package to the decompressed directory of the first SDK.

[0161] Step 409: Package the files in the current decompressed directory of the first SDK to obtain an aar package of the first merged SDK.

[0162] For step 405 to step 409, for example, classes.jar (the second jar package) is decompressed, the decompressed directory is traversed, and each class file traversed is processed as follows:

[0163] 1. Use the jad tool to convert class files into java files;

[0164] 2. Parse the converted java file:

[0165] 2.1 If you encounter a string of the type "import com.bR", replace it with "import com.aR".

[0166] 2.2 If a string in the Rxxx format is encountered, the second segment x (resource type) and the third segment xx (resource name) are intercepted.

[0167] 2.3 Match the intercepted third segment xx with the index of resource name and type established above. If the resource name is matched, obtain the matched resource type resType.

[0168] 2.4 If resType matches the resource type x in step 2.2, add the package name prefix com.b to xx to become com_b_xx, and replace the string Rxxx with Rxcom_b_xx.

[0169] 2.5 When the current java file is parsed, use the java command

[0170] 3. After all class files in the second jar package are processed, compress the decompressed directory into the classes.jar file.

[0171] 4. Rename the processed classes.jar to "package name".jar, in this case com_b.jar, and copy it to the libs subdirectory of the decompressed directory of aar package a (first SDK).

[0172] 5. Compress aar package a into an aar file to obtain the first merged SDK.

[0173] Step 410, end.

[0174] It can be seen that through Figure 4 The process shown can complete the merging of the first SDK containing resources and the second SDK containing resources. The cleverness of this merging method lies in that, on the one hand, by modifying the resource name in the resource file of the second SDK (the resource name in the second resource file, specifically, adding a prefix: com_b before the resource name), it can avoid the accidental overwriting of the resources with the same name between the second SDK and the first SDK when the second resource file is merged with the first resource file, thereby preventing errors when using the merged SDK in the future; on the other hand, by modifying the code related to the resources in the second resource file in the jar package of the second SDK, it can be ensured that the merged SDK can correctly call the resources originally belonging to the second SDK.

[0175] (2) aar package a with resources (first SDK) + aar package b without resources (second SDK)

[0176] First, decompress aar package a (first SDK) and aar package b (second SDK) respectively.

[0177] Secondly, rename the classes.jar in the decompressed directory of aar package b (the second SDK) to aar package.jar, and copy it to the lib directory of the decompressed directory of aar package a (the first SDK).

[0178] After that, copy the remaining files in the unzip directory of aar package b (second SDK), such as the files in the libs directory, the files in the jni directory, and the files in the assets directory, to the corresponding subdirectories of the unzip directory of aar package a (first SDK) in sequence.

[0179] Finally, compress the aar package a (the first SDK) to generate a merged aar file, that is, obtain the first merged SDK.

[0180] (3) aar package a without resources (first SDK) + aar package b without resources (second SDK)

[0181] First, decompress aar package a (first SDK) and aar package b (second SDK) respectively.

[0182] Secondly, rename the classes.jar in the decompressed directory of aar package b (the second SDK) to aar package.jar, and copy it to the lib directory of the decompressed directory of aar package a (the first SDK).

[0183] After that, copy the remaining files in the unzip directory of aar package b (second SDK), such as the files in the libs directory, the files in the jni directory, and the files in the assets directory, to the corresponding subdirectories of the unzip directory of aar package a (first SDK) in sequence.

[0184] Finally, compress the aar package a (the first SDK) to generate a merged aar file, that is, obtain the first merged SDK.

[0185] (4) aar package a (first SDK) + jar package b (second SDK) containing resources

[0186] First, decompress the aar package a (first SDK).

[0187] Then, copy the jar package b (the second SDK) to the lib directory of the decompressed directory of the aar package a (the first SDK).

[0188] Finally, compress the aar package a (the first SDK) to generate a merged aar file, that is, obtain the first merged SDK.

[0189] (5) aar package a (first SDK) + jar package b (second SDK) without resources

[0190] First, decompress the aar package a (first SDK).

[0191] Then, copy the jar package b (the second SDK) to the lib directory of the decompressed directory of the aar package a (the first SDK).

[0192] Finally, compress the aar package a (the first SDK) to generate a merged aar file, that is, obtain the first merged SDK.

[0193] (6) jar package a (first SDK) + jar package b (second SDK)

[0194] First, create a folder named jar package a and create a subdirectory libs in it.

[0195] Then, rename the jar package a to classes.jar and copy it to the directory.

[0196] Secondly, copy the jar package b to the libs subdirectory of the above folder.

[0197] Finally, compress the folder into a zip package and change the suffix to aar to get the first merged SDK.

[0198] The above introduces several ways to merge different types of first SDKs and second SDKs. In actual applications, you can refer to the above methods to merge two SDKs.

[0199] Corresponding to the above method embodiment, the embodiment of the present application also provides a resource providing device, which is introduced below.

[0200] like Figure 5 As shown, an embodiment of the present application provides a resource providing device 500, and the device 500 may include: a resource acquisition module 501, a resource combination module 502, a resource merging module 503 and a resource providing module 504.

[0201] The resource acquisition module 501 is used to acquire multiple basic SDKs provided by a resource provider, wherein one basic SDK is used to implement a preset function.

[0202] The resource combination module 502 is used to combine the multiple basic SDKs to obtain at least one SDK combination based on the business needs of at least one resource demander, wherein an SDK combination contains at least one basic SDK, and at least one basic SDK in an SDK combination contains resources, and an SDK combination is used to implement at least one preset function under a business need.

[0203] The resource merging module 503 is used to merge the basic SDKs in the at least one SDK combination respectively to obtain at least one merged SDK, wherein one SDK combination corresponds to one merged SDK, and one merged SDK is used to implement at least one preset function under a business requirement.

[0204] Specifically, the resource merging module 503 can merge the basic SDKs in all or part of the SDK combinations stored in the SDK combination list to obtain at least one merged SDK. For an SDK combination, when merging, two SDKs are merged at a time to obtain a new SDK, and then the new SDK is merged with one of the remaining SDKs in the SDK combination to obtain a new SDK, and so on, until all the SDKs in the SDK combination are merged; or the SDKs in the SDK combination can be merged in pairs, and then the merged SDKs are merged in pairs again, until all the SDKs in the SDK combination are merged.

[0205] As an example, the resource merging module 503 may be specifically configured to: traverse the at least one SDK combination, and execute the first specified step on the current SDK combination until the traversal is completed.

[0206] Among them, the first specifying step includes: taking out the first basic SDK from the current SDK combination; determining whether the number of basic SDKs remaining in the current SDK combination is 0; if not, taking out the second basic SDK from the current SDK combination; merging the first basic SDK and the second basic SDK to obtain the first merged SDK, and then looping to execute the second specifying step until the number of basic SDKs remaining in the current SDK combination is 0, and determining the n-1th merged SDK as the merged SDK of the current SDK combination, where n is the total number of basic SDKs when the basic SDKs in the current SDK combination are not merged.

[0207] Among them, the second specifying step includes: determining whether the number of basic SDKs remaining in the current SDK combination is 0; if not, taking out the i-th basic SDK from the current SDK combination, where i=3, 4, ..., n; merging the i-th basic SDK and the j-th merged SDK to obtain the j+1-th merged SDK, where j=1, 2, ..., n-1.

[0208] Further, when the first SDK and the second SDK to be merged are aar packages, and both the second SDK and the second SDK contain resources, the first SDK and the second SDK are merged to obtain a target merged SDK, including:

[0209] Decompress the first SDK to obtain a first resource file and a first jar package;

[0210] Decompress the second SDK to obtain a second resource file and a second jar package;

[0211] Merge the first resource file and the second resource file to obtain a merged resource file, and replace the first resource file in the decompressed directory of the first SDK with the merged resource file;

[0212] Decompress the second jar package to obtain a class file, and convert the class file into a java file;

[0213] Parsing the java file, and modifying the target code in the java file according to the merged resource file, wherein the target code includes the code related to the second resource file;

[0214] Pack the modified java file to obtain a third jar package;

[0215] Copy the third jar package to the decompressed directory of the first SDK;

[0216] Packing the files in the current decompressed directory of the first SDK to obtain the aar package of the target merged SDK, wherein the files in the current decompressed directory of the first SDK include: the first jar package, the third jar package and the merged resource file;

[0217] Among them, for the current SDK combination, when the first basic SDK is the first SDK, the second basic SDK is the second SDK, and the first merged SDK is the target merged SDK; when the i-th basic SDK is the first SDK, the j-th merged SDK is the second SDK, and the j+1-th merged SDK is the target merged SDK.

[0218] In addition, for other ways of merging the two SDKs, please refer to the above description of the method embodiment, which will not be repeated here.

[0219] The resource provision module 504 is used to provide the at least one merged SDK to the at least one resource demander, so that the target resource demander can realize at least one preset function required for its own business by accessing the target merged SDK, wherein the target resource demander is one of the at least one resource demander, and the target merged SDK is one of the at least one merged SDK.

[0220] Specifically, the resource provision module 504 can be used to: publish the at least one merged SDK to a preset server, and generate a download link for each of the at least one merged SDKs; establish a correspondence between the unique identifier of the at least one merged SDK and the download link; provide the correspondence to the resource demander, so that the resource demander can search for the download link of the target merged SDK based on the correspondence, and download the target merged SDK.

[0221] Optionally, Figure 5 The device shown may also include: a first ID setting module, which is used to set unique identifications (IDs) for the above-mentioned multiple basic IDs respectively to distinguish different basic SDKs.

[0222] Furthermore, the unique identifiers of the above-mentioned multiple basic SDKs can be taken as the factorial of a preset value (for example, 2) in turn.

[0223] Optionally, Figure 5 The device shown may also include: a second ID setting module, used to set a unique identifier (ID) for the at least one merged SDK, so that the resource demander can find the merged SDK he wants when obtaining the merged SDK.

[0224] Furthermore, the second ID setting module can be used to determine the unique identifier of all the basic SDKs merged to obtain any one of the at least one merged SDK; and determine the unique identifier of the merged SDK based on the unique identifiers of all the basic SDKs.

[0225] Furthermore, when the unique identifiers of all the basic SDKs in a merged SDK are of numeric type, the unique identifiers of all the basic SDKs in the merged SDK may be summed to obtain the unique identifier of the merged SDK.

[0226] Optionally, Figure 5The device shown may also include: a first traversal module, which is used to traverse the at least one SDK combination after combining to obtain the at least one SDK combination, determine whether there are mutually exclusive SDKs in each SDK combination, and if so, delete the group of SDKs from the multiple groups of SDKs.

[0227] Optionally, Figure 5 The device shown may also include: a second traversal module, which is used to traverse the at least one SDK combination after combining the at least one SDK combination, determine whether there is a dependent SDK in each SDK combination, and if so, add the dependent SDK to the group of SDKs.

[0228] A resource providing device provided in an embodiment of the present application can merge at least one basic SDK of a resource provider into one SDK and provide it to the resource demander according to the business needs of the resource demander, rather than directly providing multiple basic SDKs. Therefore, it can lower the access threshold for the resource demander to access the SDK, reduce the access time, and improve the access efficiency.

[0229] It should be noted that since the content executed by the device embodiment is similar to that of the method embodiment, the description of the device embodiment part in this document is relatively brief, and please refer to the method embodiment part for relevant details.

[0230] Figure 6 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Please refer to Figure 6. At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.

[0231] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0232] The memory is used to store the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0233] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a resource providing device at the logical level. The processor executes the program stored in the memory and is specifically used to execute the resource providing method provided in the embodiment of the present application.

[0234] The above application Figure 5 The method performed by the resource providing device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0235] The present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, enable the electronic device to execute Figure 5 The method performed by the resource providing device in the illustrated embodiment is specifically used to perform the resource providing method provided in the embodiment of the present application.

[0236] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0237] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0238] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0239] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0240] It should be noted that the various embodiments in this application are described in a related manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0241] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0242] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A resource providing method, characterized in that: The method comprises: Obtain multiple basic SDKs provided by the resource provider, where one basic SDK is used to implement a preset function; Based on the business needs of at least one resource demander, the multiple basic SDKs are combined to obtain at least one SDK combination, wherein one SDK combination includes at least one basic SDK, and at least one basic SDK in one SDK combination contains resources, and one SDK combination is used to implement at least one preset function under one business need; Merging the basic SDKs in the at least one SDK combination respectively to obtain at least one merged SDK, wherein one SDK combination corresponds to one merged SDK, and one merged SDK is used to implement at least one preset function under one business requirement; Providing the at least one merged SDK to the at least one resource demander, so that the target resource demander can realize at least one preset function required for its own business by accessing the target merged SDK, wherein the target resource demander is one of the at least one resource demander, and the target merged SDK is one of the at least one merged SDK; The step of merging the basic SDKs in the at least one SDK combination to obtain at least one merged SDK comprises: Traversing the at least one SDK combination, and executing the first specified step on the current SDK combination until the traversal is completed; Wherein, the first specifying step comprises: Take out the first base SDK from the current SDK combination; Determine whether the number of basic SDKs remaining in the current SDK combination is 0; If not, taking out the second basic SDK from the current SDK combination; Merge the first basic SDK and the second basic SDK to obtain the first merged SDK, and then loop through the second specified step until the number of basic SDKs remaining in the current SDK combination is 0, and determine the n-1th merged SDK as the merged SDK of the current SDK combination, where n is the total number of basic SDKs when the basic SDKs in the current SDK combination are not merged; Wherein, the second specifying step comprises: Determine whether the number of basic SDKs remaining in the current SDK combination is 0; If not, take out the i-th basic SDK from the current SDK combination, where i=3, 4, ..., n; Merge the i-th basic SDK and the j-th merged SDK to obtain the j+1-th merged SDK, where j=1, 2, ..., n-1; When the first SDK and the second SDK to be merged are aar packages, and both the first SDK and the second SDK contain resources, the first SDK and the second SDK are merged to obtain a first merged SDK, including: Decompress the first SDK to obtain a first resource file and a first jar package; Decompress the second SDK to obtain a second resource file and a second jar package; Merge the first resource file and the second resource file to obtain a merged resource file, and replace the first resource file in the decompressed directory of the first SDK with the merged resource file; Decompress the second jar package to obtain a class file, and convert the class file into a java file; Parsing the java file, and modifying the target code in the java file according to the merged resource file, wherein the target code includes the code related to the second resource file; Pack the modified java file to obtain a third jar package; Copy the third jar package to the decompressed directory of the first SDK; Pack the files in the current decompressed directory of the first SDK to obtain an aar package of the first merged SDK, wherein the files in the current decompressed directory of the first SDK include: the first jar package, the third jar package and the merged resource file; Among them, for the current SDK combination, when the first basic SDK is the first SDK, the second basic SDK is the second SDK, and the first merged SDK is the first merged SDK; when the i-th basic SDK is the first SDK, the j-th merged SDK is the second SDK, and the j+1-th merged SDK is the first merged SDK.

2. The method according to claim 1, characterized in that The method further comprises: Setting a unique identifier for each of the at least one merged SDKs; The target resource demander is provided with a correspondence between the unique identifier of the at least one merged SDK and the functions that can be implemented by the at least one merged SDK, so that the target resource demander can select the target merged SDK that matches its own business needs according to the correspondence.

3. The method according to claim 2, characterized in that Before setting a unique identifier for each of the at least one merged SDK, the method further includes: Setting unique identifiers for the multiple basic SDKs; Providing the target resource demander with a unique identifier of the base SDK that is merged to obtain the target merged SDK, so that the target resource demander can clearly identify the base SDK that is merged to obtain the target merged SDK; The step of setting a unique identifier for each of the at least one merged SDKs includes: For any one of the at least one merged SDK, determining unique identifiers of all base SDKs that are merged to obtain the merged SDK; Based on the unique identifiers of all the basic SDKs, a unique identifier of the merged SDK is determined.

4. The method according to claim 3, characterized in that The unique identifiers of all the basic SDKs are numerical, and determining the unique identifier of the merged SDK based on the unique identifiers of all the basic SDKs includes: The unique identifiers of all the basic SDKs are summed to obtain the unique identifier of the merged SDK.

5. The method according to any one of claims 2 to 4, characterized in that: The providing the at least one merged SDK to the at least one resource demander includes: Publishing the at least one merged SDK to a preset server, and generating download links for the at least one merged SDK respectively; Establishing a correspondence between the unique identifier of the at least one merged SDK and the download link respectively; The corresponding relationship is provided to the target resource demander, so that the target resource demander searches for a download link of the target merged SDK based on the corresponding relationship and downloads the target merged SDK.

6. The method according to claim 1, characterized in that After combining the multiple basic SDKs to obtain at least one SDK combination, and before respectively merging the basic SDKs in the at least one SDK combination, the method further includes: Determine whether there is a mutually exclusive SDK in each SDK combination of the at least one SDK combination; If so, delete the SDK combination from the at least one SDK combination.

7. The method according to claim 1, characterized in that After combining the multiple basic SDKs to obtain at least one SDK combination, and before respectively merging the basic SDKs in the at least one SDK combination, the method further includes: Determine whether there is a dependent SDK in each SDK combination of the at least one SDK combination; If it exists, add the dependent SDK to the SDK combination.

8. A resource providing device, characterized in that: The device comprises: The resource acquisition module is used to obtain multiple basic SDKs provided by the resource provider, wherein one basic SDK is used to implement a preset function; A resource combination module, used for combining the multiple basic SDKs to obtain at least one SDK combination based on the business needs of at least one resource demander, wherein one SDK combination includes at least one basic SDK, and at least one basic SDK in one SDK combination contains resources, and one SDK combination is used to implement at least one preset function under one business need; A resource merging module, used to merge the basic SDKs in the at least one SDK combination respectively to obtain at least one merged SDK, wherein one SDK combination corresponds to one merged SDK, and one merged SDK is used to implement at least one preset function under one business requirement; A resource provision module, configured to provide the at least one merged SDK to the at least one resource demander, so that the target resource demander can realize at least one preset function required for its own business by accessing the target merged SDK, wherein the target resource demander is one of the at least one resource demander, and the target merged SDK is one of the at least one merged SDK; In the resource merging module, the basic SDKs in the at least one SDK combination are merged respectively to obtain at least one merged SDK, including: Traversing the at least one SDK combination, and executing the first specified step on the current SDK combination until the traversal is completed; Wherein, the first specifying step comprises: Take out the first base SDK from the current SDK combination; Determine whether the number of basic SDKs remaining in the current SDK combination is 0; If not, taking out the second basic SDK from the current SDK combination; Merge the first basic SDK and the second basic SDK to obtain the first merged SDK, and then loop through the second specified step until the number of basic SDKs remaining in the current SDK combination is 0, and determine the n-1th merged SDK as the merged SDK of the current SDK combination, where n is the total number of basic SDKs when the basic SDKs in the current SDK combination are not merged; Wherein, the second specifying step comprises: Determine whether the number of basic SDKs remaining in the current SDK combination is 0; If not, take out the i-th basic SDK from the current SDK combination, where i=3, 4, ..., n; Merge the i-th basic SDK and the j-th merged SDK to obtain the j+1-th merged SDK, where j=1, 2, ..., n-1; When the first SDK and the second SDK to be merged are aar packages, and both the first SDK and the second SDK contain resources, the first SDK and the second SDK are merged to obtain a first merged SDK, including: Decompress the first SDK to obtain a first resource file and a first jar package; Decompress the second SDK to obtain a second resource file and a second jar package; Merge the first resource file and the second resource file to obtain a merged resource file, and replace the first resource file in the decompressed directory of the first SDK with the merged resource file; Decompress the second jar package to obtain a class file, and convert the class file into a java file; Parsing the java file, and modifying the target code in the java file according to the merged resource file, wherein the target code includes the code related to the second resource file; Pack the modified java file to obtain a third jar package; Copy the third jar package to the decompressed directory of the first SDK; Pack the files in the current decompressed directory of the first SDK to obtain an aar package of the first merged SDK, wherein the files in the current decompressed directory of the first SDK include: the first jar package, the third jar package and the merged resource file; Among them, for the current SDK combination, when the first basic SDK is the first SDK, the second basic SDK is the second SDK, and the first merged SDK is the first merged SDK; when the i-th basic SDK is the first SDK, the j-th merged SDK is the second SDK, and the j+1-th merged SDK is the first merged SDK.