Software Development Kit (SDK) Implementation Methods, Devices, Equipment, and Media

CN122569914APending Publication Date: 2026-08-14JINGDONG TECH HLDG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-06
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0003]相关技术中,通常采用独立的组件加载机制,每个组件都需要单独处理统一资源定位符(Uniform Resource Locator,URL)参数解析、数据请求、页面跳转、埋点上报等通用功能,从而增加了SDK开发复杂度,导致开发效率较低

Benefits of technology

[0011]本公开提供的软件开发工具包SDK实现方法、装置、电子设备、计算机可读存储介质及计算机程序产品,通过向第一组件提供应用程序编程接口API,其中,API用于调用功能模块,确定当前运行环境,并根据当前运行环境,确定与功能模块对应的功能调用指令,根据功能调用指令,确定第一组件所需的资源,其中,资源关联SDK中的目标容器,以及根据资源将第一组件渲染至目标容器。由此,能够降低SDK开发复杂度,提高SDK开发效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122569914A_ABST
    Figure CN122569914A_ABST
Patent Text Reader

Abstract

This disclosure proposes a software development kit (SDK) implementation method, apparatus, device, and medium. The method includes: providing an application programming interface (API) to a first component, wherein the API is used to call functional modules; determining the current runtime environment and, based on the current runtime environment, determining a function call instruction corresponding to the functional module; determining the resources required by the first component based on the function call instruction, wherein the resources are associated with a target container in the SDK; and rendering the first component to the target container based on the resources. This addresses the technical problem in existing technologies that increase SDK development complexity, leading to lower development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of software development technology, and in particular to a method, apparatus, device and medium for implementing a software development kit (SDK). Background Technology

[0002] With the rapid development of front-end technology, component-based development has become the mainstream front-end development model in the development of software development kits (SDKs).

[0003] In related technologies, an independent component loading mechanism is usually adopted. Each component needs to handle common functions such as Uniform Resource Locator (URL) parameter parsing, data request, page redirection, and event tracking reporting separately, which increases the complexity of SDK development and leads to low development efficiency. Summary of the Invention

[0004] This disclosure aims to at least partially address one of the technical problems in the related art.

[0005] Therefore, this disclosure provides a software development kit (SDK) implementation method, apparatus, electronic device, computer-readable storage medium, and computer program product that can reduce the complexity of SDK development and improve SDK development efficiency.

[0006] The first aspect of this disclosure provides a software development kit (SDK) implementation method, comprising: providing an application programming interface (API) to a first component, wherein the API is used to call a functional module; determining the current runtime environment, and determining a function call instruction corresponding to the functional module based on the current runtime environment; determining the resources required by the first component based on the function call instruction, wherein the resources are associated with a target container in the SDK; and rendering the first component to the target container based on the resources.

[0007] A second aspect of this disclosure provides a software development kit (SDK) implementation apparatus, comprising: an encapsulation module for providing an application programming interface (API) to a first component, wherein the API is used to call a functional module; a first determination module for determining the current runtime environment and determining a function call instruction corresponding to the functional module based on the current runtime environment; a second determination module for determining the resources required by the first component based on the function call instruction, wherein the resources are associated with a target container in the SDK; and a rendering module for rendering the first component to the target container based on the resources.

[0008] A third aspect of this disclosure provides an electronic device, including: a processor and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the software development kit (SDK) implementation method as proposed in the first aspect of this disclosure.

[0009] The fourth aspect of this disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the software development kit (SDK) implementation method as proposed in the first aspect of this disclosure.

[0010] The fifth aspect of this disclosure provides a computer program product including a computer program that, when executed by a processor, implements the software development kit (SDK) implementation method as described in the first aspect of this disclosure.

[0011] The software development kit (SDK) implementation method, apparatus, electronic device, computer-readable storage medium, and computer program product disclosed herein provide an application programming interface (API) to a first component. The API is used to call functional modules, determine the current runtime environment, determine the function call instruction corresponding to the functional module based on the current runtime environment, determine the resources required by the first component based on the function call instruction, associate the resources with a target container in the SDK, and render the first component to the target container based on the resources. This reduces the complexity of SDK development and improves SDK development efficiency.

[0012] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description

[0013] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:

[0014] Figure 1 A flowchart illustrating a software development kit (SDK) implementation method provided in this embodiment of the disclosure; Figure 2 A flowchart illustrating another software development kit (SDK) implementation method provided in this embodiment of the present disclosure; Figure 3 This is a schematic diagram of the structure of a software development kit (SDK) implementation device provided in an embodiment of the present disclosure; Figure 4 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Detailed Implementation

[0015] Embodiments of this disclosure are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.

[0016] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this disclosure are authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. The acquisition, transmission, storage, use, and processing of data in the technical solution of this disclosure all comply with the relevant provisions of national laws and regulations.

[0017] It should be noted that in the embodiments disclosed herein, certain software, components, models, and other existing solutions in the industry may be mentioned. These should be considered as exemplary and are intended only to illustrate the feasibility of implementing the technical solutions disclosed herein. However, they do not mean that the applicant has used or necessarily used such solutions.

[0018] Figure 1 This is a flowchart illustrating a software development kit (SDK) implementation method provided in an embodiment of this disclosure.

[0019] This embodiment illustrates the example of a software development kit (SDK) implementation method configured in a software development kit (SDK) implementation device. In this embodiment, the software development kit (SDK) implementation method can be configured in a software development kit (SDK) implementation device. The software development kit (SDK) implementation device can be located in a server, an electronic device, or an SDK system, and there are no restrictions on this.

[0020] like Figure 1 As shown, the software development kit (SDK) implementation method includes: S101: Provide an application programming interface (API) to the first component, wherein the API is used to call functional modules.

[0021] Optionally, the first component may be a component to be loaded into a container provided by a Software Development Kit (SDK). There may be one or more first components, and the methods provided in this embodiment can be used to process any component to be loaded into a container provided by the SDK during the software development process; there is no limitation on this.

[0022] Optionally, the Application Programming Interface (API) can be a generic API. The SDK can provide a generic API to various components, allowing each component to call the corresponding functional modules.

[0023] Optionally, the functional modules include at least one of the following: a URL parameter processing module, a page redirection module, an event tracking data processing module, and a network request module. Thus, this SDK modularly encapsulates basic front-end capabilities (such as URL parameter parsing, page redirection, event tracking reporting, and network requests), providing standardized API interfaces for various components to call. This achieves abstraction and reuse of functional logic, reduces the coupling between components and the underlying implementation, and improves code maintainability and development efficiency.

[0024] In other words, the SDK can encapsulate at least one of the following front-end functions into corresponding functional modules and provide APIs that allow various components to call these functional modules. "At least one front-end function" can include URL parameter processing, page redirection, event tracking data processing, network requests, etc., without limitation.

[0025] Optionally, after providing the application programming interface (API) to the first component, the first component can call the functional modules through the API.

[0026] For example, the URL parameter processing module: The SDK provides the `getQuery()` method to parse URL parameters, supporting multi-level URL encoding parsing; it is compatible with complex URL formats that mix hash routing and query parameters; and it uses the `qs.parse()` method to convert parameter strings into object format for easy component use. The page navigation module: The SDK provides the `navigateTo()` method to uniformly handle page navigation logic; it automatically identifies the target type (H5 page, native page, mini-program, etc.) based on the `pageType` and `jumpType` parameters in `jumpData`; it supports parameter pass-through functionality, automatically passing specified parameters from the current page to the target page. The event tracking data processing module: The SDK provides the `getClstag()` method to generate standardized event tracking data formats; it intercepts event tracking data through the `clsHook()` hook function and automatically adds page-level extended parameters; it achieves unified management and reporting of event tracking data. The network request module: The SDK encapsulates the `request()` method, which can support the automatic addition of anti-spam parameters; it supports B-end gateway adaptation, error handling, and other functions, thereby simplifying the component's network request operations.

[0027] S102: Determine the current operating environment and, based on the current operating environment, determine the function call instruction corresponding to the functional module.

[0028] Optional, current runtime environment refers to the software or hardware environment in which the current code is being executed.

[0029] Optionally, the SDK can identify the current runtime environment through an environment detection mechanism.

[0030] Optionally, the SDK analyzes the `navigator.userAgent` information and uses methods such as `isJDApp()`, `isJRApp()`, and `isJDPayWV()` to determine the current runtime environment. The `navigator.userAgent` information is a user agent string provided by the browser / client, containing identifiers such as the device, operating system, browser, and application version of the current runtime environment. `isJDApp()`, `isJRApp()`, and `isJDPayWV()` are environment detection methods that determine the current runtime environment by parsing specific identifiers injected by the client.

[0031] Optionally, after determining the current runtime environment, the SDK can determine the function call instructions corresponding to the functional modules based on the current runtime environment. Here, a function call instruction refers to an executable instruction that can invoke the underlying processing logic for the first component. The SDK can respond to the first component's API call to at least one functional module by converting the call into an executable instruction based on the current runtime environment. This instruction, which can be executed by the SDK, can be called a function call instruction. For example, the function call instruction may match the current runtime environment's redirection protocol, support the login interface call method corresponding to the current runtime environment, and have corresponding request headers (such as anti-fraud parameters, authentication tokens), etc., without any restrictions.

[0032] Optionally, in the process of determining the function call instruction corresponding to the functional module based on the current runtime environment, the environment type of the current runtime environment can be determined, and adaptation information can be determined based on the environment type. Furthermore, based on the adaptation information, the functional module can be mapped to the corresponding function call instruction. Thus, by identifying the environment type to dynamically generate adaptation information, the calls of the first component to general functional modules are mapped to function call instructions matching the current runtime environment. This achieves environment-aware runtime adaptation, ensuring that the same function can automatically call the correct underlying interface on different platforms (such as native apps, H5, and mini-programs), improving code portability and cross-platform consistency, while reducing redundant logic in environment adaptation.

[0033] Optionally, the aforementioned adaptation information is used to adapt and map the calls made by the first component to the functional modules. Adaptation information may include, for example, a redirection protocol or login method adapted to the current runtime environment; there are no restrictions on this.

[0034] For example, redirect adaptation: In one application (APP), use protocol A for redirection; in another APP, use JrBridge for redirection; and in an H5 environment, use window.location.href for redirection. Protocol A, JrBridge, and window.location.href are all optional examples of the aforementioned adaptation information. Additionally, login adaptation can be performed using the following: The SDK provides the jumpLoginInit() method to initialize login functionality and select the appropriate login method based on different environments, supporting multiple login modes such as quick login, page login, and mini-program login.

[0035] S103: Based on the function call instruction, determine the resources required by the first component, wherein the resources are associated with the target container in the SDK.

[0036] Optionally, after determining the function call instructions corresponding to the functional modules based on the current operating environment, the resources required by the first component can be determined and loaded based on the function call instructions. These resources may include, for example, the software resources, hardware resources, etc., required for rendering the first component.

[0037] Optionally, in determining the resources required by the first component based on the function call instruction, the first resource and the second resource can be determined based on the function call instruction. The first resource defines the visual style and layout rules of the rendered first component, while the second resource defines the interaction processing logic related to the first component. The first and second resources are then identified as the required resources. Thus, by decoupling and identifying the first resource (visual style and layout) and the second resource (interaction logic) required by the first component through the function call instruction, structured separation and on-demand loading of component resources are achieved, improving the accuracy and efficiency of resource loading, and supporting dynamic replacement of component styles and flexible reuse of interaction logic.

[0038] For example, the first resource is a Cascading Style Sheets (CSS) resource, and the second resource is a scripting language (JavaScript, JS) resource (or JS file).

[0039] For example, the SDK provides a unified component resource loading mechanism, supporting on-demand loading and caching management of CSS and JS files. Resource loading: The SDK provides the `loadMDJS()` method to dynamically load the CSS and JS resources required by a component. It ensures the order and integrity of resource loading through a Promise mechanism, and supports differentiated loading for Vue 2 and Vue 3 components. Vue 2 and Vue 3 components are components developed based on different frameworks.

[0040] For example, the SDK can provide a cache management mechanism: the SDK detects already loaded resources and avoids repeatedly loading the same CSS and JS files to improve page performance.

[0041] S104: Render the first component to the target container based on the resources.

[0042] Optionally, after determining the resources required for the first component, the first component can be rendered to the target container based on those resources. For example, the SDK can provide a component rendering mechanism. The SDK can provide the `renderMDJS()` method to render the loaded component (the first component) into a specified container (an optional example of the target container mentioned above), supporting both single-component rendering and batch component rendering modes.

[0043] In this embodiment, an Application Programming Interface (API) is provided to the first component. The API is used to call functional modules, determine the current runtime environment, determine the function call instruction corresponding to the functional module based on the current runtime environment, determine the resources required by the first component based on the function call instruction, associate the resources with a target container in the SDK, and render the first component to the target container based on the resources. This reduces the complexity of SDK development and improves SDK development efficiency.

[0044] Figure 2 This is a flowchart illustrating another software development kit (SDK) implementation method provided in an embodiment of this disclosure.

[0045] like Figure 2 As shown, the software development kit (SDK) implementation method includes: S201: Provide an application programming interface (API) to the first component, wherein the API is used to call functional modules.

[0046] S202: Determine the current operating environment and, based on the current operating environment, determine the function call instruction corresponding to the functional module.

[0047] S203: Based on the function call instruction, determine the resources required by the first component, wherein the resources are associated with the target container in the SDK.

[0048] S204: Render the first component to the target container based on the resources.

[0049] For a detailed description of S201-S204, please refer to the above embodiments, which will not be repeated here.

[0050] Optionally, during the rendering of the first component, its running status can be acquired, and its rendering performance data can be determined based on this status. Furthermore, based on the running status and rendering performance data, it can be determined whether the first component exhibits any operational anomalies. Thus, by collecting and correlating the component's running status and rendering performance data in real time, component rendering efficiency (such as loading time and rendering frame rate) can be quantitatively evaluated. Based on the correlation analysis between performance thresholds and state anomalies, component-level faults can be proactively identified, providing a basis for decision-making regarding performance optimization and stability assurance.

[0051] For example, the SDK integrates a dual mechanism of performance monitoring and error handling: on the one hand, it collects and reports key rendering performance metrics of components, such as loading time and rendering time, through a custom monitoring system; on the other hand, it intercepts, encapsulates, and reports errors generated during component operation through a unified exception capture and handling process. These two mechanisms work together to ensure the observability of component operation and system stability.

[0052] S205: Determine the message type of the target message, wherein the target message is published by the first component.

[0053] Optionally, the SDK can establish and initialize a message communication mechanism to enable communication between different components.

[0054] Optionally, the first component can publish messages to various components based on a message communication mechanism. The messages published by the first component can be referred to as target messages.

[0055] Optionally, the message type of the target message can be determined, such as a business message, a notification message, etc. This message type is used to determine which component(s) to which the target message is delivered. The component that receives the target message can be referred to as the second component.

[0056] S206: Determine the second component and the target callback function based on the message type, wherein the target callback function is used to pass messages between the first component and the second component.

[0057] Optionally, the second component can be a component that subscribes to messages of that message type.

[0058] Optionally, the second component and the target callback function can be determined based on the message type, and the target message can be passed to the second component when the target callback function is executed.

[0059] Optionally, in the process of determining the second component and the target callback function based on the message type, a message subscription relationship can be determined. This relationship represents the correspondence between the message type, component template identifier, and candidate callback functions. The component template identifier corresponds to a candidate component, which has subscribed to messages of the specified message type. Based on the message type and the message subscription relationship, the component template identifier and candidate callback function are determined. The candidate component corresponding to the component template identifier is identified as the second component, and the candidate callback function is identified as the target callback function. Thus, through a pre-established message subscription relationship (associating message type, component template identifier, and candidate callback function), the second component subscribed to the message type and its corresponding target callback function are precisely matched during message publication. This achieves loosely coupled communication between components based on message type, supports one-to-many message broadcasting and dynamic subscription management, and ensures accurate routing and scalability of cross-component message delivery.

[0060] Optionally, the aforementioned message subscription relationship is established as follows: A first mapping table and a second mapping table are determined, where the first mapping table represents the mapping relationship between message types and candidate callback functions, and the second mapping table represents the mapping relationship between message types and message content. The message subscription relationship is then determined based on the candidate components, the first mapping table, and the second mapping table. Thus, by separately maintaining the first mapping table (callMap) between message types and callback functions and the second mapping table (messageMap) between message types and message content, the message subscription relationship, callback routing, and message content storage are decoupled. This ensures that dynamic registration of callback functions and persistent storage of message content do not interfere with each other, improving the efficiency and maintainability of message distribution.

[0061] S207: Execute the target callback function to pass the target message to the second component.

[0062] Optionally, after determining the target callback function, the target callback function can be executed to pass the target message to the second component.

[0063] For example, the following describes the SDK initialization and message communication mechanism establishment method: The SDK system initializes when the page loads, establishing a global message communication mechanism. Two mapping tables are established using a Map data structure: `callMap` (an optional example of the first mapping table mentioned above) and `messageMap` (an optional example of the second mapping table mentioned above). `callMap` stores the mapping relationship between message types and callback functions, and `messageMap` stores the mapping relationship between message types and message content. Message subscription mechanism: The SDK establishes message subscription relationships using `callMap.set('type:'+type+'templateId'+templateId, callBack)`, where `type` is the message type, `templateId` is the component template ID (an optional example of the component template identifier mentioned above), and `callBack` is the callback function (an optional example of the candidate callback function mentioned above). Message publishing mechanism: When a component calls `pushMessage(type, message)` to publish a message, the SDK iterates through all subscribers in `callMap` that contain that message type (an optional example of the candidate components mentioned above) and executes the corresponding callback function, realizing the broadcast delivery of the message. System message protection: The SDK sets up a system message type protection mechanism. Type values ​​1-100 are reserved by the system, while component developers can use custom message types above 100 to avoid message conflicts.

[0064] In this embodiment, an Application Programming Interface (API) is provided to the first component. The API is used to call functional modules, determine the current runtime environment, determine the function call instruction corresponding to the functional module based on the current runtime environment, determine the resources required by the first component based on the function call instruction, associate the resources with a target container in the SDK, and render the first component to the target container based on the resources. This reduces the complexity of SDK development and improves SDK development efficiency.

[0065] This disclosure provides a component-to-component message communication mechanism based on a Map data structure: through a dual mapping table of callMap and messageMap, efficient message subscription and publishing are achieved, supporting decoupled communication between components.

[0066] This disclosure provides a unified cross-platform adaptation method: through environment detection and adapter pattern, the same code can be automatically adapted to different operating environments.

[0067] This disclosure provides intelligent loading management of component resources: through Promise chain loading and cache detection mechanism, on-demand loading and performance optimization of component resources are achieved.

[0068] This disclosure provides a scalable, general-purpose functional encapsulation architecture: commonly used functions are encapsulated into a unified API through modular design, supporting rapid expansion and reuse of functions.

[0069] The method provided in this disclosure provides a unified inter-component message communication mechanism to achieve efficient data interaction between components; encapsulates general functional modules to avoid redundant development and improve development efficiency; achieves cross-platform adaptation and uniformly handles interaction logic under different operating environments; and optimizes the component resource loading mechanism to improve page performance and user experience.

[0070] Figure 3 This is a schematic diagram of the structure of a software development kit (SDK) implementation device provided in an embodiment of this disclosure.

[0071] like Figure 3 As shown, the software development kit (SDK) implementation device 30 includes: Encapsulation module 301 is used to provide an application programming interface (API) to the first component, wherein the API is used to call functional modules.

[0072] The first determining module 302 is used to determine the current operating environment and, based on the current operating environment, determine the function call instruction corresponding to the function module.

[0073] The second determining module 303 is used to determine the resources required by the first component according to the function call instruction, wherein the resources are associated with the target container in the SDK.

[0074] Rendering module 304 is used to render the first component to the target container based on the resources.

[0075] It should be noted that the foregoing explanation of the software development kit (SDK) implementation method also applies to the software development kit (SDK) implementation device of this embodiment, and will not be repeated here.

[0076] In this embodiment, an Application Programming Interface (API) is provided to the first component. The API is used to call functional modules, determine the current runtime environment, determine the function call instruction corresponding to the functional module based on the current runtime environment, determine the resources required by the first component based on the function call instruction, associate the resources with a target container in the SDK, and render the first component to the target container based on the resources. This reduces the complexity of SDK development and improves SDK development efficiency.

[0077] To implement the above embodiments, this disclosure also proposes an electronic device, including: a processor and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided in the foregoing embodiments.

[0078] To implement the above embodiments, this disclosure also proposes a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided in the foregoing embodiments.

[0079] To implement the above embodiments, this disclosure also proposes a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the foregoing embodiments.

[0080] Figure 4 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Figure 4 The electronic device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0081] like Figure 4 As shown, the electronic device 12 is represented in the form of a general-purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, memory 28, and bus 18 connecting different system components (including memory 28 and processing unit 16).

[0082] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0083] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0084] Memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and / or cache 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 4 Not shown; usually referred to as a "hard drive".

[0085] although Figure 4 As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a compact disc read-only memory (CD-ROM), a digital video disc read-only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this disclosure.

[0086] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of this disclosure.

[0087] Electronic device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable human interaction with electronic device 12, and / or with any device that enables electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, electronic device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0088] The processing unit 16 executes various functional applications and data processing by running programs stored in the memory 28, such as implementing the software development kit (SDK) implementation method mentioned in the foregoing embodiments.

[0089] To implement the above embodiments, this disclosure also proposes an electronic device, including: a processor and a memory communicatively connected to the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method provided in the foregoing embodiments.

[0090] To implement the above embodiments, this disclosure also proposes a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided in the foregoing embodiments.

[0091] To implement the above embodiments, this disclosure also proposes a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the foregoing embodiments.

[0092] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in this disclosure all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0093] It should be noted that personal information collected from users should be used for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. Furthermore, such collection / sharing should only be conducted after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign an agreement / authorization that includes authorization of relevant user information before the user uses the function. In addition, any necessary steps must be taken to protect and safeguard access to such personal information data and ensure that others with access to personal information data comply with their privacy policies and procedures.

[0094] This disclosure is intended to provide implementation schemes for users to selectively prevent the use or access to their personal information data. Specifically, this disclosure is intended to provide hardware and / or software to prevent or block access to such personal information data. Once personal information data is no longer needed, risks can be minimized by restricting data collection and deleting data. Furthermore, where applicable, such personal information is de-identified to protect user privacy.

[0095] In the foregoing descriptions of the embodiments, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0096] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0097] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.

[0098] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0099] It should be understood that various parts of this disclosure can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0100] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0101] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0102] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure.

Claims

1. A method for implementing a software development kit (SDK), characterized in that, include: Provide an application programming interface (API) to the first component, wherein the API is used to call functional modules; Determine the current operating environment, and based on the current operating environment, determine the function call instruction corresponding to the functional module; Based on the function call instruction, determine the resources required by the first component, wherein the resources are associated with the target container in the SDK; The first component is rendered to the target container based on the resource.

2. The method according to claim 1, characterized in that, The functional modules include at least one of the following: a Uniform Resource Locator (URL) parameter processing module, a page redirection module, a data tracking module, and a network request module.

3. The method according to claim 1, characterized in that, The method further includes: Determine the message type of the target message, wherein the target message is published by the first component; Based on the message type, a second component and a target callback function are determined, wherein the target callback function is used to pass messages between the first component and the second component; The target callback function is executed to pass the target message to the second component.

4. The method according to claim 3, characterized in that, The step of determining the second component and the target callback function based on the message type includes: Determine message subscription relationships, wherein the message subscription relationships are used to represent the correspondence between the message type, component template identifier, and candidate callback function, the component template identifier corresponds to a candidate component, and the candidate component has subscribed to messages of the message type; Based on the message type and the message subscription relationship, determine the component template identifier and the candidate callback function; The candidate component corresponding to the component template identifier is determined as the second component, and the candidate callback function is determined as the target callback function.

5. The method according to claim 4, characterized in that, The determination of message subscription relationships includes: Determine a first mapping table and a second mapping table, wherein the first mapping table is used to represent the mapping relationship between the message type and the candidate callback function, and the second mapping table is used to represent the mapping relationship between the message type and the message content; The message subscription relationship is determined based on the candidate components, the first mapping table, and the second mapping table.

6. The method according to claim 1, characterized in that, The step of determining the function call instruction corresponding to the functional module based on the current operating environment includes: Determine the environment type of the current operating environment; Based on the environment type, determine the adaptation information; Based on the adaptation information, the functional module is mapped to the corresponding function call instruction.

7. The method according to claim 1, characterized in that, The step of determining the resources required by the first component based on the function call instruction includes: According to the function call instruction, a first resource and a second resource are determined, wherein the first resource is used to define the visual style and layout rules of the first component after it is rendered, and the second resource is used to define the interaction processing logic related to the first component. The first resource and the second resource are identified as the required resources.

8. The method according to claim 1, characterized in that, The method further includes: Obtain the running status of the first component; Based on the operating status, determine the rendering performance data of the first component; Based on the operating status and the rendering performance data, determine whether the first component has any operational abnormalities.

9. A software development kit (SDK) implementation device, characterized in that, include: An encapsulation module is used to provide an application programming interface (API) to the first component, wherein the API is used to call functional modules; The first determining module is used to determine the current operating environment and, based on the current operating environment, determine the function call instruction corresponding to the function module; The second determining module is used to determine the resources required by the first component according to the function call instruction, wherein the resources are associated with the target container in the SDK; A rendering module is used to render the first component to the target container based on the resource.

10. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-8.

12. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-8.