Page processing method and apparatus for hosting program, medium, and electronic device

By introducing a page processing method for custom routing in the applet, the problem of single page routing method in the existing technology is solved, and the personalization of page routing and user experience is improved.

WO2025007579A9PCT designated stage expired Publication Date: 2025-02-20TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/080894
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-03
Filing Date
2024-03-11
Publication Date
2025-02-20

AI Technical Summary

Technical Problem

The existing mini-program interface rendering engine uses WebView, and the page routing method is single, which is difficult to meet the developers' needs for highly customized and in-depth optimization, and it is also difficult to meet the user's natural and smooth user experience of page switching.

Method used

Provide a page processing method for boarding programs. By obtaining page jump parameters, including address information of the target page and custom routing information, determining the rendering engine identification and page identification, establishing a page tree, and calling the corresponding rendering engine for rendering processing , supports custom routing methods.

Benefits of technology

It improves the personalization, refinement and flexibility of page routing, meets developers' needs for page customization and optimization, and at the same time improves users' page switching experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024080894_20022025_PF_FP_ABST
    Figure CN2024080894_20022025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a page processing method and apparatus for a hosting program, a medium, and an electronic device. The method comprises: acquiring a page jump parameter of the hosting program, wherein the page jump parameter comprises address information of a first target page in the hosting program and custom routing information of the first target page; determining a rendering engine identifier and a page identifier corresponding to the first target page; and establishing a page tree corresponding to the hosting program according to the page identifier, calling a rendering engine corresponding to the rendering engine identifier, and rendering the first target page on the basis of the page tree and the page jump parameter. According to the technical solution provided by the embodiments of the present application, it is possible to meet the requirements of height customization and depth optimization of developers, thereby improving the individuation, refinement and flexibility of page routing while also meeting the requirement of a user for a natural and smooth experience in page switching.
Need to check novelty before this filing date? Find Prior Art

Description

Page processing method, device, medium and electronic device for hosting program

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on July 3, 2023, with application number 2023108069470 and application name “Page processing method, device, medium and electronic device for hosting program”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computer and communication technology, and in particular to program page processing technology. Background Art

[0003] Hosted programs are programs that rely on a host program and can be used without downloading and installing. Examples include mini-programs and quick apps. Taking mini-programs as an example, as mini-program applications continue to diversify, mini-program developers hope to provide users with smoother and more optimized mini-program experiences.

[0004] At present, the most commonly used mini-program interface rendering engine is WebView (web view). Page routing (i.e., the routing rules (paths) for jumping from one page to another) can only use the default routing method, that is, pushing the page from the right end to the left end of the interface. The page display effect of this routing method is single, which not only makes it difficult to meet the needs of developers for high customization and deep optimization, but also makes it difficult to meet the needs of users for a natural and smooth experience in page switching.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a page processing method, device, medium and electronic device for a hosted program, which can meet the developer's needs for high customization and deep optimization, improve the personalization, refinement and flexibility of page routing, and also meet the user's needs for a natural and smooth page switching experience.

[0007] According to one aspect of an embodiment of the present application, a page processing method for a host program is provided. The host program runs in a host environment provided by a host program, and the page processing method is executed by an electronic device running the host program. The page processing method includes:

[0008] Obtaining page jump parameters of the host program, the page jump parameters including address information of a first target page in the host program and custom routing information of the first target page; determining a rendering engine identifier and a page identifier corresponding to the first target page; establishing a page tree corresponding to the host program based on the page identifier, calling a rendering engine corresponding to the rendering engine identifier, and rendering the first target page based on the page tree and the page jump parameters.

[0009] According to one aspect of an embodiment of the present application, a page processing device for a host program is provided, wherein the host program runs in a host environment provided by a host program, and the page processing device includes:

[0010] An acquisition unit is configured to acquire page jump parameters of the host program, wherein the page jump parameters include address information of a first target page in the host program and custom routing information of the first target page; a determination unit is configured to determine a rendering engine identifier and a page identifier corresponding to the first target page; and a processing unit is configured to establish a page tree corresponding to the host program based on the page identifier, call a rendering engine corresponding to the rendering engine identifier, and render the first target page based on the page tree and the page jump parameters.

[0011] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the page processing method of the host program as described in the above embodiment is implemented.

[0012] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more computer programs, wherein when the one or more computer programs are executed by the one or more processors, the electronic device implements the page processing method of the host program as described in the above embodiment.

[0013] According to one aspect of an embodiment of the present application, a computer program product is provided, the computer program product including a computer program stored in a computer-readable storage medium. A processor of an electronic device reads and executes the computer program from the computer-readable storage medium, causing the electronic device to perform the page processing method of the hosted program provided in the various optional embodiments described above.

[0014] In the technical solution provided in some embodiments of the present application, by obtaining the page jump parameters of the host program, including the address information of the first target page in the host program, and the custom routing information of the first target page; when the first target page to be displayed is rendered by the first rendering engine that supports custom routing, the rendering engine identifier and page identifier corresponding to the first target page are determined, and then, a page tree corresponding to the host program is established according to the page identifier, and the rendering engine corresponding to the rendering engine identifier is called, and the first target page is rendered based on the page tree and the page jump parameters. In this way, developers are supported to set the custom routing information of a specific page in the page jump parameters of the host program, and then the first rendering engine is used to render and display the custom routing method of the page based on the custom routing information, thereby meeting the developer's needs for high customization and deep optimization, improving the personalization, refinement and flexibility of page routing, and at the same time, for users, it also meets the user's needs for a natural and smooth user experience of page switching. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] FIG1 is a schematic diagram showing an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied;

[0016] FIG2 shows a flow chart of a page processing method of a hosted program according to an embodiment of the present application;

[0017] FIG3 shows a flow chart of a page processing method of a hosted program according to an embodiment of the present application;

[0018] Figure 4 shows a schematic diagram of the page routing method rendered by the WebView engine;

[0019] FIG5 is a schematic diagram showing a page routing method implemented according to the technical solution of an embodiment of the present application;

[0020] FIG6 shows a schematic diagram of a declaration of a builder function according to an embodiment of the present application;

[0021] FIG7 is a schematic diagram showing the correspondence between windowID and pageID according to an embodiment of the present application;

[0022] FIG8 shows a processing flow chart of a page jump process according to an embodiment of the present application;

[0023] FIG9 shows a schematic diagram of implementing hybrid routing isolation according to an embodiment of the present application;

[0024] FIG10 shows a block diagram of a page processing apparatus of a hosted program according to an embodiment of the present application;

[0025] FIG11 shows a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0026] Example embodiments will now be described in a more complete manner with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to these examples; rather, these embodiments are provided to make this application more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art.

[0027] In addition, the features, structures or characteristics described in the present application may be combined in one or more embodiments in any suitable manner. In the following description, there are many specific details so that the embodiments of the present application can be fully understood. However, it will be appreciated by those skilled in the art that when implementing the technical solution of the present application, it is not necessary to use all the detailed features in the embodiments, one or more specific details may be omitted, or other methods, elements, devices, steps, etc. may be adopted.

[0028] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0029] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0030] It should be noted that the term "plurality" used in this document refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. The character " / " generally indicates an "or" relationship between the associated objects.

[0031] The technical solutions of the embodiments of the present application involve host programs and host programs. A host program is a program that relies on a host program and can be used without downloading and installing. For example, mini-programs and quick apps are all host programs. Taking mini-programs as an example, the mini-program interface rendering engine currently uses WebView. When jumping to a page, the new page can only be displayed by pushing it from the right end to the left end of the interface. This page routing method results in a single page display effect, which is not only difficult to meet the developer's needs for high customization and deep optimization, but also difficult to meet the user's needs for a natural and smooth experience in page switching.

[0032] To address the above issues, embodiments of the present application propose a solution for customizing routing within a hosted application. Specifically, as shown in FIG1 , an exemplary system architecture of the present application may include a terminal device 101, a network 102, and a host application platform 103. Network 102 is a medium that provides a communication link between terminal device 101 and host application platform 103. Network 102 may include various connection types, such as wired communication links, wireless communication links, and the like.

[0033] In one embodiment of the present application, a host program is run on the terminal device 101, and the host program can be an application client. The host program can communicate with the host program platform end 103 through the network 102 to display the host program page and complete corresponding business functions (such as message sending, voice call, etc.). The host program provides a host environment, and the host program can run in the host environment provided by the host program. Developers can set page jump parameters for custom routing for the host program, and then the host program can obtain the page jump parameters of the host program, which can include the address information of the first target page in the host program and the custom routing information of the first target page. If the first target page is rendered by the first rendering engine that supports custom routing, the rendering engine identifier and page identifier corresponding to the first target page can be determined, and then the page tree corresponding to the host program is established according to the page identifier, and the rendering engine corresponding to the rendering engine identifier is called, and the first target page is rendered based on the page tree and page jump parameters.

[0034] It can be seen that the technical solution of the embodiment of the present application supports developers to set custom routing information of specific pages in the page jump parameters of the host program, and then use the first rendering engine to implement the page based on the custom routing information, rendering and displaying the custom routing method of the page, thereby meeting the developer's needs for high customization and deep optimization, improving the personalization, refinement and flexibility of page routing, and at the same time, for users, it also meets the user's needs for a natural and smooth user experience of page switching.

[0035] It should be noted that the host program platform end 103 involved in the embodiments of the present application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal device 101 can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, car terminal, smart TV, etc., but is not limited to this.

[0036] The following is a detailed description of the implementation details of the technical solution of the embodiment of the present application:

[0037] FIG2 shows a flow chart of a page processing method for a host program according to an embodiment of the present application. The host program runs in a host environment provided by a host program, and the page processing method is executed by the host program or by an electronic device running the host program. Referring to FIG2 , the page processing method for the host program includes at least steps S210 to S230, which are described in detail as follows:

[0038] In step S210 , page jump parameters of the host program are obtained, where the page jump parameters include address information of a first target page in the host program and custom routing information of the first target page.

[0039] In the embodiments of this application, a hosted program is a program that relies on a host program and can be used without downloading and installing. Examples include mini-programs and quick apps. In a computer environment, the software environment in which a hosted program relies is called a host environment, and the program that provides the host environment is called a host program. Examples of host programs include open platforms, applications that can run hosted programs, and operating systems for mobile terminals.

[0040] In some optional embodiments, the page jump parameters may include a route type (i.e., routeType), which indicates custom route information for calling the first target page. This custom route information is used to indicate the route animation effect and animation display time. Optionally, the route animation effect may include pulling up the page from the bottom, or gradually expanding the page from a certain position (such as the side of the screen); the animation display time is used to indicate the display time of the route animation effect.

[0041] In some cases, multiple pages in a hosted program may be rendered by multiple rendering engines, some of which may support custom routing, while others may not. Therefore, in this embodiment, by setting the routing type in the page jump parameters, it is possible to more clearly indicate whether the first target page currently required to be rendered supports displaying custom routing effects, and the routing type can automatically render custom routing effects based on the custom routing information. Furthermore, by using custom routing information to indicate routing animation effects and animation display time, customization of custom routing effects can be achieved more concisely, which is beneficial to improving the efficiency of custom routing effects while ensuring that the defined routing effects meet actual needs.

[0042] In some optional embodiments, the process of the host program obtaining the page jump parameters of the host program may be: receiving a call request sent by a basic library of the host program, and then obtaining the page jump parameters from the call request. For example, if the host program is an applet, the call request sent by the basic library may be navigateTo.

[0043] It's important to note that the base library provides the underlying code for the VD (Virtual DOM) rendering mechanism, encapsulated built-in components, the API (Application Programming Interface) for the logic layer, and the underlying code for other supplementary capabilities, such as custom components and plug-ins. In general, the base library of a host application handles a range of framework logic, including data binding, component systems, event systems, and communication systems.

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

[0045] In some optional embodiments, the rendering engine identifier is used to identify a rendering engine and can uniquely indicate a particular rendering engine. In the embodiment of the present application, the rendering engine identifier corresponding to the first target page is identification 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.

[0046] Since a rendering engine in an embodiment of the present application can render multiple pages, a rendering engine identifier can correspond to one or more page identifiers. If a rendering engine identifier corresponds to a page identifier, it means that the rendering engine can render one page; if a rendering engine identifier corresponds to multiple page identifiers, it means that the rendering engine can render multiple pages. Therefore, if the first target page is rendered by a first rendering engine that supports custom routing, then after finding the rendering engine that renders the first target page, the corresponding rendering engine identifier can be obtained, that is, the rendering engine identifier corresponding to the first target page, and then, according to the page that the rendering engine corresponding to the rendering engine identifier needs to render, the page identifier corresponding to the first target page is obtained. It should be understood that custom routing refers to the routing effect of rendering and displaying a page according to custom routing information.

[0047] In step S230, a page tree corresponding to the host program is established according to the page identifier corresponding to the first target page, and a rendering engine corresponding to the rendering engine identifier is called to render the first target page based on the page tree and the page jump parameters.

[0048] In some optional embodiments, the page tree corresponding to the host program is used to represent a jump relationship between multiple pages in the host program, such as representing a jump from page A to page B. After calling the rendering engine corresponding to the rendering engine identifier to render the first target page based on the page tree and the page jump parameters, the first target page can be presented in the host program using a custom routing method corresponding to the custom routing information in the page jump parameters.

[0049] In some optional embodiments, the host program establishes a page tree corresponding to the host program based on the page identifier, and calls the rendering engine corresponding to the rendering engine identifier, and renders the first target page based on the page tree and the page jump parameters. The process can specifically be: returning the page jump parameters, the rendering engine identifier and the page identifier to the basic library, so as to establish a page tree corresponding to the host program through the basic library, and call the rendering engine corresponding to the rendering engine identifier, and render the first target page based on the page tree and the page jump parameters.

[0050] In this way, since the basic library can provide the relevant basic code of the virtual node rendering mechanism, encapsulated built-in components, logic layer APIs, and other supplementary capabilities (such as custom components and plug-ins, etc.), by establishing a page tree through the basic library and calling the rendering engine backend with strong rendering capabilities for rendering processing, the rendering efficiency can be improved and a higher-quality rendering effect can be obtained.

[0051] In the technical solution of the embodiment shown in Figure 2, developers are supported to set custom routing information of a specific page in the page jump parameters of the host program, and then the rendering engine can be used to render and display the custom routing method of the page based on the custom routing information, thereby meeting the developer's needs for high customization and deep optimization, improving the personalization, refinement and flexibility of page routing, and at the same time, for users, it also meets their needs for a natural and smooth user experience of page switching.

[0052] FIG3 shows a flow chart of a page processing method for a host program according to an embodiment of the present application. The host 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. Referring to FIG3 , the page processing method for the host program includes at least steps S310 to S330, which are described in detail as follows:

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

[0054] In actual applications, the operation of obtaining the page return parameter for the host program is usually performed in response to a page return operation performed by the user, that is, after detecting that the user has triggered the page return operation, the operation of obtaining the page return parameter for the host program is performed. The page return operation refers to the operation of triggering the display of a previously displayed page, that is, the operation of rolling back the display of historical pages. Accordingly, the page return parameter is a parameter used to indicate the page to be rolled back, which may include the number of pages to be rolled back. The number of pages to be rolled back refers to the number of pages required to be rolled back from the currently displayed page to the historical page to be displayed in response to the page return operation.

[0055] In some optional embodiments, the number of pages to be rolled back included in the page return parameter can be set or triggered by a page return operation. Optionally, the page return operation can be a trigger operation for a page return control on the host program, or a page return gesture operation (such as sliding on the side of the screen). If it is a page return operation, the number of pages to be rolled back included in the page return parameter can be a set value, such as 1, which means rolling back one page.

[0056] In step S320, the target rendering engine identifier corresponding to the second target page to be rolled back is determined based on the number of pages to be rolled back and the page stack corresponding to the host program.

[0057] In some optional embodiments, the page stack corresponding to the host program is used to store pages of the host program. These pages can be stored based on the order of jumps, wherein the first element in the page stack is the home page of the host program, and the last element (i.e., the element at the top of the stack) is the current page of the host program. Based on this, based on the number of pages to be rolled back and the page stack corresponding to the host program, a forward traversal can be performed based on the current page to determine a second target page to be rolled back and displayed. Then, a target rendering engine identifier corresponding to the second target page can be determined, i.e., an identifier of the rendering engine used to render the second target page.

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

[0059] In this way, through the above method, in response to the page return operation triggered by the user, the target rendering engine identifier corresponding to the second target page to be displayed in fallback is searched accordingly, and the rendering engine corresponding to the target rendering engine identifier is used to render the second target page, thereby achieving the effect of falling back to display the second target page, providing reliable technical support for the fallback display of pages in the host program.

[0060] In some optional embodiments, if the rendering engine corresponding to the target rendering engine identifier is a first rendering engine that supports custom routing and the first rendering engine is capable of rendering multiple pages, the number of pages that actually need to be rolled back in the first rendering engine corresponding to the target rendering engine identifier can be determined based on the number of pages that need to be rolled back and the page stack corresponding to the host program; and the actual number of pages that need to be rolled back can be added to the notification message.

[0061] Since multiple pages can be rendered in the first rendering engine (such as the flutter engine), when the second target page that needs to be rolled back is rendered by the rendering engine, the rendering engine may perform page rollback within the rendering engine. Therefore, it is necessary to determine the actual number of pages that need to be rolled back within the rendering engine corresponding to the target rendering engine identifier. In this way, based on the page stack and the rendering engine corresponding to the second target page, the actual number of pages that need to be rolled back is further determined to ensure reliable page rollback and avoid page rollback failures or errors.

[0062] Optionally, if both the current page of the host program and the second target page are 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 by the rendering engine corresponding to the target rendering engine identifier. In other words, the rendering engine corresponding to the target rendering engine identifier renders multiple pages. Therefore, the notification message can also be used to notify the rendering engine corresponding to the target rendering engine identifier (i.e., the first rendering engine) to perform routing animation rendering processing on the second target page. That is, the routing animation rendering during the page rollback process is performed by the first rendering engine, thereby saving related processing resources and communication resources and improving the rendering efficiency of the routing animation during the page rollback process.

[0063] In some optional embodiments, the rendering engine used to render the page of the host program may also include a second rendering engine (such as WebView), each second rendering engine can render one page, that is, a second rendering engine can only render one page, then if the target rendering engine identifies that the rendering engine corresponding to the second rendering engine is a second rendering engine, the host program can perform routing animation rendering processing on the second target page. That is, when the second target page is rendered by the second rendering engine that does not support custom routing, the host program can render the routing animation of the second target page according to the default routing animation rendering mechanism. The routing effect of the second target page rendered by the host program can ensure the reliable implementation of the page rollback, and since there is no need to interact with other rendering engines, relevant resources can be saved, and the rendering efficiency of the routing animation during the page rollback process can be improved to a certain extent.

[0064] In some optional embodiments, upon receiving a redirect request to redirect a current page in a hosted program to a specified page, a rendering engine corresponding to the current page may be obtained. If the rendering engine corresponding to the current page is a first rendering engine that supports custom routing (the first rendering engine is capable of rendering 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 first rendering engine may be directly reused to render the specified page in the first rendering engine.

[0065] It should be noted that a redirect request is a request to redirect the current page to a specified page, and it 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 to a specified page, such as the homepage of a hosted application, a business page of a hosted application, or a personal information page of a hosted application. Accordingly, in response to the page redirect operation, a redirect request may be generated indicating the specified page.

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

[0067] In some optional embodiments, the rendering engine used to render pages of the host program may further include a second rendering engine. Each second rendering engine can render one page, that is, one second rendering engine can only render one page. 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 (that is, a page rendered by the second rendering engine), the specified page rendered by the second rendering engine can be established at the top of the page stack of the host program, and the first rendering engine can be notified to roll back one page.

[0068] In the case where multiple pages of the host program support rendering by multiple rendering engines, when the rendering engine used to render the redirected designated page is the second rendering engine, and the rendering engine used to render the current page is the first rendering engine, the designated page rendered by the second rendering engine can be established at the top of the page stack, and the first rendering engine can be notified to roll back one page, thereby ensuring the correctness of the page stack and ensuring reliable page redirection.

[0069] In some optional embodiments, the rendering engine used to render pages of the host program may further include a second rendering engine. Each second rendering engine can render one page, that is, one second rendering engine can only render one page. Therefore, 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 deleted from the top of the page stack of the host program, and the specified page can be rendered by the newly created first rendering engine.

[0070] In the case where multiple pages of the host program support rendering by multiple rendering engines, when the rendering engine used to render the redirected designated page is a first rendering engine, and the rendering engine used to render the current page is a second rendering engine, the current page can be deleted from the top of the page stack, and the designated page can be rendered by the first rendering engine, thereby ensuring the correctness of the page stack and ensuring reliable page redirection.

[0071] In some optional embodiments, if the first rendering engine that supports custom routing is capable of rendering multiple pages, then each page rendered by the host program through the first rendering engine corresponds to a different data isolation area (such as Dart Isolate), and the routing context corresponding to each page is associated with the data isolation area corresponding to each page, and the routing context contains a page node tree (such as Shadow Tree). In this case, operations on the page node tree act on the data isolation area associated with the routing context, thereby ensuring data isolation between multiple pages in the first rendering engine.

[0072] Through the above mechanism, the routing context corresponding to each page rendered by the first rendering engine is stored in isolation. On the one hand, it can ensure that data isolation can be achieved between each page rendered by the first rendering engine. On the other hand, it can facilitate the sharing of some resources among the pages rendered by the first rendering engine, thereby saving related storage resources.

[0073] The following takes the hosting program as a mini-program, the host program as an application client, the first rendering engine as the Flutter engine, and the second rendering engine as the WebView as an example to describe the implementation details of the technical solution of the embodiment of the present application in detail:

[0074] As shown in Figure 4, the current rendering engine of the mini-program page uses WebView. When jumping to a page, the page can only be pushed in from the right end of the screen to the left end. This page routing method results in a single page display effect. It is not only difficult to meet the developer's needs for high customization and deep optimization, but also difficult to meet the user's needs for a natural and smooth experience of page switching. In the embodiments of the present application, custom routing can be used to provide developers with a higher degree of freedom and creativity. Developers can design routing animation solutions according to their own business needs, thereby creating a more personalized and refined mini-program interaction experience. At the same time, this custom routing method also makes the switching effect of the mini-program page more natural and smooth, making the user's operating experience smoother. For example, as shown in Figure 5, the page can be pushed in from the bottom of the screen.

[0075] In some optional embodiments, the custom routing in this application can be implemented based on Skyline and Flutter. To use custom routing in a continuous Skyline page, you can configure the renderer field to Skyline in the page configuration json file.

[0076] When using a custom route, you can first declare the custom route. For example, you can declare a custom route through the wx.router.addRouteBuilder (add route builder) interface. In an example, a custom route can be declared as follows:

[0077] In the above declaration, the first parameter "HalfScreenDialog" is the name of the custom route, and the second parameter customRouteBuilder is the builder function of the custom route. The builder function is the core of the developer's custom route, in which you can define animation effects, animation time, and so on.

[0078] An exemplary builder function can be shown in Figure 6, which specifically defines user route configuration information within a builder function, wherein code segment 601 partially illustrates route context information (i.e., routeContext). Since the old page will exit when a new page is opened, primaryAnimation can be used to indicate the parameters of the new page's push-in animation, secondaryAnimation can be used to indicate the parameters of the old page's push-out animation, and userGestureInProgress can be used to indicate whether user gestures are supported to trigger page jumps.

[0079] In Figure 6, code segment 602 is used to define the animation for pushing a new page, wherein code segment 6021 is used to indicate the value of setting the worklet animation. The default value is the value of primaryAnimation (i.e., primaryAnimation.value). If it is not triggered by a user gesture, other values ​​will be selected, and the animation style will be returned. In Figure 6, code segment 603 is used to define the animation for pushing an old page out, wherein code segment 6031 is used to indicate the value of setting the worklet animation. The default value is the value of secondaryAnimation (i.e., secondaryAnimation.value). If it is not triggered by a user gesture, other values ​​will be selected, and the animation style will be returned. In Figure 6, code segment 604 is used to return the defined animation for pushing a new page in and the animation for pushing an old page out.

[0080] After declaring a custom route, you can use the declared custom route as a page jump parameter to implement custom page routing in the game. Specifically, when calling wx.navigateTo (the page jump function), you can add a second parameter, routeType (route type), to it and set it to the name of the declared custom route "HalfScreenDialog". In this way, when jumping to the page, the route animation set in the builder function will be followed. In an example, the wx.navigateTo function is defined as follows (the url is the address of the page to be jumped to):

[0081] In one embodiment of the present application, when performing page return processing, custom routes support gestures to achieve a gesture return animation effect. Specifically, you can nest gesture components in the outermost layer of the page and change the custom route variables in the gesture callback to change the page display state. The this.customRouteContext (user route context) in the page contains all the variables when the route builder is defined for the current page, that is, the routeContext in the declared builder function.

[0082] In one embodiment of the present application, since page jumps have rich animation support when using Skyline as the rendering backend, when the page is an independent flutter engine, the routing animation is controlled by the application client and the routing animation capability of Skyline is not used. When using the same flutter engine to render consecutive pages, the routing animation capability of Skyline can be used to implement custom routing. In order to render multiple pages in the same flutter engine, the id of the flutter engine can be called windowID, and the id of the page can be called pageID. Each windowID may correspond to one or more pageIDs, but each pageID belongs to only one windowID. And in an embodiment of the present application, Webview and Skyline can be supported in the same applet, that is, a mixed routing method of WebView and Skyline is supported. Specifically, as shown in Figure 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; the WebView engine with id=3 corresponds to the page with id=4.

[0083] In one embodiment of the present application, it is assumed that the order of opening the mini program pages is wa->fb->fc->wd->fe, where "w-" represents the WebView rendering page and "f-" represents the flutter engine rendering page. In this example, two flutter engines will be generated, flutter engine1 supports rendering fb and fc; flutter engine2 supports rendering fe. The application client is responsible for the routing animation between WebView and flutter engine, while the routing of pages in the flutter engine (such as fb->fc) is controlled by Skyline. This part can customize the routing animation. Since consecutive flutter engine rendering pages can reuse the same flutter engine, system memory consumption can also be reduced. At the same time, the application client has a complete page stack, and the basic library maintains consistency with the client page stack based on onAppRoute (the API triggered when the page switches) and onAppRouteDone events. When the routing animation is generated by the application client, the triggering timing of the two events is entirely determined by the application client; when custom routing is performed in the flutter engine, the onAppRouteDone event is notified to the application client by Skyline. The following describes the page change scenario in the embodiment of the present application:

[0084] In one embodiment of the present application, when a page jump is required, as shown in Figure 8, the jump logic of the custom route includes: when the developer calls wx.navigateTo to jump to the page, the basic library calls navigateTo with the parameters {url, singlePageData}. Among them, singlePageData is the name of the defined custom route, which is "HalfScreenDialog" in the aforementioned embodiment. Then, the application client triggers the onAppRoute event. If the new page to be jumped to is rendered by flutter, the parameter returned to the basic library carries the passed-in singlePageData, and fills in the windowID and pageID. Furthermore, the basic library creates a new page tree with the new pageID. After the new page tree is created, startRender is called to initiate page rendering. After the rendering backend Skyline receives startRender, it performs page layout and drawing, and renders the custom routing effect according to the defined custom routing parameters; after the rendering backend route is completed, the client is notified, and the client triggers onAppRouteDone to the basic library, and the basic library calls back to the developer to complete the callback.

[0085] It should be noted that when jumping from the WebView engine to the Flutter engine, the page routing animation is completed by the application client, while when jumping within the Flutter engine, that is, jumping to the Flutter engine-rendered page, the page routing animation is completed by Skyline.

[0086] In one embodiment of the present application, when page return processing is required, the basic library calls the navigateBack function (a function for page return) with a parameter delta (i.e., the number of pages to be rolled back). The application client calculates which rendering engine renders the target page to be rolled back based on delta and the page stack. If the target page falls within a flutter engine, since the flutter engine may have multiple pages, it is necessary to notify the flutter engine of the calculatedDelta number of pages that actually need to be rolled back, and whether page animation is required. If page animation is required, the rendering backend will push the page and notify the application client, and the application client will trigger onAppRouteDone to the basic library.

[0087] Assume that the order of opening mini program pages is wa->fb->fc->wd->fe, where "w-" indicates the WebView rendering page and "f-" indicates the Flutter Engine rendering page. In this case, two Flutter Engines will be generated: Flutter Engine 1 is used to render fb and fc, and Flutter Engine 2 is used to render fe.

[0088] If the current page is fe, the basic library navigateBack passes delta:2, then it is determined that it needs to return to the fc page. The animation is handed over to the client, and there is no need to notify Skyline. This is because the page rollback from fe to fc is not within the same flutter engine.

[0089] If the current page is page_fe, the basic library calls navigateBack with delta:3. At this point, it is determined that the page needs to be returned to page_fb. Since the return from page_fe to page_fb does not occur between pages within the Flutter engine, the animation can be handed over to the application client. Skyline is notified of the calculatedDelta:1 page number that needs to be returned within Flutter engine 1, and Skyline does not need to perform an animation.

[0090] If the current page is fc and the basic library calls navigateBack with delta:1, it is determined that a return to page fb is required. Since the return from page fc to page fb occurs between pages within the Flutter engine, Skyline is notified within Flutter engine 1 to calculate the actual number of pages to return to, calculatedDelta:1, and perform an animation. This means that Skyline animation is only required if the current and target pages are within the same Flutter engine.

[0091] In one embodiment of the present application, gesture operations can also cause the page to return, such as clicking the return button through a gesture, or triggering the page return through a gesture slide, etc. This situation is equivalent to delta: 1, and can be processed according to the above-mentioned page return operation. It should be noted that for the first page of the flutter engine, when the return is triggered by a gesture, since it is necessary to return to the page of another rendering engine (such as a WebView page), the page routing animation can be processed by the application client; and starting from the second page of the flutter engine, if the return is triggered by a gesture, then since it is a page return operation performed within the same flutter engine, the page routing animation can be processed by Skyline. At the same time, when the page return is triggered by a gesture operation within the flutter engine, Skyline notifies the client of the start and end timing of the return, that is, the onAppRouteDone event is notified by Skyline to the application client.

[0092] In one embodiment of the present application, when page redirection processing is required, if the current page is wd and needs to be redirected to fe, the application client can delete the current top webview, create a new flutter engine, and notify Skyline NavigateTo to jump to page fe. If the current page is fc and needs to be redirected to fe, then since it is a page rendered by the same flutter engine, the previous flutter engine can be reused, and the application client notifies Skyline RedirectTo to page fe. If the current page is fc and needs to be redirected to wd, the application client can create a new webview at the top of the stack and notify Skyline NavigateBack (i.e. return) one layer of page, but no animation is needed, so as to keep the flutter engine page stack correct.

[0093] In one embodiment of the present application, since a mixed routing mode of WebView and Skyline is supported in the same applet, the multi-Flutter View (i.e., Flutter page) mechanism can be used to implement a solution of mixed use of WebView and Flutter rendering framework in a small program. Specifically, the developer can configure the renderer to be used for the page in the page.json file of the page in advance. Accordingly, when the route jumps, the client will push WebView or Flutter View according to the configuration decision in the page.json file. The mechanism of multiple Flutter Views is very similar to the mechanism of multiple WebViews. The difference is that multiple Flutter Views share resources (such as texture resources and some internal objects) at the bottom layer to save memory. In order to support multiple Flutter Views, as shown in Figure 9, a set of isolation mechanisms can be designed inside Skyline. For the Skyline page, the Context and Window in Skyline are bound to the Dart Isolate (isolation area) of the page (each Skyline page has a Dart Isolate). A Context holds a Shadow Tree. All operations of the Shadow Tree will act on its corresponding Dart Isolate, thereby achieving state isolation from the Shadow Tree to the Dart Isolate.

[0094] The technical solution of the embodiment of this application can realize customized page routing for mini programs, bringing a better user experience to mini programs. Compared with WebView, the technical solution of the embodiment of this application can achieve routing animation effects that are closer to native implementations, such as sinking routing, card transitions, etc. These effects can make users feel smoother page switching. And through customized routing, mini programs can obtain more possibilities and flexibility, further improving user experience and application value.

[0095] The following describes an embodiment of the device of the present application, which can be used to execute the page processing method of the host program in the above embodiment of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the page processing method of the host program in the above embodiment of the present application.

[0096] FIG10 shows a block diagram of a page processing device of a host program according to an embodiment of the present application. The host program runs in a host environment provided by a host program, and the page processing device is applied to the host program.

[0097] 10 , a page processing apparatus 1000 for a hosted program according to an embodiment of the present application includes: an acquiring unit 1002 , a determining unit 1004 , and a processing unit 1006 .

[0098] Among them, the acquisition unit 1002 is configured to obtain page jump parameters of the host program, and the page jump parameters include address information of the first target page in the host program and custom routing information of the first target page; the determination unit 1004 is configured to determine the rendering engine identifier and page identifier corresponding to the first target page; the processing unit 1006 is configured to establish a page tree corresponding to the host program according to the page identifier, and call the rendering engine corresponding to the rendering engine identifier to render the first target page based on the page tree and the page jump parameters.

[0099] In some embodiments of the present application, based on the aforementioned solution, the acquisition unit 1002 is further configured to: acquire a page return parameter for the host program, the page return parameter 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 host program; the page processing device of the host program further includes: a sending unit configured to send a notification message to the rendering engine corresponding to the target rendering engine identifier, so as to display the page rollback of the host program as the second target page.

[0100] In some embodiments of the present application, based on the aforementioned 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 custom routing, 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 the page stack corresponding to the host program; the first rendering engine is capable of rendering multiple pages; and the sending unit is further configured to: add the number of pages that actually need to be rolled back to the notification message.

[0101] In some embodiments of the present application, based on the aforementioned scheme, the page processing method further includes: if the current page of the host 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 notification message is also used to notify the first rendering engine to perform routing animation rendering processing on the second target page.

[0102] In some embodiments of the present application, based on the aforementioned solution, the rendering engine used to render the page of the host program also includes a second rendering engine, and each second rendering engine is capable of rendering one page; the processing unit 1006 is further configured to: if the rendering engine corresponding to the target rendering engine identifier is the second rendering engine, then perform routing animation rendering processing on the second target page through the host program.

[0103] In some embodiments of the present application, based on the aforementioned solution, the acquisition unit 1002 is configured to: in response to a page return operation triggered for the hosted program, acquire a page return parameter including a set number of pages to be rolled back.

[0104] In some embodiments of the present application, based on the aforementioned solution, the acquisition unit 1002 is further configured to: upon receiving a redirection request to redirect the current page on the host program to a specified page, obtain the rendering engine corresponding to the current page; the processing unit 1006 is further configured to: if the rendering engine corresponding to the current page is a first rendering engine that supports custom routing, and the type of the specified page is a first rendering engine page, render the specified page in the first rendering engine.

[0105] In some embodiments of the present application, based on the aforementioned solution, the rendering engine used to render the page of the host program further includes a second rendering engine, and each of the second rendering engines is capable of rendering 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 designated page is a second rendering engine page, establish the designated page rendered by the second rendering engine at the top of the page stack of the host program, and notify the first rendering engine to roll back one page.

[0106] In some embodiments of the present application, based on the aforementioned solution, the rendering engine used to render the page of the host program further includes a second rendering engine, and each of the second rendering engines is capable of rendering one page; the processing unit 1006 is further configured to: if the rendering engine corresponding to the current page is the second rendering engine, and the type of the designated page is a first rendering engine page, delete the current page from the top of the page stack of the host program, and render the designated page using the newly created first rendering engine.

[0107] In some embodiments of the present application, based on the aforementioned solution, the process of the processing unit 1006 obtaining the page jump parameters of the host program includes: receiving a call request sent by a basic library of the host program, and obtaining the page jump parameters from the call request; the process of the processing unit 1006 establishing a page tree corresponding to the host program according to the page identifier, calling a rendering engine corresponding to the rendering engine identifier, and rendering 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 as to establish a page tree corresponding to the host program through the basic library, calling the rendering engine corresponding to the rendering engine identifier, and rendering the first target page based on the page tree and the page jump parameters.

[0108] In some embodiments of the present application, based on the aforementioned scheme, each page rendered by the host program through the first rendering engine that supports custom routing corresponds to a different data isolation area, and the routing context corresponding to each page is associated with the data isolation area corresponding to each page, and the routing context contains a page node tree; wherein, operations on the page node tree act on the data isolation area associated with the routing context.

[0109] In some embodiments of the present application, based on the aforementioned solution, the page jump parameter includes a routing type, the routing type is used to indicate custom routing information for calling the first target page, and the custom routing information is used to indicate routing animation effects and animation display time.

[0110] FIG11 shows a schematic diagram of the structure of a computer system of an electronic device suitable for implementing an embodiment of the present application. The electronic device may be the electronic device running the host program in the aforementioned embodiment.

[0111] It should be noted that the computer system 1100 of the electronic device shown in FIG11 is merely an example and should not impose any limitation on the functions and scope of use of the embodiments of the present application.

[0112] As shown in Figure 11, the computer system 1100 may include a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1102 or the program loaded from the storage part 1108 into the random access memory (RAM) 1103, such as executing the method described in the above embodiment. Various programs and data required for system operation are also stored in the RAM 1103. The CPU 1101, ROM 1102 and RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.

[0113] The following components can be connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, and the like; an output section 1107 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 1108 including a hard disk; and a communication section 1109 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. Removable media 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1110 as needed, so that computer programs read from the removable media can be installed in the storage section 1108 as needed.

[0114] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried 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 can be downloaded and installed from a network via the communication section 1109, and / or installed from a removable medium 1111. When the computer program is executed by the central processing unit (CPU) 1101, the various functions defined in the system of the present application are performed.

[0115] It should be noted that the computer-readable medium shown in the embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact 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 containing or storing a computer program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.

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

[0117] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.

[0118] As another aspect, the present application further provides a computer-readable medium, which may be included in the electronic device described in the above embodiments, or may exist independently without being incorporated into the electronic device. The computer-readable medium carries one or more computer programs, and when the one or more computer programs are executed by the electronic device, the electronic device implements the method described in the above embodiments.

[0119] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiment of the application, the features and functions of two or more modules or units described above can be concretized in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0120] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable an electronic device to execute the method according to the embodiments of the present application.

[0121] For example, the electronic device may be an electronic device that runs a host program, and the electronic device may execute the page processing method of the host program shown in FIG. 2 or FIG. 4 .

[0122] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art that are not disclosed herein.

[0123] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A page processing method for a host program, wherein the host program runs in a host environment provided by a host program, and the page processing method is executed by an electronic device running the host program, and the page processing method comprises: Acquire page jump parameters of the host program, wherein the page jump parameters include address information of a first target page in the host program and custom routing information of the first target page; Determine a rendering engine identifier and a page identifier corresponding to the first target page; A page tree corresponding to the hosted program is established according to the page identifier, and a rendering engine corresponding to the rendering engine identifier is called to render the first target page based on the page tree and the page jump parameter.

2. The page processing method of the hosted program according to claim 1, further comprising: Obtaining a page return parameter for the hosted program, wherein the page return parameter includes the 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 according to the number of pages that need to be rolled back and the page stack corresponding to the host program; A notification message is sent to the rendering engine corresponding to the target rendering engine identifier, so as to display the page of the hosted program as the second target page.

3. The page processing method of the hosted program according to claim 2, further comprising: If the rendering engine corresponding to the target rendering engine identifier is a first rendering engine that supports custom routing, then determining the number of pages that actually need to be rolled back in the first rendering engine according to the number of pages that need to be rolled back and the page stack corresponding to the host program; the first rendering engine can render multiple pages; The number of pages that actually need to be rolled back is added to the notification message.

4. The page processing method of the hosted program according to claim 3, further comprising: If the current page of the host 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, the notification message is also used to notify the first rendering engine to perform routing animation rendering processing on the second target page.

5. The page processing method of a hosted program according to any one of claims 2 to 4, wherein the rendering engine for rendering the page of the hosted program further comprises a second rendering engine, each of the second rendering engines being capable of rendering one page; and the page processing method further comprises: If the rendering engine corresponding to the target rendering engine identifier is the second rendering engine, the second target page is rendered with routing animation by the host program.

6. The method for processing a page of a hosted program according to any one of claims 2 to 5, wherein the step of obtaining a page return parameter for the hosted program comprises: In response to a page return operation triggered for the hosted program, a page return parameter including a number of pages to be rolled back as a set value is obtained.

7. The page processing method of a hosted program according to any one of claims 1 to 6, further comprising: When receiving a redirection request to redirect a current page in the host program to a specified page, obtaining a rendering engine corresponding to the current page; If the rendering engine corresponding to the current page is the first rendering engine that supports custom routing, and the specified page If the type is a first rendering engine page, the specified page is rendered in the first rendering engine.

8. The page processing method of a host program according to claim 7, wherein the rendering engine for rendering the page of the host program further comprises a second rendering engine, each of the second rendering engines being capable of rendering one page; and the page processing method further comprises: If the rendering engine corresponding to the current page is the first rendering engine, and the type of the designated page is a second rendering engine page, the designated page rendered by the second rendering engine is established at the top of the page stack of the host program, and the first rendering engine is notified to roll back one page.

9. According to the page processing method of the host program according to claim 7 or 8, the rendering engine for rendering the page of the host program further includes a second rendering engine, each of the second rendering engines can render a page; the page processing method further includes: If the rendering engine corresponding to the current page is the second rendering engine, and the type of the designated page is a first rendering engine page, the current page is deleted from the top of the page stack of the host program, and the designated page is rendered by the newly created first rendering engine.

10. The method for processing a page of a hosted program according to any one of claims 1 to 9, wherein obtaining a page jump parameter of the hosted program comprises: Receiving a call request sent by the basic library of the boarding program, and obtaining the page jump parameter from the call request; The step of establishing a page tree corresponding to the hosted program according to the page identifier, calling a rendering engine corresponding to the rendering engine identifier, and rendering the first target page based on the page tree and the page jump parameter includes: The page jump parameter, the rendering engine identifier and the page identifier are returned to the basic library, so as to establish a page tree corresponding to the host program through the basic library, and call the rendering engine corresponding to the rendering engine identifier to render the first target page based on the page tree and the page jump parameter.

11. The page processing method of a host program according to any one of claims 1 to 10, wherein each page rendered by the host program through a first rendering engine supporting custom routing corresponds to a different data isolation zone, and the routing context corresponding to each page is associated with the data isolation zone corresponding to each page, and the routing context includes a page node tree; wherein, The operation on the page node tree acts on the data isolation area associated with the routing context.

12. The page processing method of a hosted program according to any one of claims 1 to 11, wherein the page jump parameter includes a routing type, the routing type is used to indicate custom routing information for calling the first target page, and the custom routing information is used to indicate a routing animation effect and an animation display time.

13. A page processing device for a host program, wherein the host program runs in a host environment provided by a host program, the page processing device comprising: an acquisition unit configured to acquire page jump parameters of the host program, wherein the page jump parameters include address information of a first target page in the host program and custom routing information of the first target page; A determination unit configured to determine a rendering engine identifier and a page identifier corresponding to the first target page; A processing unit is configured to establish a page tree corresponding to the hosted program according to the page identifier, and call the The rendering engine corresponding to the rendering engine identifier performs rendering processing on the first target page based on the page tree and the page jump parameter.

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

15. An electronic device, comprising: one or more processors; A memory for storing one or more computer programs, which, when executed by the one or more processors, enables the electronic device to implement the page processing method of the host program as described in any one of claims 1 to 12.

16. A computer program product, comprising a computer program, wherein the computer program is stored in a computer-readable storage medium, and a processor of an electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device executes the page processing method of the host program as described in any one of claims 1 to 12.