Hosting program page processing method, device, electronic device, and computer program

A custom routing mechanism for hosting programs improves page route customization and optimization, addressing the limitations of existing mini-program interface rendering engines by enhancing developer control and user experience.

JP2026501102AActive Publication Date: 2026-01-14TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2025532030
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-03
Filing Date
2024-03-11
Publication Date
2026-01-14
Estimated Expiration
2044-03-11

AI Technical Summary

Technical Problem

Current mini-program interface rendering engines, such as WebView, lack customization and optimization capabilities, resulting in monotonous page presentation effects and suboptimal user experience during page switching.

Method used

Implementing a custom routing mechanism in hosting programs by obtaining page jump parameters, determining rendering engine identifiers, and constructing a page tree to enable rendering engines to display pages based on custom route information, allowing for advanced customization and optimization of page routes.

Benefits of technology

Enhances developer flexibility and personalization of page routes while providing users with a natural and smooth page switching experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026501102000001_ABST
    Figure 2026501102000001_ABST
Patent Text Reader

Abstract

[0009] The present disclosure provides a method, device, medium, and electronic device for processing pages in a hosting program. The method includes: acquiring page jump parameters of the hosting program, where the page jump parameters include address information of a first target page in the hosting program and custom route information of the first target page; determining a rendering engine identifier and a page identifier corresponding to the first target page; and constructing a page tree corresponding to the hosting program based on the page identifier, calling a rendering engine corresponding to the rendering engine identifier, and performing rendering processing on the first target page based on the page tree and the page jump parameters. The technical solutions of the present disclosure can meet developers' needs for advanced customization and deep optimization, improve the individuality, refinement, and flexibility of page routes, and at the same time, meet users' needs for a natural and smooth page switching experience.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application claims priority to a Chinese patent application filed with the China Patent Office on July 3, 2023, bearing application number 2023108069470 and entitled "Hosting program page processing method, device, medium, and electronic device," the entire contents of which are incorporated herein by reference.

[0002] This application relates to the field of computers and communications, and more particularly to program page processing techniques. [Background technology]

[0003] A hosting program (hosted program) is a type of program that relies on a host program and can be used without downloading or installing, such as mini programs and instant applications. Taking mini programs as an example, with the continuous diversification of mini program applications, mini program developers hope to provide users with a smoother and more user-friendly mini program application experience.

[0004] Currently, the most commonly used mini-program interface rendering engine is WebView (web page view), and the page route (i.e., the route rule (path) for jumping from one page to another) can only use the default route method, which pushes pages from the right edge of the interface to the left edge. The page presentation effect of this route method is monotonous, which not only does not meet developers' needs for advanced customization and deep optimization, but also does not meet users' needs for a natural and smooth page switching experience. Summary of the Invention [Means for solving the problem]

[0005] The embodiments of the present application provide a hosting program page processing method, device, medium, and electronic device, which can meet developers' needs for advanced customization and deep optimization, improve the personalization, refinement, and flexibility of page routes, and at the same time meet users' needs for a natural and smooth page switching experience.

[0006] According to one aspect of an embodiment of the present application, there is provided a page processing method for a hosting program, the hosting program running in a host environment provided by a host program, the page processing method being executed by an electronic device running the host program, the page processing method comprising: The method includes: a step of obtaining page jump parameters of the hosting program, where the page jump parameters include address information of a first target page in the hosting program and custom route information of the first target page; a step of determining a rendering engine identifier and a page identifier corresponding to the first target page; a step of constructing a page tree corresponding to the hosting program based on the page identifier, and calling a rendering engine corresponding to the rendering engine identifier, and performing a rendering process on the first target page based on the page tree and the page jump parameters.

[0007] According to one aspect of an embodiment of the present application, there is provided a page processing device for a hosting program, the hosting program running in a host environment provided by the host program, the page processing device comprising: The method includes: an acquiring unit configured to acquire page jump parameters of the hosting program, the page jump parameters including address information of a first target page in the hosting program and custom route information of the first target page; a determining unit configured to determine a rendering engine identifier and a page identifier corresponding to the first target page; and a processing unit configured to build a page tree corresponding to the hosting program based on the page identifier, and invoke a rendering engine corresponding to the rendering engine identifier, and perform rendering processing on the first target page based on the page tree and the page jump parameters.

[0008] According to one aspect of an embodiment of the present application, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, realizes the page processing method of the hosting program described in the embodiment.

[0009] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising one or more processors and a memory used to store one or more computer programs, wherein when the one or more computer programs are executed by the one or more processors, the electronic device realizes the hosting program page processing method described in the embodiment.

[0010] According to one aspect of the present invention, a computer program product is provided, the computer program product including a computer program stored in a computer-readable storage medium, wherein a processor of an electronic device reads the computer program from the computer-readable storage medium and executes the computer program, thereby causing the electronic device to perform the page processing method of the hosting program provided in the various selectable embodiments.

[0011] Some embodiments of the present application provide a technical solution by obtaining page jump parameters of a hosting program, which include address information of a first target page in the hosting program and custom route information of the first target page; when the first target page to be jumped to and displayed is rendered by a first rendering engine that supports custom routes, determining a rendering engine identifier and a page identifier corresponding to the first target page; then building a page tree corresponding to the hosting program based on the page identifier; and invoking the rendering engine corresponding to the rendering engine identifier to perform rendering processing on the first target page based on the page tree and the page jump parameters. In this way, developers are supported to set custom route information for a specific page in the page jump parameters of the hosting program, and the first rendering engine is used to render and display a custom route manner for the page based on the custom route information, thereby meeting developers' needs for advanced customization and in-depth optimization, improving the individuality, refinement, and flexibility of page routes, and at the same time, satisfying users' needs for a natural and smooth page switching experience. [Brief explanation of the drawings]

[0012] [Figure 1] 1 shows a schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied; [Figure 2] 1 illustrates a flowchart of a page processing method of a hosting program according to one embodiment of the present application. [Figure 3] 1 illustrates a flowchart of a page processing method of a hosting program according to one embodiment of the present application. [Figure 4] A schematic diagram of the page route method rendered by the WebView engine is shown below. [Figure 5]1 illustrates a schematic diagram of a page route scheme implemented according to the technical solution of an embodiment of the present application; [Figure 6] 1 illustrates a schematic diagram of a builder function declaration according to one embodiment of the present application. [Figure 7] 1 illustrates a schematic diagram of the correspondence between windowID and pageID according to one embodiment of the present application; [Figure 8] 1 shows a processing flowchart of a page jump process according to one embodiment of the present application. [Figure 9] 1 shows a schematic diagram of an implementation of hybrid route splitting according to one embodiment of the present application; [Figure 10] FIG. 1 illustrates a block diagram of a page processing unit of a hosting program according to one embodiment of the present application. [Figure 11] 1 shows a schematic diagram of the architecture of an electronic computer system suitable for use in implementing embodiments of the present application; DETAILED DESCRIPTION OF THE INVENTION

[0013]

[0030] Exemplary embodiments will now be described in a more complete manner with reference to the drawings. However, exemplary embodiments may be embodied in various forms and should not be construed as being limited to these examples. On the contrary, the purpose of providing these embodiments is to make this application more complete and complete and to fully convey the concept of exemplary embodiments to those skilled in the art.

[0014] Furthermore, the features, structures, or characteristics described herein may be combined in any suitable manner in one or more embodiments. The following description includes many specific details, which can be used to fully understand the embodiments of the present application. However, those skilled in the art should recognize that when implementing the technical solutions of the present application, it is not necessary to use all the detailed features of the embodiments, and one or more specific details may be omitted, or other methods, elements, devices, steps, etc. may be used.

[0015] The block diagrams shown in the drawings are merely functional entities that do not necessarily correspond to physically separate entities, i.e., they can be implemented using software forms, or in one or more hardware modules or integrated circuits, or in different network and / or processor and / or microcontroller devices.

[0016] The flowcharts shown in the drawings are merely illustrative and do not necessarily include all contents and operations / steps, nor do they necessarily have to be performed in the order described. For example, some operations / steps can be further decomposed, some operations / steps can be merged, or partially merged, and therefore the actual execution order may vary based on actual circumstances.

[0017] It should be noted that "plurality" as referred to in this specification refers to two or more than two. "And / or" describes the association relationship of associated objects and indicates that three relationships can exist, for example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the associated objects before and after it are in a kind of "or" relationship.

[0018] The technical solutions of the embodiments of the present application relate to hosting programs and host programs, where a hosting program is a type of program that relies on a host program and can be used without downloading or installing, for example, mini programs and instant applications, which are both hosting programs. Taking mini programs as an example, currently, the mini program interface rendering engine uses a WebView, and when jumping to a page, it can only display a new page by pushing from the right edge to the left edge of the interface. This page route method results in a single page presentation effect, which is difficult to meet developers' needs for advanced customization and deep optimization, and also difficult to meet users' needs for a natural and smooth page switching experience.

[0019] Based on the above problem, the embodiment of the present application proposes a solution for performing custom routing in a hosting program. Specifically, as shown in Figure 1, an exemplary system architecture of the present application may include a terminal device 101, a network 102, and a host program platform terminal 103. The network 102 is a medium that provides a communication link between the terminal device 101 and the host program platform terminal 103. The network 102 may include various connection types, such as a wired communication link and a wireless communication link.

[0020] In one embodiment of the present application, a host program runs on a terminal device 101, which may be an application program client terminal. The host program can display host program pages and complete corresponding business functions (e.g., message sending, voice calling, etc.) by communicating with a host program platform terminal 103 via a network 102. The host program provides a host environment, and a hosting program can run in the host environment provided by the host program. A development staff can set page jump parameters used to perform a custom route for the hosting program. The host program can then obtain the page jump parameters of the hosting program, which may include address information of a first target page in the hosting program and custom route information for the first target page. If the first target page is to be rendered by a first rendering engine that supports a custom route, the host program can determine a rendering engine identifier and a page identifier corresponding to the first target page, build a page tree corresponding to the hosting program based on the page identifier, and call the rendering engine corresponding to the rendering engine identifier to perform rendering processing for the first target page based on the page tree and the page jump parameters.

[0021] As can be seen, the technical solution of the embodiment of the present application supports developers to set custom route information of a specific page in the page jump parameters of the hosting program, and further uses the first rendering engine to realize a custom route method in which the page is rendered and displayed based on the custom route information, thereby meeting the developer's needs for high-level customization and in-depth optimization, improving the individuality, refinement and flexibility of page routes, and at the same time meeting the user's needs for a natural and smooth user experience of page switching.

[0022] It is worth noting that the host program platform terminal 103 involved in the embodiments of the present application may be an independent physical server, a server cluster or a distributed system consisting of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud memory, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), big data, and artificial intelligence platforms. The terminal device 101 may be, but is not limited to, a smartphone, a tablet PC, a laptop, a desktop computer, a smart speaker, a smart watch, an in-vehicle terminal, a smart TV, etc.

[0023] The implementation details of the technical solutions of the embodiments of the present application are described in detail below.

[0024] 2 shows a flowchart of a page processing method of a hosting program according to one embodiment of the present application, where the hosting program runs in a host environment provided by the host program, and the page processing method is executed by the host program or an electronic device running the host program. As shown in FIG. 2, the page processing method of the hosting program includes at least steps S210 to S230, which will be described in detail as follows:

[0025] In step S210, a page jump parameter of the hosting program is obtained, and the page jump parameter includes address information of a first target page in the hosting program and custom route information of the first target page.

[0026] In the embodiments of the present application, a hosting program is a type of program that can be used without downloading or installing, relying on a host program. For example, mini programs and instant applications are all hosting programs. In a computer environment, the software environment on which a hosting program depends may be called a host environment, and the program that provides the host environment may be called a host program. The host program may be, for example, an open platform, an application program that can run the hosting program, an operating system of a mobile terminal, etc.

[0027] In some alternative embodiments, the page jump parameters may include a route type (i.e., routeType), where the route type is used to indicate custom route information for calling the first target page, and the custom route information is used to indicate a route animation effect and animation duration. Optionally, the route animation effect may be, for example, lifting the page from the bottom, or gradually unfolding the page from a certain position (e.g., the side of the screen), and the animation duration is used to indicate the duration of the route animation effect.

[0028] In some cases, multiple pages in a hosting program may be rendered by multiple rendering engines, where some rendering engines support custom routes and some do not. Therefore, in this embodiment, by setting the route type in the page jump parameter, it is possible to more clearly indicate whether the first target page that needs to be currently rendered supports displaying custom route effects, and the custom route effect can be automatically rendered based on the custom route information according to the route type. In addition, the custom route information can be used to indicate the route animation effect and animation presentation time, which allows for relatively simple customization of the custom route effect, is advantageous in improving the efficiency of the custom route effect, and at the same time, ensures that the defined route effect meets actual needs.

[0029] In some alternative embodiments, the host program may obtain the page jump parameter of the hosting program by receiving a call request sent by the base library of the hosting program and then obtaining the page jump parameter from the call request. For example, if the hosting program is a mini program, the call request sent by the base library may be navigateTo.

[0030] It should be noted that the base library can be used to provide the relevant base code for the VD (Virtual DOM, virtual node) rendering mechanism, and can further provide the API (Application Programming Interface) for the built-in components and logic layer after encapsulation, and can also provide the base code for other supplementary capabilities (such as custom components and plug-ins, etc.) In summary, the base library of the hosting program is mainly responsible for processing a series of framework logic such as data binding, component system, event system, and communication system.

[0031] In step S220, a rendering engine identifier and a page identifier corresponding to the first target page are determined.

[0032] In some alternative embodiments, the rendering engine identifier is used to identify a rendering engine, which can uniquely indicate a rendering engine, and in the present embodiment, the rendering engine identifier corresponding to the first target page is identifier information indicating the rendering engine used to render the first target page. The page identifier is used to identify a page, and the page identifier corresponding to the first target page is used to uniquely identify the first target page.

[0033] In the embodiments of the present application, since one rendering engine can render multiple pages, one rendering engine identifier can correspond to one or multiple page identifiers. If one rendering engine identifier corresponds to one page identifier, it is said that the rendering engine can render one page. If one rendering engine identifier corresponds to multiple page identifiers, it is said that the rendering engine can render multiple pages. Therefore, if a first target page is to be rendered by a first rendering engine that supports custom routes, after finding the rendering engine that renders the first target page, the corresponding rendering engine identifier, i.e., the rendering engine identifier corresponding to the first target page, can be obtained. Then, the page identifier corresponding to the first target page can be obtained based on the page that the rendering engine corresponding to the rendering engine identifier needs to render. As should be understood, a custom route refers to rendering and displaying a page route effect according to customized route information.

[0034] In step S230, a page tree corresponding to the hosting program is constructed based on the page identifier corresponding to the first target page, and a rendering engine corresponding to the rendering engine identifier is called to perform rendering processing on the first target page based on the page tree and page jump parameters.

[0035] In some alternative embodiments, the page tree corresponding to the hosting program is used to represent jump relationships between multiple pages in the hosting program, for example, jumping from page A to page B. After invoking the rendering engine corresponding to the rendering engine identifier to perform rendering processing on the first target page based on the page tree and the page jump parameters, the first target page can be presented in the hosting program according to the custom route manner corresponding to the custom route information in the page jump parameters.

[0036] In some alternative embodiments, the process of the host program building a page tree corresponding to the hosting program based on the page identifier, and calling the rendering engine corresponding to the rendering engine identifier, and performing rendering processing on the first target page based on the page tree and page jump parameters may specifically include returning the page jump parameters, the rendering engine identifier, and the page identifier to the basic library, so that the basic library builds a page tree corresponding to the hosting program, and calls the rendering engine corresponding to the rendering engine identifier, and performing rendering processing on the first target page based on the page tree and page jump parameters.

[0037] In this way, the basic library can provide the relevant basic code of the virtual node rendering mechanism, the built-in components after encapsulation, the API of the logic layer, and other supplementary capabilities (such as custom components and plug-ins), etc., so that the page tree is constructed using the basic library and the rendering engine backend with relatively strong rendering capabilities is called to perform the rendering process, thereby improving rendering efficiency and achieving a relatively high-quality rendering effect.

[0038] The technical solution of the embodiment shown in Figure 2 supports developers to set custom route information of a specific page in the page jump parameters of the hosting program, and then uses the rendering engine to render and display the custom route manner of the page based on the custom route information, thereby meeting the developers' needs for high-level customization and in-depth optimization, improving the individuality, refinement, and flexibility of page routes, and at the same time, meeting the users' needs for a natural and smooth page switching experience.

[0039] 3 shows a flowchart of a page processing method of a hosting program according to one embodiment of the present application, where the hosting program runs in a host environment provided by a host program, and the page processing method is executed by the host program or an electronic device running the host program. As shown in FIG. 3, the page processing method of the hosting program includes at least steps S310 to S330, which will be described in detail as follows:

[0040] In step S310, a page back parameter for the hosting program is obtained, where the page back parameter includes the number of pages that need to be rolled back.

[0041] In practical applications, the operation of obtaining a page back parameter for the hosting program is usually performed in response to a page back operation performed by a user, i.e., after detecting that the user has triggered a page back operation, the operation of obtaining a page back parameter for the hosting program is performed. The page back operation refers to an operation of triggering and displaying a previously displayed page, i.e., an operation of rolling back and displaying a history page. Accordingly, the page back parameter is a parameter used to indicate the page that needs to be rolled back and displayed, and may include the number of pages that need to be rolled back, where the number of pages that need to be rolled back refers to the number of pages that need to be rolled back from the currently displayed page to the history page that needs to be displayed in response to the page back operation.

[0042] In some alternative embodiments, the number of pages to be rolled back included in the page back parameter may be set or may be triggered by a page back operation. Optionally, the page back operation may be a trigger operation targeting a page back control in the hosting program or a page back gesture operation (e.g., swiping on the side of the screen), and if it is a page back operation, the number of pages to be rolled back included in the page back parameter may be a set value, such as 1, i.e., roll back one page.

[0043] In step S320, a target rendering engine identifier corresponding to a second target page to be rolled back and displayed is determined based on the number of pages that need to be rolled back and the page stack corresponding to the hosting program.

[0044] In some alternative embodiments, a page stack corresponding to the hosting program is used to store pages of the hosting program, and these pages may be stored based on a jump order, where the first element in the page stack is the home page of the hosting program, and the last element (i.e., the element at the top of the stack) is the current page of the hosting program. Based on this, the number of pages that need to be rolled back and the page stack corresponding to the hosting program can be determined, by traversing forward based on the current page, to determine a second target page that needs to be rolled back and displayed, and then a target rendering engine identifier corresponding to the second target page, i.e., the identifier of the rendering engine used to render the second target page, can be determined.

[0045] In step S330, a notification message is sent to the rendering engine corresponding to the target rendering engine identifier to roll back and display the page of the hosting program as the second target page.

[0046] In this way, in response to the page back operation triggered by the user, the above method searches for a target rendering engine identifier corresponding to the second target page that needs to be rolled back and displayed accordingly, and uses the rendering engine corresponding to the target rendering engine identifier to render the second target page, thereby achieving the effect of rolling back and displaying the second target page, and providing reliable technical support for page rollback display in the hosting program.

[0047] In some alternative embodiments, if the rendering engine corresponding to the target rendering engine identifier is a first rendering engine that supports custom routes and the first rendering engine is capable of rendering multiple pages, determine the number of pages that actually need to be rolled back in the first rendering engine corresponding to the target rendering engine identifier based on the number of pages that need to be rolled back and the page stack corresponding to the hosting program, and then add the number of pages that actually need to be rolled back in the notification message.

[0048] Since multiple pages can be rendered in a first rendering engine (e.g., a flutter engine), when a second target page that needs to be rolled back and displayed is rendered by the first rendering engine, the rendering engine may roll back pages within the first rendering engine. Therefore, it is necessary to determine the number of pages that actually need to be rolled back within the rendering engine corresponding to the target rendering engine identifier. In this way, by further determining the number of pages that actually need to be rolled back based on the page stack and the rendering engine corresponding to the second target page, it is possible to ensure that the pages are rolled back reliably and avoid the occurrence of a situation in which the page rollback fails or is incorrect.

[0049] Optionally, if the current page of the hosting program and the second target page are both pages rendered by the rendering engine corresponding to the target rendering engine identifier, and the rendering engine corresponding to the target rendering engine identifier is the first rendering engine, then the second target page is another page rendered in the rendering engine corresponding to the target rendering engine identifier, that is, the rendering engine corresponding to the target rendering engine identifier renders multiple pages. Therefore, the notification message can be further used to notify the rendering engine corresponding to the target rendering engine identifier (i.e., the first rendering engine) to perform the rendering process of the root animation for the second target page, that is, to use one first rendering engine to perform the rendering of the root animation during the page rollback process, thereby saving related processing resources and communication resources and improving the rendering efficiency of the root animation during the page rollback process.

[0050] In some alternative embodiments, the rendering engine used to render the page of the hosting program may further include a second rendering engine (e.g., a WebView). Each second rendering engine may render one page, i.e., one second rendering engine may render only one page. If the rendering engine corresponding to the target rendering engine identifier is the second rendering engine, the host program may perform a route animation rendering process for the second target page. That is, when the second target page is rendered by a second rendering engine that does not support custom routes, the host program may render the route animation of the second target page according to a default route animation rendering mechanism. Rendering the route effect of the second target page by the host program can ensure reliable page rollback and eliminate the need for interaction with other rendering engines, thereby saving related resources and improving the rendering efficiency of route animation during the page rollback process to a certain extent.

[0051] In some alternative embodiments, when a redirect request to redirect a current page in a hosting program to a specified page is received, a rendering engine corresponding to the current page can be obtained. If the rendering engine corresponding to the current page is a first rendering engine that supports custom routes (the first rendering engine can render multiple pages) and the type of the specified page is a first rendering engine page (i.e., a page rendered by the first rendering engine), the specified page can be rendered in the first rendering engine by directly reusing the first rendering engine.

[0052] It should be noted that a redirect request is a request used to redirect a current page to a designated page, and may be generated in response to a page redirect operation triggered by a user. For example, a user may trigger a page redirect operation to switch between designated pages, such as the home page of the hosting program, the business page of the hosting program, and the personal information page of the hosting program, and a redirect request used to point to the designated page may be generated in response to the page redirect operation.

[0053] In this way, in response to a redirection request from a current page to a designated page, if both the current page and the designated page support rendering by a first rendering engine, the first rendering engine can be directly reused to render the designated page, thereby improving the rendering efficiency of the designated page, supporting the display of custom route effects for the designated page, and saving related resources.

[0054] In some alternative embodiments, the rendering engines used to render pages of the hosting program may further include a second rendering engine, and each second rendering engine can render one page, i.e., one second rendering engine can render only one page. Thus, if the rendering engine corresponding to the current page is the first rendering engine and the type of the specified page is a second rendering engine page (i.e., a page rendered by the second rendering engine), the specified page obtained by rendering by the second rendering engine can be constructed at the top of the page stack of the hosting program, and the first rendering engine is notified to roll back one page.

[0055] When multiple pages of a hosting program support rendering by multiple rendering engines, if the rendering engine used to render the redirected specified page is the second rendering engine but the rendering engine used to render the current page is the first rendering engine, the specified page rendered by the second rendering engine can be constructed at the top of the page stack, and the first rendering engine can be notified to roll back one page, thereby ensuring the accuracy of the page stack and ensuring that the page is redirected reliably.

[0056] In some alternative embodiments, the rendering engines used to render pages of the hosting program may further include a second rendering engine, and each second rendering engine can render one page, i.e., one second rendering engine can render only one page. Thus, if the rendering engine corresponding to the current page is the second rendering engine and the type of the specified page is a first rendering engine page, the current page can be removed from the top of the page stack of the hosting program, and the specified page can be rendered by the newly created first rendering engine.

[0057] When multiple pages of a hosting program support rendering by multiple rendering engines, if the rendering engine used to render the redirected specified page is a first rendering engine, but the rendering engine used to render the current page is a second rendering engine, the current page can be removed from the top of the page stack, and the specified page is further rendered by the first rendering engine, thereby ensuring the accuracy of the page stack and ensuring that the pages are redirected reliably.

[0058] In some alternative embodiments, if a first rendering engine supporting custom routes can render multiple pages, each page rendered by the first rendering engine of the hosting program corresponds to a different data isolation area (e.g., Dart Isolate), and a root context corresponding to each page is associated with the data isolation area corresponding to the page, and a page node tree (e.g., Shadow Tree) is included in the root context. In such a case, operations targeting the page node tree act on the data isolation area associated with the root context, further ensuring data isolation between multiple pages in the first rendering engine.

[0059] The above mechanism separately stores the root contexts corresponding to the individual pages rendered by the first rendering engine, which on the one hand ensures that data separation between the individual pages rendered by the first rendering engine can be achieved, and on the other hand, is advantageous in realizing some resource sharing among the individual pages rendered by the first rendering engine, thereby saving related storage resources.

[0060] The following describes in detail the implementation details of the technical solutions of the embodiments of the present application, taking as an example that the hosting program is a mini program, the host program is an application program client terminal, the first rendering engine is a Flutter engine, and the second rendering engine is a WebView.

[0061] As shown in Figure 4, the current mini program page rendering engine uses a WebView, which can only push pages from the right edge to the left edge of the screen when jumping between pages. This page route method results in a monotonous page presentation effect, making it difficult to meet developers' needs for advanced customization and in-depth optimization, and also difficult to meet users' needs for a natural and smooth page switching experience. In this embodiment, the custom route method provides developers with greater freedom and creativity, allowing them to design their own route animation solutions based on their business needs, thereby creating a more personalized and refined mini program interaction experience. At the same time, this custom route method can also make the page switching effect of mini programs more natural and smooth, resulting in a smoother user experience. For example, as shown in Figure 5, pages can be pushed upward from the bottom edge of the screen.

[0062] In some alternative embodiments, the custom routes in this application can be implemented based on Skyline and Flutter. To use custom routes in a continuous Skyline page, the renderer field can be configured as Skyline in the json file configured for the page.

[0063] When using custom routes, you can declare the custom route first, for example, you can declare one custom route via the wx.router.addRouteBuilder (add route generator) port. In one example, a custom route can be declared as follows:

[0064] wx.router.addRouteBuilder( "HalfScreenDialog", customRouteBuilder )

[0065] In the above declaration, the first parameter "HalfScreenDialog" is the name of this custom route, and the second parameter "customRouteBuilder" is the builder function of the custom route. The builder function is the core where developers can define the animation effect, animation time, etc.

[0066] 6, an exemplary builder function can specifically define user route configuration information in one builder function, where code segment 601 indicates route context information (i.e., routeContext). Since the old page will be logged out during the process of opening a new page, primaryAnimation represents the parameters of the animation in which the new page is pushed, secondaryAnimation represents the parameters of the animation in which the old page is pushed, and userGestureInProgress can identify whether triggering the page jump process by a user gesture is supported.

[0067] In Figure 6, code segment 602 is used to define the animation for pushing a new page, where code segment 6021 represents the value for setting the worklet animation, which defaults to the value of primaryAnimation (i.e., primaryAnimation.value). If not triggered by a user gesture, another value is selected, and finally the animation style is restored. In Figure 6, code segment 603 is used to define the animation for pushing an old page, where code segment 6031 represents the value for setting the worklet animation, which defaults to the value of secondaryAnimation (i.e., secondaryAnimation.value). If not triggered by a user gesture, another value is selected, and finally the animation style is restored. In Figure 6, code segment 604 is used to restore the defined animation for pushing a new page and animation for pushing an old page.

[0068] After declaring a custom route, you can use the declared custom route as a page jump parameter, and the game will implement the custom page route. Specifically, when calling wx.navigateTo (i.e., the page jump function) to jump to a page, you can fill in the second parameter routeType (route type) and set it as the name of the declared custom route, "HalfScreenDialog". In this way, when jumping to a page, the route animation set in the builder function will be performed according to the route animation set in the builder function. In one example, the wx.navigateTo function is defined as follows (where url is the page address to jump to):

[0069] wx.navigateTo({ url: 'pageB', routeType: 'HalfScreenDialog' })

[0070] In one embodiment of the present application, when performing page back processing, the custom route supports completing the gesture back animation effect in cooperation with a gesture. Specifically, a gesture component can be embedded in the outermost layer of a page, and changing the variables of the custom route in the gesture callback can change the page presentation state. In a page, this.customRouteContext (user route context) contains all the variables when the current page defines a route builder, that is, the routeContext in the declared builder function.

[0071] In one embodiment of the present application, when Skyline is used as the rendering backend, page jumps have rich animation support. Therefore, when pages are independent Flutter engines, route animations are controlled by the application program client terminal and do not use Skyline's route animation capabilities. When rendering consecutive pages using the same Flutter engine, custom routes can be realized using Skyline's route animation capabilities. To render multiple pages in the same Flutter engine, the Flutter engine ID may be referred to as a window ID, and the page ID may be referred to as a page ID. Each window ID may correspond to one or more page IDs, but each page ID belongs to only one window ID. In addition, in one embodiment of the present application, it is possible to support the coexistence of a webview and Skyline in the same mini-program, i.e., it supports a hybrid route method of webview and Skyline. Specifically, as shown in FIG. 7, the WebView engine with id=1 corresponds to the page with id=1, the flutter engine with id=2 corresponds to the pages with id=2 and id=3, and the WebView engine with id=3 corresponds to the page with id=4.

[0072] In one embodiment of the present application, the order of opening pages of a mini program is assumed to be wa->fb->fc->wd->fe, where "w-" represents a WebView-rendered page and "f-" represents a Flutter Engine-rendered page. In this example, two Flutter Engines are generated: Flutter Engine 1 supports rendering fb and fc, and Flutter Engine 2 supports rendering fe. The application program client terminal is responsible for the route animation between the WebView and the Flutter Engines. The route of pages in the Flutter Engines (e.g., fb->fc) is controlled by Skyline, which allows for custom route animations. Successive Flutter Engine-rendered pages can reuse the same Flutter Engine, thereby reducing system internal storage consumption. At the same time, the application program client terminal maintains a complete page stack, and the basic library maintains consistency with the client terminal's page stack based on the onAppRoute (an API triggered when switching pages) and onAppRouteDone events. When route animation is generated by the application program client terminal, the trigger timing of the two events is entirely determined by the application program client terminal, and when a custom route is performed in the flutter engine, the onAppRouteDone event is notified to the application program client terminal by Skyline. The following describes the page change scene in the embodiment of the present application.

[0073] In one embodiment of the present application, when a page needs to be jumped, the jump logic of the custom route, as shown in FIG. 8, includes the following: When a developer calls wx.navigateTo to jump to a page, the base library calls navigateTo and passes the parameters {url, singlePageData}, where singlePageData is the name of the defined custom route, i.e., "HalfScreenDialog" in the above example. Next, the application program client terminal triggers the onAppRoute event, and if the new page that needs to be jumped to is rendered by Flutter, the passed singlePageData is passed in the parameters returned to the base library, and the windowID and pageID are written to it at the same time. Furthermore, the basic library creates a new page tree with the new pageID, and after the creation of the new page tree is completed, it calls startRender to start page rendering. After the rendering backend Skyline receives startRender, it layouts and draws the page and renders custom route effects based on the defined custom route parameters. After the rendering backend route is completed, it notifies the client terminal. The client terminal triggers onAppRouteDone to the basic library, and the basic library calls back to the developer and completes the callback.

[0074] It is necessary to note that when jumping from the WebView engine to the Flutter engine, the page route animation is completed by the application program client terminal, and when a page jumps within the Flutter engine, that is, when jumping to a Flutter engine-rendered page, the page route animation is completed by Skyline.

[0075] In one embodiment of the present application, when a page back process needs to be performed, the basic library calls the navigateBack function (a function used to perform page back) and carries a parameter delta (i.e., the number of pages to roll back). The application program client terminal calculates which rendering engine is rendering the target page that needs to be rolled back and displayed based on delta and the page stack. When the target page enters a flutter engine, because a flutter engine may have multiple pages, it needs to notify the flutter engine of the calculated delta, the number of pages that actually need to be rolled back within it, and whether page animation needs to be performed. If page animation needs to be performed, the rendering backend notifies the application program client terminal after pushing out the page, and the application program client terminal triggers onAppRouteDone to the basic library.

[0076] Assume that the order of opening mini program pages is wa->fb->fc->wd->fe, where 'w-' represents the WebView rendering page and 'f-' represents the Flutter Engine rendering page. Then, there will be two Flutter Engines, Flutter Engine 1 is used to render fb and fc, and Flutter Engine 2 is used to render fe.

[0077] When the current page is fe and the basic library navigateBack is introduced in delta:2, it determines that it needs to return to the fc page at this time, and passes the animation to the client terminal, without needing to notify Skyline. This is because the rollback from the fe page to the fc page is not a page rollback within the same Flutter engine.

[0078] If the current page is fe and the basic library navigateBack is introduced into delta:3, it will determine that it is necessary to return to the fb page at this time. Since the rollback from the fe page to the fb page is not a rollback between pages within the Flutter Engine, the animation can be passed to the application program client terminal, and Skyline will be notified of the number of pages that actually need to be rolled back in the Flutter Engine 1 (calculated Delta:1), and Skyline will not need to create an animation.

[0079] If the current page is fc and the base library navigateBack() is implemented in delta:1, it will determine that it needs to return to page fb. Since the rollback from page fc to page fb is an inter-page rollback within the Flutter Engine, Skyline can be notified of the number of pages that actually need to be rolled back in the Flutter Engine (calculatedDelta:1), and an animation needs to be created. In other words, Skyline only needs to create an animation when the current page and the target page are in the same Flutter Engine.

[0080] In one embodiment of the present application, a gesture operation can also trigger a page back. For example, a gesture can be used to tap the back button or a gesture can be used to trigger a page back. In this case, the value corresponds to delta:1 and can be processed according to the above page back operation. It should be noted that when a gesture is used to trigger a back operation on the first page of the Flutter engine, the page route animation can be processed by the application program client terminal because it is necessary to return to a page of another rendering engine (e.g., a WebView page). On the other hand, if a gesture is used to trigger a back operation on the second page of the Flutter engine, the page route animation can be processed by Skyline because it is a page back operation within the same Flutter engine. At the same time, when a gesture is used to trigger a page back operation in the Flutter engine, Skyline notifies the client terminal of the start and end timing of the back operation. That is, the onAppRouteDone event is notified by Skyline to the application program client terminal.

[0081] In one embodiment of the present application, when a page redirection process is required, if the current page is wd and needs to be redirected to fe, the application program client terminal can delete the current top webview in the stack, create a new flutter engine, and notify Skyline to jump (NavigateTo) to page fe. If the current page is fc and needs to be redirected to fe, the previous flutter engine can be reused because the pages were rendered by the same flutter engine, and the application program client terminal can notify Skyline to RedirectTo to page fe. If the current page is fc and needs to be redirected to wd, the application program client terminal can create a new webview at the top of the stack and notify Skyline to NavigateBack (i.e., go back) one page, without the need for animation, thereby maintaining the accuracy of the flutter engine's page stack.

[0082] In one embodiment of the present application, a hybrid route method for WebView and Skyline is supported in the same mini program. Therefore, a multi-Flutter View (i.e., Flutter page) mechanism can be used to realize a solution for mixing and using WebView and the Flutter rendering framework in a single mini program. Specifically, developers can pre-configure the renderer a page needs to use in the page's page.json file. Correspondingly, when a route jumps, the client device will decide to push a WebView or a Flutter View based on the configuration in the page.json file. The multi-Flutter View mechanism is very similar to the multi-WebView mechanism, except that multiple Flutter Views share resources (e.g., texture resources and some internal objects) at the underlying layer, thereby saving internal storage. To support multiple Flutter Views, a set of isolation mechanisms can be designed within Skyline, as shown in Figure 9. For Skyline pages, the Skyline Context and Window are bound to the page's Dart Isolate (each Skyline page has one Dart Isolate). A Context has one Shadow Tree, and all operations on the Shadow Tree affect the corresponding Dart Isolate, thereby realizing state separation from the Shadow Tree to the Dart Isolate.

[0083] The technical solution of the embodiments of the present application can realize customized page routes for mini programs, providing a better user experience for mini programs. Compared with WebView, the technical solution of the embodiments of the present application can realize route animation effects, such as sinking routes and card transitions, that are closer to native implementations, allowing users to experience smoother page switching. Furthermore, the custom route provides mini programs with more possibilities and flexibility, further improving the user experience and application value.

[0084] The following describes an apparatus embodiment of the present application, which can be used to implement the page processing method of the hosting program in the above embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above embodiment of the page processing method of the hosting program in the present application.

[0085] FIG. 10 shows a block diagram of a page processing device of a hosting program according to one embodiment of the present application, where the hosting program is running in a host environment provided by the host program, and the page processing device is applied to the host program.

[0086] As shown with reference to FIG. 10, a page processing device 1000 of a hosting program according to one embodiment of the present application includes an obtaining unit 1002, a determining unit 1004, and a processing unit 1006.

[0087] Here, the obtaining unit 1002 is configured to obtain page jump parameters of the hosting program, the page jump parameters including address information of a first target page in the hosting program and custom route information of the first target page; the determining unit 1004 is configured to determine a rendering engine identifier and a page identifier corresponding to the first target page; and the processing unit 1006 is configured to build a page tree corresponding to the hosting program based on the page identifier, and call a rendering engine corresponding to the rendering engine identifier, and perform rendering processing on the first target page based on the page tree and the page jump parameters.

[0088] In some embodiments of the present application, based on the above solution, the acquisition unit 1002 is further configured to acquire page back parameters for the hosting program, the page back parameters including the number of pages that need to be rolled back; the determination unit 1004 is further configured to determine a target rendering engine identifier corresponding to a second target page that needs to be rolled back and displayed based on the number of pages that need to be rolled back and the page stack corresponding to the hosting program; and the page processing device of the hosting program further includes a sending unit configured to roll back and display the page of the hosting program as the second target page by sending a notification message to a rendering engine corresponding to the target rendering engine identifier.

[0089] In some embodiments of the present application, based on the above solution, the determining unit 1004 is further configured to, if the rendering engine corresponding to the target rendering engine identifier is a first rendering engine that supports a custom route, determine the number of pages that actually need to be rolled back in the first rendering engine based on the number of pages that need to be rolled back and a page stack corresponding to the hosting program, where the first rendering engine can render multiple pages, and the sending unit is further configured to add the number of pages that actually need to be rolled back in the notification message.

[0090] In some embodiments of the present application, based on the above solution, the page processing method further includes: if the current page of the hosting program and the second target page are both pages to be rendered by the rendering engine corresponding to the target rendering engine identifier, and the rendering engine corresponding to the target rendering engine identifier is the first rendering engine, the notification message is further used to notify the first rendering engine to perform rendering processing of the root animation for the second target page.

[0091] In some embodiments of the present application, based on the above solution, the rendering engine used to render the pages of the hosting program further includes a second rendering engine, and each of the second rendering engines can render one page, and the processing unit 1006 is further configured to perform a rendering process of a root animation for the second target page by the host program if the rendering engine corresponding to the target rendering engine identifier is the second rendering engine.

[0092] In some embodiments of the present application, based on the above solution, the acquiring unit 1002 is configured to acquire a page back parameter, including a set number of pages that need to be rolled back, in response to a page back operation triggered for the hosting program.

[0093] In some embodiments of the present application, based on the above solution, the acquiring unit 1002 is further configured to acquire a rendering engine corresponding to the current page when receiving a redirection request to redirect the current page in the hosting program to a designated page, and the processing unit 1006 is further configured to render the designated page in the first rendering engine if the rendering engine corresponding to the current page is a first rendering engine that supports a custom route and the type of the designated page is a first rendering engine page.

[0094] In some embodiments of the present application, based on the above solution, the rendering engine used to render the pages of the hosting program further includes a second rendering engine, and each of the second rendering engines can render one page; the processing unit 1006 is further configured to, if the rendering engine corresponding to the current page is the first rendering engine and the type of the specified page is a second rendering engine page, build the specified page rendered by the second rendering engine at the top of the page stack of the hosting program, and notify the first rendering engine to roll back one page.

[0095] In some embodiments of the present application, based on the above solution, the rendering engine used to render the pages of the hosting program further includes a second rendering engine, and each of the second rendering engines can render one page; and the processing unit 1006 is further configured to: remove the current page from the top of the page stack of the hosting program, and render the specified page by the newly created first rendering engine, if the rendering engine corresponding to the current page is the second rendering engine and the type of the specified page is a first rendering engine page.

[0096] In some embodiments of the present application, based on the above solution, the process of the processing unit 1006 obtaining page jump parameters of the hosting program includes receiving a call request sent by a basic library of the hosting program and obtaining the page jump parameters from the call request; the process of the processing unit 1006 building a page tree corresponding to the hosting program based on the page identifier and calling a rendering engine corresponding to the rendering engine identifier, and performing rendering processing on the first target page based on the page tree and the page jump parameters includes returning the page jump parameters, the rendering engine identifier, and the page identifier to the basic library, so that the basic library builds a page tree corresponding to the hosting program, and calls a rendering engine corresponding to the rendering engine identifier, and performs rendering processing on the first target page based on the page tree and the page jump parameters.

[0097] In some embodiments of the present application, based on the above solution, each individual page rendered by a first rendering engine that supports a custom route of the hosting program corresponds to a different data separation area, a root context corresponding to each of the individual pages is associated with the data separation area corresponding to the individual page, and a page node tree is included in the root context, wherein operations targeting the page node tree act on the data separation area associated with the root context.

[0098] In some embodiments of the present application, based on the above solution, the page jump parameters include a route type, which is used to indicate custom route information for calling the first target page, and the custom route information is used to indicate route animation effects and animation presentation times.

[0099] FIG. 11 shows a structural diagram of a computer system of an electronic device suitable for use in implementing the embodiments of the present application, which may be the electronic device that runs the host program in the above embodiments.

[0100] It should be noted that the electronic device computer system 1100 shown in FIG. 11 is merely an example and should not limit the functionality and scope of use of the embodiments of the present application in any way.

[0101] As shown in FIG. 11 , computer system 1100 may include a central processing unit (CPU) 1101, which may perform various appropriate operations and processes based on programs stored in read-only memory (ROM) 1102 or programs loaded from storage portion 1108 into random access memory (RAM) 1103, for example, to execute the methods described above in the above embodiments. Various programs and data necessary for system operation are further stored in RAM 1103. CPU 1101, ROM 1102, and RAM 1103 are coupled to each other by bus 1104. Input / output (I / O) ports 1105 are also connected to bus 1104.

[0102] An input section 1106 including a keyboard and a mouse, an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), a speaker, a storage section 1108 including a hard disk, and a communication section 1109 including a network port card such as a LAN (Local Area Network) card and a modem may be connected to the I / O port 1105. The communication section 1109 performs communication processing via a network such as the Internet. A driver 1110 is also connected to the I / O port 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is attached to the driver 1110 as needed, and a computer program read from the removable medium 1111 is installed in the storage section 1108 as needed.

[0103] In particular, the processes described above with reference to the flowcharts according to the embodiments of the present application may be implemented as a computer software program. For example, the embodiments of the present application include a computer program product, which includes a computer program stored on a computer-readable medium, and the computer program is used to perform the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication unit 1109 and / or installed from a removable medium 1111. When the computer program is executed by the central processing unit (CPU) 1101, it performs various functions defined in the system of the present application.

[0104] It should be noted that the computer-readable medium described in the embodiments of the present application may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the above. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium may include, but are not limited to, an electrical connection having one or more conductors, a portable computer magnetic disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, optical fiber, a portable compact magnetic disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a computer program, and the computer program may be used by or in combination with an instruction execution system, apparatus, or device. As used herein, a computer-readable signal medium may include a propagating data signal, either in baseband or as part of a carrier wave, having a computer-readable computer program borne thereon. Such a propagating data signal may take a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.The computer program contained in the computer readable medium may be transmitted by any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination of the above.

[0105] The flowcharts and block diagrams in the figures illustrate possible system architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Each block in a flowchart or block diagram may represent a module, program segment, or portion of code, which includes one or more executable instructions used to implement a specified logical function. It should be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than the order marked in the figures. For example, two blocks shown in succession may actually be executed essentially in parallel, or they may be executed in the reverse order, depending on the functionality involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented by a dedicated hardware-based system that performs the specified function or operation, or by a combination of dedicated hardware and computer instructions.

[0106] The related units described in the embodiments of the present application may be implemented in a software manner or in a hardware manner, and the described units may be installed in a processor, where the names of these units do not limit the units themselves in some cases.

[0107] In another aspect, the present application further provides a computer-readable medium, which may be included in the electronic device described in the above embodiment, or may exist independently and not be installed in the electronic device, having one or more computer programs stored thereon, which, when executed by the electronic device, cause the electronic device to implement the method in the above embodiment.

[0108] It should be noted that although the above detailed description refers to several modules or units of equipment used to perform operations, such division is not mandatory. In fact, based on the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided to be embodied by multiple modules or units.

[0109] From the above description of the embodiments, it is easy for those skilled in the art to understand that the exemplary embodiments described herein may be realized by software or by a combination of software and necessary hardware. Therefore, the technical solutions of the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (such as a CD-ROM, a USB memory, or a mobile hard disk) or stored on a network, and includes multiple instructions to enable an electronic device to perform the method according to the embodiments of the present application.

[0110] For example, the electronic device may be an electronic device running a host program, and the electronic device may then execute the page processing method of the hosting program shown in FIG. 2 or FIG.

[0111] Those skilled in the art will easily conceive of other implementation solutions of the present application after considering the specification and practicing the embodiments disclosed herein. This application is intended to cover any modifications, uses, or adaptations of the present application, which modifications, uses, or adaptations comply with the general principles of the present application and include common general knowledge or commonly used technical means in the art that are not disclosed in the present application.

[0112] It is to be understood that the present application is not limited to the exact construction described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof, which is limited only by the appended claims. [Explanation of symbols]

[0113] 101 Terminal Equipment 102 Network 103 Host Program Platform Terminal 601~604 Code Segments 1000 page processing units 1002 Acquisition Units 1004 Decision Unit 1006 Processing Unit 1100 Computer Systems 1101 CPU 1101 Central Processing Unit (CPU) 1102 Dedicated Memory (Read-Only Memory, ROM) 1102 ROM 1103 RAM 1104 Bus 1105 Output (Input / Output, I / O) port 1105 I / O ports 1106 Input section 1107 Output part 1108 Memory part 1109 Communication section 1110 Driver 1111 Medium 6021 Code Segment 6031 Code Segments

Claims

1. A page processing method for a hosting program, the hosting program running in a host environment provided by a host program, the page processing method being executed by an electronic device running the host program, the page processing method comprising: obtaining page jump parameters of the hosting program, the page jump parameters including address information of a first target page in the hosting program and custom route information of the first target page; determining a rendering engine identifier and a page identifier corresponding to the first target page; A page processing method for a hosting program, comprising the steps of: constructing a page tree corresponding to the hosting program based on the page identifier, and calling a rendering engine corresponding to the rendering engine identifier, and performing rendering processing on the first target page based on the page tree and the page jump parameters.

2. The page processing method includes: obtaining page back parameters for the hosting program, the page back parameters including a number of pages that need to be rolled back; determining a target rendering engine identifier corresponding to a second target page that needs to be rolled back and displayed based on the number of pages that need to be rolled back and a page stack corresponding to the hosting program; 2. The method for processing a page of a hosting program according to claim 1, further comprising: rolling back and displaying the page of the hosting program as the second target page by sending a notification message to a rendering engine corresponding to the target rendering engine identifier.

3. The page processing method includes: if the rendering engine corresponding to the target rendering engine identifier is a first rendering engine that supports a custom route, determining the number of pages that actually need to be rolled back in the first rendering engine based on the number of pages that need to be rolled back and a page stack corresponding to the hosting program, wherein the first rendering engine is capable of rendering multiple pages; 3. The method of claim 2, further comprising adding the number of pages that actually need to be rolled back in the notification message.

4. The page processing method includes:

4. The page processing method of claim 3, further comprising the step of: if the current page of the hosting program and the second target page are both pages to be rendered by a rendering engine corresponding to the target rendering engine identifier, and the rendering engine corresponding to the target rendering engine identifier is the first rendering engine, the notification message is further used to notify the first rendering engine to perform rendering processing of a root animation for the second target page.

5. The rendering engines used to render the pages of the hosting program further include second rendering engines, and each second rendering engine can render one page, and the page processing method includes: A page processing method for a hosting program according to any one of claims 2 to 4, further comprising the step of performing a rendering process of a root animation for the second target page by the host program if the rendering engine corresponding to the target rendering engine identifier is the second rendering engine.

6. The step of obtaining a page-back parameter for the hosting program includes:

6. A method for processing pages in a hosting program according to claim 2, further comprising the step of obtaining a page back parameter including a set number of pages that need to be rolled back in response to a page back operation triggered on the hosting program.

7. The page processing method includes: When receiving a redirect request to redirect a current page in the hosting program to a specified page, obtaining a rendering engine corresponding to the current page; 7. The method for processing pages of a hosting program according to claim 1, further comprising: if the rendering engine corresponding to the current page is a first rendering engine that supports custom routes and the type of the specified page is a first rendering engine page, rendering the specified page in the first rendering engine.

8. The rendering engines used to render the pages of the hosting program further include second rendering engines, and each second rendering engine can render one page, and the page processing method includes:

8. The page processing method of claim 7, further comprising the step of: if the rendering engine corresponding to the current page is the first rendering engine and the type of the specified page is a second rendering engine page, building the specified page obtained by rendering by the second rendering engine at the top of the page stack of the hosting program, and notifying the first rendering engine to roll back one page.

9. The rendering engines used to render the pages of the hosting program further include second rendering engines, and each second rendering engine can render one page, and the page processing method includes:

9. A method for processing pages in a hosting program as described in claim 7 or 8, further comprising the step of: if the rendering engine corresponding to the current page is the second rendering engine and the type of the specified page is a first rendering engine page, removing the current page from the top of the page stack of the hosting program and rendering the specified page with the newly created first rendering engine.

10. The step of obtaining a page jump parameter of the hosting program includes: receiving a call request sent by a basic library of the hosting program and obtaining the page jump parameter from the call request; The step of constructing a page tree corresponding to the hosting program based on the page identifier, and invoking a rendering engine corresponding to the rendering engine identifier, and performing a rendering process on the first target page based on the page tree and the page jump parameters, includes: A page processing method for a hosting program described in any one of claims 1 to 9, comprising a step of returning the page jump parameters, the rendering engine identifier, and the page identifier to the basic library, thereby constructing a page tree corresponding to the hosting program using the basic library, and calling a rendering engine corresponding to the rendering engine identifier, and performing rendering processing on the first target page based on the page tree and the page jump parameters.

11. A page processing method for a hosting program according to any one of claims 1 to 10, wherein each individual page rendered by a first rendering engine that supports a custom route of the hosting program corresponds to a different data separation area, a root context corresponding to each of the individual pages is associated with the data separation area corresponding to the individual page, a page node tree is included in the root context, and operations targeting the page node tree act on the data separation area associated with the root context.

12. 12. The page processing method of claim 1, wherein the page jump parameters include a route type, the route type is used to indicate custom route information for calling the first target page, and the custom route information is used to indicate a route animation effect and an animation presentation time.

13. A page processing device for a hosting program, the hosting program running in a host environment provided by the host program, the page processing device comprising: an acquiring unit configured to acquire page jump parameters of the hosting program, the page jump parameters including address information of a first target page in the hosting program and custom route information of the first target page; a determining unit configured to determine a rendering engine identifier and a page identifier corresponding to the first target page; a processing unit configured to construct a page tree corresponding to the hosting program based on the page identifier, and to call a rendering engine corresponding to the rendering engine identifier, and to perform rendering processing on the first target page based on the page tree and the page jump parameters.

14. A computer-readable medium having a computer program stored thereon, the computer program implementing the hosting program page processing method of any one of claims 1 to 12 when executed by a processor.

15. An electronic device, one or more processors; and a memory used to store one or more computer programs, which, when executed by the one or more processors, cause the electronic device to implement the hosting program page processing method of any one of claims 1 to 12.

16. A computer program product, the computer program product including a computer program, the computer program being stored in a computer-readable storage medium, and a processor of an electronic device reading and executing the computer program from the computer-readable storage medium, thereby causing the electronic device to perform the hosting program page processing method of any one of claims 1 to 12.

Citation Information

Patent Citations

  • Routing information processing method and device, electronic equipment and computer storage medium

    CN111639275A

  • Page rendering method and device based on applet, equipment and storage medium

    CN112861057A

  • Automated animated transitions between screens of a GUI application

    US8504925B1