Plug-in access method and device, equipment, storage medium and program product
By initializing and configuring SaaS plugin functional modules and using rendering containers when the application starts, the problems of long development cycles and poor user experience in existing technologies are solved. This enables rapid integration and visually consistent SaaS plugin access, improving development efficiency and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-07
AI Technical Summary
Existing third-party SaaS service integration methods have long development cycles, low development efficiency, and suffer from fragmented identity authentication and independent UI, resulting in a poor user experience.
By using the plugin access method, the application calls the initialization interface at startup to initialize and configure the SaaS plugin functional modules, uses the rendering container for user authentication and business data acquisition, and combines the UI configuration information of the host application with the user identity information to render the business interface of the SaaS plugin, achieving seamless identity synchronization and visual consistency.
It shortened the development cycle, improved development efficiency, achieved seamless synchronization of user identities, avoided repeated logins, enhanced user experience, and maintained visual consistency between the SaaS plugin and the host application.
Smart Images

Figure CN121807403A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of mobile application development technology, and in particular to a plug-in access method, apparatus, device, storage medium, and program product. Background Technology
[0002] With the rapid development of the mobile internet, an increasing number of applications (APPs) need to quickly integrate third-party Software as a Service (SaaS) to enrich their own functionality and improve user experience. For example, lifestyle service APPs can integrate third-party SaaS services to provide users with features such as a "points redemption mall".
[0003] Currently, the existing integration method for third-party SaaS services mainly involves APP developers manually analyzing and understanding all the application programming interfaces (APIs) of the third-party SaaS service, and independently developing the adapted user interface (UI) and business logic from scratch.
[0004] However, the integration work of the above-mentioned third-party SaaS service integration methods is arduous, with long development cycles (usually several weeks to several months) and low development efficiency. Summary of the Invention
[0005] This application provides a plug-in access method, apparatus, device, storage medium, and program product to improve application development efficiency.
[0006] In a first aspect, embodiments of this application provide a plug-in access method, wherein the application integrates a Software as a Service (SaaS) plug-in functional module, the method comprising:
[0007] In response to the operation of launching the application, the initialization interface is invoked to initialize and configure the SaaS plugin functional modules;
[0008] In response to the operation of activating the SaaS plugin, the user identity information is sent to the server of the SaaS plugin through the functional module of the SaaS plugin, so that the server can perform user authentication based on the user identity information;
[0009] In response to the successful user authentication, business data is obtained from the server through the rendering container of the SaaS plugin functional module;
[0010] The rendering container renders the business interface of the SaaS plugin based on the business data and rendering reference information. The rendering reference information includes at least one of the following: the user interface configuration information of the application and the user identity information.
[0011] Optionally, before sending the user identity information to the server of the SaaS plugin through the SaaS plugin functional module, the method further includes:
[0012] In response to a user's login operation to the application, the user's login data is encrypted through the application's server to obtain the user's identity information;
[0013] In response to the operation of activating the SaaS plugin, the user identity information is transmitted to the SaaS plugin functional module through the information transmission interface provided by the SaaS plugin functional module.
[0014] Optionally, the application's user interface configuration information includes: the application's user interface theme color; the user identity information includes: the user's role parameters; and the rendering of the SaaS plugin's business interface through the rendering container, based on the business data and rendering reference information, includes:
[0015] The user role identifier is determined based on the user's role parameters using the rendering container.
[0016] Based on the user interface theme color and the business data, the rendering container determines the interface elements and their colors.
[0017] The rendering container renders the business interface of the SaaS plugin based on the user role identifier, the interface elements, and the colors of the interface elements.
[0018] Optionally, the method further includes:
[0019] Receive incremental update packages from the server of the SaaS plugin;
[0020] Based on the incremental update package, the SaaS plugin functional modules are incrementally updated.
[0021] Optionally, before invoking the initialization interface to initialize and configure the SaaS plugin functional modules in response to the operation of launching the application, the method further includes:
[0022] In response to the completion of the application installation, the identifier of the device on which the application is installed is detected;
[0023] Based on the device's identifier, the target SaaS plugin personalized function unit is determined from multiple SaaS plugin personalized function units of the initial SaaS plugin function module.
[0024] The SaaS plugin personalized function unit, except for the target SaaS plugin personalized function unit value, is deleted from the initial SaaS plugin function module to obtain the SaaS plugin function module.
[0025] Optionally, after sending the user identity information to the SaaS plugin's server through the SaaS plugin's functional module, the method further includes:
[0026] In response to a failed user authentication, a prompt message is output; the prompt message is used to indicate that the user has not registered the SaaS plugin.
[0027] Secondly, this application provides a plug-in access device, wherein the application integrates a Software as a Service (SaaS) plug-in function module, and the device includes:
[0028] The processing module is used to call the initialization interface in response to the operation of launching the application and to initialize and configure the SaaS plugin functional modules.
[0029] The sending module is used to respond to the operation of starting the SaaS plugin by sending the user identity information to the server of the SaaS plugin through the functional module of the SaaS plugin, so that the server can perform user authentication based on the user identity information.
[0030] The receiving module is used to obtain business data from the server through the rendering container of the SaaS plugin function module in response to the successful user authentication.
[0031] A rendering module is used to render the business interface of the SaaS plugin based on the business data and rendering reference information through the rendering container. The rendering reference information includes at least one of the following: the user interface configuration information of the application and the user identity information.
[0032] Thirdly, this application provides an electronic device, including: a processor and a memory; the processor is communicatively connected to the memory;
[0033] The memory stores computer instructions;
[0034] The processor executes computer instructions stored in the memory to implement the method as described in any one of the first aspects.
[0035] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of the first aspects.
[0036] Fifthly, this application provides a computer program product comprising a computer program that, when executed by a processor, implements the method as described in any one of the first aspects.
[0037] The plugin access method, apparatus, device, storage medium, and program product provided in this application embodiment allow the application (i.e., the host application) to call the initialization interface to initialize and configure the SaaS plugin functional modules when the application starts, providing a basic environment guarantee for the subsequent operation of the SaaS plugin. When starting the SaaS plugin, the user's identity information is sent to the server for authentication through the SaaS plugin functional module. Server-side verification of user identity information ensures the security of interaction between the SaaS plugin functional module and the server, and achieves seamless identity synchronization between the application's user and the SaaS plugin service, avoiding repeated login operations within the SaaS plugin and reducing user experience interruptions. Through a rendering container, the business interface of the SaaS plugin is rendered based on business data and rendering reference information including the host application's UI configuration information and user identity information, ensuring visual consistency between the SaaS plugin's business interface and the host application, or adapting content according to user identity. Using the above method, host application developers no longer need to manually analyze third-party APIs or independently develop UI and business logic. The integration of streamlined steps such as initialization, automatic user identity verification, and opening the rendering container for rendering shortens the development cycle and improves development efficiency. Attached Figure Description
[0038] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0039] Figure 1 A flowchart illustrating a plug-in access method provided in this application;
[0040] Figure 2 A schematic diagram illustrating an application scenario of the plug-in access method provided in this application;
[0041] Figure 3 A flowchart illustrating another plugin integration method provided in this application;
[0042] Figure 4 A flowchart illustrating another plug-in access method provided in this application;
[0043] Figure 5 A schematic diagram of the structure of a plug-in access device provided in this application;
[0044] Figure 6 This is a schematic diagram of the hardware structure of an electronic device provided in this application.
[0045] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0047] With the rapid development of the mobile internet, more and more host applications (such as social apps, lifestyle service apps, and utility apps) need to quickly integrate third-party SaaS services (such as e-commerce malls, social sharing, online payment, and data analysis) to enrich their own functions and improve user experience.
[0048] For example, providing a "points redemption mall" function to users in a lifestyle service app requires integrating third-party SaaS services. Similarly, embedding a "live streaming tipping" function in a social app requires connecting to payment and interaction SaaS services.
[0049] In existing technologies, the main ways to integrate SaaS plugins into host applications include: developers manually integrating APIs and developing UIs. In other words, developers need to parse the API documentation of third-party SaaS services one by one, and develop corresponding user interfaces and business logic for each functional module (such as e-commerce, payment, and sharing) to handle cross-system data interaction.
[0050] Taking an integrated e-commerce mall SaaS service as an example, the developers of the host application need to develop UI components such as product list pages, details pages, and checkout pages, and handle business logic such as inventory and payment callbacks, which involves a large amount of development work.
[0051] Therefore, the integration work of the above-mentioned third-party SaaS service integration methods is arduous, with long development cycles (usually requiring several weeks to several months) and low development efficiency.
[0052] Furthermore, existing SaaS service integration methods suffer from issues such as fragmented identity authentication and low coupling with the host application. For example, in current methods, after logging in to the host application, users still need to re-register within the SaaS plugin or authorize login via protocols such as OAuth, resulting in a poor user experience (even if authorization protocols like OAuth can achieve login, deeply integrating user information and rights remains very complex). In addition, the UI of SaaS plugins is usually independent of the host application, requiring developers to manually modify plugin interface elements, further reducing development efficiency.
[0053] Considering the aforementioned problems with existing plugin integration methods, this application proposes a plugin integration method that simplifies the integration process to reduce development difficulty and improve development efficiency. This method eliminates the need for host application developers to manually analyze third-party APIs or independently develop UI and business logic. By integrating streamlined steps such as initialization, automatic user identity verification, and opening the rendering container for rendering, the development cycle is shortened and development efficiency is improved.
[0054] Optionally, the execution entity of this plug-in access method can be any existing electronic device with processing capabilities, such as a server or terminal device. This electronic device may have an application installed (such as the aforementioned host application). This application may integrate a SaaS plug-in functional module. Optionally, this SaaS plug-in functional module may be provided to the host application for integration in the form of a Software Development Kit (SDK).
[0055] The plug-in access technology solution of this application will be described in detail below with reference to specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0056] Figure 1 This is a flowchart illustrating a plug-in integration method provided in this application. Figure 1 As shown, the method may include the following steps:
[0057] S101. In response to the application startup operation, the initialization interface is called to initialize and configure the SaaS plugin functional modules.
[0058] Optionally, the aforementioned application (the application described in any embodiment of this application, also referred to as the host application) can be an application running on any mobile operating system. The aforementioned SaaS plugin functional modules can be modules used to provide specific business functions, such as e-commerce functions, payment functions, sharing functions, or content service functions. It should be understood that this application does not impose any limitations on the type of host application or the specific business functions provided by the SaaS plugin functional modules.
[0059] For example, after obtaining the SDK containing the SaaS plugin functional module, the developer of the host application (or the integrator) can integrate the SDK into the development project of the host application. The SaaS plugin functional module can be initialized upon the first launch or each subsequent launch of the host application to execute the SaaS plugin functionality.
[0060] In some embodiments, the electronic device may initialize and configure the aforementioned SaaS plugin functional modules through a preset initialization interface of the host application. For example, the preset initialization interface may be init(config) in the SDK.
[0061] Optionally, when the host application calls this initialization interface, it can pass in corresponding configuration parameters (config). These configuration parameters may include, but are not limited to: identification information assigned by the SaaS service provider to identify the host application, the network address for communicating with the SaaS service backend, and specific user interface style configuration information for the host application.
[0062] Through the above initialization configuration, the SaaS plugin functional module can establish a connection with the SaaS plugin server and execute the subsequent rendering function of the SaaS plugin business interface.
[0063] S102. In response to the operation of starting the SaaS plugin, the user identity information is sent to the server of the SaaS plugin through the SaaS plugin function module, so that the server can perform user authentication based on the user identity information.
[0064] Optionally, the aforementioned operation of activating the SaaS plugin can refer to the user triggering an entry control related to the SaaS plugin function within the application interface. For example, clicking buttons or menu items such as "Points Mall," "Online Customer Service," or "Third-Party Sharing" within the application can trigger the operation of activating the SaaS plugin.
[0065] The aforementioned user identity information can be credentials used on the SaaS plugin's server to uniquely identify and verify the current application user. In some embodiments, this user identity information may be generated by the application's server after the user successfully logs into the application. In some embodiments, this user identity information may be an encrypted token. This token may contain a unique user identifier, role, level, validity period, or other information used by the user in the application.
[0066] Optionally, the electronic device may, for example, respond to the aforementioned operation of activating the SaaS plugin by transmitting the user's identity information to the SaaS plugin functional module through a standard interface provided by the SaaS plugin functional module. Then, the SaaS plugin functional module may, for example, send the user's identity information to the server of the corresponding SaaS plugin (i.e., the backend server of the SaaS service provider that provides the SaaS plugin functionality) through a secure communication component.
[0067] Upon receiving the user's identity information, the SaaS plugin's server can execute a user authentication process. For example, using the aforementioned token as the user's identity information, this authentication process might include: verifying the token's signature validity to ensure the certificate's source is trustworthy, and then parsing the token content to obtain the user identifier. The SaaS plugin's server can then check whether the user identifier has been registered with the SaaS plugin's server. Alternatively, the SaaS plugin's server can also verify whether the token is valid.
[0068] It should be understood that this application does not limit how the server-side of the SaaS plugin performs user authentication based on user identity information. Optionally, the implementation method of user authentication based on user identity information on the server-side of the SaaS plugin can refer to any existing server-side user authentication method based on user identity information, which will not be elaborated here.
[0069] S103. In response to successful user authentication, business data is retrieved from the server through the rendering container of the SaaS plugin functional module.
[0070] The rendering container can be a core component in the SaaS plugin functional module responsible for loading and displaying the plugin's business interface. In some embodiments, the rendering container can be a native view controller or an embedded WebView component, and it can have the function of loading content from the network and rendering it.
[0071] Optionally, after completing user authentication, the SaaS plugin's server can, for example, return a response to the SaaS plugin's functional module indicating successful user authentication. For instance, this response may also carry a temporary session ID or authorization code, enabling the SaaS plugin's functional module to establish an interactive session with the server.
[0072] The electronic device can activate the rendering container in response to successful user authentication. Based on the context established after successful authentication (e.g., using the aforementioned session identifier or directly appending the authenticated user token to the request header), the rendering container can initiate a business data retrieval request to the SaaS plugin's server. The server can respond to this business data retrieval request by sending the aforementioned business data to the SaaS plugin's functional module.
[0073] For example, the aforementioned business data may include data required for displaying the business interface of the SaaS plugin. It should be understood that the display data required for the interfaces of different SaaS plugins may differ, and this application does not limit the content of such business data.
[0074] S104. Render the business interface of the SaaS plugin using the rendering container, based on business data and rendering reference information.
[0075] The rendering reference information may include, for example, at least one of the following: application user interface configuration information and user identity information.
[0076] For example, the application's user interface configuration information may include data such as the application's theme color, font style, and other application interface characteristics. For example, the aforementioned user identity information may include, for example, the user's name, user level, etc.
[0077] For example, an electronic device can perform the following steps through a rendering container to render the business interface of a SaaS plugin based on business data and rendering reference information:
[0078] Step 1: Populate the obtained business data (such as a product list JSON file) into the preset business interface template of the SaaS plugin.
[0079] Step 2: Based on the application's user interface configuration information, globally set the style attributes of interface elements in the business interface, such as color, font, and spacing. This means applying the application's user interface configuration information to the visual style rules of the business interface of the SaaS plugin to be rendered, ensuring that the buttons, backgrounds, text, and other elements presented on the business interface maintain a consistent visual style with the host application.
[0080] Step 3: Based on user identity information (e.g., the user role is a high-level user), decide whether to display specific UI elements, or adjust the visibility of interface elements.
[0081] The rendering container can present a business interface that carries the complete business functions of the SaaS service, is deeply integrated with the host application in terms of visuals and experience, and can intelligently change according to the user's identity (such as an e-commerce interface that matches the colors of the host application and displays products exclusive to high-level users) in the view stack provided by the host application.
[0082] In this embodiment, when the application starts, it can call the initialization interface to initialize and configure the SaaS plugin functional modules, providing a basic environment guarantee for the subsequent operation of the SaaS plugin. When starting the SaaS plugin, the user's identity information is sent to the server for authentication through the SaaS plugin functional module. Server-side verification of user identity information ensures the security of interaction between the SaaS plugin functional modules and the server, and achieves seamless identity synchronization between the application's user and the SaaS plugin service, avoiding repeated login operations within the SaaS plugin and reducing user experience interruptions. Through a rendering container, the business interface of the SaaS plugin is rendered based on business data and rendering reference information containing the application's UI configuration information and user identity information, ensuring visual consistency between the SaaS plugin's business interface and the application, or adapting content according to user identity. Using the above method, application developers no longer need to manually analyze third-party APIs or independently develop UI and business logic. The integration of streamlined steps such as initialization, automatic user identity verification, and opening the rendering container for rendering shortens the development cycle and improves development efficiency.
[0083] As one possible implementation, before sending user identity information to the SaaS plugin's server via the SaaS plugin's functional module, the electronic device can also respond to the user's login application operation by encrypting the user login data through the application's server to obtain the user identity information.
[0084] The electronic device can respond to the operation of launching the SaaS plugin and transmit the aforementioned user identity information to the SaaS plugin functional module through the information transmission interface provided by the SaaS plugin functional module.
[0085] Optionally, the aforementioned user login operation can refer to the user entering a username and password on the login interface of the host application, or verifying a mobile phone number, etc. This application does not limit the method of user login to the application.
[0086] Optionally, the aforementioned user login data may include, for example, a user's unique identifier. In some embodiments, the user login data may include, for example, a user's unique identifier (such as a user ID, mobile phone number, email address, etc.) and a timestamp of successful login.
[0087] The application's server can use asymmetric or symmetric encryption algorithms to encrypt user login data and obtain user identity information. For example, the application's server can generate a token conforming to the JWT standard based on the user login data. Specifically, the host application's server can use the private key held by the host application's server to sign the user login data, forming an encrypted string, which is the user identity information (user token).
[0088] Optionally, the SaaS plugin module can provide a standard information transmission interface to the host application. This information transmission interface can be used to receive user identity information from the host application.
[0089] By using the above method, the user login data is encrypted through the application's server to obtain the user's identity information, preventing the user's identity information from being intercepted or tampered with during transmission and ensuring the security of the user's identity information transmission.
[0090] As one possible implementation, the application's user interface configuration information may include: the application's user interface theme colors. The aforementioned user identity information may include: the user's role parameters. The electronic device, for example, can determine the user's role identifier based on these role parameters using a rendering container.
[0091] Optionally, the user's role parameter can be a field included in the user's identity information. This role parameter can be used to characterize the user's identity category or level within the host application system. After obtaining the user's identity information, the SaaS plugin functional module can parse the user's identity information to obtain the aforementioned role parameter.
[0092] For example, an electronic device can determine a user's role identifier by using the user's role parameters and the mapping relationship between the role parameters and the role identifier. This mapping relationship can, for example, be pre-configured in the SDK.
[0093] Electronic devices, for example, can determine the colors of interface elements and interface elements based on the aforementioned user interface theme colors and business data through a rendering container.
[0094] Optionally, the aforementioned business data may include specific content structure information that the interface needs to display. For example, the business data may include interface elements that need to be rendered, such as banners, goods grids, and user cards.
[0095] The dynamic interface engine of the SaaS plugin module can determine the color of each interface element based on the interface element type defined by business data and the aforementioned theme colors. For example, the background color of the "Add to Cart" button can be determined to be consistent with the theme color.
[0096] Then, electronic devices can use this rendering container to render the business interface of the SaaS plugin based on user role identification, interface elements, and the colors of the interface elements.
[0097] For example, an electronic device may first lay out and create a business interface based on user role identification, interface elements, and the colors of the interface elements. For instance, the rendering container can create corresponding interface element views within the container based on the layout information in the business data.
[0098] Then, the rendering container can assign the aforementioned user interface theme colors to the corresponding style attributes (such as background color, text color, border color, etc.) of each interface element. Next, the rendering container can fill the corresponding interface elements with specific content from the business data (such as product images, title text, etc.). Simultaneously, the rendering container can also render user role identifiers (such as member badges) as special interface elements at preset locations (such as the top of the user card).
[0099] Using the methods described above, user role identifiers can be determined based on user role parameters, and these identifiers, combined with the user interface theme color and business data, can jointly determine the interface elements and their colors. Because the rendered business interface integrates the user role identifier and the application's theme color, the SaaS plugin's business interface can display differentiated identifiers based on user identity and maintain consistency with the host application in visual style (such as button colors).
[0100] As one possible implementation, the electronic device can also receive incremental update packages from the SaaS plugin's server. The electronic device can then use these incremental update packages to incrementally update the SaaS plugin's functional modules.
[0101] Optionally, the SaaS plugin functional module may, for example, periodically or at specific times (e.g., when the SaaS plugin functional module starts) send update check requests to the SaaS plugin server during operation. In response to these update check requests, the server may send an incremental update package to the SaaS plugin functional module when an update is available. Alternatively, when the server detects an available new version or hotfix, it may generate and distribute a corresponding incremental update package based on the SDK version currently integrated into the host application.
[0102] The aforementioned incremental update package may include, for example, a data package containing changes to the functionality of the SaaS plugin (such as newly added code files, modified resource images, or updated configuration files), rather than a complete SDK installation package.
[0103] For example, electronic devices can replace old local files with new files in an incremental update package, or merge patch data into existing resources. Alternatively, electronic devices can load updated code logic into memory and replace the original logic branches based on runtime dynamic loading technology. Furthermore, electronic devices can clear old cached data to ensure that the new business interface and business logic take effect.
[0104] In this embodiment, the SaaS plugin functional module receives incremental update packages from the server and performs incremental updates on the SaaS plugin functional module based on these packages. Because these incremental update packages are incremental and provided directly by the server, the updates and optimizations of the SaaS plugin functionality do not require intervention from the host application developers or a re-release of the application version. This method allows the SaaS plugin to iterate its functionality independently and quickly, thereby reducing the long-term maintenance costs and complexity of the host application.
[0105] As one possible implementation, before the electronic device calls the initialization interface to initialize and configure the SaaS plugin functional modules in response to the operation of launching the application, it can also detect the identifier of the device that installed the application in response to the completion of the application installation.
[0106] Then, the electronic device can identify the target SaaS plugin personalization unit from among the multiple SaaS plugin personalization units of the initial SaaS plugin functional module based on the device's identifier.
[0107] Then, the electronic device can delete the SaaS plugin personalization function units "except for the target SaaS plugin personalization function unit value" from the initial SaaS plugin function module to obtain the aforementioned SaaS plugin function module.
[0108] Optionally, the timing of application installation completion can refer to the application's first installation and launch, or the application's launch after completing an overwrite installation.
[0109] Optionally, the identification of the aforementioned device may be, for example, the brand name and model identifier of the device (e.g., the electronic device) on which the application is installed.
[0110] For example, a SaaS plugin module can call the API of the device on which the application is installed to obtain the device's identifier.
[0111] Optionally, the initial SaaS plugin functional module is a full SDK. This full SDK can encapsulate multiple personalized functional units for different device types. Each personalized functional unit of a SaaS plugin can include, for example, specific interface resources or shortcut operation methods specific to that device type.
[0112] For example, a SaaS plugin functional module may determine the SaaS plugin personalized functional unit corresponding to the device identifier based on the device identifier and the mapping relationship between the device identifier and the SaaS plugin personalized functional unit.
[0113] In this embodiment, after the application is installed, the target SaaS plugin personalized function unit is identified and retained from multiple SaaS plugin personalized function units in the initial SaaS plugin function module based on the device identifier, while other SaaS plugin personalized function units are deleted. This reduces redundant code and size of the SaaS plugin function module. Through this method, while ensuring that the SaaS plugin function module can have personalized functions for different devices, lightweight customization of the SaaS plugin function module is achieved.
[0114] As one possible implementation, after the electronic device sends the user's identity information to the SaaS plugin's server via the SaaS plugin's functional module, it can also output a prompt message in response to failed user authentication. This prompt message can be used to inform the user that they have not registered for the SaaS plugin.
[0115] For example, the SaaS plugin functional module can determine that user authentication has failed based on the user authentication result returned by the SaaS plugin's server. For instance, the SaaS plugin functional module can determine that user authentication has failed when a field in the aforementioned user authentication result has a specific value.
[0116] When user authentication fails, the SaaS plugin functional module will not execute the subsequent processes of obtaining business data and rendering the interface to ensure the security of the application and SaaS plugin.
[0117] Alternatively, the electronic device can output the above-mentioned prompt information, for example, through any existing message notification method such as a pop-up dialog box.
[0118] By using the above method, when user authentication fails, a prompt message indicating that the plugin has not been registered is output to the user, avoiding user confusion or interruption of the operation process due to silent authentication failure, thus improving the transparency of the authentication process and the user experience.
[0119] The following is an exemplary description of the plugin access method provided in this application:
[0120] Figure 2 This is a schematic diagram illustrating an application scenario of the plug-in access method provided in this application. For example... Figure 2 As shown, the host application can deploy host business logic and a user identity system. The SaaS plugin SDK can deploy a host configuration module, a standardized container module, an identity synchronization module, a dynamic interface engine, and a secure communication channel (encryption / signature). The SaaS service provider cloud can deploy authentication services, business data services, and a user profiling and policy engine.
[0121] The user identity system can directly deliver user tokens to the identity synchronization module. The host configuration module can configure the identity synchronization module. The standardized container module can transmit data bidirectionally to the dynamic interface engine. The standardized container module can provide a ready-to-use UI container for users to view. The identity synchronization module can transmit token verification and synchronization—a secure channel—to the identity verification service. The dynamic interface engine can transmit customized data requests, UI commands, etc., through a secure channel to the business data service, user profile, and policy engine.
[0122] Figure 3 This is a flowchart illustrating another plugin integration method provided in this application. Figure 3 As shown, the following steps can be performed after the process begins:
[0123] Step S10: Integrate the SDK into the host application and initialize it.
[0124] Step S20: The host user logs in and generates a user identity token.
[0125] Step S30: The user triggers the plugin entry, such as by clicking the mall button.
[0126] Step S40: The host calls the SDK interface and passes in the user token.
[0127] Then, determine if the token is valid. If invalid, proceed to step S50, return an error, and the process ends.
[0128] If valid, proceed to step S60: the SDK invokes the standardized container and requests business data. Step S70: the dynamic interface engine renders the customized plugin interface based on the user's identity and host configuration. Step S80: the user performs business operations such as browsing, sharing, and payment within the unified interface. End of process.
[0129] Figure 4 This is a flowchart illustrating another plugin integration method provided in this application. Figure 4 As shown, users, host applications, and SaaS plugin SDKs can perform security token verification and synchronization processes. Specifically, this includes the following steps:
[0130] 1. The user clicks "Plugin Entry".
[0131] 2. The host application sends the user's identity information to the SaaS plugin SDK through the startPlugin(userToken) interface.
[0132] 3. The SaaS plugin SDK uses verifyToken (userToken) to authenticate with the SaaS authentication service.
[0133] 4. Synchronize user identity and policy profile to SaaS business data service.
[0134] 5. The SaaS plugin SDK receives the Session ID returned after successful verification and establishes a session.
[0135] However, it involves performing dynamic data acquisition and rendering processes based on identity and topic.
[0136] 6. The SaaS plugin SDK requests business data from the SaaS business data service (based on SessionID, host UI theme).
[0137] 7. The SaaS plugin SDK receives the returned customized business data.
[0138] 8. The SaaS plugin SDK renders the interface through a dynamic interface engine.
[0139] 9. Present users with a customized UI rendered using standardized containers.
[0140] The aforementioned container can be embedded in the host application's page navigation stack. This container is responsible for loading and displaying the complete business interface (such as the e-commerce homepage and product detail pages) provided by the SaaS service. The dynamic interface engine can be a core component, communicating with the SaaS service backend and dynamically rendering the corresponding business interface based on received host user identity information (such as user ID, level, and tags) and pre-configured host application UI theme. For example, it can display a dedicated interface for high-level users or adjust button colors according to the host theme color. The secure communication module is responsible for encrypting, signing, and preventing tampering of all network communications between the SDK and the SaaS service backend, ensuring data security.
[0141] For example, the access method includes the following steps:
[0142] Step S1: Integration and Initialization. The host application integrates the SDK and calls the initialization interface when the application starts to complete the basic SDK configuration.
[0143] Step S2: Identity Token Transfer. After a user logs in to the host application, the host application generates a user identity token and, when the SaaS plugin needs to be launched (e.g., when the user clicks the "Points Mall" entry), passes the token to the SDK through the standard interface provided by the SDK.
[0144] Step S3: Authentication and Synchronization. The SDK's identity synchronization module sends the token to the SaaS service backend. The backend verifies the token's validity, parses the user's identity, and establishes the corresponding session within its system. Upon successful verification, a callback notification is sent to the SDK.
[0145] Step S4: Containerized Loading and Dynamic UI Rendering. The standardized container module of the SDK is invoked. The container requests business data from the SaaS service backend, and the dynamic UI engine renders the final, style-consistent plugin interface (such as an e-commerce interface) based on the returned data (including content customized based on user identity) and the host UI configuration.
[0146] Step S5: Business Process Execution. Users perform operations within the plugin interface (such as browsing products, sharing, placing orders, and making payments). All business logic is processed by the SaaS service backend. Sensitive operations such as payment and sharing will re-verify user identity and can call the host application's own payment capabilities or sharing components through the bridging interface provided by the host application.
[0147] Taking a lifestyle service app (host application) that wants to integrate a "daily necessities mall" plugin as an example, the integration method includes the following steps:
[0148] 1. Preparation: SDK provided by the e-commerce service provider. The app developer imports this SDK.
[0149] 2. Initialization: In the Application initialization code of the life service app, call SDK.init(config) and pass in the assigned AppKey (a unique identification key issued by the SaaS plugin provider to the host application).
[0150] 3. Integration entry point: Add a "Lifestyle Mall" button to the "My" page of lifestyle service apps.
[0151] 4. Identity Transfer: After a user logs into the lifestyle service app, its server generates an encrypted JSON Web Token (JWT) containing information such as the user's ID and level. When the user clicks the "Lifestyle Mall" button, the app calls SDK.startPlugin(userToken).
[0152] 5. Identity Synchronization: The SDK transmits the token to the e-commerce server. The e-commerce server verifies the JWT, confirming that it is a valid user A from the partner's "Lifestyle Service APP". It then creates a session for user A in the e-commerce and prepares their exclusive data (such as matching discounts based on the lifestyle service APP's membership level).
[0153] 6. Interface Display: The SDK opens a full-screen e-commerce container and loads the e-commerce homepage. The e-commerce server returns the homepage data, and the SDK dynamically adjusts the colors of the e-commerce buttons and key icons based on the theme color (such as vibrant orange) obtained in advance from the lifestyle service app. User A sees an e-commerce platform with a "High-Tier User Discount" icon, and the colors blend seamlessly with the lifestyle service app.
[0154] 7. Usage: User A browses products, places an order, and pays. The payment interface is also dynamically adapted. After successful payment, the order data can be queried in the "My Orders" section of the lifestyle service app through the interface provided by the SDK, thus achieving a closed loop.
[0155] In this embodiment, host application developers do not need to concern themselves with the complex UI and business logic within the plugin. Integration can be completed in three simple steps: "initialization - token transfer - container opening," reducing development workload from weeks or even months to hours. Through token synchronization and verification mechanisms, seamless synchronization of user identities across systems is achieved, allowing users to "log in once and access everywhere," resulting in a smooth experience and significantly improved conversion rates. Through a dynamic interface adaptation engine, the plugin UI maintains consistency with the host application's style while intelligently differentiating displays based on user identity, achieving deep integration of functionality and experience. The generation, transfer, and verification of identity tokens are all conducted under secure protocols, with end-to-end encryption ensuring user data and transaction security. Function updates and interface optimizations for the SaaS plugin are all handled by the service provider in the background, eliminating the need for the host application to release new versions, thus reducing long-term maintenance costs.
[0156] This SDK encapsulates complete SaaS plugin functional modules and achieves one-click low-code integration through a unified identity bridging protocol and standardized container protocols. Host applications require only minimal configuration to embed a fully functional plugin interface. Furthermore, token synchronization and verification mechanisms ensure seamless and secure synchronization of host user identities to plugin services. In addition, the SDK, through a dynamic interface adaptation engine, can automatically render corresponding customized interfaces for sharing, payment, etc., based on the host application's brand style and user roles. This application reduces integration complexity and improves development efficiency and user experience.
[0157] Figure 5 This is a schematic diagram of the structure of a plug-in access device provided in this application. Figure 5 As shown, the plug-in access device 500 may include: a processing module 51, a sending module 52, an acquisition module 53, and a rendering module 54. Among them,
[0158] Processing module 51 is used to call the initialization interface in response to the operation of starting the application and to initialize and configure the SaaS plugin functional modules.
[0159] The sending module 52 is used to respond to the operation of starting the SaaS plugin by sending the user identity information to the server of the SaaS plugin through the SaaS plugin function module, so that the server can perform user authentication based on the user identity information.
[0160] Module 52 is used to retrieve business data from the server in response to successful user authentication, through the rendering container of the SaaS plugin functional module.
[0161] Rendering module 54 is used to render the business interface of the SaaS plugin through a rendering container, based on business data and rendering reference information. The rendering reference information includes at least one of the following: application user interface configuration information and user identity information.
[0162] Optionally, the processing module 51 is further configured to, in response to the user's login application operation, encrypt the user's login data through the application's server to obtain the user's identity information before sending the user's identity information to the SaaS plugin's server through the SaaS plugin function module; and in response to the SaaS plugin's startup operation, transmit the user's identity information to the SaaS plugin function module through the information transmission interface provided by the SaaS plugin function module.
[0163] Taking the application's user interface configuration information, including the application's user interface theme color, and user identity information, including the user's role parameters, as an example, optionally, the rendering module 54 is specifically used to determine the user role identifier based on the user's role parameters through the rendering container; determine the interface elements and their colors based on the user interface theme color and business data through the rendering container; and render the business interface of the SaaS plugin based on the user role identifier, interface elements, and their colors through the rendering container.
[0164] Optionally, the plug-in access device 500 may further include a receiving module 55 for receiving incremental update packages from the SaaS plug-in's server. Optionally, the processing module 51 is also used to incrementally update the SaaS plug-in's functional modules based on the incremental update packages.
[0165] Optionally, the processing module 51 is further configured to, before calling the initialization interface to initialize the SaaS plugin functional module in response to the operation of starting the application, detect the identifier of the device on which the application is installed in response to the completion of the application installation; based on the device identifier, determine the target SaaS plugin personalized functional unit from multiple SaaS plugin personalized functional units of the initial SaaS plugin functional module; delete the SaaS plugin personalized functional units in the initial SaaS plugin functional module except for the value of the target SaaS plugin personalized functional unit, to obtain the SaaS plugin functional module.
[0166] Optionally, the processing module 51 is also used to output a prompt message in response to the user's authentication failure; the prompt message is used to remind the user that the SaaS plugin has not been registered.
[0167] The plug-in access device 500 provided in this application is used to execute the aforementioned plug-in access method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0168] Figure 6 This is a schematic diagram of the hardware structure of an electronic device provided in this application. Figure 6 The illustrated electronic device 60 includes a memory 61, a processor 62, and a communication interface 63. The memory 61, processor 62, and communication interface 63 are communicatively connected to each other. For example, the memory 61, processor 62, and communication interface 63 can be connected via a network. Alternatively, the electronic device 60 may also include a bus 64. The memory 61, processor 62, and communication interface 63 are communicatively connected to each other via the bus 64. Figure 6 It is an electronic device 60 in which the memory 61, processor 62, and communication interface 63 are connected to each other via bus 64.
[0169] The memory 61 can be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 61 can store programs, and when the program stored in the memory 61 is executed by the processor 62, the processor 62 and the communication interface 63 are used to execute the plug-in access method described in any of the foregoing embodiments. The memory can also store data required by the plug-in access method.
[0170] The processor 62 can be a general-purpose CPU, microprocessor, application-specific integrated circuit (ASIC), graphics processing unit (GPU), or one or more integrated circuits.
[0171] Processor 62 can also be an integrated circuit chip with signal processing capabilities. In implementation, the plug-in access method of this application can be completed through the integrated logic circuits in the hardware of processor 62 or through software instructions. The aforementioned processor 62 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the following embodiments of this application. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the following embodiments of this application can be directly embodied as execution by a hardware decoding processor, or as a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 61, and processor 62 reads the information in memory 61 and, in conjunction with its hardware, completes the plug-in access method of this application.
[0172] Communication interface 63 uses transceiver modules, such as, but not limited to, transceivers, to enable communication between electronic device 60 and other devices or communication networks. For example, data sets can be acquired through communication interface 63.
[0173] When the aforementioned electronic device 60 includes a bus 64, the bus 64 may include a path for transmitting information between various components of the electronic device 60 (e.g., memory 61, processor 62, communication interface 63).
[0174] This application also provides a computer-readable storage medium, which may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. Specifically, the computer-readable storage medium stores program instructions, which are used in the methods described in the above embodiments.
[0175] This application also provides a program product including executable instructions stored in a readable storage medium. At least one processor of an electronic device can read the executable instructions from the readable storage medium, and the at least one processor executes the executable instructions to cause the electronic device to implement the plug-in access methods provided in the various embodiments described above.
[0176] The term "multiple" in this document refers to two or more. The term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the preceding and following related objects; in formulas, " / " indicates a "division" relationship. Additionally, it should be understood that in the description of this application, words such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order.
[0177] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.
[0178] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A plug-in integration method, characterized in that, The application integrates a Software as a Service (SaaS) plugin module, and the method includes: In response to the operation of launching the application, the initialization interface is invoked to initialize and configure the SaaS plugin functional modules; In response to the operation of activating the SaaS plugin, the user identity information is sent to the server of the SaaS plugin through the functional module of the SaaS plugin, so that the server can perform user authentication based on the user identity information; In response to the successful user authentication, business data is obtained from the server through the rendering container of the SaaS plugin functional module; The rendering container renders the business interface of the SaaS plugin based on the business data and rendering reference information. The rendering reference information includes at least one of the following: the user interface configuration information of the application and the user identity information.
2. The method according to claim 1, characterized in that, Before sending the user identity information to the SaaS plugin's server via the SaaS plugin's functional module, the method further includes: In response to a user's login operation to the application, the user's login data is encrypted through the application's server to obtain the user's identity information; In response to the operation of activating the SaaS plugin, the user identity information is transmitted to the SaaS plugin functional module through the information transmission interface provided by the SaaS plugin functional module.
3. The method according to claim 1 or 2, characterized in that, The application's user interface configuration information includes: the application's user interface theme color; the user identity information includes: the user's role parameters; and the rendering of the SaaS plugin's business interface through the rendering container, based on the business data and rendering reference information, includes: The user role identifier is determined based on the user's role parameters using the rendering container. Based on the user interface theme color and the business data, the rendering container determines the interface elements and their colors. The rendering container renders the business interface of the SaaS plugin based on the user role identifier, the interface elements, and the colors of the interface elements.
4. The method according to claim 1 or 2, characterized in that, The method further includes: Receive incremental update packages from the server of the SaaS plugin; Based on the incremental update package, the SaaS plugin functional modules are incrementally updated.
5. The method according to claim 1 or 2, characterized in that, Before invoking the initialization interface to initialize and configure the SaaS plugin functional modules in response to the operation of launching the application, the method further includes: In response to the completion of the application installation, the identifier of the device on which the application is installed is detected; Based on the device's identifier, the target SaaS plugin personalized function unit is determined from multiple SaaS plugin personalized function units of the initial SaaS plugin function module. The SaaS plugin personalized function unit, except for the target SaaS plugin personalized function unit value, is deleted from the initial SaaS plugin function module to obtain the SaaS plugin function module.
6. The method according to claim 1 or 2, characterized in that, After sending the user identity information to the SaaS plugin's server via the SaaS plugin's functional module, the method further includes: In response to a failed user authentication, a prompt message is output; the prompt message is used to indicate that the user has not registered the SaaS plugin.
7. A plug-in access device, characterized in that, The application integrates a Software as a Service (SaaS) plugin module, and the device includes: The processing module is used to call the initialization interface in response to the operation of launching the application and to initialize and configure the SaaS plugin functional modules. The sending module is used to respond to the operation of starting the SaaS plugin by sending the user identity information to the server of the SaaS plugin through the functional module of the SaaS plugin, so that the server can perform user authentication based on the user identity information; The acquisition module is used to acquire business data from the server through the rendering container of the SaaS plugin function module in response to the successful user authentication. A rendering module is used to render the business interface of the SaaS plugin based on the business data and rendering reference information through the rendering container. The rendering reference information includes at least one of the following: the user interface configuration information of the application and the user identity information.
8. An electronic device, characterized in that, include: Processor and memory; The processor is communicatively connected to the memory; The memory stores computer instructions; The processor executes computer instructions stored in the memory to implement the method as described in any one of claims 1-6.
9. 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-6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1-6.