CN114036431A - Page cache skipping method and device, electronic equipment and storage medium - Google Patents

Page cache skipping method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114036431A
CN114036431A CN202111514885.3A CN202111514885A CN114036431A CN 114036431 A CN114036431 A CN 114036431A CN 202111514885 A CN202111514885 A CN 202111514885A CN 114036431 A CN114036431 A CN 114036431A
Authority
CN
China
Prior art keywords
page
routing
route
transferred
position information
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
Application number
CN202111514885.3A
Other languages
Chinese (zh)
Inventor
童威
王高伟
王天翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202111514885.3A priority Critical patent/CN114036431A/en
Publication of CN114036431A publication Critical patent/CN114036431A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a page cache skipping method, a page cache skipping device, electronic equipment and a storage medium, wherein the page cache skipping method is applied to a progressive framework and comprises the following steps: when a page jump instruction is received, acquiring the rolling position information of a starting page, analyzing a jump function through a route guard, and acquiring a route object to be transferred; writing the rolling position information and the routing object to be transferred into a data storage space, and caching and displaying a transfer page corresponding to the jump function; when a page rollback instruction is received, analyzing a rollback function through a route guard to obtain a target route object; determining a route object to be transferred corresponding to the target route object from the data storage space, and acquiring rolling position information corresponding to the route object to be transferred; and loading a starting page corresponding to the target routing object according to the rolling position information. By the technical scheme of the embodiment of the invention, the effects of improving the compatibility and the confidentiality and increasing the page loading speed are realized.

Description

Page cache skipping method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of internet, in particular to a page cache skipping method and device, electronic equipment and a storage medium.
Background
The browser is usually built based on a front-end frame, and when a user browses a front-end webpage application, a scene of scrolling and component switching often exists. If the scrolling browsing for the page is not maintained and the corresponding cache is not performed during page loading, the user experience is affected to a certain extent and system pressure is caused at the front end and the back end. Therefore, there is a need to preserve the scrolling behavior and page content to avoid the problem of repeatedly rendering pages.
In the prior art, page scrolling record during self-defined route switching can be realized through a scrolling behavior control function provided by the Vue Router, but the Vue Router can only be used in a browser with history. The method can also be used for recording and storing the rolling behavior, but the method can also be used for viewing the content through a debugging tool, so that the problem of privacy disclosure can be caused.
Disclosure of Invention
The embodiment of the invention provides a page cache skipping method, a page cache skipping device, electronic equipment and a storage medium, and aims to achieve the technical effects of improving compatibility and confidentiality and increasing page loading speed.
In a first aspect, an embodiment of the present invention provides a page cache skipping method, where the method is applied in a progressive framework and includes:
when a page jump instruction is received, acquiring the rolling position information of a starting page, analyzing a jump function through a route guard, and acquiring a route object to be transferred;
writing the rolling position information and the routing object to be transferred into a data storage space, and caching and displaying a transfer page corresponding to the jump function; wherein, the data storage space is positioned in the memory;
when a page backspacing instruction is received, analyzing a backspacing function through the route guard to obtain a target route object;
determining a route object to be transferred corresponding to the target route object from the data storage space, and acquiring rolling position information corresponding to the route object to be transferred;
and loading a starting page corresponding to the target routing object according to the rolling position information.
In a second aspect, an embodiment of the present invention further provides a page buffer jumping device, where the device is configured in a progressive frame, and includes:
the route object to be transferred acquiring module is used for acquiring the rolling position information of the initial page when a page jump instruction is received, and analyzing a jump function through a route guard to acquire a route object to be transferred;
the data writing module is used for writing the rolling position information and the to-be-transferred routing object into a data storage space, and caching and displaying a transfer page corresponding to the jump function; wherein, the data storage space is positioned in the memory;
the target routing object acquisition module is used for analyzing the backspacing function through the routing guard when a page backspacing instruction is received, and acquiring a target routing object;
a rolling position information obtaining module, configured to determine, from the data storage space, a to-be-transferred route object corresponding to the target route object, and obtain rolling position information corresponding to the to-be-transferred route object;
and the page loading module is used for loading a starting page corresponding to the target routing object according to the rolling position information.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the page cache jump method according to any of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the page cache jump method according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, when a page jump instruction is received, the rolling position information of the initial page is obtained, the jump function is analyzed through the route guard, the route object to be transferred is obtained, the rolling position information and the route object to be transferred are written into the data storage space, the transfer page corresponding to the jump function is cached and displayed, and the information of the initial page is stored and the transfer page is jumped and displayed. When a page rollback instruction is received, a rollback function is analyzed through a routing guard to obtain a target routing object, a to-be-transferred routing object corresponding to the target routing object is determined from a data storage space, rolling position information corresponding to the to-be-transferred routing object is obtained, and an initial page corresponding to the target routing object is loaded according to the rolling position information, so that when a page is rolled back, rolling operation is executed, a page area corresponding to the rolling position information is displayed, the problems of poor compatibility and confidentiality and slow page jumping and loading speed are solved, the technical effects of improving compatibility and confidentiality and improving page loading speed are achieved.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flowchart of a page cache skipping method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a page cache skipping method according to a second embodiment of the present invention;
fig. 3 is a schematic flowchart of a page cache skipping method according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a page cache jump apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a page cache skipping method according to an embodiment of the present invention, where the page cache skipping method according to the embodiment of the present invention is applicable to a situation where a page is skipped back and forth in a browser, and the page cache skipping method may be executed by a page cache skipping apparatus, where the apparatus may be implemented in a form of software and/or hardware, and the hardware may be an electronic device, and optionally, the electronic device may be a mobile terminal, or the like.
As shown in fig. 1, the method of this embodiment specifically includes the following steps:
s110, when a page jump instruction is received, obtaining the rolling position information of the initial page, analyzing the jump function through the route guard, and obtaining the route object to be transferred.
The page jump instruction may be an instruction to leave the starting page to the transfer page, may be code for performing page transfer, and the like. The starting page may be the current page displayed by the browser. The transfer page may be the page to which it is desired to go. The scroll position information may be progress position information corresponding to a scroll bar of the starting page when the starting page is left. The route guard may be a function called at route switching to perform other operations when switching pages. The jump function may be a function for jumping pages, and parameters of the jump function may include routing information of a start page and a transfer page, and the like. The route object to be transferred may be a route object determined from the transfer page.
Specifically, when a page jump instruction is received, scroll position information is determined according to the current state of the starting page. And calling a routing guard to analyze a jump function corresponding to the page jump instruction and determine a to-be-transferred routing object corresponding to the transfer page to be jumped.
It should be noted that the page jump instruction may be an instruction generated when a user triggers some control on the starting page.
And S120, writing the rolling position information and the routing object to be transferred into a data storage space, and caching and displaying a transfer page corresponding to the jump function.
The data storage space is located in the memory, and the data storage space may be a memory space for storing the routing information, the page information, and the like.
Specifically, after the rolling position information and the route information to be transferred are acquired, the acquired information is stored in the data storage space. And caching data required by the transfer page, and displaying the transfer page through the cached data so that a user can see the transfer page on a browser.
S130, when a page rollback instruction is received, analyzing the rollback function through a route guard, and obtaining a target route object.
The page rollback instruction may be an instruction to rollback from a transfer page to a starting page, may be code for performing page rollback, and the like. The fallback function may be a function for the fallback page, and the parameters of the fallback function may include routing information of the start page and the transfer page, and the like. The target route object may be a route object determined from the start page.
Specifically, when a page rollback instruction is received, a routing guard is called to analyze a rollback function corresponding to the page rollback instruction, and a target routing object corresponding to a starting page to be rolled back is determined.
It should be noted that the rollback function and the transfer function may be the same or similar functions for page transfer and switching.
S140, determining a to-be-transferred routing object corresponding to the target routing object from the data storage space, and acquiring the rolling position information corresponding to the to-be-transferred routing object.
Specifically, a to-be-transferred routing object corresponding to the target routing object is determined from the to-be-transferred routing objects stored in the data storage space according to the target routing object, and the rolling position information corresponding to the determined to-be-transferred routing object is acquired in the data storage space.
And S150, loading a starting page corresponding to the target routing object according to the rolling position information.
Specifically, the data corresponding to the starting page cached before is acquired from the memory space, the starting page is loaded based on the acquired data, and the loaded starting page is displayed according to the scroll position information, so that the content when the starting page leaves before is displayed when the page is backed.
It should be noted that the technical solution of the present embodiment may be applied to a progressive frame, and the progressive frame may be Vue. Vue can be applied layer by layer from bottom to top, and the core library only focuses on the view layer, so that the integration with the third party library or the existing project is convenient, and the drive can be provided for the complex single-page application. The solution of this embodiment can be implemented based on Vuex, which is a state management model developed specifically for vue.
According to the technical scheme of the embodiment of the invention, when a page jump instruction is received, the rolling position information of the initial page is obtained, the jump function is analyzed through the route guard, the route object to be transferred is obtained, the rolling position information and the route object to be transferred are written into the data storage space, the transfer page corresponding to the jump function is cached and displayed, and the information of the initial page is stored and the transfer page is jumped and displayed. When a page rollback instruction is received, a rollback function is analyzed through a routing guard to obtain a target routing object, a to-be-transferred routing object corresponding to the target routing object is determined from a data storage space, rolling position information corresponding to the to-be-transferred routing object is obtained, and an initial page corresponding to the target routing object is loaded according to the rolling position information, so that when a page is rolled back, rolling operation is executed, a page area corresponding to the rolling position information is displayed, the problems of poor compatibility and confidentiality and slow page jumping and loading speed are solved, the technical effects of improving compatibility and confidentiality and improving page loading speed are achieved.
Example two
Fig. 2 is a schematic flow chart of a page cache skipping method according to a second embodiment of the present invention, and in this embodiment, reference may be made to the technical solution of this embodiment for an obtaining manner of a to-be-transferred route object, a data writing manner, an obtaining manner of a target route object, and a reloading display manner of a starting page on the basis of the above embodiments. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
As shown in fig. 2, the method of this embodiment specifically includes the following steps:
and S210, caching data of the initial page based on the switching and maintaining component.
Wherein, the switching holding component can be used for buffering other component data, thereby saving performance.
Specifically, after the initial page is loaded for the first time, the data of the initial page may be cached based on the switch holding component, so as to be called when the initial page is returned later.
Illustratively, the toggle hold component may be a < keep-alive > component provided by Vue for data caching of the starting page so that the initial page is cached after the first load is completed.
S220, when a page jump instruction is received, obtaining the rolling position information of the initial page.
And S230, intercepting the jump function through the route guard, analyzing the source parameter in the jump function, and taking the route object corresponding to the source parameter as the route object to be transferred.
The source parameter may be a parameter indicating a starting page in the jump function, and may be understood as a parameter indicating a source page of the page jump operation.
Specifically, before leaving the start page, the routing guard may intercept the jump function, analyze a source parameter in the jump function, determine parameter information corresponding to the source parameter, and use a routing object corresponding to the parameter information as a routing object to be transferred.
It should be noted that the route object may be a URL (Uniform Resource Locator). The route guardian may be the router. The origin parameter may be a from parameter or the like that indicates a route object for the leaving page.
S240, constructing a target routing tree object according to the routing meta information of the routing object to be transferred and the original routing tree object, writing the target routing tree object and the rolling position information into a data storage space, and caching and displaying a transfer page corresponding to the jump function.
The routing meta information may be related custom information of the routing object, and may include: page tags, whether a toggle hold component is included, etc. The original routing tree object can be a routing tree constructed based on historical page jumps, and can be a tree used for representing jump relations between different pages. The target routing tree object may be a routing tree updated based on the routing meta information of the to-be-transferred routing object corresponding to the current jump operation.
Specifically, the original routing tree object is obtained, and the original routing tree object is updated according to the routing meta-information of the routing object to be transferred, so as to obtain the target routing tree object. The target routing tree object can also be updated based on other parameters, such as the destination parameter, in the jump function corresponding to the routing object to be transferred. Further, the target routing tree object and the scroll position information may be written to a data storage space for subsequent fallback use. When the operation is executed or after the operation is executed, the transfer page corresponding to the jump function can be loaded and rendered on the browser page, and the data of the transfer page can be cached so as to be directly called when the page is re-entered.
And S250, intercepting the backspacing function through a route guard when a page backspacing instruction is received, analyzing the destination parameter in the backspacing function, and taking the routing object corresponding to the destination parameter as a target routing object.
The forward parameter may be a parameter indicating a desired page in the fallback function, and may be understood as a parameter indicating a forward page of a page fallback operation.
Specifically, before leaving the transfer page and returning to the start page, the route guard may intercept the return function, analyze the destination parameter in the return function, determine the parameter information corresponding to the destination parameter, and use the route object corresponding to the parameter information as the target route object.
It should be noted that the going parameter may be a parameter such as a to parameter indicating a routing object of the incoming page.
S260, retrieving the to-be-transferred routing object corresponding to the routing meta-information from the data storage space according to the routing meta-information of the target routing object, and acquiring the rolling position information corresponding to the to-be-transferred routing object according to the to-be-transferred routing object.
Specifically, the data storage space is searched according to the routing meta-information of the target routing object, the routing meta-information of each routing object to be transferred in the data storage space is matched with the routing meta-information of the target routing object, and the successfully matched routing object to be transferred is determined. And further, corresponding rolling position information can be acquired from the data storage space according to the retrieved to-be-transferred route object.
S270, loading a starting page corresponding to the target routing object from the cache according to the target routing object, and displaying the starting page based on the rolling position information.
Specifically, since the starting page is cached, the data of the starting page corresponding to the target route object may be called from the cache, and the starting page is loaded based on the data. Further, the display area of the home page is determined based on the scroll position information so that the same display area as that when the user leaves the home page can be displayed when the user moves back to the home page.
Alternatively, the scroll position information may be updated when the start page is again left. If the scroll position information is contained in the data storage space or other components, the scroll position information may be updated accordingly.
It should be noted that the start page and the transfer page are opposite and not one-way jumps, so the scroll position information corresponding to the transfer page may also be recorded, and the specific implementation steps may be the same as or similar to the above steps.
According to the technical scheme of the embodiment of the invention, the initial page is subjected to initial caching by caching data based on the switching holding component, when a page jump instruction is received, the rolling position information of the initial page is obtained, the jump function is intercepted by the route guard, the source parameter in the jump function is analyzed, and the route object corresponding to the source parameter is taken as the route object to be transferred so as to accurately determine the route object to be transferred. And constructing a target routing tree object according to the routing meta information of the routing object to be transferred and the original routing tree object, writing the target routing tree object and the rolling position information into a data storage space, caching and displaying a transfer page corresponding to the jump function, and storing the information of the initial page and jumping to display the transfer page. When a page rollback instruction is received, intercepting a rollback function through a route guard, analyzing a destination parameter in the rollback function, taking a route object corresponding to the destination parameter as a target route object, retrieving a to-be-transferred route object corresponding to route meta-information from a data storage space according to the route meta-information of the target route object, and acquiring rolling position information corresponding to the to-be-transferred route object according to the to-be-transferred route object. And loading a starting page corresponding to the target routing object from the cache according to the target routing object, displaying the starting page based on the rolling position information, executing rolling operation when the page is returned, and displaying a page area corresponding to the rolling position information.
EXAMPLE III
As an optional implementation of the foregoing embodiments, fig. 3 is a schematic flowchart of a page cache skipping method according to a third embodiment of the present invention. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
As shown in fig. 3, the method of this embodiment specifically includes the following steps:
1. under the condition that a user stays in the page A and then enters the page B to browse, a route guarder.
2. And calling a writing module, recording the routing information (the routing meta information of the routing object to be transferred) of the page A, constructing a routing tree (a target routing tree object), determining a rolling position (rolling position information), and storing the data in a data module.
3. While the user remains on page B, he can fall back to page a by performing a back operation.
4. Before page A is loaded, a route guardian router.
5. And calling an execution module, reading the rolling position recorded in the data module according to the analyzed routing information (target routing object), and setting a rolling behavior so as to roll to the rolling position when the page A is displayed.
The design of the relevant modules involved in the above steps is specifically set forth as follows:
route guard: the route meta-information may be custom information added for page routing, such as page title, whether keep-alive, etc. The caching of the page data can be realized by setting the routing meta information and matching the < keep-alive > tag. The route guardian may register by using router. When a navigation triggers, the call is made according to the creation sequence of the route guardian. In the parameter list of the function, to represents the target routing object to be entered, and from represents the routing object which is leaving currently, and the routing objects can be obtained by function analysis in the jump operation.
A data module: JavaScript allows for the dynamic addition of properties after object creation. Based on the characteristic, the data module dynamically constructs and stores the routing tree object by using the routing guard and the routing meta-information before storing the page rolling behaviors.
A writing module: obtaining a scrolling position by using a Window _ scroll attribute (a read-only scroll attribute of a Window interface returns the current vertical scrolling pixel number of the document) of the current page, and writing scrolling position information into a data module.
An execution module: by using the global preposed route guard, when the page is about to enter the target route, the target route meta-information is taken as a key word, corresponding data is retrieved from the cached rolling position information of the data module, and a rolling method is called, for example: scroll to method, a scrolling action is performed.
Compared with other global state storage schemes such as localStorage and sessionStorage, the technical scheme of the embodiment has the following advantages:
1. the privacy protection is stronger: since Vuex runs independently in memory in thread form, stored data cannot be viewed through a developer tool built into a browser in a production environment. However, the global state storage scheme of localStorage and sessionStorage can then view specific content by calling a developer tool.
2. The reading efficiency is higher: because Vuex runs in the memory and shares the life cycle with single-page application, the method has higher read-write efficiency compared with other storage modes based on browser cache.
3. The state storage of Vuex is responsive: when the component Vue reads the scroll position from the data module, if the scroll position changes, the corresponding other components will be updated accordingly. Therefore, any page can read the scrolling behavior of other pages, and the data can have consistency and higher expandability.
According to the technical scheme of the embodiment, page data caching is achieved through switching the retention components, the routing tree is dynamically constructed through the data module, the rolling position of the current page is stored according to needs through the writing module, the cached rolling behavior is set before the current page is rendered by utilizing the route guard of the global preposition according to the execution module, the problems of poor compatibility and confidentiality and the problems of slow page jumping and loading speed are solved through the modularized design and the rolling behavior caching scheme described in the detailed steps, the compatibility and confidentiality are improved, and the technical effect of improving the page loading speed is achieved.
Example four
Fig. 4 is a schematic structural diagram of a page buffer jumping apparatus according to a fourth embodiment of the present invention, where the apparatus is configured in a progressive frame, and includes: a to-be-transferred route object obtaining module 310, a data writing module 320, a target route object obtaining module 330, a rolling position information obtaining module 340, and a page loading module 350.
The module 310 for acquiring a route object to be transferred is configured to, when a page jump instruction is received, acquire rolling position information of a starting page, and analyze a jump function through a route guard to acquire the route object to be transferred; a data writing module 320, configured to write the rolling position information and the to-be-transferred route object into a data storage space, and cache and display a transfer page corresponding to the skip function; wherein, the data storage space is positioned in the memory; a target routing object obtaining module 330, configured to, when a page rollback instruction is received, analyze a rollback function through the routing guard, and obtain a target routing object; a rolling position information obtaining module 340, configured to determine, from the data storage space, a to-be-transferred routing object corresponding to the target routing object, and obtain rolling position information corresponding to the to-be-transferred routing object; and a page loading module 350, configured to load a start page corresponding to the target routing object according to the scroll position information.
Optionally, the apparatus further comprises: and the data caching module is used for caching data of the starting page based on the switching and maintaining component.
Optionally, the to-be-transferred route object obtaining module 310 is further configured to intercept the jump function through a route guard, analyze a source parameter in the jump function, and use a route object corresponding to the source parameter as the to-be-transferred route object.
Optionally, the data writing module 320 is further configured to construct a target routing tree object according to the routing meta information of the routing object to be transferred and the original routing tree object; and writing the target routing tree object and the rolling position information into a data storage space.
Optionally, the target routing object obtaining module 330 is further configured to intercept the fallback function through the route guard, analyze the destination parameter in the fallback function, and use a routing object corresponding to the destination parameter as the target routing object.
Optionally, the rolling position information obtaining module 340 is further configured to retrieve, according to the routing meta information of the target routing object, a to-be-transferred routing object corresponding to the routing meta information from the data storage space, and obtain, according to the to-be-transferred routing object, rolling position information corresponding to the to-be-transferred routing object.
Optionally, the page loading module 350 is further configured to load, according to the target routing object, a start page corresponding to the target routing object from the cache, and display the start page based on the scroll position information.
According to the technical scheme of the embodiment of the invention, when a page jump instruction is received, the rolling position information of the initial page is obtained, the jump function is analyzed through the route guard, the route object to be transferred is obtained, the rolling position information and the route object to be transferred are written into the data storage space, the transfer page corresponding to the jump function is cached and displayed, and the information of the initial page is stored and the transfer page is jumped and displayed. When a page rollback instruction is received, a rollback function is analyzed through a routing guard to obtain a target routing object, a to-be-transferred routing object corresponding to the target routing object is determined from a data storage space, rolling position information corresponding to the to-be-transferred routing object is obtained, and an initial page corresponding to the target routing object is loaded according to the rolling position information, so that when a page is rolled back, rolling operation is executed, a page area corresponding to the rolling position information is displayed, the problems of poor compatibility and confidentiality and slow page jumping and loading speed are solved, the technical effects of improving compatibility and confidentiality and improving page loading speed are achieved.
The page cache skipping device provided by the embodiment of the invention can execute the page cache skipping method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary electronic device 40 suitable for use in implementing embodiments of the present invention. The electronic device 40 shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 5, electronic device 40 is embodied in the form of a general purpose computing device. The components of electronic device 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 40 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 40 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)404 and/or cache memory 405. The electronic device 40 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 403 by one or more data media interfaces. System memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 408 having a set (at least one) of program modules 407 may be stored, for example, in system memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), with one or more devices that enable a user to interact with the electronic device 40, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 40 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Also, the electronic device 40 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 412. As shown, the network adapter 412 communicates with the other modules of the electronic device 40 over the bus 403. It should be appreciated that although not shown in FIG. 5, other hardware and/or software modules may be used in conjunction with electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing by running programs stored in the system memory 402, for example, implementing the page cache jump method provided by the embodiment of the present invention.
EXAMPLE six
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a page cache jump method, where the method is applied in a progressive framework, and includes:
when a page jump instruction is received, acquiring the rolling position information of a starting page, analyzing a jump function through a route guard, and acquiring a route object to be transferred;
writing the rolling position information and the routing object to be transferred into a data storage space, and caching and displaying a transfer page corresponding to the jump function; wherein, the data storage space is positioned in the memory;
when a page backspacing instruction is received, analyzing a backspacing function through the route guard to obtain a target route object;
determining a route object to be transferred corresponding to the target route object from the data storage space, and acquiring rolling position information corresponding to the route object to be transferred;
and loading a starting page corresponding to the target routing object according to the rolling position information.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A page cache skipping method is applied to a progressive framework and comprises the following steps:
when a page jump instruction is received, acquiring the rolling position information of a starting page, analyzing a jump function through a route guard, and acquiring a route object to be transferred;
writing the rolling position information and the routing object to be transferred into a data storage space, and caching and displaying a transfer page corresponding to the jump function; wherein, the data storage space is positioned in the memory;
when a page backspacing instruction is received, analyzing a backspacing function through the route guard to obtain a target route object;
determining a route object to be transferred corresponding to the target route object from the data storage space, and acquiring rolling position information corresponding to the route object to be transferred;
and loading a starting page corresponding to the target routing object according to the rolling position information.
2. The method of claim 1, further comprising:
and performing data caching on the starting page based on a switching and maintaining component.
3. The method of claim 1, wherein the parsing the jump function by the routing guard to obtain the routing object to be transferred comprises:
intercepting the jump function by route guard, analyzing the source parameter in the jump function, and taking the route object corresponding to the source parameter as the route object to be transferred.
4. The method of claim 1, wherein writing the scroll position information and the route object to be transferred into a data storage space comprises:
constructing a target routing tree object according to the routing meta-information of the routing object to be transferred and the original routing tree object;
and writing the target routing tree object and the rolling position information into a data storage space.
5. The method of claim 1, wherein the parsing the fallback function through the routing daemon to obtain the target routing object comprises:
intercepting a backspacing function through the route guard, analyzing a destination parameter in the backspacing function, and taking a route object corresponding to the destination parameter as a target route object.
6. The method of claim 1, wherein determining a route object to be transferred corresponding to the target route object from the data storage space, and obtaining the rolling position information corresponding to the route object to be transferred comprises:
and retrieving a to-be-transferred routing object corresponding to the routing meta-information from the data storage space according to the routing meta-information of the target routing object, and acquiring rolling position information corresponding to the to-be-transferred routing object according to the to-be-transferred routing object.
7. The method of claim 1, wherein loading a start page corresponding to the target routing object according to the scroll position information comprises:
and loading a starting page corresponding to the target routing object from the cache according to the target routing object, and displaying the starting page based on the rolling position information.
8. A page buffer jumping device, configured in a progressive frame, comprising:
the route object to be transferred acquiring module is used for acquiring the rolling position information of the initial page when a page jump instruction is received, and analyzing a jump function through a route guard to acquire a route object to be transferred;
the data writing module is used for writing the rolling position information and the to-be-transferred routing object into a data storage space, and caching and displaying a transfer page corresponding to the jump function; wherein, the data storage space is positioned in the memory;
the target routing object acquisition module is used for analyzing the backspacing function through the routing guard when a page backspacing instruction is received, and acquiring a target routing object;
a rolling position information obtaining module, configured to determine, from the data storage space, a to-be-transferred route object corresponding to the target route object, and obtain rolling position information corresponding to the to-be-transferred route object;
and the page loading module is used for loading a starting page corresponding to the target routing object according to the rolling position information.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the page cache jump method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a page cache jump method according to any one of claims 1 to 7.
CN202111514885.3A 2021-12-13 2021-12-13 Page cache skipping method and device, electronic equipment and storage medium Pending CN114036431A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111514885.3A CN114036431A (en) 2021-12-13 2021-12-13 Page cache skipping method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111514885.3A CN114036431A (en) 2021-12-13 2021-12-13 Page cache skipping method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114036431A true CN114036431A (en) 2022-02-11

Family

ID=80146656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111514885.3A Pending CN114036431A (en) 2021-12-13 2021-12-13 Page cache skipping method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114036431A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115544404A (en) * 2022-09-02 2022-12-30 北银金融科技有限责任公司 Dynamic caching method for H5 single-page application routing component

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115544404A (en) * 2022-09-02 2022-12-30 北银金融科技有限责任公司 Dynamic caching method for H5 single-page application routing component

Similar Documents

Publication Publication Date Title
CN106991154B (en) Webpage rendering method and device, terminal and server
CN109474847B (en) Search method, device and equipment based on video barrage content and storage medium
US20110119602A1 (en) Web server, web browser and web system
EP2755145A1 (en) Webpage browsing method and device, and storage medium
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN112612546A (en) Page loading method and device, electronic equipment and storage medium
CN111813465B (en) Information acquisition method, device, medium and equipment
CN112507259A (en) Webpage loading method and device, electronic equipment and storage medium
CN114741149B (en) Page switching method and device for single-page application, storage medium and electronic equipment
CN109885781B (en) Mixed page unified browsing method, device, equipment and storage medium
CN111913922B (en) Binary structured log generation method, device, equipment and storage medium
US11477158B2 (en) Method and apparatus for advertisement anti-blocking
CN112306594A (en) Rendering method and device based on mobile terminal and storage medium
CN114036431A (en) Page cache skipping method and device, electronic equipment and storage medium
CN113760894A (en) Data calling method and device, electronic equipment and storage medium
CN110717126A (en) Page browsing method and device, electronic equipment and computer readable storage medium
CN114461214A (en) Page display method and device, electronic equipment and storage medium
CN114647411A (en) Programming interface loading method and device, electronic equipment and storage medium
CN114528509A (en) Page display processing method and device, electronic equipment and storage medium
CN113885998A (en) Page rendering method and device, electronic equipment and storage medium
CN107749892B (en) Network reading method and device for conference record, intelligent tablet and storage medium
CN114048048A (en) Information sharing method and device, electronic equipment and storage medium
CN113961298A (en) Page switching method, device, equipment and medium
CN111506380A (en) Rendering method, device, equipment and storage medium
CN107741992B (en) Network storage method and device for conference records, intelligent tablet and storage medium

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