Page stack processing method and device, storage medium and electronic device
By using two rendering engines to render alternately in Flutter App, the problem of excessive memory usage in hybrid view stack management is solved, and efficient memory utilization and user experience are improved.
Patent Information
- Application Number
- CN202111267000.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2041-10-28
AI Technical Summary
In the prior art, the Flutter multi-engine solution causes excessive memory usage when managing the hybrid view stack, which may cause OOM errors and affect the stability of the App.
Two rendering engines are used to render the target type page alternately, determine the target type page through the page address, and when the rendering engine is already associated, select the rendering engine that opens the page association first for rendering, unlinks the old page, establishes a new page association, and reduces the number of rendering engines.
It reduces the memory usage of the rendering engine, improves the utilization rate of memory resources, avoids page rendering chaos, and improves user experience and app stability.
Smart Images

Figure CN114089997B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a page stack processing method and device, a storage medium, and an electronic device. Background Art
[0002] Flutter is a toolkit for building user interfaces that helps developers efficiently build beautiful, multi-platform applications using a single codebase. It supports mobile, web (website), desktop, and embedded platforms. The Flutter framework was designed to create complete cross-platform apps (applications) using Flutter. That is, all pages in an app are Flutter pages. However, this design approach does not support hybrid view stacks well. Currently, apps are not designed entirely as Flutter apps, especially for apps that are already online. Even if they want to switch to a Flutter app format, the only option is to gradually migrate the existing app.
[0003] During the application migration process, apps that have already updated some of their services to the Flutter framework may experience the coexistence of Flutter pages with other pages, such as native pages and web pages. Furthermore, the order and number of these Flutter pages appearing alongside other pages are uncertain, requiring management of the resulting mixed view navigation stack.
[0004] The related art mainly uses the Flutter multi-engine solution to manage the Flutter hybrid view stack. That is, when a view is created, a Flutter engine is simultaneously created to render the current view. However, with the multi-engine solution, creating each new page will occupy more than 80MB (megabytes) of memory. When there are many pages, it may trigger OOM (Out of Memory) errors, causing the app to crash. Although the latest generation of Flutter can reduce the memory occupied by the Flutter engine, when there are a large number of pages in the app, the Flutter engine will still occupy a large amount of memory.
[0005] This shows that while the Flutter multi-engine solution can solve the hybrid view stack management problem to a certain extent, it will consume a large amount of memory. In other words, the page stack processing method in the related art has the problem of excessive memory usage due to the use of a rendering engine for each page. Summary of the Invention
[0006] Embodiments of the present invention provide a page stack processing method and device, a storage medium, and an electronic device, which at least solve the problem of excessive memory usage caused by using a rendering engine to render each page in the page stack processing method in the related art.
[0007] According to one aspect of an embodiment of the present application, a method for processing a page stack is provided, comprising: determining, based on a first page address of a first page to be opened, that the first page is a page of a target type, wherein the page of the target type is a page that is rendered alternately using two rendering engines; when the two rendering engines have respectively established associations with two pages of the target type in the page stack, determining a first rendering engine from the two rendering engines, wherein the first rendering engine is the rendering engine associated with the page that is opened first of the two pages; and rendering the first page using the first rendering engine to jump to displaying the first page.
[0008] In an exemplary embodiment, determining the first rendering engine from the two rendering engines includes: sequentially searching for each page in the page stack along a target direction, wherein the target direction is a direction from the top of the page stack to the bottom of the page stack; and when the two pages of the target type are found in the page stack, determining the rendering engine of the two rendering engines that is associated with the later of the two pages found as the first rendering engine.
[0009] In an exemplary embodiment, after determining that the first page to be opened is a page of the target type based on the first page address of the first page, the method further includes: if one of the two rendering engines is not associated with a page of the target type in the page stack, determining a second rendering engine from the two rendering engines, wherein the second rendering engine is a rendering engine that is not associated with a page in the page stack; and rendering the first page using the second rendering engine to jump to display the first page.
[0010] In an exemplary embodiment, rendering the first page using the first rendering engine includes: disassociating the first rendering engine from the first of the two pages; and establishing an association between the first rendering engine and the first page, wherein the first rendering engine after establishing the association is used to render the first page.
[0011] In an exemplary embodiment, after rendering the first page using the first rendering engine, the method further includes: determining, based on a second page address of a second page to be closed, that the second page is a page of the target type, wherein the second page is associated with a third rendering engine of the two rendering engines; if there is a third page of the target type in the page stack that is not associated with either of the two rendering engines, disassociating the third rendering engine from the second page; and establishing an association between the third rendering engine and the third page.
[0012] In an exemplary embodiment, after determining that the second page to be closed is a page of the target type based on the second page address of the second page, the method further includes: searching for each page in the page stack in sequence along a target direction, wherein the target direction is a direction from the top of the page stack to the bottom of the page stack; and determining the first page of the target type found that is not associated with either of the two rendering engines as the third page.
[0013] In an exemplary embodiment, determining that the first page is a target type of page based on the first page address of the first page to be opened includes: parsing the first page address to obtain a page address prefix of the first page address, wherein the page address prefix is used to identify the network protocol used by the first page address; and determining that the first page is a target type of page when the page address prefix matches a page address feature corresponding to the target type.
[0014] According to another aspect of an embodiment of the present application, a page stack processing device is also provided, including: a first determination unit, used to determine, based on a first page address of a first page to be opened, that the first page is a page of a target type, wherein the page of the target type is a page rendered alternately using two rendering engines; a second determination unit, used to determine a first rendering engine from the two rendering engines, when the two rendering engines have respectively established associations with two pages of the target type in the page stack, wherein the first rendering engine is the rendering engine associated with the page that is opened first of the two pages; a first rendering unit, used to render the first page using the first rendering engine, so as to jump to displaying the first page.
[0015] In an exemplary embodiment, the second determination unit includes: a search module for searching for each page in the page stack in sequence along a target direction, wherein the target direction is a direction from the top of the page stack to the bottom of the page stack; and a first determination module for determining, when the two pages of the target type are found in the page stack, the rendering engine associated with the later of the two pages found as the first rendering engine.
[0016] In an exemplary embodiment, the device also includes: a third determination unit, which is used to determine a second rendering engine from the two rendering engines after determining that the first page is a target type of page based on the first page address of the first page to be opened, if there is a rendering engine among the two rendering engines that is not associated with the target type of page in the page stack, wherein the second rendering engine is a rendering engine that is not associated with a page in the page stack; and a second rendering unit, which is used to render the first page using the second rendering engine to jump to display the first page.
[0017] In an exemplary embodiment, the first rendering unit includes: a disassociation module for disassociating the first rendering engine from the first of the two pages; and an establishment module for establishing an association between the first rendering engine and the first page, wherein the first rendering engine after establishing the association is used to render the first page.
[0018] In an exemplary embodiment, the apparatus further includes: a fourth determining unit configured to, after rendering the first page using the first rendering engine, determine that the second page to be closed is a page of the target type based on a second page address of the second page to be closed, wherein the second page is a page associated with a third rendering engine of the two rendering engines; a releasing unit configured to release the association between the third rendering engine and the second page if a third page of the target type that is not associated with either of the two rendering engines exists in the page stack; and an establishing unit configured to establish the association between the third rendering engine and the third page.
[0019] In an exemplary embodiment, the device further includes: a search unit for searching for each page in the page stack in sequence along a target direction after determining that the second page is a page of the target type based on the second page address of the second page to be closed, wherein the target direction is a direction from the top of the page stack to the bottom of the page stack; and a fifth determination unit for determining the first page of the target type found that is not associated with either of the two rendering engines as the third page.
[0020] In an exemplary embodiment, the first determination unit includes: a parsing module, used to parse the first page address to obtain a page address prefix of the first page address, wherein the page address prefix is used to identify the network protocol used by the first page address; a second determination module, used to determine that the first page is a page of the target type when the page address prefix matches the page address feature corresponding to the target type.
[0021] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned page stack processing method when running.
[0022] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the page stack processing method through the computer program.
[0023] In an embodiment of the present application, two rendering engines are used to alternately render pages of a target type. By determining that the first page to be opened is a page of the target type based on a first page address of the first page to be opened, wherein the page of the target type is a page that is rendered alternately using the two rendering engines; when the two rendering engines have respectively established associations with two pages of the target type in the page stack, a first rendering engine is determined from the two rendering engines, wherein the first rendering engine is the rendering engine associated with the page that is opened first of the two pages; and the first rendering engine is used to render the first page to jump to display the first page. After determining that the page type of the page to be opened is a page of the target type based on the page address of the page to be opened, the rendering engine associated with the page that is opened first of the two pages associated with the rendering engines is used as the first rendering engine to render the page to be opened. This can achieve the purpose of rendering the target type page by using two rendering engines, thereby reducing the number of rendering engines used, achieving the technical effect of reducing the memory usage of the rendering engines and improving the utilization of memory resources, thereby solving the problem of excessive memory usage caused by using a rendering engine to render each page in the page stack processing method in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0026] Figure 1 is a schematic diagram of a hardware environment for an optional page stack processing method according to an embodiment of the present application;
[0027] Figure 2 is a flowchart of an optional page stack processing method according to an embodiment of the present application;
[0028] Figure 3 This is a schematic diagram of a process of opening a page in an optional page stack processing system according to an embodiment of the present application;
[0029] Figure 4 This is a schematic diagram of a flow chart of closing a page in an optional page stack processing system according to an embodiment of the present application;
[0030] Figure 5This is a rendering principle diagram of a rendering engine in an optional page stack processing system according to an embodiment of the present application;
[0031] Figure 6 is a working principle diagram of a rendering engine in another optional page stack processing system according to an embodiment of the present application;
[0032] Figure 7 is an overall timing diagram of an optional page stack processing system according to an embodiment of the present application;
[0033] Figure 8 is a structural block diagram of an optional page stack processing device according to an embodiment of the present application;
[0034] Figure 9 This is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] According to one aspect of an embodiment of the present application, a method for processing a page stack is provided. Optionally, in this embodiment, the method for processing a page stack can be applied to Figure 1 In the hardware environment shown in FIG. 1 , which is composed of a terminal device 102 and a server 104. Figure 1As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal device or the client installed on the terminal device. A database can be set up on the server or independently of the server to provide data storage services for the server 104.
[0038] The aforementioned network may include, but is not limited to, at least one of the following: a wired network and a wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, and a local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity) and Bluetooth. The terminal device 102 may be, but is not limited to, a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile internet device (MID), a PAD, or other terminal devices.
[0039] The page stack processing method of the embodiment of the present application can be executed by the server 104, or by the terminal device 102, or jointly by the server 104 and the terminal device 102. The page stack processing method of the embodiment of the present application can also be executed by the client installed on the terminal device 102.
[0040] Taking the method for processing the page stack in this embodiment executed by the terminal device 102 as an example, Figure 2 is a flow chart of an optional method for processing a page stack according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may include the following steps:
[0041] Step S202 : determining, based on the first page address of the first page to be opened, that the first page is a target type of page, wherein the target type of page is a page that is rendered alternately using two rendering engines.
[0042] The page stack processing method of this embodiment can be applied to scenarios where page stack processing is performed within a terminal device, a smart home appliance with page display capabilities, or other devices. Such smart home devices can be located in a user's home, or can be electronic devices equipped with smart chips, such as smart televisions and smart refrigerators. These smart home devices can be included in the page stack processing system. Compared to traditional home appliances, the smart home appliances in this embodiment have additional computing modules, network interfaces, and input / output devices, enabling them to provide intelligent analysis and intelligent services.
[0043] In related technologies, hybrid page stacks can be managed by assigning a rendering engine to each target page type in the stack. However, this approach incurs significant memory overhead. To reduce this memory overhead, the FlutterBoost framework can also be used to manage hybrid page stacks. This framework uses a single Flutter engine to manage the hybrid view stack, addressing the memory usage issues associated with Flutter's multi-engine solution.
[0044] However, in the single-engine solution of the FlutterBoost framework, each engine can only render a single page. When switching from an old page to a new one, a screenshot of the old page's content is taken and saved in the page stack. When returning from the new page to the old one, the previously saved screenshot is displayed instead of the actual page during the return animation. In this case, even if the content of the old page changes, the changes are not visible during the return animation, impacting the user experience. Compared to the multi-engine solution, the single-engine solution has more complex internal logic and can lead to more issues in actual use. This, in turn, increases application maintenance costs and lengthens the development cycle. Furthermore, the current Flutter framework has been updated to version 2.2.3, but FlutterBoost still only supports the previously released Flutter framework version 1.17.1. This restricts apps using the FlutterBoost framework and prevents them from upgrading to newer Flutter versions.
[0045] Optionally, in this embodiment, dual engines can be used to alternately render Flutter pages to solve the problem of excessive memory usage caused by multiple engines and the problem of poor experience caused by a single engine. At the same time, the App can be freed from the constraints of the FlutterBoost framework.
[0046] A target application may be running on the user's terminal device. When the user wishes to open the first page of the target application, the user may perform a first triggering operation in the detection area of the terminal device to trigger the opening of the first page. The first triggering operation may be a touch operation such as sliding or clicking, a gesture operation corresponding to a single finger or multiple fingers, or a voice interaction operation. In this embodiment, the type of the first triggering operation is not limited.
[0047] The above-mentioned detection area can be any area or specific area of the display screen of the terminal device or smart home device. The display screen here is a component used to display the pages of the installed application in the terminal device or smart home device. It can be but is not limited to a physical screen such as LED (Light Emitting Diode), ink screen, etc., or it can be a display screen projected into the air medium or other media. This is not limited in this embodiment.
[0048] Each page in the application can correspond to a unique URL (Uniform Resource Location, which is a page address). The target application (or the terminal device, in this embodiment, the target application is taken as an example) can obtain the page address of the first page, that is, the first page address, which can be the URL of the first page. According to the first page address, the target application can determine the page type of the first page, and the result of the determination can be that the first page is a page of the target type, and the page of the target type is a page that is rendered alternately using two rendering engines, for example, a Flutter page, or other types of pages, which are not limited in this embodiment.
[0049] Optionally, the operation of determining the page type of the first page can be performed by the Page Route of the target application (i.e., the routing manager in the App). The routing manager can obtain the first page address of the first page. After obtaining the first page address, the routing manager can determine the page type of the first page based on the first page address, and can compare the page type with the target type stored in advance. If the first page type is consistent with the target type, the first page is determined to be a page of the target type.
[0050] Optionally, the operation of determining the page type of the first page can be performed locally on the terminal device or by a query server. That is, the terminal device can send the first page address to the query server, and the query server can determine whether the first page is a page of the target type based on the first page address. This embodiment is not limited to this.
[0051] For example, when a user wants to open page A of an application, he or she will click on the corresponding area of a smartphone (an example of a terminal device) (an example of a first trigger operation). After detecting the user's click operation, the application can determine that the page to be opened is page A. The routing manager of the application can obtain the page address of page A and determine whether page A is a Flutter page (i.e., an example of a target type page) based on the page address of page A.
[0052] Step S204 : When two rendering engines have been associated with two pages of the target type in the page stack, a first rendering engine is determined from the two rendering engines, wherein the first rendering engine is the rendering engine associated with the page opened first of the two pages.
[0053] The two rendering engines can be used to alternately render target page types, that is, to alternately render the content of target page types in the display window of the terminal device. By default, the rendering engine can display HTML (HyperText Markup Language), XML (Extensible Markup Language) documents and images. It can also display other types of data with the help of plug-ins (a type of browser extension), such as using a PDF (Portable Document Format) reader plug-in to display PDF format data.
[0054] After determining that the first page is of the target type, the target application can determine whether both rendering engines have been created and associated with the two pages of the target type in the page stack. If both rendering engines have been associated with the two pages of the target type in the page stack, the target application can determine the first rendering engine from among the two rendering engines. Optionally, the first rendering engine is the rendering engine associated with the page that was opened first of the two pages.
[0055] Optionally, the operation of determining the rendering engine for rendering the current page can be performed by the page manager (Page Manager) of the target application, which can be used to allocate engine resources for pages of the target type. For example, the page manager can be a Flutter page manager, which can allocate dual-engine resources for all Flutter pages. Optionally, the operation of determining the rendering engine for rendering the current page can also be performed by a scheduling server, which can be communicated with the terminal device for determining the rendering engine of the current page (e.g., the first page) based on the scheduling request of the terminal device.
[0056] It should be noted that the number of rendering engines is not limited to two. As long as the number of rendering engines (at least two) is less than the number of pages of the target type in the page stack, the same technical effect can be achieved. For example, using three rendering engines to alternately render pages of the target type can also achieve the same technical effect. In this embodiment, there is no limit on the number of rendering engines.
[0057] For example, after determining that page A is a Flutter page, if both Flutter engines have established associations with the Flutter pages in the page stack, the Flutter engine (the first Flutter engine) associated with the last Flutter page associated with a Flutter engine in the page stack can be determined as the Flutter engine to be used currently.
[0058] It should be noted that, for pages of other types except the target type, corresponding rendering methods may be used for page rendering. This embodiment does not limit the rendering methods of other types of pages.
[0059] Step S206: Render the first page using the first rendering engine to jump to and display the first page.
[0060] After determining the first rendering engine, the target application can use the first rendering engine to render the first page. For example, the first rendering engine resources can be scheduled using a scheduling instruction to use the first rendering engine to render the first page, so as to jump to display the first page, for example, display the first page on the application interface of the target application.
[0061] For example, after determining to use the first Flutter engine, the application can use the first Flutter engine to render page A. Page A is displayed on the display interface of the application.
[0062] Through the above steps S202 to S206, based on the first page address of the first page to be opened, it is determined that the first page is a page of the target type, wherein the page of the target type is a page that is rendered alternately using two rendering engines; when the two rendering engines have respectively established associations with the two pages of the target type in the page stack, a first rendering engine is determined from the two rendering engines, wherein the first rendering engine is the rendering engine associated with the page that is opened first of the two pages; the first rendering engine is used to render the first page to jump to display the first page, thereby solving the problem of excessive memory occupation by the rendering engine due to the use of a rendering engine to render each page in the page stack in the related art processing method. This reduces the memory occupation of the rendering engine and improves the utilization of memory resources.
[0063] In an exemplary embodiment, determining a first rendering engine from two rendering engines includes:
[0064] S11, searching for each page in the page stack in sequence along a target direction, wherein the target direction is a direction from the top of the page stack to the bottom of the page stack;
[0065] S12 : When two pages of the target type are found in the page stack, the rendering engine associated with the later found page among the two rendering engines is determined as the first rendering engine.
[0066] Optionally, the rendering engine to be currently used, i.e., the first rendering engine, can be determined from the two rendering engines by using the page identifier corresponding to the rendering engine. The page identifier corresponding to the rendering engine can be the page sequence number of the page associated with the rendering engine, i.e., the rendering engine associated with the page opened first of the two pages is determined based on the page sequence number. The page sequence number here can be the sequence number of the associated page in the page stack, or it can be the sequence number of the associated page in the target type page of the page stack. The page sequence number of the associated page can be recorded locally on the terminal device through configuration information, or in the configuration information of the rendering engine, which is not limited in this embodiment.
[0067] Optionally, in this embodiment, to reduce modifications to the rendering engine's configuration information and improve the accuracy of rendering engine determination, the target application may sequentially search for each page in the page stack, moving from the top of the page stack to the bottom. If two pages of the target type are found in the page stack (it can be determined that both rendering engines have been associated with pages of the target type in the page stack), the target application may determine the rendering engine associated with the later-found page of the target type as the first rendering engine.
[0068] Since the page stack follows the "first in, last out" principle, the page opened first in the page stack is close to the bottom of the page stack. During the query process of pages in the page stack, the page found last of the two pages is the page opened first of the two pages, that is, the page closer to the bottom of the stack, or the page farthest from the top of the stack.
[0069] Optionally, the above search operation can be performed by a page manager. Taking the Flutter page manager as an example, the Flutter page manager can obtain the current view stack (i.e., page stack) through the page navigator (Navigator), start searching from the top of the current view stack, and find the last page with the Flutter engine.
[0070] Through this embodiment, the target type of page in the page stack is searched from the top to the bottom of the page stack, and the rendering engine to be used is determined, which can reduce the modification of the configuration information of the rendering engine and improve the accuracy of the rendering engine determination.
[0071] In an exemplary embodiment, after determining that the first page is a page of the target type according to the first page address of the first page to be opened, the method further includes:
[0072] S21, if one of the two rendering engines is not associated with a page of the target type in the page stack, determining a second rendering engine from the two rendering engines, wherein the second rendering engine is a rendering engine not associated with a page in the page stack;
[0073] S22: Use the second rendering engine to render the first page to jump to and display the first page.
[0074] In this embodiment, if one of the two rendering engines is not associated with a page of the target type in the page stack, the target application can directly determine the rendering engine not associated with the page in the page stack as the rendering engine used to render the first page, that is, the second rendering engine. Optionally, if the rendering engine not associated with the page of the target type in the page stack has not yet been created, the second rendering engine can be created first. If neither rendering engine is associated with a page of the target type in the page stack, the second rendering engine can be selected from the two rendering engines randomly or according to a predetermined order.
[0075] After determining the second rendering engine, the target application can use the second rendering engine to render the first page to jump to display the first page. The method of using the second rendering engine to render the first page is similar to the above embodiment and will not be repeated here.
[0076] For example, when there is a Flutter engine in the two Flutter engines that is not associated with the Flutter page in the page stack, the smartphone can determine the Flutter engine to be used based on the second Flutter engine that is not associated with the Flutter page in the page stack, and use the second Flutter engine to render page A to jump to display page A.
[0077] Through this embodiment, when there is a rendering engine that is not associated with a page of the target type, the unassociated rendering engine is used to render the page, which can improve the accuracy of page rendering and improve the utilization rate of engine resources.
[0078] In an exemplary embodiment, rendering the first page using the first rendering engine includes:
[0079] S31, disassociating the first rendering engine from the page that is opened first among the two pages;
[0080] S32: Establish an association between the first rendering engine and the first page, wherein the associated first rendering engine is used to render the first page.
[0081] Because a rendering engine can only render a page associated with it, if a rendering engine is associated with multiple pages, it may cause page rendering confusion, thereby reducing the user experience. In this embodiment, after determining the first rendering engine from the two rendering engines, the target application can disassociate the first rendering engine from the page of the target type associated with the rendering engine, that is, disassociate the first rendering engine from the page that was opened first of the two pages.
[0082] Optionally, disassociating the first rendering engine from the page that is opened first of the two pages may be performed by: deleting the page address associated with the first rendering engine recorded in the first rendering engine, that is, the page address of the associated page of the target type, and deleting the association record between the first rendering engine and the associated page of the first rendering engine recorded in the association server, where the association server is used to record the association relationship between the rendering engine and the page.
[0083] After disassociating the first rendering engine from the page that was opened first, the target application can establish an association between the first rendering engine and the first page. Since no page is currently associated with the first rendering engine, this avoids page rendering confusion. Optionally, the association can be established by at least one of the following methods: recording the page address of the first page, i.e., the first page address, in the first rendering engine; or associating the first rendering engine with the first page by an association server. This is not limited to this in this embodiment.
[0084] For example, after determining the first Flutter engine, the smartphone can disassociate the first Flutter engine from its associated Flutter page, and after disassociation, establish an association between the first Flutter engine and page A to use the first Flutter engine to render page A.
[0085] Through this embodiment, by first releasing the existing association between the rendering engine and the old page and then establishing the association between the rendering engine and the new page, page rendering confusion is avoided and the accuracy of page rendering is improved.
[0086] In an exemplary embodiment, after rendering the first page using the first rendering engine, the method further includes:
[0087] S41, determining, based on a second page address of a second page to be closed, that the second page is a page of a target type, wherein the second page is a page associated with a third rendering engine of the two rendering engines;
[0088] S42: If there is a third page of the target type in the page stack that is not associated with any of the two rendering engines, disassociate the third rendering engine from the second page.
[0089] S43: Establish an association between the third rendering engine and the third page.
[0090] In the process of viewing a page in the target application, in addition to the scenario of opening a page, there is also a scenario of closing a page. If the user wants to close the second page that is currently open, he or she can perform a second trigger operation in the detection area of the terminal device to trigger the closing of the second page. The above-mentioned second trigger operation can be a touch operation such as sliding or clicking, or a gesture operation corresponding to a single finger or multiple fingers, or a voice interaction operation. In this embodiment, the type of the second trigger operation is not limited.
[0091] The target application can detect the above-mentioned second trigger operation and, in response to the detected second trigger operation, obtain the page address of the second page to be closed, that is, the second page address. The second page address can be the URL of the second page. Based on the second page address, the target application can determine the page type of the second page. The result of the determination can be that the second page is a page of the target type, for example, a Flutter page, or other types of pages, which are not limited in this embodiment.
[0092] If the second page is a page of the target type, it can be associated with one of the two rendering engines (i.e., a third rendering engine, which can be the first rendering engine or another rendering engine). To improve the rationality of rendering engine resource utilization, if there is a third page of the target type in the page stack that is not associated with either of the two rendering engines, the target application can first disassociate the third rendering engine from the second page, and then establish an association between the third rendering engine and the third page. Disassociation between the third rendering engine and the second page and establishment of an association between the third rendering engine and the third page are similar to those described above and will not be repeated here.
[0093] It should be noted that if there is no page of the target type in the page stack that is not associated with either of the two rendering engines, the association between the third rendering engine and the second page can be disassociated without associating the third rendering engine with any page. The third rendering engine can also be deleted, which is not limited in this embodiment.
[0094] For example, when you want to close page B, if page B is a Flutter page, and there is a Flutter-type page C in the current view stack that is not associated with any of the two Flutter engines, the smartphone can disassociate page B from its corresponding Flutter engine, and establish an association between the disassociated Flutter engine and page C.
[0095] Through this embodiment, by associating the rendering engine associated with the target type page to be closed with the target type page in the page stack that has not established an association relationship with the rendering engine, the rationality of rendering engine resource utilization can be improved.
[0096] In an exemplary embodiment, after determining that the second page is a target type of page based on the second page address of the second page to be closed, the method further includes:
[0097] S51, searching for each page in the page stack in sequence along a target direction, wherein the target direction is a direction from the top of the page stack to the bottom of the page stack;
[0098] S52: Determine the first page of the target type found and not associated with any of the two rendering engines as the third page.
[0099] Alternatively, the third page can be determined by the page identifiers of each page in the page stack. The page identifiers of each page can identify the page type of each page and its position in the page stack (which can be a page sequence number). Based on the page type and page position, the third page of the target type from the top of the stack can be determined as the third page.
[0100] Optionally, in this embodiment, to improve the accuracy of page determination, the target application can sequentially search for each page in the page stack, moving from the top of the page stack to the bottom. If a page of the target type exists in the page stack that is not associated with either of the two rendering engines, the first page of this type found can be determined as the third page. This third page is the page of the target type that is closest to the top of the stack and is not associated with a rendering engine.
[0101] For example, the smartphone may search for each page in the page stack in sequence from the top of the page stack to the bottom of the page stack, and determine the first Flutter page found that is not associated with the Flutter engine as the page to be associated with the Flutter engine.
[0102] Through this embodiment, the target type of pages in the page stack are searched from the top of the page stack to the bottom of the stack, and the pages to be associated with the rendering engine are determined, which can improve the accuracy of page determination.
[0103] In an exemplary embodiment, determining that the first page is a target type of page according to the first page address of the first page to be opened includes:
[0104] S61, parsing the first page address to obtain a page address prefix of the first page address, wherein the page address prefix is used to identify a network protocol used by the first page address;
[0105] S62 : When the page address prefix matches a page address feature corresponding to the target type, determine that the first page is a page of the target type.
[0106] The pages opened in the application have different page types, and the page address features contained in the page addresses are different. For example, the URL format of a Native page is "native: / / xxx", the URL format of a Web page is "http: / / xxx" or "https: / / xxx", and the URL format of a Flutter page is "flutter: / / xxx". Therefore, the page type of a page can be determined based on the page address features of the page address. The above-mentioned page address features may include a page address prefix. The target application can parse the first page address to obtain the page address prefix of the first page address. The page address prefix can be used to identify the network protocol used by the first page address. The above-mentioned parsing process can be performed by the target application or by the page router of the target application, which is not limited in this embodiment.
[0107] When the parsed page address prefix matches the page address feature corresponding to the target type, the target application can determine that the first page is a page of the target type. The page address prefix and the page address feature corresponding to the target type can match each other, or the page address feature corresponding to the target type can include the page address prefix, which is not limited in this embodiment.
[0108] For example, when the page address prefix parsed from page A is "flutter: / / ", the above page address prefix can be matched with the page address feature "flutter: / / " of the Flutter page. Since the two are the same, it can be determined that page A is a Flutter type page.
[0109] Through this embodiment, the page type of the page to be opened is determined by the matching relationship between the page address prefix of the page to be opened and the page address feature corresponding to the target type, which can improve the convenience of page type determination.
[0110] The following is an explanation of the page stack processing method in the embodiment of the present application with reference to an optional example. In this optional example, the target type of page is a Flutter page, and the rendering engine is a Flutter engine.
[0111] This optional example provides a solution for alternating rendering of Flutter pages using two Flutter engines. This solution allows for precise scheduling of the two Flutter engines to provide rendering, message delivery, and data transfer services for different Flutter pages while processing multiple levels of pages in a hybrid view stack (i.e., a page stack that allows writing different types of pages).
[0112] Combine Figure 3 and Figure 4 For the scenario of opening a new Flutter page, the page stack processing method of this optional example may include the following steps:
[0113] Step S302: Open a page through the page router and pass in the page URL (for example, the page router obtains the URL of the page to be opened through gotoPage(url)).
[0114] like Figure 5 As shown, the current view stack contains multiple Flutter pages, namely, Flutter page A, Flutter page B, Flutter page C, and Flutter page D. Among them, Flutter engine A is first associated with Flutter page A, and then with Flutter page C. Flutter engine B is first associated with Flutter page B, and then with Flutter page D. Figure 6 shown.
[0115] In step S304, the page router parses the page address prefix as "flutter" (ie, determines that the URL scheme is flutter).
[0116] Step S306: Open the page through the Flutter page manager and pass the page address of the page to the Flutter page manager (for example, pass the URL to the Flutter page manager through gotoFlutterPage(url)).
[0117] Step S308: The Flutter page manager obtains the current view stack through the page navigator.
[0118] In step S310, the Flutter page manager searches from the top of the current view stack to the bottom of the stack, finds the last page with a rendering engine, and disassociates the rendering engine from the page.
[0119] The Flutter page manager searches for the Flutter page closest to the top of the current view stack and that does not have a Flutter engine, and finds Flutter page C.
[0120] Step S312: Create a new Flutter page to jump to in the page stack, and establish an association relationship between the rendering engine and the new page.
[0121] The Flutter page manager creates a Flutter engine for Flutter page E, that is, creates an association between Flutter page E and Flutter engine A.
[0122] Step S314: Jump to the new Flutter page (FluttePage E) through the page navigator
[0123] Push Flutter page E onto the stack through the page navigator and jump to the new Flutter page, that is, Flutter page E.
[0124] Combine Figure 4 and Figure 7 For the scenario of closing a Flutter page, the page stack processing method of this optional example may include the following steps:
[0125] Step S702: Close a page through the page router and pass in the page URL (for example, the page router obtains the URL of the page to be closed through ClosePage(url), for example, the URL of the Flutter page E).
[0126] Step S704: The page router resolves the page address prefix to "flutter" (ie, determines that the URL scheme is flutter).
[0127] Step S706: Close the page through the Flutter page manager, and enter and exit the page address of the page into the Flutter page manager (for example, pass the URL to the Flutter page manager through CloseFlutterPage(url)).
[0128] Step S708: The Flutter page manager obtains the current view stack through the page navigator.
[0129] In step S710, the Flutter page manager searches from the top of the current view stack to the bottom of the stack and finds the first page that does not have a rendering engine.
[0130] The Flutter page manager searches for the Flutter page closest to the top of the current view stack and that does not have a Flutter engine, and finds Flutter page C.
[0131] Step S712: Establish an association between the found Flutter page and the rendering engine associated with the page to be closed.
[0132] The Flutter page manager establishes an association between Flutter page C and Flutter engine A.
[0133] Step S714: Close the current page (FlutterPage E) through the page navigator. For example, pop the Flutter page E out of the stack through the page navigator.
[0134] This optional example uses a dual-engine solution to manage Flutter pages in a hybrid view stack, keeping memory usage within a small range while providing a better user experience.
[0135] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory, Read-Only Memory) / RAM (Random Access Memory, Random Access Memory), a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0137] According to another aspect of an embodiment of the present application, a page stack processing device for implementing the above-mentioned page stack processing method is also provided. Figure 8 is a structural block diagram of an optional page stack processing device according to an embodiment of the present application, such as Figure 8 As shown, the device may include:
[0138] A first determining unit 802 is configured to determine, based on a first page address of a first page to be opened, that the first page is a page of a target type, wherein the page of the target type is a page that is rendered alternately using two rendering engines;
[0139] a second determining unit 804 connected to the first determining unit 802 and configured to determine a first rendering engine from the two rendering engines when the two rendering engines have been respectively associated with the two pages of the target type in the page stack, wherein the first rendering engine is the rendering engine associated with the page that is opened first of the two pages;
[0140] The first rendering unit 806 is connected to the second determining unit 804 and is configured to render the first page using a first rendering engine to jump to display the first page.
[0141] It should be noted that the first determining unit 802 in this embodiment can be used to execute the above step S202, the second determining unit 804 in this embodiment can be used to execute the above step S204, and the first rendering unit 806 in this embodiment can be used to execute the above step S206.
[0142] Through the above module, based on the first page address of the first page to be opened, the first page is determined to be a page of the target type, wherein the page of the target type is a page that is rendered alternately using two rendering engines; when the two rendering engines have respectively established associations with the two pages of the target type in the page stack, a first rendering engine is determined from the two rendering engines, wherein the first rendering engine is the rendering engine associated with the page that is opened first of the two pages; the first rendering engine is used to render the first page to jump to display the first page, thereby solving the problem of excessive memory occupation by the rendering engine due to the use of a rendering engine to render each page in the page stack in the related art processing method, reducing the memory occupation of the rendering engine and improving the utilization of memory resources.
[0143] In an exemplary embodiment, the second determining unit includes:
[0144] a search module, configured to sequentially search for each page in the page stack along a target direction, wherein the target direction is a direction from the top of the page stack to the bottom of the page stack;
[0145] The first determining module is configured to, when two pages of the target type are found in the page stack, determine the rendering engine associated with the later found page among the two rendering engines as the first rendering engine.
[0146] In an exemplary embodiment, the apparatus further comprises:
[0147] a third determining unit configured to, after determining, based on the first page address of the first page to be opened, that the first page is a page of the target type, determine a second rendering engine from the two rendering engines if one of the two rendering engines is not associated with a page of the target type in the page stack, wherein the second rendering engine is a rendering engine not associated with a page in the page stack;
[0148] The second rendering unit is configured to render the first page using a second rendering engine, so as to jump to and display the first page.
[0149] In an exemplary embodiment, the first rendering unit includes:
[0150] a disassociation module, configured to disassociate the first rendering engine from the page that is opened first among the two pages;
[0151] The establishing module is used to establish an association between the first rendering engine and the first page, wherein the first rendering engine after the association is established is used to render the first page.
[0152] In an exemplary embodiment, the apparatus further comprises:
[0153] a fourth determining unit configured to, after rendering the first page using the first rendering engine, determine, based on a second page address of the second page to be closed, that the second page is a page of the target type, wherein the second page is a page associated with a third rendering engine of the two rendering engines;
[0154] a releasing unit, configured to release the association between the third rendering engine and the second page if a third page of the target type that is not associated with any of the two rendering engines exists in the page stack;
[0155] The establishing unit is configured to establish an association between the third rendering engine and the third page.
[0156] In an exemplary embodiment, the apparatus further comprises:
[0157] a search unit configured to, after determining that the second page to be closed is a page of a target type based on a second page address of the second page to be closed, sequentially search for each page in the page stack along a target direction, wherein the target direction is a direction from the top of the page stack to the bottom of the page stack;
[0158] The fifth determining unit is configured to determine the first page of the target type found but not associated with any of the two rendering engines as the third page.
[0159] In an exemplary embodiment, the first determining unit includes:
[0160] a parsing module, configured to parse the first page address to obtain a page address prefix of the first page address, wherein the page address prefix is used to identify a network protocol used by the first page address;
[0161] The second determining module is configured to determine that the first page is a page of the target type when the page address prefix matches a page address feature corresponding to the target type.
[0162] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. Figure 1 The hardware environment shown can be implemented through software or hardware, wherein the hardware environment includes a network environment.
[0163] According to another aspect of the embodiments of the present application, a storage medium is further provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of any of the page stack processing methods described above in the embodiments of the present application.
[0164] Optionally, in this embodiment, the above-mentioned storage medium may be located on at least one network device among the multiple network devices in the network shown in the above-mentioned embodiment.
[0165] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0166] S1, determining, based on a first page address of a first page to be opened, that the first page is a page of a target type, wherein the page of the target type is a page that is rendered alternately using two rendering engines;
[0167] S2, when two rendering engines have been respectively associated with two pages of the target type in the page stack, determining a first rendering engine from the two rendering engines, wherein the first rendering engine is the rendering engine associated with the page that is opened first of the two pages;
[0168] S3: Render the first page using the first rendering engine to jump to and display the first page.
[0169] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0170] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0171] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned page stack processing method is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0172] Figure 9 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Figure 9 As shown, it includes a processor 902, a communication interface 904, a memory 906 and a communication bus 908, wherein the processor 902, the communication interface 904 and the memory 906 communicate with each other through the communication bus 908, wherein,
[0173] Memory 906, for storing computer programs;
[0174] The processor 902 is configured to execute the computer program stored in the memory 906 to implement the following steps:
[0175] S1, determining, based on a first page address of a first page to be opened, that the first page is a page of a target type, wherein the page of the target type is a page that is rendered alternately using two rendering engines;
[0176] S2, when two rendering engines have been respectively associated with two pages of the target type in the page stack, determining a first rendering engine from the two rendering engines, wherein the first rendering engine is the rendering engine associated with the page that is opened first of the two pages;
[0177] S3: Render the first page using the first rendering engine to jump to and display the first page.
[0178] Optionally, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 9 The communication interface is used for communication between the electronic device and other devices.
[0179] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Alternatively, the memory may also be at least one storage device located away from the aforementioned processor.
[0180] As an example, the memory 906 may include, but is not limited to, the first determination unit 802, the second determination unit 804, and the first rendering unit 806 in the page stack processing device. Furthermore, the memory 906 may also include, but is not limited to, other module units in the page stack processing device, which will not be described in detail in this example.
[0181] The above-mentioned processor can be a general-purpose processor, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0182] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0183] It can be understood by those skilled in the art that Figure 9 The structure shown is for illustration only. The device for implementing the above page stack processing method may be a terminal device, such as a smart phone, tablet computer, PDA, MID, PAD or other terminal devices. Figure 9 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 9 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 9 Different configurations shown.
[0184] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0185] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0186] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above-mentioned computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application.
[0187] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0188] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, and can be electrical or other forms.
[0189] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected based on actual needs to achieve the purpose of the solution provided in this embodiment.
[0190] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0191] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for processing a page stack, characterized in that: include: Determining, according to a first page address of a first page to be opened, that the first page is a page of a target type, wherein the page of the target type is a page rendered alternately using two rendering engines; If the two rendering engines have been associated with two pages of the target type in the page stack, respectively, determining a first rendering engine from the two rendering engines, wherein the first rendering engine is the rendering engine associated with the page that is opened first among the two pages; Rendering the first page using the first rendering engine to jump to and display the first page; determining, according to a second page address of a second page to be closed, that the second page is a page of the target type, wherein the second page is a page associated with a third rendering engine of the two rendering engines, and the third rendering engine is one of the two rendering engines; Searching for each page in the page stack in sequence along a target direction, wherein the target direction is a direction from the top of the page stack to the bottom of the page stack; Determine the first page of the target type that is not associated with any of the two rendering engines as the third page; If a third page of the target type that is not associated with either of the two rendering engines exists in the page stack, the association between the third rendering engine and the second page is disassociated, and an association between the third rendering engine and the third page is established, wherein the association between the third rendering engine and the second page is disassociated by deleting the page address of the second page recorded in the third rendering engine, and the association between the third rendering engine and the third page is established by recording the page address of the third page in the third rendering engine.
2. The method according to claim 1, characterized in that Determining a first rendering engine from the two rendering engines includes: Searching for each page in the page stack in sequence along a target direction, wherein the target direction is a direction from the top of the page stack to the bottom of the page stack; In a case where the two pages of the target type are found in the page stack, the rendering engine of the two rendering engines that is associated with the later found page of the two pages is determined as the first rendering engine.
3. The method according to claim 1, characterized in that After determining, based on the first page address of the first page to be opened, that the first page is a page of the target type, the method further includes: If one of the two rendering engines is not associated with a page of the target type in the page stack, determining a second rendering engine from the two rendering engines, wherein the second rendering engine is a rendering engine not associated with a page in the page stack; The first page is rendered using the second rendering engine to jump to and display the first page.
4. The method according to claim 1, wherein The rendering of the first page using the first rendering engine includes: Disassociation between the first rendering engine and the page that is opened first among the two pages; An association is established between the first rendering engine and the first page, wherein the first rendering engine after the association is established is used to render the first page.
5. The method according to any one of claims 1 to 4, characterized in that The determining, based on the first page address of the first page to be opened, that the first page is a page of the target type includes: Parsing the first page address to obtain a page address prefix of the first page address, wherein the page address prefix is used to identify a network protocol used by the first page address; In a case where the page address prefix matches a page address feature corresponding to the target type, the first page is determined to be a page of the target type.
6. A page stack processing device, characterized in that: include: a first determining unit, configured to determine, based on a page address identifier of a first page to be opened, that the first page is a page of a target type, wherein the page of the target type is a page rendered alternately using two rendering engines; a second determining unit configured to, when each of the two rendering engines is associated with a page of the target type in the page stack, determine a first rendering engine from the two rendering engines, wherein the first rendering engine is the rendering engine corresponding to the page that is opened first among the two pages; a first rendering unit, configured to render the first page using the first rendering engine, so as to jump to displaying the first page; The apparatus further includes: a fourth determining unit configured to determine, after rendering the first page using the first rendering engine, that the second page is a page of the target type based on the second page address of the second page to be closed, wherein the second page is a page associated with a third rendering engine of the two rendering engines, and the third rendering engine is one of the two rendering engines; a searching unit configured to search for each page in the page stack in sequence along a target direction after determining, based on the second page address of the second page to be closed, that the second page is a page of the target type, wherein the target direction is a direction from the top of the page stack to the bottom of the page stack; a fifth determining unit configured to determine, as the third page, a first page of the target type found that is not associated with either of the two rendering engines; a releasing unit configured to release the association between the third rendering engine and the second page if a third page of the target type not associated with either of the two rendering engines exists in the page stack; and an establishing unit configured to establish an association between the third rendering engine and the third page; wherein the association between the third rendering engine and the second page is released by deleting the page address of the second page recorded in the third rendering engine, and the association between the third rendering engine and the third page is established by recording the page address of the third page in the third rendering engine.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 5 when executed.
8. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 5 through the computer program.
Citation Information
Patent Citations
Page jumping method and device, electronic equipment and storage medium
CN112905933A