Method and device for calling software development kit by host application

Through the message broadcasting and subscription services of the mobile operating system, the host application and SDK are decoupled, solving the problems of increased package size and circular dependencies caused by the introduction of the SDK in the host application, reducing access and joint debugging costs, and simplifying the development process.

CN120610831AActive Publication Date: 2025-09-09THE PEOPLES BANK OF CHINA DIGITAL CURRENCY INST
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510542517.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-09-09
Estimated Expiration
2045-04-27

AI Technical Summary

Technical Problem

After introducing a third-party SDK into the host application, the package size increases rapidly and circular dependencies arise, increasing the integration cost and the complexity of development and debugging.

Method used

Through the message broadcast and subscription services of the mobile operating system, the host application and SDK are decoupled. The message broadcast service is used to send call requests and responses, and the response is obtained through the message subscription service. An SDK development and debugging container is built and the bypass component is used to simulate the basic capabilities of the host application.

Benefits of technology

It avoids the circular dependency between the host application and the SDK, reduces the access cost, simplifies the development and debugging process, and reduces direct coupling dependencies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120610831A_ABST
    Figure CN120610831A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for calling a software development kit by a host application, and relates to the field of computer networks. A specific embodiment of the method comprises the following steps: a host application sends a first call request through a message broadcast service of a mobile terminal operating system; the software development kit obtains the first call request through a message subscription service of the mobile terminal operating system, processes the first call request to generate a first call request response, and sends the first call request response through a message broadcast service; and the host application obtains a first call request response corresponding to the first call request through the message subscription service. Decoupling of the host application and the software development kit is achieved, and circulation dependence is relieved. The invention further provides a corresponding device, electronic equipment and a computer readable medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method for a host application to call a software development kit, a method for simulating a host application to call a software development kit, a mobile terminal system, an electronic device, and a computer-readable medium. Background Art

[0002] In actual project development, it is often necessary to introduce a third-party software development kit (SDK) into the host application's code base to implement a certain function. Third-party SDKs generally contain independent code implementations of basic capabilities (independent of the host application providing these capabilities). However, this may cause the host application's package size to increase rapidly after introducing the third-party SDK. Therefore, in certain use cases, it is desirable to minimize the size of the third-party SDK by reusing the basic capabilities provided by the host application. In this case, the main problems may be as follows: the cost of integrating the host application with the third-party SDK is high. With the continuous development of mobile technology, the complexity of mobile applications has become increasingly higher, and mobile applications generally adopt a multi-component build model. When a third-party SDK reuses the basic capabilities provided by the host application, there may be circular dependencies between calling components, which greatly increases the cost of integrating the third-party SDK. Summary of the Invention

[0003] In view of this, a first aspect of an embodiment of the present invention provides a method for a host application to call a software development kit based on a mobile operating system message service, thereby avoiding the problem of circular dependencies and reducing access costs. Specifically, an embodiment of the present invention provides a method for a host application to call a software development kit, wherein the software development kit is integrated into the host application, and the host application is installed in the mobile operating system. The method includes:

[0004] The host application sends a first call request through the message broadcast service of the mobile terminal operating system;

[0005] The software development kit obtains the first call request through the message subscription service of the mobile terminal operating system, processes the first call request to generate a first call request response, and sends the first call request response through the message broadcast service;

[0006] The host application obtains a first call request response corresponding to the first call request through the message subscription service.

[0007] In some embodiments of the present invention, the software development kit processes the first call request, including:

[0008] In response to the need to rely on a component within the host application, the software development kit sends a second call request through the message broadcast service;

[0009] The host application obtains the second call request through the message subscription service, processes the second call request to generate a second call request response, and sends the second call request response through the message broadcast service;

[0010] The software development kit obtains the second call request response through the message subscription service, and generates the first call request response according to the second call request response.

[0011] In some embodiments of the present invention, the first call request is written in accordance with the standard interface format of the software development kit, and the host application further integrates a first component for converting the format of the first call request into the message format of the message broadcast service system.

[0012] In some embodiments of the present invention, the host application is further integrated with a second component, and the second component is used to convert the format of the message containing the first call request into an interface standard format.

[0013] In a second aspect of an embodiment of the present invention, in order to reduce the coupling of joint debugging and improve the efficiency of joint debugging, a method for simulating a host application calling a software development kit is provided. The software development kit is integrated into a joint debugging container, which is installed in a mobile terminal operating system. A bypass component is also integrated into the debugging container. The bypass component is configured to simulate the basic capabilities of the host application calling the software development kit. The method includes the following steps:

[0014] The bypass component sends a first joint debugging call request through the message broadcast service of the mobile terminal operating system;

[0015] The software development kit obtains the first joint debugging call request through the message subscription service of the mobile terminal operating system, processes the first joint debugging call request to generate a first joint debugging call request response, and sends the first joint debugging call request response through the message broadcast service;

[0016] The host application obtains the first joint debugging call request response through the message subscription service, and the first joint debugging call request response is used to verify the success of the call.

[0017] In some embodiments of the present invention, the software development kit processes the first joint debugging call request, including:

[0018] In response to the need to rely on a component within the host application, the software development kit sends a second joint debugging call request through the message broadcast service;

[0019] The bypass component obtains the second joint debugging call request through the message subscription service, processes the second joint debugging call request to generate a second joint debugging call request response, and sends the second joint debugging call request response through the message broadcast service;

[0020] The software development kit obtains the second joint debugging call request response through the message subscription service, and generates the first joint debugging call request response according to the second joint debugging call request response.

[0021] In some embodiments of the present invention, the first joint debugging call request is written in accordance with the interface standard format of the software development kit, and the joint debugging container also integrates a first component and a second component. The first component is used to convert the format of the first joint debugging call request into the message format of the message broadcast service system, and the second component is used to convert the format of the message containing the first joint debugging call request into the interface standard format.

[0022] A third aspect of an embodiment of the present invention provides a mobile terminal system, including a mobile terminal operating system, a host application installed in the mobile terminal operating system, and a software development kit integrated in the host application, wherein:

[0023] The host application is configured to send a first call request through a message broadcast service;

[0024] The software development kit is configured to obtain a first call request through a message subscription service, process the first call request to generate a first call request response, and send the first call request response through a message broadcast service;

[0025] The host application is further configured to obtain a first call request response through a message subscription service.

[0026] According to a fourth aspect of an embodiment of the present invention, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the method provided by an embodiment of the present invention.

[0027] According to a fifth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method provided by the embodiment of the present invention is implemented.

[0028] One embodiment of the aforementioned invention has the following advantages or beneficial effects: In this embodiment, the mobile operating system's message broadcasting capabilities are used to decouple SDK access, avoiding circular dependencies between the host application and the SDK and enabling lightweight and fast access. Based on the mobile operating system's message broadcasting capabilities, an SDK development and debugging container is constructed, and a bypass component is implemented to simulate the host application to provide basic capability services. This model allows the SDK to perform development and debugging independently of the host application, reducing direct coupling dependencies.

[0029] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying drawings are provided for a better understanding of the present invention and are not intended to limit the present invention.

[0031] Figure 1 This is a diagram of the traditional system architecture for solving the circular dependency of host applications;

[0032] Figure 2 is a schematic diagram of a mobile terminal system architecture for implementing a method for a host application to call a software development kit according to some embodiments of the present invention;

[0033] Figure 3 is a flowchart of a method for a host application to call a software development kit according to some embodiments of the present invention;

[0034] Figure 4 is a schematic diagram of a process of a host application calling a software development kit according to some embodiments of the present invention;

[0035] Figure 5 is a schematic diagram of a process for a software development kit to generate a response according to some embodiments of the present invention;

[0036] Figure 6 is a schematic diagram of a process of intercommunication between a host application and a software development kit according to some embodiments of the present invention;

[0037] Figure 7 is a schematic diagram of a process of a host application using middleware to call a software development kit according to some embodiments of the present invention;

[0038] Figure 8 is a schematic diagram of a process of intercommunication between a host application and a software development kit using middleware according to some embodiments of the present invention;

[0039] Figure 9 is a schematic diagram of a mobile terminal system architecture for implementing a method for simulating a host application to call a software development kit according to some embodiments of the present invention;

[0040] Figure 10 is a flowchart of a method for simulating a host application to call a software development kit according to some embodiments of the present invention;

[0041] Figure 11 is a schematic diagram of a process for a software development kit to generate a joint debugging response according to some embodiments of the present invention;

[0042] Figure 12 is a schematic diagram of a flow chart of intercommunication between a bypass component and a software development kit according to some embodiments of the present invention;

[0043] Figure 13 is a schematic diagram of a process of a bypass component using middleware to call a software development kit according to some embodiments of the present invention;

[0044] Figure 14 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;

[0045] Figure 15 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0047] The following introduces the concepts involved in the embodiments of the present invention.

[0048] SDK (Software Development Kit) refers to a software development kit, which is a collection of software tools for developers to use.

[0049] A host application, also known as a host application, in the software field usually refers to a main or basic application that can provide the necessary operating environment and support for other software or programs (such as plug-ins, extensions, scripts, etc.).

[0050] A circular dependency refers to a mutually dependent relationship between two or more entities (such as modules, classes, components, and services), preventing them from existing or functioning independently. This dependency forms a closed loop, where each entity depends on another, which in turn depends on it, without a clear starting or ending point. Circular dependencies create confusion in dependency relationships and architectural hierarchies, and can lead to compilation errors or failures, resource release issues, and other problems.

[0051] Decoupling is an important concept in software engineering and system design. It refers to reducing or eliminating direct dependencies between different modules, components, systems or services, thereby enhancing their independence, maintainability and scalability.

[0052] The message broadcast service and message subscription service of the mobile operating system refer to a mechanism built into the mobile operating system that allows applications or system components to communicate by sending and receiving messages. Two roles, publisher and subscriber, can be configured. Publishers publish messages, and subscribers receive and process these messages.

[0053] The inventors of the embodiments of the present invention have found that the traditional method to solve the SDK circular dependency is to introduce middleware to change the calling relationship between the third-party SDK and the components in the host application (the two do not call each other directly). However, as the complexity of the functions increases, there is still a risk of forming a circular dependency after the transitive dependency. Figure 1 As shown, component 2 needs to call the SDK interface to complete the function call, and the SDK also needs to call the component 2 interface to perform initialization and other operations. The existence of a mutual calling dependency constitutes a circular dependency. At this time, middleware 1 and middleware 2 are introduced to eliminate the direct calling relationship between component 2 and the SDK. However, the calling path will still start from component 2 and end at component 2, forming a larger loop, which still does not solve the circular dependency problem. In addition, the inventors also found that the cost of developing and debugging the third-party SDK itself is high: when the third-party SDK reuses the basic capabilities provided by the host application, the development and debugging requires obtaining and pre-setting the basic capability-related code provided by the host in advance, which is highly coupled and costly.

[0054] This embodiment of the present invention provides a method for enabling host applications to call SDKs based on the mobile operating system's message broadcasting capabilities, achieving decoupling between the SDK and the host application. This method loosely couples the host application with third-party components or SDKs, allowing logical processing to be completed through message broadcasting and subscription mechanisms without requiring direct dependencies.

[0055] like Figure 2 As shown, an embodiment of the present invention provides a mobile terminal system 100 that can run the method of the host application calling the software development kit in the embodiment of the present invention, including a mobile terminal operating system 110, a host application 120 installed in the mobile terminal operating system 110, and a software development kit 130 integrated in the host application 120.

[0056] like Figure 3 As shown, the method for the host application to call the software development kit in the embodiment of the present invention includes the following steps:

[0057] S210 : The host application 120 sends a first call request through the message broadcast service of the mobile operating system 110 .

[0058] S220: The software development kit 130 obtains the first call request through the message subscription service of the mobile operating system 110, processes the first call request to generate a first call request response, and sends the first call request response through the message broadcast service.

[0059] S230: The host application 120 obtains a first call request response corresponding to the first call request through the message subscription service.

[0060] In an embodiment of the present invention, the host application and the SDK transmit call requests and responses through message broadcasting and message subscription services, thereby achieving decoupling. When the host application needs to call the SDK, after sending the call request through the message broadcast service, it can continue to process other logic without having to wait for a response, thus avoiding the problem of strong dependency.

[0061] In the embodiment of the present invention, when the host application 120 sends a call request, it will attach the target SDK information to the request. When the target SDK obtains the request through the message subscription service, if the target SDK in the request is matched with itself, it will obtain the request. Figure 4 As shown, mobile operating system 110 includes host applications 120a, 120b, and 120c. Host application 120a integrates SDK 130a, while host application 120b integrates SDK 130b1 and SDK 130b2. Host application 120c does not integrate an SDK. When host application 120b needs to call SDK 130b1, it assembles information about SDK 130b1 and a call request req1 into message mes1, which is then broadcast via a message broadcast service. When host application 120b needs to call SDK 130b2, it assembles information about SDK 130b2 and a call request req2 into mes2, which is then broadcast via a message broadcast service. Software Development Kit 130b1 obtains message mes1 through the message subscription service, thereby obtaining the call request req1 therein, processes it to generate a response res1, assembles the message into message mes3 containing host application 120b and response res1, and sends mes3 through the message broadcast service. Software Development Kit 130b2 obtains message mes2 through the message subscription service, thereby obtaining the call request req2 therein, processes it to generate a response res2, assembles the message into message mes4 containing host application 120b and response res2, and sends mes4 through the message broadcast service. Host application 120b obtains messages mes3 and mes4 through the message subscription service, thereby obtaining the responses res1 and res2 therein.

[0062] The calling method in the embodiment of the present invention is not only suitable for one-way calling requests, but also suitable for two-way calling, such as Figure 5 As shown, the software development kit processes the first call request, including:

[0063] S221: In response to the need to rely on a component within the host application, the software development kit sends a second call request through the message broadcast service.

[0064] S222: The host application obtains the second call request through the message subscription service, processes the second call request to generate a second call request response, and sends the second call request response through the message broadcast service.

[0065] S223: The software development kit obtains the second call request response through the message subscription service, and generates the first call request response according to the second call request response.

[0066] In this embodiment of the present invention, when the SDK needs to rely on a component within the host application when executing the first call request, the SDK is allowed to call the component, still using the message broadcast and message subscription mechanism, achieving two-way decoupling and eliminating circular dependencies. In this embodiment of the present invention, after issuing the call request, the SDK does not interrupt operation and can still process other call requests from the host application.

[0067] like Figure 6As shown, when host application 120 needs to call software development kit 130, it assembles information about software development kit 130 and call request req1 into message mes1, and broadcasts message mes1 via the message broadcast service. Software development kit 130 obtains message mes1 through the message subscription service, thereby obtaining the call request req1 therein. While processing call request req1, software development kit 130 determines that it needs to rely on a component within host application 120. It then generates call request req2, assembles information about host application 120 and call request req2 into message mes2, and broadcasts message mes2 via the message broadcast service. Host application 120 obtains mes2 through the message subscription service, from which it obtains the call request req2. The component within host application 120 processes req2 and generates a response res2. Host application 120 assembles response res2 and information about software development kit 130 into message mes3, and broadcasts message mes3 via the message broadcast service. The software development kit 130 obtains message mes3 through the message subscription service and obtains response res2 therefrom. The software development kit 13 generates response res1 based on response res2 and assembles message mes4 based on the information of the host application 120 and response res1. The message mes4 is broadcasted through the message broadcast service. The host application 120 obtains message mes4 through the message subscription service and obtains response res1 therefrom. Response res1 is the response to the call request req1. Finally, the host application calls the software development kit and obtains a response to the call request. In the embodiment of the present invention, the host application and the software development kit realize the transmission of call requests and responses through the message broadcast service and message subscription service of the operating system. After sending the request or response, the host application and the software development kit can continue to process other tasks without the need for breakpoint waiting, eliminating dependencies and solving the problem of circular dependencies.

[0068] In some embodiments of the present invention, Figure 7 As shown, in order to ensure that the host application maintains the original calling mode, the host application of the embodiment of the present invention further integrates a first component 121 and a second component 122. The first calling request is written in accordance with the interface standard format of the software development kit. The first component 121 is used to convert the format of the first calling request into the message format of the message broadcast service system; the second component 122 is used to convert the format of the message containing the first calling request into the interface standard format.

[0069] In the embodiment of the present invention, communication is performed through the system broadcast message mechanism, which requires constructing a specified request and response message structure according to the message convention, which imposes a learning cost on the caller.

[0070] In order to prevent the caller from noticing the change in processing mode and to allow the process to work just like calling the API (Application Programming Interface) directly, two middlewares can be built to hide complex operations such as message construction and deconstruction inside the middlewares, and provide them to the upper layer through the middleware encapsulation interface (simulating the previous direct API call). Figure 7 As shown, the call request req1 is processed by the first middleware 121 to generate a message mes1, and the message mes1 is processed by the second middleware 122 to deconstruct the call request req1. Subsequently, the second middleware 122 also converts the response req1 into a message mes2, and the first middleware 121 converts the message mes2 into a response res1.

[0071] like Figure 8 As shown, when the software development kit needs to call a component in the host application, the second middleware 122 also converts the call request req2 into a message mes2, and the first middleware 121 also deconstructs the message mes2 to obtain the call request req2. Subsequently, the host application 120 processes the call request req2 to generate res2, and assembles res2 through the first middleware 121 to generate a message mes3. The second middleware deconstructs the message mes3 to obtain a response res2 and sends it to the software development kit 130. The software development kit 130 generates res1 according to the response res2, and assembles res1 through the second middleware 122 to generate a message mes4. The first middleware deconstructs mes4 to obtain a response res1.

[0072] This embodiment of the present invention decouples access to the SDK based on the mobile operating system's message broadcasting capabilities, avoiding circular dependencies between the host application and the SDK and enabling lightweight and fast access. This simplifies the invocation of the mobile operating system's message broadcast service through middleware encapsulation and direct access via simulated API interfaces.

[0073] In other embodiments of the present invention, to reduce the difficulty of joint debugging, an SDK development and debugging container is built based on the mobile operating system's message broadcasting capabilities, and a bypass component is implemented to simulate the host application to provide basic capabilities and services. Through this model, the SDK can perform development and joint debugging independently of the host application, reducing direct coupling dependencies.

[0074] like Figure 9 As shown, an embodiment of the present invention provides a mobile terminal system 100 that can run the method of simulating a host application calling a software development kit in an embodiment of the present invention, including a mobile terminal operating system 110, a joint debugging container 140 installed in the mobile terminal operating system 110, a software development kit 130 and a bypass component 150 integrated in the joint debugging container 140, and the bypass component 150 is configured to simulate the basic capabilities of the host application calling the software development kit.

[0075] like Figure 10 As shown, the method for the host debugging container to call the software development kit in the embodiment of the present invention includes the following steps:

[0076] S310: The bypass component 150 sends a first joint debugging call request through the message broadcast service of the mobile operating system 110.

[0077] S320: The software development kit 130 obtains the first joint debugging call request through the message subscription service of the mobile operating system 110, processes the first joint debugging call request to generate a first joint debugging call request response, and sends the first joint debugging call request response through the message broadcast service.

[0078] S330: The bypass component 150 obtains a first joint debugging call request response corresponding to the first joint debugging call request through the message subscription service.

[0079] In an embodiment of the present invention, the bypass component and the SDK transmit call requests and responses through message broadcasting and message subscription services, thereby achieving decoupling. When the bypass component needs to call the SDK, after sending the call request through the message broadcast service, it can continue to process other logic without having to wait for a response, thus avoiding the problem of strong dependency.

[0080] In an embodiment of the present invention, when the bypass component 150 sends a call request, it will attach the target SDK information to the request. When the target SDK obtains the request through the message subscription service, if the target SDK in the request is matched with itself, it will obtain the request.

[0081] The simulated call method in the embodiment of the present invention can not only simulate a one-way call request, but also simulate a two-way call, such as Figure 11 As shown, the software development kit processes the first joint debugging call request, including:

[0082] S321: In response to the need to rely on a component within the host application, the software development kit 130 sends a second joint debugging call request via a message broadcast service.

[0083] S322: The bypass component 150 obtains the second joint debugging call request through the message subscription service, processes the second joint debugging call request to generate a second joint debugging call request response, and sends the second joint debugging call request response through the message broadcast service.

[0084] S323: The software development kit 130 obtains the second joint debugging call request response through the message subscription service, and generates the first joint debugging call request response according to the second joint debugging call request response.

[0085] In this embodiment of the present invention, when the SDK executes the first joint debugging call request and needs to rely on a component within the host application, the SDK is allowed to call the component, still using a message broadcast and message subscription mechanism, achieving two-way decoupling and eliminating circular dependencies. In this embodiment of the present invention, after issuing the call request, the SDK does not interrupt operation and can still process other call requests from the debugging container.

[0086] like Figure 12 As shown, when bypass component 150 needs to call SDK 130, it assembles information about SDK 130 and the joint debugging request req1 into message mes1 and broadcasts message mes1 via the message broadcast service. SDK 130 obtains message mes1 through the message subscription service, thereby obtaining the joint debugging request req1. During the processing of joint debugging request req1, SDK 130 determines that it needs to rely on components within the host application. It then generates joint debugging request req2 and assembles information about bypass component 150 and the joint debugging request req2 into message mes2. This message is then broadcast via the message broadcast service. Bypass component 150 obtains mes2 through the message subscription service, extracting the joint debugging request req2 from it. Bypass component 150 processes req2 and generates a response res2. Bypass component 150 assembles response res2 and information about SDK 130 into message mes3 and broadcasts message mes3 via the message broadcast service. Software Development Kit 130 obtains message mes3 through the message subscription service and obtains response res2 from it. Software Development Kit 130 generates response res1 based on response res2 and assembles message mes4 based on the information from bypass component 150 and response res1. Message mes4 is broadcast through the message broadcast service. Bypass component 150 obtains message mes4 through the message subscription service and obtains response res1 from it. Response res1 is the response to call request req1, ultimately simulating the call to the software development kit and obtaining a response to the call request. The debugging container and software development kit of this embodiment of the present invention implement the transmission of call requests and responses through the operating system's message broadcast service and message subscription service. After sending a request or response, the debugging container and software development kit can continue to process other tasks without the need for breakpoint waiting, eliminating dependencies and resolving the problem of circular dependencies.

[0087] In the embodiment of the present invention, since the bypass component 150 is a component that simulates the host application, when processing the joint debugging call request req2, it determines that the call request format is correct and can directly return the result according to the call request without actual processing, thereby reducing the development workload.

[0088] In the embodiment of the present invention, communication is performed through the system broadcast message mechanism, which requires constructing a specified request and response message structure according to the message convention, which imposes a learning cost on the caller.

[0089] In order to prevent the caller from noticing the change in processing methods and to allow it to work just like directly calling the API (application programming interface) before, middleware can be built to hide complex operations such as message message construction and deconstruction inside the middleware, and provide them to the upper-level call through the middleware encapsulation interface (simulating the previous direct call to the API).

[0090] In some embodiments of the present invention, Figure 13 As shown, in order to ensure that the bypass component maintains the original calling mode of the host application, the debugging container of the embodiment of the present invention further integrates a first component 121 and a second component 122. The first joint debugging call request is written in accordance with the interface standard format of the software development kit. The first component 121 is used to convert the format of the first joint debugging call request into the message format of the message broadcast service system; the second component 122 is used to convert the format of the message containing the first joint debugging call request into the interface standard format.

[0091] In this embodiment, an SDK development and debugging container is built based on the mobile operating system's message broadcasting capabilities, and a bypass component is implemented to simulate the host application to provide basic capabilities and services. Through this model, the SDK can perform development and debugging independently of the host application, reducing direct coupling dependencies.

[0092] The system features of the embodiments of the present invention may refer to the methods, steps and other features of the embodiments of the present invention, and the system embodiments may be combined with the features of the method embodiments to obtain new embodiments, and vice versa, and will not be repeated here.

[0093] Figure 14 An exemplary system architecture 1400 is shown to which the method for a host application to call a software development kit or the implementation apparatus for a host application to call a software development kit according to an embodiment of the present invention can be applied.

[0094] like Figure 14 As shown, system architecture 1400 may include terminal devices 1401, 1402, and 1403, a network 1404, and a server 1405. Network 1404 is used to provide a medium for communication links between terminal devices 1401, 1402, and 1403 and server 1405. Network 1404 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0095] Users can use terminal devices 1401, 1402, and 1403 to interact with server 1405 via network 1404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 1401, 1402, and 1403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0096] The terminal devices 1401 , 1402 , and 1403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0097] Server 1405 may be a server that provides various services, such as a backend management server (for example only) that supports shopping websites browsed by users using terminal devices 1401, 1402, and 1403. The backend management server may analyze and process received data such as product information query requests, and feed back processing results (for example, targeted push information and product information—for example only) to the terminal device.

[0098] It should be noted that the method for the host application to call the software development kit provided in the embodiment of the present invention is generally executed by the terminal devices 1401, 1402, and 1403. Accordingly, the implementation device for the host application to call the software development kit is generally set in the terminal devices 1401, 1402, and 1403.

[0099] It should be understood that Figure 14 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0100] Reference below Figure 15 , which shows a structural diagram of a computer system 1500 suitable for implementing a terminal device or server in accordance with an embodiment of the present invention. The method or apparatus for implementing the method in accordance with an embodiment of the present invention can be implemented on the computer system 1500. Figure 15 The terminal device or server 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.

[0101] like Figure 15As shown, computer system 1500 includes a central processing unit (CPU) 1501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1502 or a program loaded from a storage unit 1508 into a random access memory (RAM) 1503. Various programs and data required for the operation of system 1500 are also stored in RAM 1503. CPU 1501, ROM 1502, and RAM 1503 are connected to each other via a bus 1504. An input / output (I / O) interface 1505 is also connected to bus 1504.

[0102] The following components are connected to the I / O interface 1505: an input section 1506 including a keyboard, a mouse, and the like; an output section 1507 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 1508 including a hard disk; and a communication section 1509 including a network interface card such as a LAN card or a modem. The communication section 1509 performs communication processing via a network such as the Internet. A drive 1510 is also connected to the I / O interface 1505 as needed. Removable media 1511, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1510 as needed, so that computer programs read therefrom can be installed into the storage section 1508 as needed.

[0103] In particular, according to the embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1509, and / or installed from a removable medium 1511. When the computer program is executed by the central processing unit (CPU) 1501, the above-mentioned functions defined in the system of the present invention are performed.

[0104] It should be noted that the computer-readable medium described in the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.

[0105] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0106] The units or modules involved in the embodiments of the present invention may be implemented in software or in hardware. The units or modules described may also be provided in a processor. For example, they may be described as follows: a processor includes a sending unit (or "module"), an acquisition unit, a determination unit, and a first processing unit. The names of these units or modules do not, in some cases, constitute a limitation on the units or modules themselves. For example, the sending unit may also be described as a "unit that sends a request for obtaining an image to the connected server."

[0107] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiments, or may exist independently and not incorporated into the device. The computer-readable medium carries one or more programs, and when executed by the device, the device performs the above method.

[0108] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A method for a host application to call a software development kit, characterized in that: The software development kit is integrated into the host application, and the host application is installed on the mobile terminal operating system. The method includes: The host application sends a first call request through the message broadcast service of the mobile terminal operating system; The software development kit obtains the first call request through the message subscription service of the mobile terminal operating system, processes the first call request to generate a first call request response, and sends the first call request response through the message broadcast service; The host application obtains the first call request response corresponding to the first call request through the message subscription service.

2. The method according to claim 1, characterized in that The software development kit processes the first call request, including: In response to the need to rely on a component within the host application, the software development kit sends a second call request through the message broadcast service; The host application obtains the second call request through the message subscription service, processes the second call request to generate a second call request response, and sends the second call request response through the message broadcast service; The software development kit obtains the second call request response through the message subscription service, and generates the first call request response according to the second call request response.

3. The method according to claim 1, characterized in that The first call request is written in accordance with the standard interface format of the software development kit, and the host application further integrates a first component, which is used to convert the format of the first call request into the message format of the message broadcast service system.

4. The method according to claim 3, characterized in that The host application is further integrated with a second component, and the second component is used to convert the format of the message containing the first call request into the interface standard format.

5. A method for simulating a host application calling a software development kit, characterized in that: The software development kit is integrated into a joint debugging container, which is installed in a mobile terminal operating system. The debugging container also integrates a bypass component, which is configured to simulate the basic capabilities of the host application invoking the software development kit. The method includes the following steps: The bypass component sends a first joint debugging call request through the message broadcast service of the mobile terminal operating system; The software development kit obtains the first joint debugging call request through the message subscription service of the mobile terminal operating system, processes the first joint debugging call request to generate a first joint debugging call request response, and sends the first joint debugging call request response through the message broadcast service; The host application obtains the first joint debugging call request response through the message subscription service, and the first joint debugging call request response is used to verify the success of the call.

6. The method according to claim 5, characterized in that The software development tool kit processes the first joint debugging call request, including: In response to the need to rely on a component within the host application, the software development kit sends a second joint debugging call request through the message broadcast service; The bypass component obtains the second joint debugging call request through the message subscription service, processes the second joint debugging call request to generate a second joint debugging call request response, and sends the second joint debugging call request response through the message broadcast service; The software development kit obtains the second joint debugging call request response through the message subscription service, and generates the first joint debugging call request response according to the second joint debugging call request response.

7. The method according to claim 5, characterized in that The first joint debugging call request is written in accordance with the interface standard format of the software development kit, and the joint debugging container also integrates a first component and a second component. The first component is used to convert the format of the first joint debugging call request into the message format of the message broadcast service system, and the second component is used to convert the format of the message containing the first joint debugging call request into the interface standard format.

8. A mobile terminal system, characterized in that: It includes a mobile operating system, a host application installed on the mobile operating system, and a software development kit integrated into the host application, wherein: The host application is configured to send a first call request via a message broadcast service; The software development kit is configured to obtain the first call request through a message subscription service, process the first call request to generate a first call request response, and send the first call request response through a message broadcast service; The host application is further configured to obtain the first call request response through the message subscription service.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Mimicry digital power distribution network operating system and construction method

    CN118939238A

  • Software development kit calling method, device and equipment and readable storage medium

    CN119512659A

  • Automated subscription management service

    US20240214459A1