CN117972242A - Page automatic rendering method based on sharing engine and network attached storage device - Google Patents
Page automatic rendering method based on sharing engine and network attached storage device Download PDFInfo
- Publication number
- CN117972242A CN117972242A CN202311826170.0A CN202311826170A CN117972242A CN 117972242 A CN117972242 A CN 117972242A CN 202311826170 A CN202311826170 A CN 202311826170A CN 117972242 A CN117972242 A CN 117972242A
- Authority
- CN
- China
- Prior art keywords
- page
- target
- engine
- switching
- route
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000009877 rendering Methods 0.000 title claims abstract description 72
- 238000000034 method Methods 0.000 title claims abstract description 57
- 238000004883 computer application Methods 0.000 claims description 3
- 230000009286 beneficial effect Effects 0.000 abstract description 18
- 238000010586 diagram Methods 0.000 description 11
- 238000004590 computer program Methods 0.000 description 3
- 230000000903 blocking effect Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a page automatic rendering method based on a sharing engine and a network attached storage device, wherein the method comprises the following steps: after the current application is started, and when the page switching instruction of the current application is detected to be received, determining a target route required for switching to the target page according to the page switching instruction, and switching to the target page through the target route; according to a preset engine identification, searching a page engine matched with a target page from a preset key value pair container, and binding the page engine with the target page so as to render the target page through the page engine; and the page engines binding with the target page each time are the same. Therefore, the method and the device can realize quick starting and quick rendering of each target page by sharing the same page engine by a plurality of target pages, thereby being beneficial to improving the display efficiency of the target pages and improving the browsing experience of users on the target pages.
Description
Technical Field
The invention relates to the technical field of page rendering, in particular to an automatic page rendering method based on a shared engine and network attached storage equipment.
Background
Based on the continual development of Flutter (mobile application development framework) technology applications, users have increasingly higher demands on the rendering of Flutter pages. Because of the complex user requirements, it is often necessary to nest native interfaces between Flutter pages, resulting in the presence within the interface container: flutter pages, native pages, and Flutter pages. However, due to the design limitation of Flutter engines, each Flutter page is rendered by a corresponding independent engine, and the Flutter engine is long in loading time and large in memory consumption, and often causes a phenomenon of page jump delay, so that the use experience of a user is affected.
It can be seen that it is particularly important to provide a method that can increase the rendering rate of Flutter pages.
Disclosure of Invention
The invention provides an automatic page rendering method based on a shared engine and network attached storage equipment, which aims to solve the technical problem that the same page engine can be shared by a plurality of target pages to realize quick starting and quick rendering of each target page, so that the display efficiency of the target pages is improved, and the browsing experience of users on the target pages is improved.
In order to solve the technical problem, the first aspect of the invention discloses an automatic page rendering method based on a sharing engine, which comprises the following steps:
After the current application is started, and when the page switching instruction of the current application is detected to be received, determining a target route required for switching to a target page according to the page switching instruction, and switching to the target page through the target route;
according to a preset engine identification, searching a page engine matched with the target page from a preset key value pair container, and binding the page engine with the target page so as to render the target page through the page engine; and the page engines binding with the target page each time are the same.
As an optional implementation manner, in the first aspect of the present invention, after the current application is started, the method further includes:
Performing preloading operation on the page engine preset by the current application, and determining an engine identification of the page engine;
and caching the page engine into a preset key value list in a key value pair container based on the engine identification of the page engine.
In a first aspect of the present invention, the determining, according to the page switch instruction, a target route required for switching to a target page includes:
Determining the page switching type to which the page switching instruction belongs according to the page switching instruction; the page switching type comprises page switching types under a plurality of different components or page switching types under the same component;
When the page switching type to which the page switching instruction belongs comprises the page switching types under the plurality of different components, determining a target route required for switching to a target page as a first-stage route;
And when the page switching type to which the page switching instruction belongs comprises the page switching type under the same component, determining a target route required for switching to the target page as a second-stage route.
As an optional implementation manner, in the first aspect of the present invention, the page switch type under the same component includes a page entry type under the same component or a page rollback type under the same component;
the switching to the target page through the target route includes:
when the target route is the second-stage route and the page switching type to which the page switching instruction belongs comprises the page entry type under the same component, determining a push instruction matched with the page switching instruction;
And executing a push operation on the page management stack of the second-stage route according to the push instruction so as to switch to the target page.
As an optional implementation manner, in the first aspect of the present invention, before the determining a push instruction that matches the page switch instruction, the method further includes:
judging whether a sending object corresponding to the page switching instruction has switching authority or not according to the page switching instruction, and if so, determining a first page management stack condition of the second-level route;
Judging whether the page management stack of the second-level route meets a stacking condition according to the condition of the first page management stack of the second-level route;
And triggering and executing the operation of determining the push instruction matched with the page switching instruction when judging that the page management stack of the second-stage route meets the push condition.
As an optional implementation manner, in the first aspect of the present invention, the switching to the target page through the target route further includes:
when the target route is the second-level route and the page switching type to which the page switching instruction belongs comprises the page rollback type under the same component, determining a second page management stack condition of the second-level route;
Judging whether the page management stack of the second-level route meets the pop-up condition according to the condition of the second page management stack of the second-level route;
when judging that the page management stack of the second-level route meets the pop-up condition, determining a pop-up instruction matched with the page switching instruction;
And executing a pop operation on the page management stack of the second-level route according to the pop instruction so as to switch to the target page.
In an optional implementation manner, in a first aspect of the present invention, the determining, according to a second page management stack condition of the second level route, whether the page management stack of the second level route meets a pop condition includes:
Judging whether the current page of the current application is the last page in the second-level route according to the second page management stack condition of the second-level route;
When judging that the current page of the current application is the last page in the second-level route, determining that a page management stack of the second-level route does not meet a pop-up condition;
And when judging that the current page of the current application is not the last page in the second-level route, determining that a page management stack of the second-level route meets the pop-up condition.
The invention discloses an automatic page rendering device based on a sharing engine in a second aspect, which comprises:
The first determining module is used for determining a target route required by switching to a target page according to the page switching instruction after the current application is started and when the page switching instruction of the current application is detected to be received;
the switching module is used for switching to the target page through the target route;
The searching module is used for searching a page engine matched with the target page from a preset key value pair container according to a preset engine identification, and binding the page engine with the target page so as to render the target page through the page engine; and the page engines binding with the target page each time are the same.
As an alternative embodiment, in the second aspect of the present invention, the apparatus further includes:
The pre-loading module is used for executing pre-loading operation on a page engine preset by the current application after the current application is started;
a second determining module, configured to determine an engine identifier of the page engine;
And the caching module is used for caching the page engine into a preset key value list in the key value pair container based on the engine identification of the page engine.
In a second aspect of the present invention, the method for determining the destination route required for switching to the destination page by the first determining module according to the page switching instruction specifically includes:
Determining the page switching type to which the page switching instruction belongs according to the page switching instruction; the page switching type comprises page switching types under a plurality of different components or page switching types under the same component;
When the page switching type to which the page switching instruction belongs comprises the page switching types under the plurality of different components, determining a target route required for switching to a target page as a first-stage route;
And when the page switching type to which the page switching instruction belongs comprises the page switching type under the same component, determining a target route required for switching to the target page as a second-stage route.
As an optional implementation manner, in the second aspect of the present invention, the page switch type under the same component includes a page entry type under the same component or a page rollback type under the same component;
The mode of switching to the target page by the switching module through the target route specifically comprises the following steps:
when the target route is the second-stage route and the page switching type to which the page switching instruction belongs comprises the page entry type under the same component, determining a push instruction matched with the page switching instruction;
And executing a push operation on the page management stack of the second-stage route according to the push instruction so as to switch to the target page.
As an optional implementation manner, in the second aspect of the present invention, the manner of switching, by the switching module, to the target page through the target route specifically further includes:
Before determining a push instruction matched with the page switching instruction, judging whether a sending object corresponding to the page switching instruction has switching authority according to the page switching instruction, and if so, determining a first page management stack condition of the second-level route;
Judging whether the page management stack of the second-level route meets a stacking condition according to the condition of the first page management stack of the second-level route;
And triggering and executing the operation of determining the push instruction matched with the page switching instruction when judging that the page management stack of the second-stage route meets the push condition.
As an optional implementation manner, in the second aspect of the present invention, the manner of switching, by the switching module, to the target page through the target route specifically further includes:
when the target route is the second-level route and the page switching type to which the page switching instruction belongs comprises the page rollback type under the same component, determining a second page management stack condition of the second-level route;
Judging whether the page management stack of the second-level route meets the pop-up condition according to the condition of the second page management stack of the second-level route;
when judging that the page management stack of the second-level route meets the pop-up condition, determining a pop-up instruction matched with the page switching instruction;
And executing a pop operation on the page management stack of the second-level route according to the pop instruction so as to switch to the target page.
In a second aspect of the present invention, the method for determining, by the switching module, whether the page management stack of the second level route meets the pop condition according to the second page management stack condition of the second level route specifically includes:
Judging whether the current page of the current application is the last page in the second-level route according to the second page management stack condition of the second-level route;
When judging that the current page of the current application is the last page in the second-level route, determining that a page management stack of the second-level route does not meet a pop-up condition;
And when judging that the current page of the current application is not the last page in the second-level route, determining that a page management stack of the second-level route meets the pop-up condition.
A third aspect of the present invention discloses an electronic device, including:
A memory storing executable program code;
A processor coupled to the memory;
The processor calls the executable program codes stored in the memory to execute the sharing engine-based page automatic rendering method disclosed in the first aspect of the invention.
A fourth aspect of the present invention discloses a network attached storage device configured with at least a display screen and having a memory storing executable program code;
A processor coupled to the memory;
The processor calls the executable program codes stored in the memory to execute the sharing engine-based page automatic rendering method disclosed in the first aspect of the invention.
A fifth aspect of the present invention discloses a computer storage medium storing computer instructions for performing the sharing engine-based automatic page rendering method disclosed in the first aspect of the present invention when the computer instructions are called.
A sixth aspect of the present invention discloses an automatic page rendering system based on a shared engine, the system comprising an electronic device disclosed in the third aspect of the present invention, and the electronic device being communicatively connected to a network-attached storage device disclosed in the fourth aspect of the present invention, the electronic device having installed therein a computer application capable of executing the method disclosed in the first aspect of the present invention.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
In the embodiment of the invention, after the current application is started, and when the page switching instruction of the current application is detected to be received, determining a target route required for switching to a target page according to the page switching instruction, and switching to the target page through the target route; according to a preset engine identification, searching a page engine matched with a target page from a preset key value pair container, and binding the page engine with the target page so as to render the target page through the page engine; and the page engines binding with the target page each time are the same. Therefore, the method and the device can realize quick starting and quick rendering of each target page by sharing the same page engine by a plurality of target pages, thereby being beneficial to improving the display efficiency of the target pages and improving the browsing experience of users on the target pages.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow diagram of an automatic page rendering method based on a shared engine according to an embodiment of the present invention;
FIG. 2 is a flow diagram of another method for automatically rendering pages based on a shared engine according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a page auto-rendering device based on a shared engine according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another page auto-rendering device based on a shared engine according to an embodiment of the present invention;
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention
FIG. 6 is a schematic diagram of a network attached storage device according to an embodiment of the present invention;
Fig. 7 is a schematic structural diagram of an automatic page rendering system based on a shared engine according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first, second and the like in the description and in the claims and in the above-described figures are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, article, or article that comprises a list of steps or elements is not limited to only those listed but may optionally include other steps or elements not listed or inherent to such process, method, article, or article.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The invention discloses an automatic page rendering method based on a shared engine and network attached storage equipment, which can realize the quick starting and quick rendering of each target page in a mode that a plurality of target pages share the same page engine, thereby being beneficial to improving the display efficiency of the target pages and further being beneficial to improving the browsing experience of users on the target pages.
Example 1
Referring to fig. 1, fig. 1 is a flow chart of an automatic page rendering method based on a sharing engine according to an embodiment of the present invention. The method for automatically rendering the page based on the sharing engine described in fig. 1 can be applied to rendering the page of the application programs of the intelligent computer, the intelligent mobile phone and other electronic devices, and the embodiment of the invention is not limited. Optionally, the method may be implemented by an automatic page rendering device, where the automatic page rendering device may be integrated in a computer, a mobile phone, or other electronic devices, or may be a local server or a cloud server for processing a page rendering flow, where embodiments of the present invention are not limited. As shown in fig. 1, the sharing engine-based page auto-rendering method may include the following operations:
101. After the current application is started, and when the page switching instruction of the current application is detected to be received, determining a target route required for switching to the target page according to the page switching instruction, and switching to the target page through the target route.
In the embodiment of the invention, namely after the current application is started, and when a page switching instruction which is triggered by a user and needs to switch the current page of the current application is detected, a target route is determined according to the page switching instruction, and then the current page is switched to the target page through the target route. Optionally, the page switching instruction may be a gesture control type, a voice control type, or the like page switching instruction. Further, the current page and each target page of the current application may be written using Dart, and a two-level route nesting mode may be designed in the portal component of the current application.
102. According to a preset engine identification, searching a page engine matched with the target page from a preset key value pair container, and binding the page engine and the target page so as to render the target page through the page engine.
In the embodiment of the invention, the page engines bound with the target page each time are the same or the same, i.e. the invention adopts a mode that a plurality of target pages (such as Flutter pages) share the same page engine, and after the current application is started and when the target page needs to be drawn, the target page is bound with the preheated page engine immediately so as to finish the drawing of the page interface. For example, if the current page of the current application is already bound to the page engine, and when the current page jumps to the native interface and then to the new page from the native interface, the page engine may be bound to the new page again to render the new page.
Therefore, the embodiment of the invention can realize the quick starting and quick rendering of each target page by sharing the same page engine by a plurality of target pages, thereby being beneficial to reducing the conditions of interface jump and blocking and large memory consumption, improving the display efficiency of the target pages and further being beneficial to improving the browsing experience of users on the target pages.
In an alternative embodiment, after the current application in step 101 is started, the method further includes:
the method comprises the steps of executing preloading operation on a page engine preset by current application, and determining an engine identification of the page engine;
based on the engine identification of the page engine, the page engine is cached into a preset key value list in the key value pair container.
In this alternative embodiment, after the current application is started, the preheated page engine is cached in the key value list instance in the key value pair container, and any page component is not bound, so that the page engine can be uniformly managed, and the page engine can be quickly bound with each target page when the binding is required subsequently. Alternatively, the engine identification of the page engine may include an engine ID, an engine name, and the like.
Therefore, the optional embodiment can preheat the page engine and cache the page engine in the key value pair container, so that the management efficiency of the page engine is improved, the binding efficiency between the page engine and each target page is improved, and the rendering and display efficiency of each target page is improved.
Example two
Referring to fig. 2, fig. 2 is a flow chart of another automatic page rendering method based on a sharing engine according to an embodiment of the invention. The method for automatically rendering the page based on the sharing engine described in fig. 2 can be applied to rendering the page of the application programs of the intelligent computer, the intelligent mobile phone and other electronic devices, and the embodiment of the invention is not limited. Optionally, the method may be implemented by an automatic page rendering device, where the automatic page rendering device may be integrated in a computer, a mobile phone, or other electronic devices, or may be a local server or a cloud server for processing a page rendering flow, where embodiments of the present invention are not limited. As shown in fig. 2, the sharing engine-based page auto-rendering method may include the following operations:
201. after the current application is started, and when the current application page switching instruction is detected to be received, determining the page switching type to which the page switching instruction belongs according to the page switching instruction.
In the embodiment of the invention, the page switching type includes page switching types under a plurality of different components or page switching types under the same component, for example, when a page switching instruction is used for indicating that a current page of a current application is switched to a module page (such as a user module, a browsing recording module, a setting module and the like) with dissimilar page component architecture, the page switching type to which the page switching instruction belongs is the page switching type under the plurality of different components; when the page switching instruction is used for indicating to switch from the current page of the current application to a display page with similar page component architecture under a certain module (such as a user list page, a user detail page, a user editing page and the like with similar page component architecture under a user module), the page switching type to which the page switching instruction belongs is the page switching type under the same component. The page switching type under the same component comprises a page entering type under the same component or a page rollback type under the same component.
202. When the page switching type to which the page switching instruction belongs comprises the page switching types under a plurality of different components, determining a target route required for switching to the target page as a first-level route.
In the embodiment of the invention, the first-level routing is responsible for switching among pages under different page component architectures.
203. When the page switching type to which the page switching instruction belongs comprises the page switching type under the same component, determining a target route required for switching to the target page as a second-stage route.
In the embodiment of the invention, the second-level route is responsible for switching among pages with similar page component architecture, wherein the first-level route and the second-level route can be in a nested design.
204. And switching to the target page through the target route.
205. According to a preset engine identification, searching a page engine matched with the target page from a preset key value pair container, and binding the page engine and the target page so as to render the target page through the page engine.
In the embodiment of the present invention, for other descriptions of step 204 and step 205, please refer to the detailed descriptions of step 101 and step 102 in the first embodiment, and the detailed description of the embodiment of the present invention is omitted.
Therefore, by implementing the embodiment of the invention, the corresponding target route can be determined according to different page switching types to which the page switching instruction belongs, so that the reliability and the accuracy of determining the target route can be improved, the reliability and the accuracy of switching the target page through the target route can be further improved, and the timeliness of switching the target page by the target route can be improved.
In an alternative embodiment, the switching to the target page through the target route in step 204 includes:
When the target route is the second-level route and the page switching type to which the page switching instruction belongs comprises the page entry type under the same component, determining a push instruction matched with the page switching instruction;
and executing a push operation on the page management stack of the second-level route according to the push instruction so as to switch to the target page.
In this alternative embodiment, for example, after the user enters the page managed by the first level route, the second level route loads each default page, and then when the user needs to jump to the default page in the first level route, the automatic page rendering device pushes the default page in the page management stack of the second level route, so as to implement the switching process of the target page.
Further, before determining the push instruction matching the page switch instruction, the method further includes:
Judging whether a sending object corresponding to the page switching instruction has switching authority according to the page switching instruction, and if so, determining the condition of a first page management stack of a second-level route;
judging whether the page management stack of the second-level route meets a stacking condition according to the condition of the first page management stack of the second-level route;
when judging that the page management stack of the second-level route meets the stacking condition, triggering the operation of executing the stacking instruction which is determined to be matched with the page switching instruction.
In this optional embodiment, determining, according to the first page management stack condition of the second level route, whether the page management stack of the second level route meets a push condition includes: judging whether the current page of the current application is the first page in the second-level route according to the condition of the first page management stack of the second-level route; when the judging result is yes, determining that the page management stack of the second-level route does not meet the stacking condition; and when the judging result is negative, determining that the page management stack of the second-level route meets the stacking condition.
Therefore, the optional embodiment not only can judge whether the page management stack of the second-level route meets the stacking condition according to the switching permission of the sending object and the condition of the first page management stack of the second-level route, but also can determine the stacking instruction matched with the page switching instruction according to the specific page switching type under the same component, thus being beneficial to improving the reliability, accuracy and effectiveness of the target page switching operation, further being beneficial to improving the rendering efficiency of the subsequent target page, and further being beneficial to improving the browsing experience of the user.
In yet another alternative embodiment, the switching to the target page through the target route in the step 204 further includes:
When the target route is a second-level route and the page switching type to which the page switching instruction belongs comprises a page rollback type under the same component, determining a second page management stack condition of the second-level route;
Judging whether the page management stack of the second-level route meets the pop-up condition according to the condition of the second page management stack of the second-level route;
When judging that the page management stack of the second-level route meets the pop-up condition, determining a pop-up instruction matched with the page switching instruction;
And according to the pop instruction, performing a pop operation on the page management stack of the second-level route so as to switch to the target page.
In this optional embodiment, further, according to the second page management stack condition of the second level route, determining whether the page management stack of the second level route meets the pop-up condition includes:
Judging whether the current page of the current application is the last page in the second-level route according to the second page management stack condition of the second-level route;
when the current page of the current application is judged to be the last page in the second-level route, determining that a page management stack of the second-level route does not meet a pop-up condition;
and when judging that the current page of the current application is not the last page in the second-level route, determining that the page management stack of the second-level route meets the pop-up condition.
In this alternative embodiment, for example, when the user performs the page returning operation or sideslips on the page managed by the second level route, it may be determined whether the pop is possible in the page management stack in the second level reason, if so, it may be determined that the page management stack of the second level route meets the pop condition, and may be directly switched to the target page to be returned, and if not, if the current page is displayed as the last page in the page management stack in the second level route, it may be determined that the pop condition is not met by the page management stack of the second level route.
Therefore, the optional embodiment not only can judge whether the page management stack of the second level route meets the pop-up condition according to the condition of the second page management stack of the second level route, but also can determine the pop-up instruction matched with the page switching instruction according to the specific page switching type under the same component, thus being beneficial to further improving the reliability, accuracy and effectiveness of the target page switching operation, further being beneficial to further improving the rendering efficiency of the target page, and further being beneficial to further improving the browsing experience of a user.
Example III
Referring to fig. 3, fig. 3 is a schematic structural diagram of an automatic page rendering device based on a sharing engine according to an embodiment of the present invention. As shown in fig. 3, the sharing engine-based page auto-rendering apparatus may include:
the first determining module 301 is configured to determine, after the current application is started, and when it is detected that a page switching instruction of the current application is received, a target route required for switching to a target page according to the page switching instruction;
A switching module 302, configured to switch to a target page through a target route;
The searching module 303 is configured to search, according to a preset engine identifier, a page engine that matches with the target page from the preset key value pair container, and bind the page engine with the target page, so as to render the target page through the page engine.
In the embodiment of the invention, the page engines bound with the target page at each time are the same or can be the same.
Therefore, the automatic page rendering device based on the shared engine described in fig. 3 can realize the quick start and quick rendering of each target page by sharing the same page engine with a plurality of target pages, thereby being beneficial to reducing the occurrence of interface jump and blocking and large memory consumption, improving the display efficiency of the target pages, and further being beneficial to improving the browsing experience of users on the target pages.
In an alternative embodiment, the apparatus further comprises:
The preloading module 304 is configured to execute a preloading operation on a page engine preset for a current application after the current application is started;
A second determining module 305, configured to determine an engine identifier of the page engine;
the caching module 306 is configured to cache the page engine into a preset key value list in the key value pair container based on the engine identifier of the page engine.
Therefore, implementing the shared engine-based automatic page rendering device described in fig. 4 can preheat the page engine and cache the page engine in the key value pair container, which is beneficial to improving the management efficiency of the page engine, and further beneficial to improving the binding efficiency between the page engine and each target page, and further beneficial to improving the rendering and display efficiency of each target page.
In another alternative embodiment, the first determining module 301 determines, according to the page switch instruction, a target route required for switching to the target page specifically includes:
determining the page switching type to which the page switching instruction belongs according to the page switching instruction; the page switching type comprises page switching types under a plurality of different components or page switching types under the same component;
when the page switching type to which the page switching instruction belongs comprises the page switching types under a plurality of different components, determining a target route required for switching to a target page as a first-stage route;
When the page switching type to which the page switching instruction belongs comprises the page switching type under the same component, determining a target route required for switching to the target page as a second-stage route.
Therefore, implementing the shared engine-based automatic page rendering device described in fig. 4 can determine the corresponding target route according to different page switching types to which the page switching instruction belongs, so that the reliability and accuracy of determining the target route can be improved, the reliability and accuracy of switching the target page through the target route can be further improved, and the timeliness of switching the target page by the target route can be improved.
In yet another alternative embodiment, the page switch type under the same component includes a page entry type under the same component or a page rollback type under the same component;
The manner of switching to the target page by the switching module 302 through the target route specifically includes:
When the target route is the second-level route and the page switching type to which the page switching instruction belongs comprises the page entry type under the same component, determining a push instruction matched with the page switching instruction;
and executing a push operation on the page management stack of the second-level route according to the push instruction so as to switch to the target page.
Further, as an optional implementation manner, the switching module 302 switches to the target page through the target route specifically further includes:
Before determining a push instruction matched with a page switching instruction, judging whether a sending object corresponding to the page switching instruction has switching authority according to the page switching instruction, and if so, determining a first page management stack condition of a second-level route;
judging whether the page management stack of the second-level route meets a stacking condition according to the condition of the first page management stack of the second-level route;
when judging that the page management stack of the second-level route meets the stacking condition, triggering the operation of executing the stacking instruction which is determined to be matched with the page switching instruction.
Therefore, the automatic page rendering device based on the shared engine described in fig. 4 can determine whether the page management stack of the second level route meets the stacking condition according to the switching authority of the sending object and the condition of the first page management stack of the second level route, and can determine the stacking instruction matched with the page switching instruction according to the specific page switching type under the same component, so that the reliability, accuracy and effectiveness of the target page switching operation are improved, the rendering efficiency of the target page is improved, and the browsing experience of a user is improved.
In yet another alternative embodiment, the manner of switching to the target page by the switching module 302 through the target route specifically further includes:
When the target route is a second-level route and the page switching type to which the page switching instruction belongs comprises a page rollback type under the same component, determining a second page management stack condition of the second-level route;
Judging whether the page management stack of the second-level route meets the pop-up condition according to the condition of the second page management stack of the second-level route;
When judging that the page management stack of the second-level route meets the pop-up condition, determining a pop-up instruction matched with the page switching instruction;
And according to the pop instruction, performing a pop operation on the page management stack of the second-level route so as to switch to the target page.
Further, as an optional implementation manner, the manner in which the switching module 302 determines whether the page management stack of the second level route meets the pop condition according to the second page management stack condition of the second level route specifically includes:
Judging whether the current page of the current application is the last page in the second-level route according to the second page management stack condition of the second-level route;
when the current page of the current application is judged to be the last page in the second-level route, determining that a page management stack of the second-level route does not meet a pop-up condition;
and when judging that the current page of the current application is not the last page in the second-level route, determining that the page management stack of the second-level route meets the pop-up condition.
Therefore, the automatic page rendering device based on the shared engine described in fig. 4 can determine whether the page management stack of the second level route meets the pop-up condition according to the second page management stack condition of the second level route, and can determine the pop-up instruction matched with the page switching instruction according to the specific page switching type under the same component, so that the reliability, accuracy and effectiveness of the target page switching operation can be further improved, the subsequent rendering efficiency of the target page can be further improved, and the browsing experience of a user can be further improved.
Example IV
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the invention. As shown in fig. 5, the electronic device may include:
a memory 401 storing executable program codes;
A processor 402 coupled with the memory 401;
The processor 402 invokes executable program codes stored in the memory 401 to perform the steps in the shared engine-based page auto-rendering method described in the first or second embodiment of the present invention.
In the embodiment of the present invention, optionally, the electronic device may be a smart phone, a smart computer, a tablet device, a smart television, or a device capable of being installed with a memory storing executable program codes and a processor coupled to the memory, where the executable program codes may access a network attached storage device, and then execute the steps in the method described in the first embodiment or the second embodiment of the present invention.
Example five
Referring to fig. 6, fig. 6 is a schematic structural diagram of a network attached storage device according to an embodiment of the present invention. As shown in fig. 6, the network attached storage device is configured with at least a display screen 503 and the network attached storage device stores a memory 501 of executable program code;
a processor 502 coupled to the memory 501;
The processor 502 invokes executable program code stored in the memory 501 to perform the steps in the shared engine-based page auto-rendering method described in the first or second embodiment of the present invention.
In the embodiment of the invention, after the corresponding client is installed on the network-attached storage device, the user can operate the network-attached storage device through the configured display screen, wherein the display screen can be externally connected or directly configured on the network-attached storage device.
Example six
The embodiment of the invention discloses a computer storage medium which stores computer instructions for executing the steps in the sharing engine-based page automatic rendering method described in the first or second embodiment of the invention when the computer instructions are called.
Example seven
Referring to fig. 7, fig. 7 is a schematic structural diagram of an automatic page rendering system based on a sharing engine according to an embodiment of the present invention. As shown in fig. 7, the system includes an electronic device 601 disclosed in a fourth embodiment of the present invention, and the electronic device 601 is communicatively connected to a network attached storage device 602 disclosed in a fifth embodiment of the present invention, where a computer application capable of executing the method described in the first embodiment of the present invention or the second embodiment of the present invention is installed in the electronic device 601.
Example eight
An embodiment of the present invention discloses a computer program product comprising a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the shared engine-based page auto-rendering method described in the first or second embodiment.
The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above detailed description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product that may be stored in a computer-readable storage medium including Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), one-time programmable Read-Only Memory (OTPROM), electrically erasable programmable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disc Memory, magnetic disc Memory, tape Memory, or any other medium that can be used for computer-readable carrying or storing data.
Finally, it should be noted that: the embodiment of the invention discloses an automatic page rendering method based on a shared engine and network attached storage equipment, which are disclosed by the embodiment of the invention only as the preferred embodiment of the invention, and are only used for illustrating the technical scheme of the invention, but not limiting the technical scheme; although the invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that; the technical scheme recorded in the various embodiments can be modified or part of technical features in the technical scheme can be replaced equivalently; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.
Claims (12)
1. A method for automatically rendering pages based on a shared engine, the method comprising:
After the current application is started, and when the page switching instruction of the current application is detected to be received, determining a target route required for switching to a target page according to the page switching instruction, and switching to the target page through the target route;
according to a preset engine identification, searching a page engine matched with the target page from a preset key value pair container, and binding the page engine with the target page so as to render the target page through the page engine; and the page engines binding with the target page each time are the same.
2. The shared engine-based page auto-rendering method of claim 1, further comprising, after the current application is started, the steps of:
Performing preloading operation on the page engine preset by the current application, and determining an engine identification of the page engine;
and caching the page engine into a preset key value list in a key value pair container based on the engine identification of the page engine.
3. The method for automatically rendering pages based on a shared engine according to claim 1 or 2, wherein the determining the target route required for switching to the target page according to the page switching instruction comprises:
Determining the page switching type to which the page switching instruction belongs according to the page switching instruction; the page switching type comprises page switching types under a plurality of different components or page switching types under the same component;
When the page switching type to which the page switching instruction belongs comprises the page switching types under the plurality of different components, determining a target route required for switching to a target page as a first-stage route;
And when the page switching type to which the page switching instruction belongs comprises the page switching type under the same component, determining a target route required for switching to the target page as a second-stage route.
4. The automatic page rendering method based on the shared engine according to claim 3, wherein the page switching type under the same component includes a page entry type under the same component or a page rollback type under the same component;
the switching to the target page through the target route includes:
when the target route is the second-stage route and the page switching type to which the page switching instruction belongs comprises the page entry type under the same component, determining a push instruction matched with the page switching instruction;
And executing a push operation on the page management stack of the second-stage route according to the push instruction so as to switch to the target page.
5. The shared engine-based page auto-rendering method of claim 4, wherein prior to the determining a push instruction that matches the page switch instruction, the method further comprises:
judging whether a sending object corresponding to the page switching instruction has switching authority or not according to the page switching instruction, and if so, determining a first page management stack condition of the second-level route;
Judging whether the page management stack of the second-level route meets a stacking condition according to the condition of the first page management stack of the second-level route;
And triggering and executing the operation of determining the push instruction matched with the page switching instruction when judging that the page management stack of the second-stage route meets the push condition.
6. The sharing engine-based page auto-rendering method of claim 4 or 5, wherein the switching to the target page through the target route further comprises:
when the target route is the second-level route and the page switching type to which the page switching instruction belongs comprises the page rollback type under the same component, determining a second page management stack condition of the second-level route;
Judging whether the page management stack of the second-level route meets the pop-up condition according to the condition of the second page management stack of the second-level route;
when judging that the page management stack of the second-level route meets the pop-up condition, determining a pop-up instruction matched with the page switching instruction;
And executing a pop operation on the page management stack of the second-level route according to the pop instruction so as to switch to the target page.
7. The method for automatically rendering a page based on a shared engine according to claim 6, wherein the determining whether the page management stack of the second level route satisfies a pop condition according to the second page management stack condition of the second level route comprises:
Judging whether the current page of the current application is the last page in the second-level route according to the second page management stack condition of the second-level route;
When judging that the current page of the current application is the last page in the second-level route, determining that a page management stack of the second-level route does not meet a pop-up condition;
And when judging that the current page of the current application is not the last page in the second-level route, determining that a page management stack of the second-level route meets the pop-up condition.
8. An automatic page rendering device based on a shared engine, the device comprising:
The first determining module is used for determining a target route required by switching to a target page according to the page switching instruction after the current application is started and when the page switching instruction of the current application is detected to be received;
the switching module is used for switching to the target page through the target route;
The searching module is used for searching a page engine matched with the target page from a preset key value pair container according to a preset engine identification, and binding the page engine with the target page so as to render the target page through the page engine; and the page engines binding with the target page each time are the same.
9. An electronic device, the electronic device comprising:
A memory storing executable program code;
A processor coupled to the memory;
the processor invokes the executable program code stored in the memory to perform the shared engine-based automatic page rendering method of any of claims 1-7.
10. A network attached storage device, wherein the network attached storage device is configured with at least a display screen and the network attached storage device stores a memory of executable program code;
A processor coupled to the memory;
the processor invokes the executable program code stored in the memory to perform the shared engine-based automatic page rendering method of any of claims 1-7.
11. A computer storage medium storing computer instructions which, when invoked, are operable to perform the sharing engine based page auto-rendering method of any one of claims 1-7.
12. A shared engine-based automatic page rendering system, comprising an electronic device according to claim 9, communicatively coupled to a network-attached storage device according to claim 10, in which a computer application capable of performing the method according to any one of claims 1-7 is installed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311826170.0A CN117972242A (en) | 2023-12-27 | 2023-12-27 | Page automatic rendering method based on sharing engine and network attached storage device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311826170.0A CN117972242A (en) | 2023-12-27 | 2023-12-27 | Page automatic rendering method based on sharing engine and network attached storage device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117972242A true CN117972242A (en) | 2024-05-03 |
Family
ID=90865268
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311826170.0A Pending CN117972242A (en) | 2023-12-27 | 2023-12-27 | Page automatic rendering method based on sharing engine and network attached storage device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117972242A (en) |
-
2023
- 2023-12-27 CN CN202311826170.0A patent/CN117972242A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20160232374A1 (en) | Permission control method and apparatus | |
JP2019520624A (en) | Page component dynamic layout | |
CN110018858B (en) | Application management method and device based on voice control | |
CN110298194B (en) | File processing method, device, equipment and storage medium based on block chain | |
CN107247722B (en) | File scanning method and device and intelligent terminal | |
CN111291374B (en) | Application program detection method, device and equipment | |
CN112652302B (en) | Voice control method, device, terminal and storage medium | |
CN110069739B (en) | Page preloading method and device | |
CN111241040B (en) | Information acquisition method and device, electronic equipment and computer storage medium | |
CN111221634A (en) | Method, device and equipment for processing merging request and storage medium | |
US20170308546A1 (en) | File storage method and electronic device | |
CN111414207A (en) | Page construction method, device and equipment | |
CN111160029A (en) | Information processing method and device, electronic equipment and computer readable storage medium | |
CN108647102B (en) | Service request processing method and device of heterogeneous system and electronic equipment | |
CN103020186B (en) | A kind of document retrieval method based on embedded device, device and equipment | |
CN111814492A (en) | Translation method, terminal and computer storage medium | |
CN111125744B (en) | Code branch merging method, system, computer device and readable storage medium | |
CN117972242A (en) | Page automatic rendering method based on sharing engine and network attached storage device | |
CN112182446A (en) | Page display method and device, terminal equipment and computer readable storage medium | |
CN107704502B (en) | Routing method, device, equipment and system | |
CN112579938B (en) | Page loading method and device, storage medium and electronic equipment | |
CN108446144A (en) | A kind of application program launching method, device, terminal and storage medium | |
CN113885969A (en) | Embedded device, embedded software loading method and storage medium | |
CN107948936B (en) | Smart city roadside parking method and related product | |
CN111708715A (en) | Memory allocation method, memory allocation device and terminal equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |