Page display method and device
By leveraging the collaborative work of application plugin integration components and page management components in business applications on mobile devices, the isolation between plugin capabilities and page display is achieved, solving the problem of lack of plugin access in mobile browsers and applications, and improving user experience and business customization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- UC MOBILE CHINA CO LTD
- Filing Date
- 2025-12-15
- Publication Date
- 2026-05-08
AI Technical Summary
The lack of effective third-party plugin integration mechanisms in mobile browsers and applications results in low user experience and business customization.
A page display method and apparatus are provided. By applying a plugin integration component and a page management component, the plugin call request is responded to, the target plugin display information is determined, and the WebView page is updated through the page management component, thereby achieving isolation between plugin capabilities and page display.
It improves the compatibility of plugin functionality with mobile devices and user experience, reduces the maintenance cost of application plugin integration components, and enhances the customization of business applications.
Smart Images

Figure CN121996339A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a page display method. It also relates to a page display device, a computing device, a computer-readable storage medium, and a computer program product. Background Technology
[0002] With the rapid development of technology, users' demands for diverse browser functions are increasing. Third-party plugins can be used to extend browser functionality, such as ad blocking and webpage translation, thereby improving the user experience.
[0003] While third-party plugins are widely used in desktop browsers, mobile browsers and mobile applications also require them. For mobile applications, the WebView component can be used to display web page content. Specifically, when a mobile application needs to display web page content, the WebView component can be used to display the content within its own user interface, without requiring redirection to an external browser. Summary of the Invention
[0004] In view of the above, embodiments of this specification provide a page display method. One or more embodiments of this specification also relate to a page display device, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this specification, a page display method is provided, the method being applied to a business application on a mobile device, the business application deploying an application plugin integration component and a page management component, the application plugin integration component providing plugin extension functionality for the business application, and the page management component displaying a WebView-based page, including: In response to an operation on the current WebView page, a target plugin invocation request is generated, wherein the target plugin invocation request carries a target plugin identifier; The target plugin display information is determined based on the target plugin identifier through the application plugin integration component, wherein the target plugin display information represents the information to be displayed related to the target plugin during the processing of the target plugin call request; The current WebView page is updated based on the target plugin display information using the page management component to obtain the target WebView page.
[0006] According to a second aspect of the embodiments of this specification, a page display device is provided, the page display device being deployed on a business application of a mobile device, the page display device including an application plugin integration component and a page management component, the application plugin integration component being used to provide plugin extension functions for the business application, and the page management component being used to display a WebView-based page; The response unit is configured to generate a target plugin invocation request in response to an operation on the current WebView page, wherein the target plugin invocation request carries a target plugin identifier; The determining unit is configured to determine target plugin display information based on the target plugin identifier through the application plugin integration component, wherein the target plugin display information represents information to be displayed related to the target plugin during the processing of the target plugin invocation request; The update unit is configured to update the current WebView page based on the target plugin display information through the page management component, thereby obtaining the target WebView page.
[0007] According to a third aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the above method.
[0008] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the above-described method.
[0009] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described method.
[0010] This specification provides a page display method that, in a WebView-based business application on a mobile device, generates a target plugin invocation request in response to an operation on the current WebView page, wherein the target plugin invocation request carries a target plugin identifier; the application plugin integration component determines target plugin display information based on the target plugin identifier, wherein the target plugin display information represents information to be displayed related to the target plugin during the processing of the target plugin invocation request; and the page management component updates the current WebView page based on the target plugin display information to obtain the target WebView page.
[0011] One embodiment of this specification uses an application plugin integration component to process target plugin call requests and determine the target plugin display information that needs to be displayed during the processing of the target plugin call requests. The target WebView page is obtained by displaying the target plugin display information on the current WebView page through a page management component. In other words, the application plugin integration component provides plugin extension functionality, and the page management component provides WebView-based page display functionality, thus achieving isolation between page display and plugin capabilities. Attached Figure Description
[0012] Figure 1 This is a flowchart illustrating a page display method provided in one embodiment of this specification; Figure 2 This is a schematic diagram of the structure of an application plug-in integration component provided in one embodiment of this specification; Figure 3 This is a schematic diagram of the structure of a business application that accesses the SDK, provided in one embodiment of this specification. Figure 4 This is a schematic diagram of the structure of an SDK provided in one embodiment of this specification; Figure 5 This is a schematic diagram of the structure of a page display device provided in one embodiment of this specification; Figure 6 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0013] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0014] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0015] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0016] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0017] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0018] Browser third-party plugins: These are plugins that extend the functionality of a browser and can be installed by users. These plugins are developed by individuals or organizations on the Internet, based on the Chrome plugin standard. Generally, the developed plugins are made available to users for installation and use on websites such as the Chrome Web Store and Edge Store.
[0019] WebView: WebView is a lightweight browser component embedded in a native app for displaying web page content. WebView allows mobile or desktop applications to load and render HTML, CSS, and JavaScript. The AndroidWebView architecture encapsulates the core browsing implementation (including web page loading, layout, and rendering) into a WebView interface, facilitating the use of core browsing functionalities by different integrators. The browser interface and functionality are implemented based on the WebView interface.
[0020] Chromium for Android architecture: The core browsing mechanism and the interface implementation are integrated into one, and the core functions of the webpage and the interface functions of the browser are integrated and inseparable.
[0021] As described in the background section, current third-party browser extension access mechanisms are concentrated on desktop browsers, such as the CRX plugins in the Chrome and Edge app stores. In desktop browser applications, third-party plugins can be used to enhance browser functionality and improve the user experience. For example, ad-blocking plugins can filter out distracting information on web pages, translation plugins can achieve real-time conversion of multilingual content, developer tool plugins can be used to debug web applications, and automation script plugins can automatically populate and manipulate web page content. These plugins significantly expand the functional boundaries of browsers by injecting JavaScript, modifying the DOM structure, and intercepting network requests.
[0022] However, on mobile devices, due to operating system limitations, performance constraints, and security mechanisms, mainstream mobile browsers generally do not support third-party plugin mechanisms. Taking the iOS platform as an example, the company behind iOS mandates that all third-party browsers use the WebKit rendering engine and prohibits loading arbitrary JavaScript extensions, only allowing limited ad-blocking functionality through Content Blockers. Additionally, a small number of browsers have implemented third-party plugin integration mechanisms under the Chromium for Android architecture, but browsers based on this architecture have limited flexibility and a low degree of business customization.
[0023] This specification provides a page display method, and also relates to a page display device, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.
[0024] See Figure 1 , Figure 1 A flowchart of a page display method according to an embodiment of this specification is shown, which specifically includes the following steps.
[0025] Step 102: In response to the operation on the current WebView page, generate a target plugin invocation request, wherein the target plugin invocation request carries a target plugin identifier.
[0026] It should be noted that the page display method provided in this manual is applied to business applications on mobile devices, which deploy application plugin integration components and page management components. Furthermore, this business application supports rendering web page content based on WebView technology; specifically, this business application can be a mobile browser, an e-commerce platform app (mobile application software), a lifestyle service platform app, etc.
[0027] The application plugin integration component is used to provide plugin extension functionality for business applications. Specifically, this component can be configured to be responsible for executing the core capabilities of plugins, including but not limited to plugin registration, plugin permission verification, native function invocation, and plugin business logic processing.
[0028] The page management component is used to display WebView-based pages. Specifically, this component can be configured to be responsible for displaying plugin-related pages and managing the containers (instances) of plugin pages, including but not limited to creating WebView containers (instances), controlling page loading status, and rendering page elements.
[0029] In practical applications, business applications can incorporate a plugin mechanism to extend functionality. As described in the background section, business applications on WebView-based mobile devices lack a plugin access mechanism. Furthermore, even after integrating a plugin mechanism, the page display strategy differs for each business application, resulting in different page styles. Therefore, if the Software Development Kit (SDK) providing plugin extension capabilities simultaneously provides both plugin capabilities and plugin-related page display, the displayed pages may not be compatible with the business application, reducing user experience and the degree of business customization. Thus, in some specific embodiments of this specification, the page management component can be implemented by the business application access party. The page management component can be adaptively developed based on the application plugin integration component that provides plugin extension functionality. This page management component can provide WebView-based page display capabilities to display plugin-related pages. In other words, when various business application access parties need to access the application plugin integration component to use plugin extension functionality, each access party can develop a corresponding page management component based on its own page display strategy. This ensures that plugin-related pages better adapt to personalized business applications, improving the degree of business application customization and enhancing user experience.
[0030] In one or more embodiments of this specification, the interaction between the page management component and the application plugin integration component can be achieved through a predefined interface. In this specification, the module corresponding to this predefined interface is the plugin interface module, which is located within the application plugin integration component to improve the integration level of the application plugin integration component and enhance the ease of access for business applications.
[0031] like Figure 2 As shown, Figure 2This is a schematic diagram of an application plugin integration component provided in one embodiment of this specification. The component includes a plugin interface module and a kernel module. In this specification, different modules implement different logic to ensure that plugin functionality can be used when different business applications are accessed. Specifically, the plugin interface module enables bidirectional communication between the page management component and the kernel module. The plugin interface module provides a first interface and a second interface. The first interface provides plugin extension functionality to the kernel module, and the second interface provides the ability for the page management component to update the WebView page, or in other words, the second interface provides the ability for the page management component to display the WebView page.
[0032] In practical applications, the kernel module can provide a plugin management service interface, i.e., the first interface in the plugin interface module, allowing the page management component to call this first interface to send plugin capability requests. Simultaneously, the kernel module can define callback interface specifications, which business application access parties can use to implement specific callback methods to obtain the callback interface, i.e., the second interface in the plugin interface module.
[0033] In one or more embodiments of this specification, the page management component can be implemented by a business application to display pages related to the plugin based on the WebView mechanism during the processing of a target plugin invocation request. In practical applications, this page management component can be referred to as a Shell layer, which can perform some adaptation work such as page display, and can also obtain plugin association information and invoke plugin functions through interfaces, etc.
[0034] Since the page management component is implemented by the business application integrator, each integrator can flexibly customize the plugin page display format for different apps. In other words, each integrator can customize its own page management component based on its own application's page display strategy and the callback interface specifications of the plugin interface module in the application plugin integration component. Each business application implements its own page management component, while all business applications share the application plugin integration component. Therefore, each integrator can customize its own page management component to achieve differentiated plugin page displays.
[0035] As can be seen, the application plugin component provided in this manual can decouple the plugin page display capability from the business application while maintaining the universality of the plugin's core logic. In other words, it entrusts the plugin page display capability to the corresponding page management component of the business application itself, providing flexible customization of the plugin page display for the business application and reducing the maintenance cost of the application plugin integration component. This allows business applications on mobile devices to dynamically register, uninstall, and execute plugin functions while decoupling the plugin's core logic from the plugin page display, improving the maintainability and cross-business application reusability of the application plugin integration component.
[0036] In one or more embodiments of this specification, the plug-in interface module and kernel module can be integrated and packaged into a unified software development kit (SDK), which can be referred to as SDK in this specification. That is to say, the application plug-in integration component is an SDK, such as... Figure 3 As shown, Figure 3 This is a schematic diagram illustrating the structure of a business application that integrates the SDK, as provided in one embodiment of this specification. The SDK provides core plugin logic, such as plugin registration, startup, operation, and storage, allowing business applications integrating the SDK to flexibly display plugin pages. The plugin interface module and kernel module in this SDK can be developed and implemented by the SDK provider's technical personnel. Similarly, the page management component can be developed and implemented by the business application provider's technical personnel. This specification does not impose specific limitations; however, it can be developed using Web technologies such as JavaScript, HTML, and CSS, as well as communication mechanisms such as JSBridge and WebViewClient, to implement the functionality of each module and page management component in the SDK.
[0037] In one or more embodiments of this specification, when a business application requires plugin integration, a page management component adapted to the SDK can be built based on the SDK. When the business application does not require plugin integration, a page management component adapted to the SDK does not need to be built.
[0038] In one or more embodiments of this specification, a WebView-based business application in a mobile device can, in response to an operation on the current WebView page, generate a target plugin invocation request through a page management component and send the plugin invocation request to an application plugin integration component, wherein the target plugin invocation request carries a target plugin identifier.
[0039] In one or more embodiments of this specification, when the page management component sends a plugin invocation request to the application plugin integration component, the page management component may call a first interface in the plugin interface module to send the target plugin invocation request to the kernel module, so as to realize the invocation of the plugin extension capabilities provided by the kernel module through the first interface.
[0040] It should be noted that a target plugin invocation request can be understood as an operation request for the target plugin. This operation request can be a registration request (i.e., an installation request), an uninstallation request, or a run request, etc. In other words, the target plugin invocation request can include target plugin registration requests, target plugin uninstallation requests, and target plugin run requests, etc.
[0041] In practical applications, when the target plugin is not registered in the business application, the user can find the target plugin registration element (such as a button) on the current user page, i.e., the current WebView page, and then click it to trigger the target plugin registration process. Specifically, the business application in the mobile device can respond to the click operation on the plugin registration element in the current WebView page by generating a target plugin registration request carrying the target plugin identifier through the page management component. The page management component can then call the first interface in the plugin interface module to pass the target plugin registration request to the kernel module.
[0042] Similarly, when a target plugin has been registered in a business application, the user can click the target plugin identifier corresponding to that plugin to run it. Specifically, the business application in the mobile device can respond to the click operation on the target plugin identifier in the current WebView page by generating a request to run the target plugin carrying the target plugin identifier through the page management component. The page management component can then call the first interface in the plugin interface module to pass the target plugin run request to the kernel module.
[0043] Similarly, when there is a need to uninstall a target plugin, the user can click the target plugin uninstall element (such as a button) corresponding to the target plugin. Specifically, the business application in the mobile device can respond to the click operation of the target plugin uninstall element in the current WebView page by generating a target plugin uninstallation request carrying the target plugin identifier through the page management component. The page management component can then call the first interface in the plugin interface module to pass the target plugin uninstallation request to the kernel module.
[0044] In one or more embodiments of this specification, the user interface of the business application displays a current WebView page rendered based on WebView. The application page may contain multiple plugin elements, including but not limited to plugin registration elements such as plugin registration buttons, plugin uninstallation elements such as plugin uninstallation buttons, plugin icons, plugin marketplaces, and plugin menus. When a user clicks on any plugin element, a JavaScript event can be triggered, and the page management component captures the click operation and generates a request related to the click operation.
[0045] It should be noted that the plugin identifier can be understood as a way to distinguish different plugins. This plugin identifier can be the plugin name, or it can be a set of characters or numbers pre-assigned to each plugin, etc. This manual does not impose specific restrictions, and it can be pre-set based on actual needs.
[0046] Step 104: Using the application plugin integration component, determine the target plugin display information based on the target plugin identifier, wherein the target plugin display information represents the information to be displayed related to the target plugin during the processing of the target plugin call request.
[0047] In practical applications, the process of handling target plugin call requests involves the display of pages related to the target plugin. For example, when registering a target plugin, the target plugin icon needs to be displayed after registration is completed. In order to isolate plugin capabilities from page display, this manual uses a page management component developed by the business application access party to display pages related to the target plugin.
[0048] In one or more embodiments of this specification, a mapping table between plugin identifiers and display information can be pre-set. Therefore, the application plugin integration component can determine the target plugin display information corresponding to the target plugin identifier carried in the target plugin call request based on the pre-set mapping table. Specifically, during the processing of the target plugin call request, the kernel module can determine the target plugin display information corresponding to the target plugin identifier carried in the target plugin call request based on the stored mapping table.
[0049] It should be noted that the target plugin display information can be understood as the information related to the target plugin that needs to be displayed during the kernel module's processing of the target plugin call request. This plugin display information includes, but is not limited to, the plugin icon, plugin name, plugin operation prompts such as plugin installation and uninstallation prompts, plugin registration progress, and plugin uninstallation progress. This manual does not impose specific limitations on the plugin display information.
[0050] In one or more embodiments of this specification, after the kernel module determines the target plugin display information, it can call the second interface provided by the plugin interface module to pass the target plugin display information to the page management component, so that the page management component can render the target plugin display information.
[0051] Step 106: Update the current WebView page based on the target plugin display information using the page management component to obtain the target WebView page.
[0052] In one or more embodiments of this specification, the page management component can update the page elements in the current WebView page to obtain the target WebView page based on the received target plugin display information, or it can generate a target WebView page independent of the current WebView page based on the received target plugin display information.
[0053] Specifically, the page management component can render the target plugin display information in the current WebView page to obtain the target WebView page if it determines that the target plugin display information is of the first type. If the target plugin display information is determined to be of the second type, a target WebView page independent of the current WebView page is rendered based on the target plugin display information.
[0054] Typically, running a plugin involves using its functionality. Therefore, when the target plugin request is for running the plugin, a separate page displaying the target plugin's functionality should be shown, independent of the current WebView page. However, when uninstalling or registering a plugin, only plugin icons, tooltips, and other page elements need to be displayed, without creating a new page. Therefore, the relevant target plugin information can be shown within the current WebView page.
[0055] Therefore, in one or more embodiments of this specification, the first type of information can be understood as the target plugin display information determined based on the target plugin registration request or the target plugin uninstallation request, and the second type of information can be understood as the target plugin display information determined based on the target plugin run request. That is, if the target plugin call request is determined to be a target plugin registration request or a target plugin uninstallation request, the target plugin display information can be determined to be the first type of display information; if the target plugin call request is determined to be a target plugin run request, the target plugin display information can be determined to be the second type of information.
[0056] Furthermore, when the target plugin display information is determined to be of the first type, the page management component can call a preset rendering method to inject JavaScript instructions into the page code corresponding to the current WebView page to modify the Document Object Model (DOM) structure corresponding to the current WebView page, or to dynamically create the page element corresponding to the target plugin display information in the current WebView page and render it to obtain the target WebView page.
[0057] When the target plugin display information is determined to be of the second type, and a target WebView page independent of the current WebView page is rendered based on the target plugin display information, the page management component can do so in a WebView instance that is independent of the current WebView page, or in other words, the page management component can create a WebView instance that is independent of the current WebView page, and call the page rendering method in that independent WebView instance to generate the plugin function page, i.e., the target WebView page independent of the current WebView page, based on the target plugin display information. Specifically, the target plugin display information includes the entry address of the target plugin function page, i.e., the Uniform Resource Identifier (URL) of the plugin function page entry. The page management component can call a preset rendering method in the independent WebView container it manages to load the target plugin function page address to display the target plugin function page, i.e., the target WebView page independent of the current WebView page.
[0058] It should be noted that the default rendering method is provided by a WebView-based rendering engine. This rendering engine can be pre-set in the page management component, or it can be a rendering engine located outside the page management component, such as the rendering engine provided by the operating system of the mobile device where the business application is located. When the page management component receives the plugin page display information, it can call the rendering method provided by the rendering engine to render the plugin page display information. In other words, the page management component can execute the rendering of plugin-related pages through the rendering engine.
[0059] In one or more embodiments of this specification, when the WebView-based rendering engine is provided by the mobile device's operating system, the WebView instance corresponding to the WebView page typically contains the rendering engine. In other words, the WebView instance is the rendering carrier, and it integrates the rendering engine provided by the mobile device's operating system. Therefore, the page management component can call the page rendering interface of the WebView instance, passing the target plugin page display information as a parameter to the WebView instance. After receiving the target plugin page display information, the WebView instance triggers the rendering engine to execute rendering logic in the WebView page corresponding to the WebView instance, thereby achieving the call to the page rendering method to obtain the target WebView page. This execution of rendering logic includes, but is not limited to, reading local or remote resources, parsing HTML and CSS, constructing a document object model, executing JavaScript, and performing layout calculations and pixel drawing, etc.
[0060] In one or more embodiments of this specification, when the target plugin call request is a target plugin registration request, the target plugin display information may include target plugin usage permissions, target plugin name, registration confirmation parameters (which may be confirm registration and cancel registration), and target plugin icon, etc. Therefore, after receiving the target plugin registration request, the kernel module can determine the target plugin display information corresponding to the target plugin identifier, which includes the target plugin name, target plugin usage permissions, and a target plugin registration confirmation prompt box. This information, including the target plugin name, target plugin usage permissions, and registration confirmation parameters, can be elements within the target plugin registration confirmation prompt box. The page management component can call a preset rendering method to render the target plugin registration confirmation prompt box in the current WebView page based on the target plugin name, target plugin usage permissions, and registration confirmation parameters contained in the target plugin display information, thereby obtaining the first target WebView page. Next, in response to a click on the target plugin registration confirmation prompt in the first target WebView page, if the click on the target plugin registration confirmation prompt is determined to be a registration confirmation, a registration confirmation request carrying registration confirmation parameters can be generated. The page management component can send this registration confirmation request to the kernel module through the first interface in the plugin interface module. The kernel module can perform the registration of the target plugin according to the registration confirmation request. After the registration of the target plugin is completed, the kernel module can call the second interface in the plugin interface module to send the target plugin display information containing the target plugin icon to the page management component. The page management component can call the preset rendering method to render the target plugin icon in the current WebView page to obtain the second target WebView page.
[0061] In one or more embodiments of this specification, when the target plugin call request is a target plugin uninstallation request, the target plugin display information may include the target plugin name. Therefore, after receiving the target plugin uninstallation request, the kernel module can determine the target plugin display information corresponding to the target plugin identifier, which includes the target plugin name, uninstallation confirmation parameters (which can be confirm uninstallation and cancel uninstallation), and a target plugin uninstallation confirmation prompt box. The target plugin name and uninstallation confirmation parameters can be elements within the target plugin uninstallation confirmation prompt box. The kernel module then instructs the page management component to generate the target plugin uninstallation confirmation prompt box. The page management component can call a preset rendering method to render the target plugin uninstallation confirmation prompt box in the current WebView page based on the target plugin display information including the target plugin name and uninstallation confirmation parameters, thus obtaining a third target WebView page. Next, in response to a click on the target plugin uninstallation confirmation prompt in the third target WebView page, if the click on the target plugin uninstallation confirmation prompt is confirmed as uninstallation, an uninstallation confirmation request carrying uninstallation parameters can be generated. The page management component can send this uninstallation confirmation request to the kernel module through the first interface in the plugin interface module. The kernel module can then execute the uninstallation of the target plugin based on the uninstallation confirmation request. After the uninstallation of the target plugin is completed, the kernel module can call the second interface in the plugin interface module to send the target plugin uninstallation completion information to the page management component. The page management component can then delete the target plugin icon in the third WebView page based on the target plugin uninstallation completion information to obtain the fourth WebView page.
[0062] In one or more embodiments of this specification, when the target plugin invocation request is a target plugin execution request, the target plugin display information may include the target plugin function page entry address. Therefore, after receiving the target plugin execution request, the kernel module can determine the target plugin display information corresponding to the target plugin identifier, which includes the target plugin function page entry address. This target plugin display information, including the target plugin function page entry address, is used to instruct the page management component to generate the target plugin function page. The page management component can call a preset rendering method to load the target plugin function page entry address in a WebView instance that is independent of the current WebView page's corresponding WebView instance, thereby presenting the target plugin function page and obtaining the target WebView page.
[0063] It should be noted that how the kernel module performs plugin registration, plugin execution, and plugin uninstallation can be found in current plugin registration, plugin execution, and plugin uninstallation technologies, and will not be elaborated on in this manual.
[0064] Based on the above page display method, during the process of invoking plugin capabilities, the plugin capabilities are provided by the application plugin integration component, while the page display is implemented by the page management component, thus achieving isolation between plugin capabilities and page display. Specifically, the application plugin component provided in this specification can, while maintaining the generality of the plugin's core logic, decouple the plugin page display capability from the business application. That is, it entrusts the plugin page display capability to the corresponding page management component of the business application itself, providing the business application with flexible customization of plugin page display and reducing the maintenance cost of the application plugin integration component. This allows business applications on mobile devices to dynamically register, uninstall, and execute plugin functions while decoupling the plugin's core logic from the plugin page display, improving the maintainability and cross-business application reusability of the application plugin integration component.
[0065] Furthermore, business application access providers can adapt and develop page management components based on the application plugin integration components that provide plugin extension functionality. These page management components can provide WebView-based page display capabilities to display plugin-related pages. In other words, when various business application access providers need to access the application plugin integration components to use plugin extension functionality, they can develop corresponding page management components based on their own page display strategies to ensure that plugin-related pages are adapted to business applications, thereby improving the customization of business applications and enhancing user experience.
[0066] Furthermore, in one or more embodiments of this specification, the kernel module in the SDK may include a core engine submodule and an application adaptation submodule, such as... Figure 4 The above, Figure 4 This is a schematic diagram of the structure of an SDK provided in one embodiment of this specification.
[0067] The application adaptation submodule adapts to and invokes the functions of the core engine submodule based on WebView. In practical applications, the application adaptation submodule can run in the native environment of the business application on a mobile device (such as Android), and is used to adapt to and invoke the functions of the core engine submodule in the WebView page context. This application adaptation submodule can be called the Android_WebView layer, which includes plugin engine initialization, plugin data storage, plugin loading and startup, and implementation of various Chrome APIs. The application adaptation submodule mainly includes the adaptation logic for WebView-based business applications on mobile devices. This application adaptation submodule can invoke the plugin capabilities of the core engine submodule and implement plugin engine initialization, data persistence, plugin loading and startup, and platform adaptation of Chrome APIs. It can bridge plugin capabilities to the plugin interface module.
[0068] The core engine submodule provides general business logic processing capabilities for at least one plugin, specifically including plugin registration, resource loading, JS API binding, and inter-plugin communication. In practical applications, this core engine submodule can be called the Content layer. The Content layer is the core module of the plugin and contains the most basic general logic. The Content layer may include plugin package parsing, plugin resource loading, worker extension, inter-process communication, JS API binding mechanism, JS / CSS injection mechanism, and lifecycle management, etc.
[0069] Overall, the core engine submodule can provide general business logic processing capabilities for plugins, including plugin registration, resource loading, JS API binding, and inter-plugin communication. The application adaptation submodule can adapt to and call the functions of the core engine submodule in the WebView context. The plugin interface module implements bidirectional communication between the page management component and the core engine submodule. Specifically, it defines a set of standardized WebView-based plugin interfaces, including a first interface and a second interface. The first interface is the interface for the page management component in the business application to call the kernel module in the SDK, which is used to provide plugin capabilities to the business application. The second interface is the interface for the kernel module in the SDK to call back the page management component in the business application, which is used to call back the page display events related to the plugin involved in the plugin capability request to the page management component of the business application. The page management component of the business application is responsible for the interface presentation, that is, it is used to provide the kernel module with WebView-based page display capabilities. The page management component is implemented by the business application access party that accesses the SDK. The business application access party can customize the rendering method to obtain the page management component according to the page display strategy and actual needs of the business application.
[0070] This application plugin integration component enables dynamic registration, uninstallation, and execution of plugin functions, while maintaining the decoupling of the plugin's core logic from the user interface, thus improving system maintainability and cross-application reusability. As mentioned earlier, the page display method provided in this specification is applicable to business applications deployed on mobile devices, which support rendering web content based on a WebView container. For example, taking an e-commerce platform as an example, this e-commerce platform can be built based on AndroidWebView, and can construct a page management component based on the interface specifications defined by the SDK and its own page display strategy. Then, the e-commerce platform can integrate this application plugin integration component, thereby dynamically loading third-party plugins and displaying plugin-related pages through the application plugin integration component and the page management component.
[0071] Corresponding to the above method embodiments, this specification also provides an embodiment of a page display device. Figure 5 This specification illustrates a schematic diagram of a page display device according to an embodiment. The page display device is deployed in a business application on a mobile device. The page display device includes an application plugin integration component and a page management component. The application plugin integration component provides plugin extension functionality for the business application, and the page management component displays a WebView-based page, such as... Figure 5 As shown, the device includes: The response unit 502 is configured to generate a target plugin invocation request in response to an operation on the current WebView page, wherein the target plugin invocation request carries a target plugin identifier; The determining unit 504 is configured to determine target plugin display information based on the target plugin identifier through the application plugin integration component, wherein the target plugin display information represents information to be displayed related to the target plugin during the processing of the target plugin invocation request; The update unit 506 is configured to update the current WebView page based on the target plugin display information through the page management component, thereby obtaining the target WebView page.
[0072] Optionally, the response unit 502 is further configured to, in response to an operation on the current application page, generate a target plugin invocation request through the page management component, and send the target plugin invocation request to the application plugin integration component.
[0073] Optionally, the application plugin integration component includes a plugin interface module and a kernel module; The response unit 502 is further configured to call the first interface provided by the plugin interface module through the page management component to pass the target plugin call request to the kernel module, wherein the first interface is used to provide the plugin extension function of the kernel module.
[0074] Optionally, the determining unit 504 is further configured to determine the target plugin display information corresponding to the target plugin identifier in a pre-set mapping table between plugin identifiers and display information through the application plugin integration component.
[0075] Optionally, the application plugin integration component includes a plugin interface module and a kernel module; The determining unit 504 is further configured to determine the target plugin display information based on the target plugin identifier through the kernel module, and call the second interface provided by the plugin interface module to pass the target plugin display information to the page management component, wherein the second interface is used to provide the page management component with the ability to update the WebView page.
[0076] Optionally, the update unit 506 is further configured to, through the page management component, render the target plugin display information in the current WebView page when it is determined that the target plugin display information is a first type of information, to obtain the target WebView page; If the target plugin display information is determined to be of the second type, a target WebView page independent of the current WebView page is rendered based on the target plugin display information.
[0077] Optionally, the update unit 506 is further configured to determine the target plugin display information as first display type information when the target plugin call request is a target plugin registration request or a target plugin uninstallation request; The update unit 506 is further configured to determine that the target plugin display information is second type information when the target plugin call request is a target plugin run request.
[0078] Based on the aforementioned page display device, during the process of invoking plugin capabilities, the plugin capabilities are provided by the application plugin integration component, while the page display is implemented by the page management component, thus achieving isolation between plugin capabilities and page display. Specifically, the application plugin component provided in this specification can, while maintaining the generality of the plugin's core logic, decouple the plugin page display capability from the business application, that is, entrust the plugin page display capability to the corresponding page management component of the business application itself. This provides the business application with flexible customization functions for plugin page display and reduces the maintenance cost of the application plugin integration component. This allows business applications on mobile devices to dynamically register, uninstall, and execute plugin functions while decoupling the plugin's core logic from the plugin page display, improving the maintainability and cross-business application reusability of the application plugin integration component.
[0079] Furthermore, business application access providers can adapt and develop page management components based on the application plugin integration components that provide plugin extension functionality. These page management components can provide WebView-based page display capabilities to display plugin-related pages. In other words, when various business application access providers need to access the application plugin integration components to use plugin extension functionality, they can develop corresponding page management components based on their own page display strategies to ensure that plugin-related pages are adapted to business applications, thereby improving the customization of business applications and enhancing user experience.
[0080] The above is a schematic scheme of a page display device according to this embodiment. It should be noted that the technical solution of this page display device and the technical solution of the page display method described above belong to the same concept. For details not described in detail in the technical solution of the page display device, please refer to the description of the technical solution of the page display method described above.
[0081] Figure 6 A structural block diagram of a computing device 600 according to an embodiment of this application is shown. The components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and a database 650 is used to store data.
[0082] The computing device 600 also includes an access device 640, which enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 640 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0083] In one embodiment of this application, the aforementioned components of the computing device 600 and Figure 6 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 6 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.
[0084] The computing device 600 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 600 can also be a mobile or stationary server.
[0085] The processor 620 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-described page display method.
[0086] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the page display method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the page display method described above.
[0087] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the page display method described above.
[0088] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the computer-readable storage medium embodiments are basically similar to the page display method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the page display method embodiments.
[0089] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the page display method described above.
[0090] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the page display method described above belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the page display method described above.
[0091] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0092] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0093] It should be noted that the above description describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous. Secondly, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this specification.
[0094] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0095] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A page display method, the method being applied to a business application on a mobile device, wherein the business application deploys an application plugin integration component and a page management component, the application plugin integration component being used to provide plugin extension functionality for the business application, and the page management component being used to display a WebView-based page, comprising: In response to an operation on the current WebView page, a target plugin invocation request is generated, wherein the target plugin invocation request carries a target plugin identifier; The target plugin display information is determined based on the target plugin identifier through the application plugin integration component, wherein the target plugin display information represents the information to be displayed related to the target plugin during the processing of the target plugin call request; The current WebView page is updated based on the target plugin display information using the page management component to obtain the target WebView page.
2. The method as described in claim 1, wherein generating a target plugin invocation request in response to an operation on the current WebView page includes: In response to an operation on the current application page, a target plugin invocation request is generated through the page management component, and the target plugin invocation request is sent to the application plugin integration component.
3. The method as described in claim 2, wherein the application plugin integration component includes a plugin interface module and a kernel module; Sending the target plugin invocation request to the application plugin integration component includes: The page management component calls the first interface provided by the plugin interface module to pass the target plugin call request to the kernel module, wherein the first interface is used to provide the plugin extension function of the kernel module.
4. The method as described in claim 1, wherein determining the target plugin display information based on the target plugin identifier through the application plugin integration component includes: The application plugin integration component determines the target plugin display information corresponding to the target plugin identifier from a pre-set mapping table between plugin identifiers and display information.
5. The method as described in claim 1, wherein the application plugin integration component includes a plugin interface module and a kernel module; The application plugin integration component determines the target plugin display information based on the target plugin identifier, including: The kernel module determines the target plugin display information based on the target plugin identifier and calls the second interface provided by the plugin interface module to pass the target plugin display information to the page management component. The second interface is used to provide the page management component with the ability to update the WebView page.
6. The method as described in claim 1, wherein the current WebView page is updated based on the target plugin display information through the page management component to obtain the target WebView page, comprising: Using the page management component, when it is determined that the target plugin display information is of the first type, the target plugin display information is rendered in the current WebView page to obtain the target WebView page; If the target plugin display information is determined to be of the second type, a target WebView page independent of the current WebView page is rendered based on the target plugin display information.
7. The method as described in claim 6, wherein determining that the target plugin display information is first type information includes: If the target plugin call request is a target plugin registration request or a target plugin uninstallation request, the target plugin display information is determined to be the first display type information; The target plugin's displayed information is determined to be of the second type, including: If the target plugin call request is a target plugin run request, the target plugin display information is determined to be second type information.
8. A page display device, the page display device being deployed on a business application of a mobile device, the page display device comprising an application plugin integration component and a page management component, the application plugin integration component being used to provide plugin extension functionality for the business application, and the page management component being used to display a WebView-based page; The response unit is configured to generate a target plugin invocation request in response to an operation on the current WebView page, wherein the target plugin invocation request carries a target plugin identifier; The determining unit is configured to determine target plugin display information based on the target plugin identifier through the application plugin integration component, wherein the target plugin display information represents information to be displayed related to the target plugin during the processing of the target plugin invocation request; The update unit is configured to update the current WebView page based on the target plugin display information through the page management component, thereby obtaining the target WebView page.
9. A computing device, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.
11. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.