SDK calling method and device and electronic equipment
By dynamically detecting the terminal's operating environment and loading the corresponding third-party service platform SDK, the problem of strong coupling between business development and the operating environment is solved, realizing dynamic loading of the SDK and reducing redundancy.
Patent Information
- Application Number
- CN202410992800.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-08
AI Technical Summary
Because SDKs for different platforms differ, and SDKs for the same platform also differ in different terminal operating environments, business development and the operating environment are tightly coupled, resulting in cumbersome manual operations and redundant project SDKs.
By responding to operations that trigger third-party platform services, the terminal operating environment is dynamically detected, the name of the third-party service platform and the name of the terminal operating environment are obtained, the download address information of the SDK is obtained from the configuration management platform, and the corresponding third-party service platform SDK is loaded as needed.
It enables dynamic detection of the terminal's operating environment when third-party platform services are triggered, solving the problem of strong coupling between business development and the operating environment, and avoiding tedious manual operations and SDK redundancy.
Smart Images

Figure CN118916097A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an SDK calling method, device and electronic device. Background Art
[0002] With the rapid development of mobile Internet, Internet business applications are showing a multi-terminal trend. A business application system will have multiple terminal accesses at the same time, including PC (Personal Computer), H5 (HTML5, the fifth generation of hypertext markup language), APP (Application), WeChat applet, Alipay applet, etc. At the same time, the business application system will also rely on multiple third-party platform services, such as map services, payment services, voice services, etc.
[0003] However, due to the differences in SDKs (Software Development Kits) for different platform services, the SDKs for the same platform service also differ in different terminal operating environments. As a result, each terminal has its own independent SDK. The differences in the operating environments of each terminal need to be considered when developing business application systems. Therefore, there is a technical problem of strong coupling between business development and the operating environment. Summary of the invention
[0004] The present invention aims to solve one of the technical problems in the related art at least to a certain extent.
[0005] To this end, the first purpose of the present invention is to propose an SDK calling method, which is applied to the terminal to dynamically detect the terminal operating environment when triggering the third-party platform service, and load the corresponding third-party service platform SDK on demand, so as to solve the technical problem of strong coupling between business development and operating environment in the prior art.
[0006] The second object of the present invention is to propose an SDK calling method for application in a configuration management platform.
[0007] The third object of the present invention is to provide an SDK calling device, which is applied to a terminal.
[0008] A fourth objective of the present invention is to provide an SDK calling device for use in a configuration management platform.
[0009] A fifth objective of the present invention is to provide an electronic device.
[0010] A sixth object of the present invention is to provide a computer-readable storage medium.
[0011] A seventh object of the present invention is to provide a computer program product.
[0012] To achieve the above-mentioned purpose, the first embodiment of the present invention proposes an SDK calling method, which is applied to a terminal and includes:
[0013] In response to the operation of triggering the third-party platform service, obtaining the name of the third-party service platform, and detecting the terminal operating environment to determine whether there is a third-party service platform SDK in the terminal operating environment;
[0014] In the case that the third-party service platform SDK does not exist in the terminal operating environment, obtaining the terminal operating environment name, and obtaining the download address information of the third-party service platform SDK from the configuration management platform based on the third-party service platform name and the terminal operating environment name;
[0015] Based on the download address information, the third-party service platform SDK is downloaded, and the third-party service platform SDK is triggered to be called.
[0016] Optionally, as a first possible implementation manner of the first aspect, the method further includes:
[0017] In the case that the third-party service platform SDK exists in the terminal operating environment, the calling of the third-party service platform SDK is triggered.
[0018] Optionally, as a second possible implementation manner of the first aspect, the detecting the terminal operating environment to determine whether a third-party service platform SDK exists in the terminal operating environment includes:
[0019] Based on the name of the third-party service platform, detecting whether there is an SDK matching the name of the third-party service platform in the terminal operating environment;
[0020] In the case where an SDK matching the name of the third-party service platform exists in the terminal operating environment, determining that the third-party service platform SDK exists in the terminal operating environment;
[0021] In a case where there is no SDK matching the name of the third-party service platform in the terminal operating environment, it is determined that there is no third-party service platform SDK in the terminal operating environment.
[0022] Optionally, as a third possible implementation manner of the first aspect, the acquiring, from the configuration management platform based on the name of the third-party service platform and the name of the terminal operating environment, download address information of the third-party service platform SDK includes:
[0023] Based on the name of the third-party service platform and the name of the terminal operating environment, a request for obtaining download address information of the third-party service platform SDK is sent to the configuration management platform;
[0024] Receive the download address information of the third-party service platform SDK sent by the configuration management platform.
[0025] To achieve the above-mentioned purpose, the second embodiment of the present invention proposes an SDK calling method, which is applied to a configuration management platform, wherein the configuration management platform stores third-party service platform SDK information, wherein the third-party service platform SDK information includes the name of the third-party service platform, the name of the terminal operating environment, and the download address information of the third-party service platform SDK.
[0026] The method comprises:
[0027] A request for obtaining download address information of a third-party service platform SDK sent by a receiving terminal;
[0028] According to the third-party service platform name and the terminal operating environment name carried in the request, determine the target third-party service platform SDK information that successfully matches both the third-party service platform name and the terminal operating environment name;
[0029] The download address information of the third-party service platform SDK in the target third-party service platform SDK information is determined as the download address information of the third-party service platform SDK, and sent to the terminal.
[0030] Optionally, as a first possible implementation manner of the second aspect, determining, according to the third-party service platform name and the terminal operating environment name carried in the request, target third-party service platform SDK information that successfully matches both the third-party service platform name and the terminal operating environment name includes:
[0031] Matching the third-party service platform name with the third-party service platform name in any third-party service platform SDK information stored in the configuration management platform and matching the terminal operating environment name with the terminal operating environment name in any third-party service platform SDK information stored in the configuration management platform;
[0032] In the case that the third-party service platform name and the terminal operating environment name both match successfully, the third-party service platform SDK information that matches successfully is determined as the target third-party service platform SDK information.
[0033] Optionally, as a second possible implementation manner of the second aspect, the third-party service platform SDK information also includes version information of the third-party service platform SDK.
[0034] To achieve the above-mentioned purpose, the third aspect of the present invention proposes an SDK calling device, which is applied to a terminal and includes:
[0035] A first processing module is used to obtain the name of the third-party service platform in response to the operation of triggering the third-party platform service, and detect the terminal operating environment to determine whether there is a third-party service platform SDK in the terminal operating environment;
[0036] an acquisition module, configured to acquire the name of the terminal operating environment if the third-party service platform SDK does not exist in the terminal operating environment, and acquire the download address information of the third-party service platform SDK from the configuration management platform based on the name of the third-party service platform and the name of the terminal operating environment;
[0037] The second processing module is used to download the third-party service platform SDK based on the download address information, and trigger the call of the third-party service platform SDK.
[0038] Optionally, as a first possible implementation manner of the third aspect, the apparatus further includes:
[0039] The calling module is used to trigger the calling of the third-party service platform SDK when the third-party service platform SDK exists in the terminal running environment.
[0040] Optionally, as a second possible implementation manner of the third aspect, the first processing module is further configured to:
[0041] Based on the name of the third-party service platform, detecting whether there is an SDK matching the name of the third-party service platform in the terminal operating environment;
[0042] In the case where an SDK matching the name of the third-party service platform exists in the terminal operating environment, determining that the third-party service platform SDK exists in the terminal operating environment;
[0043] In a case where there is no SDK matching the name of the third-party service platform in the terminal operating environment, it is determined that there is no third-party service platform SDK in the terminal operating environment.
[0044] Optionally, as a third possible implementation manner of the third aspect, the acquisition module is further used to:
[0045] Based on the name of the third-party service platform and the name of the terminal operating environment, a request for obtaining download address information of the third-party service platform SDK is sent to the configuration management platform;
[0046] Receive the download address information of the third-party service platform SDK sent by the configuration management platform.
[0047] To achieve the above-mentioned purpose, the fourth aspect of the present invention proposes an SDK calling device, which is applied to a configuration management platform, wherein the configuration management platform stores third-party service platform SDK information, wherein the third-party service platform SDK information includes the name of the third-party service platform, the name of the terminal operating environment, and the download address information of the third-party service platform SDK.
[0048] The device comprises:
[0049] A receiving module, used to receive a request sent by a terminal to obtain download address information of a third-party service platform SDK;
[0050] A determination module, configured to determine, according to the third-party service platform name and the terminal operating environment name carried in the request, target third-party service platform SDK information that successfully matches both the third-party service platform name and the terminal operating environment name;
[0051] The third processing module is used to determine the download address information of the third-party service platform SDK in the target third-party service platform SDK information as the download address information of the third-party service platform SDK, and send it to the terminal.
[0052] Optionally, as a first possible implementation manner of the fourth aspect, the determining module is further used to:
[0053] Matching the third-party service platform name with the third-party service platform name in any third-party service platform SDK information stored in the configuration management platform and matching the terminal operating environment name with the terminal operating environment name in any third-party service platform SDK information stored in the configuration management platform;
[0054] In the case that the third-party service platform name and the terminal operating environment name both match successfully, the third-party service platform SDK information that matches successfully is determined as the target third-party service platform SDK information.
[0055] Optionally, as a second possible implementation manner of the fourth aspect, the third-party service platform SDK information also includes version information of the third-party service platform SDK.
[0056] To achieve the above-mentioned object, a fifth aspect of the present invention provides an electronic device, including:
[0057] at least one processor; and
[0058] a memory communicatively connected to the at least one processor; wherein,
[0059] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the SDK calling method of the first aspect mentioned above, or execute the SDK calling method of the second aspect mentioned above.
[0060] In order to achieve the above-mentioned purpose, the sixth aspect of the present invention proposes a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the SDK calling method of the first aspect, or to execute the SDK calling method of the second aspect.
[0061] In order to achieve the above-mentioned purpose, the seventh aspect of the present invention proposes a computer program product, including a computer program, which, when executed by a processor, implements the SDK calling method of the first aspect, or implements the SDK calling method of the second aspect.
[0062] The technical solution provided by the embodiment of the present invention has the following beneficial effects:
[0063] By responding to the operation of triggering the third-party platform service, obtaining the name of the third-party service platform, and detecting the terminal operating environment to determine whether there is a third-party service platform SDK in the terminal operating environment, and then obtaining the terminal operating environment name when there is no third-party service platform SDK in the terminal operating environment, and based on the third-party service platform name and the terminal operating environment name, obtaining the download address information of the third-party service platform SDK from the configuration management platform, and then downloading the third-party service platform SDK based on the download address information, and triggering the call of the third-party service platform SDK. In this way, it is possible to dynamically detect the terminal operating environment when triggering the third-party platform service, and load the corresponding third-party service platform SDK on demand, solving the technical problem of strong coupling between business development and operating environment in the prior art.
[0064] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0066] Figure 1 A flowchart of an SDK calling method provided by an embodiment of the present invention;
[0067] Figure 2 A flowchart of another SDK calling method provided by an embodiment of the present invention;
[0068] Figure 3 A flowchart of another SDK calling method provided by an embodiment of the present invention;
[0069] Figure 4 A flowchart of another SDK calling method provided by an embodiment of the present invention;
[0070] Figure 5 A flowchart of another SDK calling method provided by an embodiment of the present invention;
[0071] Figure 6 A flowchart of another SDK calling method provided by an embodiment of the present invention;
[0072] Figure 7 A schematic diagram of a flow chart of an SDK calling method in a scenario provided by an embodiment of the present invention;
[0073] Figure 8 A schematic diagram of the structure of an SDK calling device provided by an embodiment of the present invention;
[0074] Fig. 9 A schematic diagram of the structure of another SDK calling device provided by an embodiment of the present invention;
[0075] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0076] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0077] In related technologies, when developing business application systems, it is necessary to consider the differences in the operating environments of various terminals. There are technical problems of strong coupling between business development and the operating environment, which are specifically manifested as follows:
[0078] 1. Before development, developers need to manually download the SDK corresponding to the terminal operating environment of the third-party platform service, and manually put it into each front-end project directory in advance.
[0079] 2. During the development process, developers need to consider different terminal operating environments in business codes and perform differentiated processing. Usually, they need to manually determine the operating environment, which involves hard coding.
[0080] 3. In the compilation and packaging stage, developers need to manually specify the operating environment to package different SDKs. Different operating environments need to be compiled and packaged independently, and there are multiple application deployment deliverables.
[0081] 4. To add a new terminal operating environment later, you also need to manually add the corresponding SDK, increase the corresponding environment code processing branch, and recompile and package it.
[0082] 5. For multiple projects within a company or team, the same third-party platform service SDK is applied in each project, which causes redundancy.
[0083] In response to the above problems, an embodiment of the present invention provides an SDK calling method, which is applied to the terminal to dynamically detect the terminal operating environment when triggering the third-party platform service, and load the corresponding third-party service platform SDK on demand, thereby solving the technical problem of strong coupling between business development and operating environment in the prior art.
[0084] The SDK calling method, device and electronic device according to the embodiments of the present invention are described below with reference to the accompanying drawings.
[0085] Figure 1 The flowchart of a SDK calling method provided by an embodiment of the present invention is shown in FIG.
[0086] like Figure 1 As shown, the SDK calling method includes the following steps:
[0087] Step 101, in response to an operation of triggering a third-party platform service, obtain the name of the third-party service platform, and detect the terminal operating environment to determine whether there is a third-party service platform SDK in the terminal operating environment.
[0088] It should be noted that the SDK calling method of the embodiment of the present invention can be executed by the SDK calling device provided by the embodiment of the present invention. The SDK calling device can be an electronic device, or can be configured in an electronic device. Among them, the electronic device can be any stationary or mobile computing device capable of data processing, such as a mobile computing device such as a laptop, a smart phone, a wearable device, or a stationary computing device such as a desktop computer, or a server, or other types of computing devices, etc., which are not limited in this embodiment.
[0089] Among them, third-party platform services can be understood as professional services provided by service providers in the role of a third party, such as map services, payment services, voice services, etc.
[0090] Among them, the terminal operating environment can include PC, H5, APP, WeChat applet, Alipay applet, etc.
[0091] In this embodiment, in response to the operation of triggering the third-party platform service, the name of the third-party service platform can be obtained, and the terminal operating environment can be detected based on the obtained third-party service platform name to determine whether there is a third-party service platform SDK in the terminal operating environment. It can be understood that by detecting the terminal environment, two detection results can be obtained for whether there is a third-party service platform SDK in the terminal operating environment, one is that there is a third-party service platform SDK in the terminal operating environment, and the other is that there is no third-party service platform SDK in the terminal operating environment.
[0092] It should be noted that the SDK calling device provided in the embodiment of the present invention can obtain the name of the third-party service platform through various open, legal and compliant methods. For example, the SDK calling device can obtain the name of the third-party service platform in real time in response to the operation of triggering the third-party platform service, or it can also obtain the name of the third-party service platform from other devices in response to the operation of triggering the third-party platform service, or it can also obtain the name of the third-party service platform through other open, legal and compliant methods. This is not limited in this embodiment.
[0093] Since the SDKs of different platform services are different, the SDKs of the same platform service are also different in different terminal operating environments. Therefore, for any third-party platform service, different SDKs exist in different terminal operating environments. In this embodiment, by responding to the operation of triggering the third-party platform service, the terminal operating environment is detected. This can achieve dynamic detection of the terminal operating environment when the third-party platform service is triggered, and if the third-party service platform SDK does not exist in the terminal operating environment, the third-party service platform SDK can be loaded on demand, avoiding the cumbersome manual operations and project SDK redundancy caused by the strong coupling of business development and the operating environment.
[0094] Step 102, when the third-party service platform SDK does not exist in the terminal operating environment, obtain the terminal operating environment name, and obtain the download address information of the third-party service platform SDK from the configuration management platform based on the third-party service platform name and the terminal operating environment name.
[0095] Among them, the configuration management platform stores the third-party service platform SDK information, which may specifically include the name of the third-party service platform, the name of the terminal operating environment, and the download address information of the third-party service platform SDK. It should be noted that there is a corresponding relationship between the download address information of the third-party service platform SDK stored in the configuration management platform and the name of the third-party service platform and the name of the terminal operating environment, that is, one third-party service platform name + one terminal operating environment name corresponds to one download address information of the third-party service platform SDK.
[0096] In this embodiment, when the third-party service platform SDK does not exist in the terminal operating environment, the terminal operating environment name can be obtained, so as to obtain the download address information of the third-party service platform SDK from the configuration management platform based on the obtained terminal operating environment name and the third-party service platform name. It can be understood that since there is a corresponding relationship between the download address information of the third-party service platform SDK stored in the configuration management platform and the third-party service platform name and the terminal operating environment name, the corresponding download address information of the third-party service platform SDK can be obtained from the configuration management platform based on the third-party service platform name and the terminal operating environment name. Optionally, the download address information of the third-party service platform SDK can be obtained from the configuration management platform by network transmission.
[0097] It should be noted that the SDK calling device provided in the embodiment of the present invention can obtain the terminal operating environment name through various open, legal and compliant methods. For example, the SDK calling device can obtain the terminal operating environment name in real time, or it can also obtain the terminal operating environment name from other devices, or it can also obtain the terminal operating environment name through other open, legal and compliant methods. This is not limited in this embodiment.
[0098] Step 103: Download the third-party service platform SDK based on the download address information, and trigger the call of the third-party service platform SDK.
[0099] In this embodiment, after obtaining the download address information of the third-party service platform SDK, the third-party service platform SDK is downloaded based on the download address information, and after the third-party service platform SDK is downloaded, the third-party service platform SDK is triggered to be called. In this way, the terminal operating environment can be dynamically detected when the third-party platform service is triggered, and the corresponding third-party service platform SDK can be loaded as needed.
[0100] The SDK calling method provided in the embodiment of the present invention obtains the name of the third-party service platform in response to the operation of triggering the third-party platform service, and detects the terminal operating environment to determine whether there is a third-party service platform SDK in the terminal operating environment, thereby obtaining the terminal operating environment name when there is no third-party service platform SDK in the terminal operating environment, and based on the third-party service platform name and the terminal operating environment name, obtains the download address information of the third-party service platform SDK from the configuration management platform, and then downloads the third-party service platform SDK based on the download address information, and triggers the calling of the third-party service platform SDK. In this way, it is possible to dynamically detect the terminal operating environment when triggering the third-party platform service, and load the corresponding third-party service platform SDK on demand, solving the technical problem of strong coupling between business development and operating environment in the prior art.
[0101] Through the above analysis, it can be known that by detecting the terminal environment, two detection results can be obtained for whether there is a third-party service platform SDK in the terminal operating environment. In order to more comprehensively illustrate the previous embodiment, this embodiment provides another SDK calling method. Figure 2 This is a flow chart of another SDK calling method provided by an embodiment of the present invention. Similarly, the SDK calling method in the embodiment of the present invention is also applied to the terminal.
[0102] like Figure 2 As shown, the SDK calling method may include the following steps:
[0103] Step 201, in response to an operation of triggering a third-party platform service, obtain the name of the third-party service platform, and detect the terminal operating environment to determine whether there is a third-party service platform SDK in the terminal operating environment.
[0104] Step 202, when the third-party service platform SDK does not exist in the terminal operating environment, obtain the terminal operating environment name, and obtain the download address information of the third-party service platform SDK from the configuration management platform based on the third-party service platform name and the terminal operating environment name.
[0105] Step 203: Download the third-party service platform SDK based on the download address information, and trigger the call of the third-party service platform SDK.
[0106] It should be noted that the execution process of steps 201-203 can refer to the execution process of steps 101-103 in the previous embodiment, and the principles are the same, which will not be repeated here.
[0107] Step 204: When the third-party service platform SDK exists in the terminal operating environment, trigger the calling of the third-party service platform SDK.
[0108] In this embodiment, when the third-party service platform SDK exists in the terminal operating environment, the third-party service platform SDK can be directly triggered to be called.
[0109] The SDK calling method provided in the embodiment of the present invention obtains the name of the third-party service platform in response to the operation of triggering the third-party platform service, and detects the terminal operating environment to determine whether there is a third-party service platform SDK in the terminal operating environment, thereby obtaining the terminal operating environment name when there is no third-party service platform SDK in the terminal operating environment, and based on the third-party service platform name and the terminal operating environment name, obtains the download address information of the third-party service platform SDK from the configuration management platform, so as to download the third-party service platform SDK based on the download address information, and trigger the calling of the third-party service platform SDK, or directly trigger the calling of the third-party service platform SDK when there is a third-party service platform SDK in the terminal operating environment. In this way, it is possible to dynamically detect the terminal operating environment when triggering the third-party platform service, and load the corresponding third-party service platform SDK on demand based on the detection result, thereby solving the technical problem of strong coupling between business development and operating environment in the prior art.
[0110] In order to more clearly illustrate the process of detecting the terminal operating environment to determine whether a third-party service platform SDK exists in the terminal operating environment in the embodiment of the present invention, this embodiment provides another SDK calling method. Figure 3 This is a flow chart of another SDK calling method provided by an embodiment of the present invention. Similarly, the SDK calling method in the embodiment of the present invention is also applied to the terminal.
[0111] like Figure 3 As shown, the SDK calling method may include the following steps:
[0112] Step 301, in response to an operation of triggering a third-party platform service, obtain the name of the third-party service platform, and based on the name of the third-party service platform, detect whether there is an SDK matching the name of the third-party service platform in the terminal operating environment.
[0113] In this embodiment, in response to the operation of triggering the third-party platform service, the third-party service platform name can be obtained, so as to detect whether there is an SDK matching the third-party service platform name in the terminal operating environment based on the obtained third-party service platform name.
[0114] In a possible implementation of this embodiment, the name of the SDK detected in the terminal operating environment can be matched with the name of the third-party service platform to determine whether there is an SDK matching the name of the third-party service platform in the terminal operating environment. Specifically, the SDK existing in the terminal operating environment can be detected first to obtain at least one SDK in the terminal operating environment, and then for any SDK in the terminal operating environment, the name of the SDK is matched with the name of the third-party service platform to determine whether there is an SDK matching the name of the third-party service platform in the terminal operating environment.
[0115] It should be noted that the other execution processes of this step can refer to the execution process of step 101 in the above embodiment, and the principles are the same, which will not be repeated here.
[0116] Step 302: If there is an SDK matching the name of the third-party service platform in the terminal operating environment, determine whether there is a third-party service platform SDK in the terminal operating environment.
[0117] Since it is possible to determine whether there is an SDK matching the name of the third-party service platform in the terminal operating environment by matching the name of the SDK in any terminal operating environment, it is possible to determine whether there is an SDK matching the name of the third-party service platform in the terminal operating environment if the name of the SDK in any terminal operating environment successfully matches the name of the third-party service platform. Furthermore, if there is an SDK matching the name of the third-party service platform in the terminal operating environment, it is possible to determine that there is a third-party service platform SDK in the terminal operating environment.
[0118] Step 303: if there is no SDK matching the name of the third-party service platform in the terminal operating environment, it is determined that there is no third-party service platform SDK in the terminal operating environment.
[0119] Similarly, if the name of the SDK in any terminal operating environment fails to match the name of the third-party service platform, it can be determined that there is no SDK matching the name of the third-party service platform in the terminal operating environment. Furthermore, if there is no SDK matching the name of the third-party service platform in the terminal operating environment, it can be determined that there is no third-party service platform SDK in the terminal operating environment.
[0120] Step 304, when the third-party service platform SDK does not exist in the terminal operating environment, obtain the terminal operating environment name, and obtain the download address information of the third-party service platform SDK from the configuration management platform based on the third-party service platform name and the terminal operating environment name.
[0121] Step 305: Download the third-party service platform SDK based on the download address information, and trigger the call of the third-party service platform SDK.
[0122] Step 306: If the third-party service platform SDK exists in the terminal operating environment, trigger the calling of the third-party service platform SDK.
[0123] It should be noted that the execution process of steps 304-306 can refer to the execution process of steps 202-204 in the previous embodiment, and the principles are the same, which will not be repeated here.
[0124] The SDK calling method provided in the embodiment of the present invention obtains the name of the third-party service platform in response to the operation of triggering the third-party platform service, and detects whether there is an SDK matching the name of the third-party service platform in the terminal operating environment based on the name of the third-party service platform, thereby determining that there is a third-party service platform SDK in the terminal operating environment when there is an SDK matching the name of the third-party service platform in the terminal operating environment, and determining that there is no third-party service platform SDK in the terminal operating environment when there is no SDK matching the name of the third-party service platform in the terminal operating environment. Thus, it is possible to detect the terminal operating environment to determine whether there is a third-party service platform SDK in the terminal operating environment, and load the third-party service platform SDK on demand when there is no third-party service platform SDK in the terminal operating environment, thereby decoupling business development from the operating environment.
[0125] In order to more clearly illustrate the process of obtaining the download address information of the third-party service platform SDK from the configuration management platform based on the third-party service platform name and the terminal operating environment name in the embodiment of the present invention, this embodiment provides another SDK calling method. Figure 4 This is a flow chart of another SDK calling method provided by an embodiment of the present invention. Similarly, the SDK calling method in the embodiment of the present invention is also applied to the terminal.
[0126] like Figure 4 As shown, the SDK calling method may include the following steps:
[0127] Step 401, in response to the operation of triggering the third-party platform service, obtain the name of the third-party service platform, and detect the terminal operating environment to determine whether there is a third-party service platform SDK in the terminal operating environment.
[0128] It should be noted that the execution process of this step can refer to the execution process of step 101 in the above embodiment, and the principle is the same, which will not be repeated here.
[0129] Step 402, when the third-party service platform SDK does not exist in the terminal operating environment, obtain the terminal operating environment name, and send a request for obtaining the download address information of the third-party service platform SDK to the configuration management platform based on the third-party service platform name and the terminal operating environment name.
[0130] Among them, the configuration management platform stores the third-party service platform SDK information, which may specifically include the name of the third-party service platform, the name of the terminal operating environment, and the download address information of the third-party service platform SDK. It should be noted that there is a corresponding relationship between the download address information of the third-party service platform SDK stored in the configuration management platform and the name of the third-party service platform and the name of the terminal operating environment, that is, one third-party service platform name + one terminal operating environment name corresponds to one download address information of the third-party service platform SDK.
[0131] In this embodiment, when the third-party service platform SDK does not exist in the terminal operating environment, the terminal operating environment name can be obtained, so as to send a request for obtaining the download address information of the third-party service platform SDK to the configuration management platform based on the obtained terminal operating environment name and the third-party service platform name. It should be noted that the request for obtaining the download address information of the third-party service platform SDK sent to the configuration management platform in this step carries the third-party service platform name and the terminal operating environment name, so that the configuration management platform can determine the download address information of the third-party service platform SDK based on the third-party service platform name and the terminal operating environment name carried in the request.
[0132] It can be understood that since there is a correspondence between the download address information of the third-party service platform SDK stored in the configuration management platform and the third-party service platform name and the terminal operating environment name, the configuration management platform can determine the download address information of the third-party service platform SDK based on the third-party service platform name and the terminal operating environment name carried in the request.
[0133] It should be noted that the SDK calling device provided in the embodiment of the present invention can obtain the terminal operating environment name through various open, legal and compliant methods. For example, the SDK calling device can obtain the terminal operating environment name in real time, or it can also obtain the terminal operating environment name from other devices, or it can also obtain the terminal operating environment name through other open, legal and compliant methods. This is not limited in this embodiment.
[0134] Step 403: Receive the download address information of the third-party service platform SDK sent by the configuration management platform.
[0135] In this embodiment, after sending a request for obtaining the download address information of the third-party service platform SDK to the configuration management platform, the download address information of the third-party service platform SDK sent by the configuration management platform can be received through network transmission.
[0136] Step 404: Download the third-party service platform SDK based on the download address information, and trigger the call of the third-party service platform SDK.
[0137] It should be noted that the execution process of this step can refer to the execution process of step 103 in the above embodiment, and the principles are the same, which will not be repeated here.
[0138] The SDK calling method provided in the embodiment of the present invention obtains the name of the third-party service platform in response to the operation of triggering the third-party platform service, and detects whether there is an SDK matching the name of the third-party service platform in the terminal operating environment based on the name of the third-party service platform, thereby obtaining the name of the terminal operating environment when the third-party service platform SDK does not exist in the terminal operating environment, and based on the name of the third-party service platform and the name of the terminal operating environment, sends a request to the configuration management platform to obtain the download address information of the third-party service platform SDK, and then after receiving the download address information of the third-party service platform SDK sent by the configuration management platform, the third-party service platform SDK is downloaded based on the download address information, and the calling of the third-party service platform SDK is triggered. In this way, it is possible to obtain the download address information of the third-party service platform SDK from the configuration management platform based on the name of the third-party service platform and the name of the terminal operating environment.
[0139] It should be noted that the above embodiment is described from the perspective of the terminal. In order to more clearly illustrate the SDK calling process, the embodiment of the present invention provides a possible implementation of an SDK calling method described from the perspective of the configuration management platform. Figure 5 A flowchart of another SDK calling method provided by an embodiment of the present invention. It is understandable that the SDK calling method in the embodiment of the present invention is applied to a configuration management platform, which stores third-party service platform SDK information, and the third-party service platform SDK information includes the name of the third-party service platform, the name of the terminal operating environment, and the download address information of the third-party service platform SDK. Optionally, the third-party service platform SDK information may also include the version information of the third-party service platform SDK.
[0140] like Figure 5 As shown, the SDK calling method may include the following steps:
[0141] Step 501: receiving a request sent by a terminal to obtain download address information of a third-party service platform SDK.
[0142] Similarly, the SDK calling method of the embodiment of the present invention can also be executed by the SDK calling device provided by the embodiment of the present invention. The SDK calling device can be an electronic device, or can be configured in an electronic device. Among them, the electronic device can be any stationary or mobile computing device capable of data processing, such as a mobile computing device such as a laptop, a smart phone, a wearable device, or a stationary computing device such as a desktop computer, or a server, or other types of computing devices, etc., which are not limited in this embodiment.
[0143] In this embodiment, a request for obtaining the download address information of the third-party service platform SDK sent by the terminal can be received by network transmission. It should be noted that the request carries the name of the third-party service platform and the name of the terminal operating environment, so that the subsequent steps can determine the download address information of the third-party service platform SDK based on the name of the third-party service platform and the name of the terminal operating environment carried in the request.
[0144] Step 502: According to the third-party service platform name and the terminal operating environment name carried in the request, determine the target third-party service platform SDK information that successfully matches the third-party service platform name and the terminal operating environment name.
[0145] In this embodiment, after receiving the request sent by the terminal to obtain the download address information of the third-party service platform SDK, the target third-party service platform SDK information that successfully matches the third-party service platform name and the terminal operating environment name can be determined based on the third-party service platform name and the terminal operating environment name carried in the request. Optionally, the target third-party service platform SDK information can be determined by matching the third-party service platform name in the third-party service platform SDK information stored in the configuration management platform with the third-party service platform name carried in the request, and matching the terminal operating environment name in the third-party service platform SDK information stored in the configuration management platform with the terminal operating environment name carried in the request.
[0146] Step 503: determine the download address information of the third-party service platform SDK in the target third-party service platform SDK information as the download address information of the third-party service platform SDK, and send it to the terminal.
[0147] In this embodiment, the download address information of the third-party service platform SDK in the target third-party service platform SDK information may be determined as the download address information of the third-party service platform SDK and sent to the terminal via network transmission.
[0148] The SDK calling method provided in the embodiment of the present invention receives a request sent by a terminal to obtain the download address information of the third-party service platform SDK, thereby determining the target third-party service platform SDK information that successfully matches the third-party service platform name and the terminal operating environment name according to the third-party service platform name and the terminal operating environment name carried in the request, and then determining the download address information of the third-party service platform SDK in the target third-party service platform SDK information as the download address information of the third-party service platform SDK, and sending it to the terminal. In this way, the configuration management platform can send the download address information of the third-party service platform SDK requested by the terminal to the terminal as needed.
[0149] In order to more clearly illustrate the process of determining the target third-party service platform SDK information that successfully matches the third-party service platform name and the terminal operating environment name according to the third-party service platform name and the terminal operating environment name carried in the request in the embodiment of the present invention, this embodiment provides another SDK calling method. Figure 6 A flowchart of another SDK calling method provided by an embodiment of the present invention. Similarly, the SDK calling method in the embodiment of the present invention is also applied to the configuration management platform, which also stores the third-party service platform SDK information, and the third-party service platform SDK information also includes the third-party service platform name, the terminal operating environment name, and the download address information of the third-party service platform SDK.
[0150] like Figure 6 As shown, the SDK calling method may include the following steps:
[0151] Step 601: receiving a request sent by a terminal to obtain download address information of a third-party service platform SDK.
[0152] It should be noted that the execution process of this step can refer to the execution process of step 501 in the above embodiment, and the principles are the same, which will not be repeated here.
[0153] Step 602, matching the third-party service platform name with the third-party service platform name in any third-party service platform SDK information stored in the configuration management platform, and matching the terminal operating environment name with the terminal operating environment name in any third-party service platform SDK information stored in the configuration management platform.
[0154] In this embodiment, the third-party service platform name can be matched with the third-party service platform name in any third-party service platform SDK information stored in the configuration management platform, and the terminal operating environment name can be matched with the terminal operating environment name in any third-party service platform SDK information stored in the configuration management platform. Optionally, the third-party service platform name in any third-party service platform SDK information stored in the configuration management platform can be matched with the third-party service platform name carried in the request to obtain at least one third-party service platform name successfully matched third-party service platform SDK information, and then the terminal operating environment name in the third-party service platform SDK information obtained with at least one third-party service platform name successfully matched is matched with the terminal operating environment name carried in the request. Alternatively, the terminal operating environment name in any third-party service platform SDK information stored in the configuration management platform can be matched with the terminal operating environment name carried in the request to obtain at least one third-party service platform SDK information successfully matched with the terminal operating environment name, and then the third-party service platform name in the third-party service platform SDK information obtained with at least one terminal operating environment name successfully matched is matched with the third-party service platform name carried in the request, which is not limited in this embodiment.
[0155] Step 603: When the third-party service platform name and the terminal operating environment name both match successfully, the third-party service platform SDK information that matches successfully is determined as the target third-party service platform SDK information.
[0156] In this embodiment, when the third-party service platform name and the terminal operating environment name are successfully matched, the successfully matched third-party service platform SDK information can be determined as the target third-party service platform SDK information. Thus, the target third-party service platform SDK information can be obtained based on the third-party service platform name and the terminal operating environment name carried in the request.
[0157] Step 604: determine the download address information of the third-party service platform SDK in the target third-party service platform SDK information as the download address information of the third-party service platform SDK, and send it to the terminal.
[0158] It should be noted that the execution process of this step can refer to the execution process of step 503 in the above embodiment, and the principles are the same, which will not be repeated here.
[0159] The SDK calling method provided in the embodiment of the present invention matches the third-party service platform name with the third-party service platform name in any third-party service platform SDK information stored in the configuration management platform, and matches the terminal operating environment name with the terminal operating environment name in any third-party service platform SDK information stored in the configuration management platform, so that when both the third-party service platform name and the terminal operating environment name are successfully matched, the successfully matched third-party service platform SDK information is determined as the target third-party service platform SDK information. In this way, the target third-party service platform SDK information can be determined based on the third-party service platform name and the terminal operating environment name carried in the request.
[0160] In order to clearly illustrate the above embodiments of the invention, examples are now given for illustration.
[0161] Figure 7 A schematic diagram of a flow chart of an SDK calling method in a scenario provided by an embodiment of the present invention;
[0162] like Figure 7 As shown, a variety of applications can be run in the terminal, such as mini-program applications, H5 applications, APP applications, etc., so that the third-party service platform will have corresponding SDK information, such as mini-program SDK, H5SDK, APP SDK, etc., and then the configuration management platform can be targeted at any third-party service platform, the SDK information of each existing unified configuration management, that is, the SDK information of each third-party service platform is centrally configured and managed. Among them, the third-party service platform SDK information may include the name of the third-party service platform, the name of the terminal operating environment, and the download address information of the third-party service platform SDK. Optionally, the third-party service platform SDK information may also include the version information of the third-party service platform SDK.
[0163] Since the configuration management platform can perform centralized configuration management on the SDK information of each third-party service platform, when the terminal is running an application, it can respond to the operation of triggering the third-party platform service, obtain the name of the third-party service platform, and detect whether there is a third-party service platform SDK in the terminal operating environment based on the name of the third-party service platform. In the event that the third-party service platform SDK does not exist in the terminal operating environment, the terminal operating environment name is obtained, and a request is made to the configuration management platform for the download address information of the third-party service platform SDK based on the name of the third-party service platform and the name of the terminal operating environment. After receiving the download address information of the third-party service platform SDK sent by the configuration management platform, the third-party service platform SDK is dynamically loaded on demand based on the download address information, and the call of the third-party service platform SDK is triggered.
[0164] For example, assuming that the terminal runs an APP application, in the process of the terminal running the APP application, in response to the operation of triggering the third-party platform service, the name of the third-party service platform can be obtained, and based on the name of the third-party service platform, whether there is an APP SDK of the third-party service platform in the terminal operating environment, so that when there is no APP SDK of the third-party service platform in the terminal operating environment, the name of the terminal operating environment is obtained, and based on the name of the third-party service platform and the name of the terminal operating environment, a request is made to the configuration management platform to obtain the download address information of the APP SDK of the third-party service platform, and then after receiving the download address information of the APP SDK of the third-party service platform sent by the configuration management platform, based on the download address information, the APP SDK of the third-party service platform is dynamically loaded on demand, and the APP SDK of the third-party service platform is triggered to be called. In this way, the SDK can be loaded on demand, effectively avoiding the situation of SDK redundancy.
[0165] With the above Figures 1 to 4 Corresponding to the SDK calling method provided in the embodiment, the present invention also provides an SDK calling device. Figures 1 to 4 The SDK calling method provided in the embodiment corresponds to the SDK calling method, so the implementation method of the SDK calling method is also applicable to the SDK calling device provided in the embodiment of the present invention, and will not be described in detail in the embodiment of the present invention.
[0166] Figure 8 This is a schematic diagram of the structure of an SDK calling device provided in an embodiment of the present invention. It should be noted that the SDK calling device in the embodiment of the present invention is applied to a terminal.
[0167] like Figure 8 As shown, the SDK calling device includes: a first processing module 81, an acquisition module 82 and a second processing module 83.
[0168] The first processing module 81 is used to obtain the name of the third-party service platform in response to the operation of triggering the third-party platform service, and detect the terminal operating environment to determine whether there is a third-party service platform SDK in the terminal operating environment;
[0169] The acquisition module 82 is used to acquire the terminal operating environment name when the third-party service platform SDK does not exist in the terminal operating environment, and acquire the download address information of the third-party service platform SDK from the configuration management platform based on the third-party service platform name and the terminal operating environment name;
[0170] The second processing module 83 is used to download the third-party service platform SDK based on the download address information, and trigger the call of the third-party service platform SDK.
[0171] Furthermore, in a possible implementation of the embodiment of the present invention, the first processing module 81 is further configured to:
[0172] Based on the name of the third-party service platform, detect whether there is an SDK matching the name of the third-party service platform in the terminal operating environment;
[0173] If there is an SDK matching the name of the third-party service platform in the terminal operating environment, determining that the third-party service platform SDK exists in the terminal operating environment;
[0174] When there is no SDK matching the name of the third-party service platform in the terminal operating environment, it is determined that there is no third-party service platform SDK in the terminal operating environment.
[0175] Furthermore, in a possible implementation of the embodiment of the present invention, the acquisition module 82 is further configured to:
[0176] Based on the name of the third-party service platform and the name of the terminal operating environment, a request is sent to the configuration management platform to obtain the download address information of the third-party service platform SDK;
[0177] Receive the download address information of the third-party service platform SDK sent by the configuration management platform.
[0178] Furthermore, in a possible implementation manner of the embodiment of the present invention, the above-mentioned device also includes: a calling module, which is used to trigger the calling of the third-party service platform SDK when the third-party service platform SDK exists in the terminal operating environment.
[0179] The SDK calling device provided in the embodiment of the present invention obtains the name of the third-party service platform in response to the operation of triggering the third-party platform service, and detects the terminal operating environment to determine whether there is a third-party service platform SDK in the terminal operating environment, thereby obtaining the terminal operating environment name when there is no third-party service platform SDK in the terminal operating environment, and based on the third-party service platform name and the terminal operating environment name, obtains the download address information of the third-party service platform SDK from the configuration management platform, and then downloads the third-party service platform SDK based on the download address information, and triggers the calling of the third-party service platform SDK. In this way, it is possible to dynamically detect the terminal operating environment when triggering the third-party platform service, and load the corresponding third-party service platform SDK on demand, solving the technical problem of strong coupling between business development and operating environment in the prior art.
[0180] With the above Figures 5 and 6 Corresponding to the SDK calling method provided in the embodiment, the present invention also provides an SDK calling device. Figures 5 and 6The SDK calling method provided in the embodiment corresponds to the SDK calling method, so the implementation method of the SDK calling method is also applicable to the SDK calling device provided in the embodiment of the present invention, and will not be described in detail in the embodiment of the present invention.
[0181] Fig. 9 A structural diagram of another SDK calling device provided in an embodiment of the present invention. It should be noted that the SDK calling device in the embodiment of the present invention is applied to a configuration management platform, and the configuration management platform stores third-party service platform SDK information, and the third-party service platform SDK information includes the name of the third-party service platform, the name of the terminal operating environment, and the download address information of the third-party service platform SDK.
[0182] like Fig. 9 As shown, the SDK calling device includes: a receiving module 91, a determining module 92 and a third processing module 93.
[0183] The receiving module 91 is used to receive a request sent by a terminal to obtain download address information of a third-party service platform SDK;
[0184] A determination module 92 is used to determine target third-party service platform SDK information that successfully matches both the third-party service platform name and the terminal operating environment name according to the third-party service platform name and the terminal operating environment name carried in the request;
[0185] The third processing module 93 is used to determine the download address information of the third-party service platform SDK in the target third-party service platform SDK information as the download address information of the third-party service platform SDK, and send it to the terminal.
[0186] Furthermore, in a possible implementation of the embodiment of the present invention, the determination module 92 is further configured to:
[0187] Matching the third-party service platform name with the third-party service platform name in any third-party service platform SDK information stored in the configuration management platform, and matching the terminal operating environment name with the terminal operating environment name in any third-party service platform SDK information stored in the configuration management platform;
[0188] When the third-party service platform name and the terminal operating environment name both match successfully, the successfully matched third-party service platform SDK information is determined as the target third-party service platform SDK information.
[0189] Furthermore, in a possible implementation manner of the embodiment of the present invention, the third-party service platform SDK information also includes version information of the third-party service platform SDK.
[0190] The SDK calling device provided in the embodiment of the present invention receives a request for obtaining the download address information of the third-party service platform SDK sent by the terminal, thereby determining the target third-party service platform SDK information that successfully matches the third-party service platform name and the terminal operating environment name according to the third-party service platform name and the terminal operating environment name carried in the request, and then determining the download address information of the third-party service platform SDK in the target third-party service platform SDK information as the download address information of the third-party service platform SDK, and sending it to the terminal. In this way, the configuration management platform can send the download address information of the third-party service platform SDK requested by the terminal to the terminal as needed.
[0191] In order to implement the above embodiments, the present invention also proposes an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the SDK calling method proposed in any of the above embodiments of the present invention.
[0192] Fig.10 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. It should be noted that: Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0193] like Fig.10 As shown, the electronic device may include: a housing 11, a processor 12, a memory 13, a circuit board 14 and a power supply circuit 15, wherein the circuit board 14 is arranged inside the space enclosed by the housing 11, and the processor 12 and the memory 23 are arranged on the circuit board 14; the power supply circuit 15 is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory 13 is used to store executable program codes; the processor 12 runs the program corresponding to the executable program code by reading the executable program code stored in the memory 13, so as to execute the SDK calling method proposed in any of the above-mentioned embodiments of the present invention.
[0194] For details on the specific execution process of the above steps by the processor 12 and the steps further executed by the processor 12 by running the executable program code, please refer to the present invention. Figure 1-7 The description of the illustrated embodiment will not be repeated here.
[0195] In order to implement the above embodiments, the present invention further proposes a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the SDK calling method proposed in any of the above embodiments of the present invention.
[0196] In order to implement the above embodiments, the present invention further proposes a computer program product, including a computer program, which, when executed by a processor, implements the SDK calling method proposed in any of the above embodiments of the present invention.
[0197] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0198] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0199] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.
[0200] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0201] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0202] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0203] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0204] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A SDK calling method, characterized in that: Applied to terminals, including: In response to the operation of triggering the third-party platform service, obtaining the name of the third-party service platform, and detecting the terminal operating environment to determine whether there is a third-party service platform SDK in the terminal operating environment; In the case that the third-party service platform SDK does not exist in the terminal operating environment, obtaining the terminal operating environment name, and obtaining the download address information of the third-party service platform SDK from the configuration management platform based on the third-party service platform name and the terminal operating environment name; Based on the download address information, the third-party service platform SDK is downloaded, and the third-party service platform SDK is triggered to be called.
2. The method according to claim 1, characterized in that The method further comprises: In the case that the third-party service platform SDK exists in the terminal operating environment, the calling of the third-party service platform SDK is triggered.
3. The method according to claim 1 or 2, characterized in that: The detecting of the terminal operating environment to determine whether there is a third-party service platform SDK in the terminal operating environment includes: Based on the name of the third-party service platform, detecting whether there is an SDK matching the name of the third-party service platform in the terminal operating environment; In the case where an SDK matching the name of the third-party service platform exists in the terminal operating environment, determining that the third-party service platform SDK exists in the terminal operating environment; In a case where there is no SDK matching the name of the third-party service platform in the terminal operating environment, it is determined that there is no third-party service platform SDK in the terminal operating environment.
4. The method according to claim 1 or 2, characterized in that: The acquiring, from the configuration management platform, download address information of the third-party service platform SDK based on the name of the third-party service platform and the name of the terminal operating environment includes: Based on the name of the third-party service platform and the name of the terminal operating environment, a request for obtaining download address information of the third-party service platform SDK is sent to the configuration management platform; Receive the download address information of the third-party service platform SDK sent by the configuration management platform.
5. A SDK calling method, characterized in that: Applied to a configuration management platform, wherein the configuration management platform stores third-party service platform SDK information, wherein the third-party service platform SDK information includes the name of the third-party service platform, the name of the terminal operating environment, and the download address information of the third-party service platform SDK. The method comprises: A request for obtaining download address information of a third-party service platform SDK sent by a receiving terminal; According to the third-party service platform name and the terminal operating environment name carried in the request, determine the target third-party service platform SDK information that successfully matches both the third-party service platform name and the terminal operating environment name; The download address information of the third-party service platform SDK in the target third-party service platform SDK information is determined as the download address information of the third-party service platform SDK, and sent to the terminal.
6. The method according to claim 5, characterized in that The determining, according to the third-party service platform name and the terminal operating environment name carried in the request, target third-party service platform SDK information that successfully matches both the third-party service platform name and the terminal operating environment name, includes: Matching the third-party service platform name with the third-party service platform name in any third-party service platform SDK information stored in the configuration management platform and matching the terminal operating environment name with the terminal operating environment name in any third-party service platform SDK information stored in the configuration management platform; In the case that the third-party service platform name and the terminal operating environment name both match successfully, the third-party service platform SDK information that matches successfully is determined as the target third-party service platform SDK information.
7. The method according to any one of claims 5 to 6, characterized in that: The third-party service platform SDK information also includes version information of the third-party service platform SDK.
8. An SDK calling device, characterized in that: Applied to terminals, including: A first processing module is used to obtain the name of the third-party service platform in response to the operation of triggering the third-party platform service, and detect the terminal operating environment to determine whether there is a third-party service platform SDK in the terminal operating environment; an acquisition module, configured to acquire the name of the terminal operating environment if the third-party service platform SDK does not exist in the terminal operating environment, and acquire the download address information of the third-party service platform SDK from the configuration management platform based on the name of the third-party service platform and the name of the terminal operating environment; The second processing module is used to download the third-party service platform SDK based on the download address information, and trigger the call of the third-party service platform SDK.
9. An SDK calling device, characterized in that: Applied to a configuration management platform, wherein the configuration management platform stores third-party service platform SDK information, wherein the third-party service platform SDK information includes the name of the third-party service platform, the name of the terminal operating environment, and the download address information of the third-party service platform SDK. The device comprises: A receiving module, used to receive a request sent by a terminal to obtain download address information of a third-party service platform SDK; A determination module, configured to determine, according to the third-party service platform name and the terminal operating environment name carried in the request, target third-party service platform SDK information that successfully matches both the third-party service platform name and the terminal operating environment name; The third processing module is used to determine the download address information of the third-party service platform SDK in the target third-party service platform SDK information as the download address information of the third-party service platform SDK, and send it to the terminal.
10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method of any one of claims 1-4, or execute the method of any one of claims 5-7.
11. A computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 4, or to execute the method according to any one of claims 5 to 7.
12. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 4, or implements the method according to any one of claims 5 to 7.
