Page refresh processing method and device for multi-tab and processor

By setting up a separate refresh button and page mapping process in the multi-tab system, the problems of repeated resource loading and data loss when switching tabs are solved, and the switching speed and data integrity are improved.

CN116894130BActive Publication Date: 2025-10-14ZHONGKE YUNGU TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310779334.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-28
Publication Date
2025-10-14
Estimated Expiration
2043-06-28

AI Technical Summary

Technical Problem

When switching between multiple tabs, the existing technology requires re-downloading page resources and requesting interface data each time the tab is switched, resulting in a poor user experience. In addition, the state before the tab switch cannot be saved, affecting the switching speed and data integrity.

Method used

A multi-tab page refresh processing method is provided. By setting a separate refresh button on each tab, after obtaining the operation instruction, the corresponding child object is selected from the page mapping of the page common container, the route is updated and the page data is copied, the history and new child objects are traversed to determine the rendering and non-rendering objects, and the target tab page is refreshed.

Benefits of technology

Refreshing a single tab page does not affect the cached data of other tab pages, which improves the tab switching speed and eliminates the need to reload resources when switching, ensuring data integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116894130B_ABST
    Figure CN116894130B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a page refreshing processing method, device and processor for multiple tabs. The method comprises: obtaining an operation instruction of a user triggering a refresh button of any target tab; selecting a first sub-object corresponding to the target tab from a page mapping of a page public container according to the operation instruction, the first sub-object comprising first page data of a tab page corresponding to the target tab and a first tab route corresponding to the tab page; updating the first tab route and copying the first page data through a preset function to obtain an updated page mapping; traversing each second sub-object in a plurality of historical sub-objects and new sub-objects included in the updated page mapping to re-determine a first rendering object and a first non-rendering object of the tab page of the target tab according to a second tab route of each second sub-object; and refreshing the tab page of the target tab according to the first rendering object and the first non-rendering object to refresh the individual tab page.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a page refresh processing method, device, storage medium and processor for multiple tabs. Background Art

[0002] Currently, when switching between multiple tabs on a menu page, each tab switch requires re-downloading the page resources, re-requesting the interface data, and waiting for the page to load. Frequent switching between tabs can severely impact the user experience, as each switch requires waiting for the page to load. Furthermore, the state of the tab page before the tab switch cannot be saved. For example, when a user fills out a complex form, some data may require reference to data on other tab pages. If the user switches to another tab page to view the data and then switches back to the tab page, the previously entered data may be completely cleared and will need to be re-entered. Furthermore, if the data on a specific page needs to be updated, simply clicking the browser refresh button will clear all cached data, and some pages may not require reloading. If all caches are cleared, switching to a tab page that already has loaded resources will require re-requesting the resources.

[0003] Therefore, in the prior art, refreshing a certain tab page will affect the data of other tab pages. When switching the tab page again after refreshing, the data of the tab page needs to be reloaded, making it difficult to switch the tab page quickly. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a page refresh processing method, device, storage medium and processor for multiple tabs.

[0005] To achieve the above objectives, the first aspect of the present application provides a page refresh processing method for multiple tabs, wherein each tab has a separate refresh button, and each tab corresponds to a tab page, including:

[0006] Get the user's operation instruction to trigger the refresh button of any target tab;

[0007] Selecting, according to the operation instruction, a first sub-object corresponding to the target tab from a page mapping of a page common container, wherein the page common container is constructed based on a specific application framework, and the first sub-object includes first page data of a tab page corresponding to the target tab and a first tab route corresponding to the tab page;

[0008] Updating the first tab route and copying the first page data through a preset function to obtain a new sub-object, thereby obtaining an updated page mapping, wherein the updated page mapping includes multiple historical sub-objects and the new sub-object;

[0009] Traversing each second sub-object in the multiple historical sub-objects and the new sub-object to re-determine a first rendering object and a first non-rendering object of the tab page of the target tab according to the second tab route of each second sub-object;

[0010] Refresh the tab page of the target tab according to the first rendering object and the first non-rendering object.

[0011] In an embodiment of the present application, re-determining the first rendering object and the first non-rendering object of the tab page of the target tab according to the second tab route of each second sub-object includes: for any second sub-object, when the second tab route of the second sub-object is the same as the first tab route, determining the second sub-object as the first rendering object; for any second sub-object, when the second tab route of the second sub-object is different from the first tab route, adding a preset hidden flag to the second sub-object, and determining the second sub-object as the first non-rendering object of the tab page of the target tab.

[0012] In an embodiment of the present application, the page refresh processing method also includes: before obtaining the operation instruction of the user triggering the refresh button for any target tab, obtaining the first jump instruction triggered by the user for the target tab for the first time; determining the total number of sub-objects of the historical sub-objects in the page mapping of the page common container according to the first jump instruction, wherein each historical sub-object corresponds to a time identifier; when the cache identifier of the target tab is the first identifier, comparing the total number of sub-objects with a preset value; when the total number of sub-objects is greater than or equal to the preset value, eliminating the historical sub-objects with the earliest time identifier in all historical sub-objects; caching the first page data of the tab page corresponding to the target tab and the first tab route corresponding to the tab page of the target tab as the first sub-object to the page mapping.

[0013] In an embodiment of the present application, the page refresh processing method also includes: when the cache identifier of the target tab is the second identifier, traversing each historical sub-object in the page mapping to determine the second rendering object and the second non-rendering object of the tab page of the target tab according to the historical tab route of each historical sub-object; jumping from the previous tab page to the tab page of the target tab according to the second rendering object and the second non-rendering object.

[0014] In an embodiment of the present application, the page refresh processing method also includes: when the total number of sub-objects is less than a preset value, the first page data of the tab page corresponding to the target tab and the first tab route corresponding to the tab page of the target tab are cached as the first sub-object to the page mapping.

[0015] In an embodiment of the present application, the page refresh processing method further includes: after caching the first sub-object to the page mapping, traversing multiple historical sub-objects and the first sub-object in the page mapping after caching the first sub-object, so as to determine the second rendering object and the second non-rendering object of the tab page of the target tab according to the tab routing of each sub-object in the multiple historical sub-objects and the first sub-object; and jumping from the previous tab page to the tab page of the target tab according to the second rendering object and the second non-rendering object.

[0016] In an embodiment of the present application, the page refresh processing method further includes: obtaining a second jump instruction for the target tab triggered again by the user; obtaining a second rendering object and a second non-rendering object according to the second jump instruction; and jumping from the previous tab page to the tab page of the target tab according to the second rendering object and the second non-rendering object.

[0017] A second aspect of the present application provides a machine-readable storage medium having instructions stored thereon. When the instructions are executed by a processor, the processor is configured to execute the above-mentioned page refresh processing method for multiple tabs.

[0018] A third aspect of the present application provides a processor configured to execute the above-mentioned page refresh processing method for multiple tabs.

[0019] A fourth aspect of the present application provides a page refresh processing device for multiple tabs, including the above-mentioned processor.

[0020] Through the above technical solution, an operation instruction for triggering a refresh button for any target tab by a user is obtained, and according to the operation instruction, a first sub-object corresponding to the target tab is selected from the page mapping of the page common container, the first tab route is updated, and the first page data is copied through a preset function to obtain a new sub-object to obtain an updated page mapping, and multiple historical sub-objects and each second sub-object in the new sub-objects are traversed to re-determine the first rendering object and the first non-rendering object of the tab page of the target tab according to the second tab route of each second sub-object, and the tab page of the target tab is refreshed according to the first rendering object and the first non-rendering object. This allows refreshing a separate tab page without affecting the page cache data of other tab pages. After the refresh, the tab page is switched without reloading the page cache data of other tab pages, thereby further improving the tab switching speed.

[0021] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present application, but do not constitute a limitation of the embodiments of the present application. In the accompanying drawings:

[0023] Figure 1 The following is a schematic diagram showing a flow chart of a page refresh processing method for multiple tabs according to an embodiment of the present application;

[0024] Figure 2 The internal structure diagram of a computer device according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0025] To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0026] Figure 1 The following schematically shows a flow chart of a page refresh processing method for multiple tabs according to an embodiment of the present application. Figure 1 As shown, in one embodiment of the present application, a page refresh processing method for multiple tabs is provided, comprising the following steps:

[0027] Step 101: Obtain an operation instruction of a user triggering a refresh button for any target tab.

[0028] Step 102: Select the first sub-object corresponding to the target tab from the page mapping of the page common container according to the operation instruction, wherein the page common container is constructed based on a specific application framework, and the first sub-object includes the first page data of the tab page corresponding to the target tab and the first tab route corresponding to the tab page.

[0029] Step 103 : Update the first tab route, and copy the first page data through a preset function to obtain a new sub-object, so as to obtain an updated page mapping, wherein the updated page mapping includes multiple historical sub-objects and new sub-objects.

[0030] Step 104 : traverse each second sub-object in the multiple historical sub-objects and the new sub-object to re-determine the first rendering object and the first non-rendering object of the tab page of the target tab according to the second tab route of each second sub-object.

[0031] Step 105 : Refresh the tab page of the target tab according to the first rendering object and the first non-rendering object.

[0032] Each tab has a separate refresh button, and each tab corresponds to a tab page. The user can trigger the refresh button for any target tab, and the processor can obtain the operation instruction corresponding to the refresh button. Afterwards, the processor can select the first child object corresponding to the target tab from the page mapping of the page common container according to the operation instruction. Among them, the page common container is built based on a specific application framework. The specific application framework refers to umiJS. The page common container refers to BasicLayout. The page mapping is a map, which is a data structure that stores key-value pairs. Each key is unique, and the corresponding value can be quickly found through the key. The child object refers to the children in the props of BasicLayout. The first child object includes the first page data of the tab page corresponding to the target tab and the first tab route corresponding to the tab page. Among them, the first tab route can be used as the key of the map, and the first page data can be used as the value of the map. That is, the first child object can be stored in the map in the form of a key-value pair.

[0033] After selecting the first sub-object corresponding to the target tab, the processor can update the first tab route and copy the first page data through a preset function to obtain a new sub-object. That is, the first tab route of the first sub-object can be updated, while the first page data remains unchanged. Among them, the preset function refers to the cloneElement function of react. After obtaining the new sub-object, the page mapping will also be updated, and the updated page mapping can be obtained. Among them, the updated page mapping includes multiple historical sub-objects and the new sub-object. Then, the processor can traverse each second sub-object in the multiple historical sub-objects and the new sub-objects. Each second sub-object refers to each sub-object in the multiple historical sub-objects and the new sub-objects. At this time, the processor can re-determine the first rendering object and the first non-rendering object of the tab page of the target tab based on the second tab route of each second sub-object, and can refresh the tab page of the target tab based on the first rendering object and the first non-rendering object.

[0034] Through the above technical solution, an operation instruction for triggering a refresh button for any target tab by a user is obtained, and according to the operation instruction, a first sub-object corresponding to the target tab is selected from the page mapping of the page common container, the first tab route is updated, and the first page data is copied through a preset function to obtain a new sub-object to obtain an updated page mapping, and multiple historical sub-objects and each second sub-object in the new sub-objects are traversed to re-determine the first rendering object and the first non-rendering object of the tab page of the target tab according to the second tab route of each second sub-object, and the tab page of the target tab is refreshed according to the first rendering object and the first non-rendering object. This allows refreshing a separate tab page without affecting the page cache data of other tab pages. After the refresh, the tab page is switched without reloading the page cache data of other tab pages, thereby further improving the tab switching speed.

[0035] In one embodiment, re-determining the first rendering object and the first non-rendering object of the tab page of the target tab based on the second tab route of each second sub-object includes: for any second sub-object, when the second tab route of the second sub-object is the same as the first tab route, determining the second sub-object as the first rendering object; for any second sub-object, when the second tab route of the second sub-object is different from the first tab route, adding a preset hidden flag to the second sub-object, and determining the second sub-object as the first non-rendering object of the tab page of the target tab.

[0036] For any second child object, if the second tab route of the second child object is the same as the first tab route, the processor can determine that the second child object is the first rendering object. That is, the second child object needs to be rendered when the tab page of the target tab is refreshed. If the second tab route of the second child object is different from the first tab route, the processor can determine that the second child object is the first non-rendering object of the tab page of the target tab. That is, the second child object does not need to be rendered when the tab page of the target tab is refreshed. In this case, the processor can add a preset hidden flag to the second child object so as not to render the second child object when the tab page of the target tab is refreshed. The preset hidden flag is a style attribute of display: "none". For example, all children in the map can be rendered sequentially. If the key of the current children in the map is consistent with the browser's route, the children can be rendered normally. If the key of the current children in the map is inconsistent with the browser's route, a style attribute of display: "none" can be added to the children to hide the children.

[0037] In one embodiment, the page refresh processing method also includes: before obtaining the operation instruction of the user triggering the refresh button for any target tab, obtaining the first jump instruction triggered by the user for the target tab for the first time; determining the total number of sub-objects of the historical sub-objects in the page mapping of the page common container according to the first jump instruction, wherein each historical sub-object corresponds to a time identifier; when the cache identifier of the target tab is the first identifier, comparing the total number of sub-objects with a preset value; when the total number of sub-objects is greater than or equal to the preset value, eliminating the historical sub-objects with the earliest time identifier in all historical sub-objects; caching the first page data of the tab page corresponding to the target tab and the first tab route corresponding to the tab page of the target tab as the first sub-object to the page mapping.

[0038] Before obtaining the user's operation instruction to trigger the refresh button for any target tab, the processor can obtain the first jump instruction triggered by the user for the target tab for the first time. At this time, the processor can determine the total number of child objects of the historical child object in the page mapping of the page common container based on the first jump instruction. Each historical child object corresponds to a time identifier. For example, a storage variable for the timestamp can be added to value, expressed as (children, updateTime), where children refers to the child object and updateTime refers to the corresponding time identifier.

[0039] In the case where the cache identifier of the target tab is the first identifier, the target tab needs to be cached. At this time, the processor can compare the total number of sub-objects with the preset value. The preset value can be customized according to the actual situation. For example, the preset value can be 10. If the total number of sub-objects is greater than or equal to the preset value, it can be said that the page mapping has no location to store the first page data and the first tab route of the target tab. At this time, the processor can eliminate the historical sub-objects with the earliest time point as the time identifier in all historical sub-objects. Then, the processor can cache the first page data of the tab page corresponding to the target tab and the first tab route corresponding to the tab page of the target tab as the first sub-object to the page mapping.

[0040] In one embodiment, the page refresh processing method further includes: when the cache identifier of the target tab is the second identifier, traversing each historical sub-object in the page mapping to determine the second rendering object and the second non-rendering object of the tab page of the target tab according to the historical tab route of each historical sub-object; and jumping from the previous tab page to the tab page of the target tab according to the second rendering object and the second non-rendering object.

[0041] If the cache identifier of the target tab is the second identifier, then the target tab does not need to be cached. In this case, the processor can traverse each history sub-object in the page mapping to determine the second rendering object and the second non-rendering object of the target tab's tab page based on the history tab routing of each history sub-object. Furthermore, the processor can jump from the previous tab page to the target tab's tab page based on the second rendering object and the second non-rendering object.

[0042] In one embodiment, the page refresh processing method also includes: when the total number of sub-objects is less than a preset value, the first page data of the tab page corresponding to the target tab and the first tab route corresponding to the tab page of the target tab are cached as the first sub-object to the page mapping.

[0043] In the case where the cache identifier of the target tab is the first identifier, the target tab needs to be cached. At this time, the processor can compare the total number of sub-objects with the preset value. The preset value can be customized according to the actual situation. For example, the preset value can be 10. If the total number of sub-objects is less than the preset value, it can be said that the page mapping has a location to store the first page data and the first tab route of the target tab. At this time, the processor can directly cache the first page data of the tab page corresponding to the target tab and the first tab route corresponding to the tab page of the target tab as the first sub-object to the page mapping.

[0044] For example, if the maximum number of cached pages is 10, when opening a new tab, the system can determine whether the number of cached pages in the map exceeds 10. If so, the cached page with the earliest update time can be removed from the map, and the cached page data for the new tab can be added to the map. This method can control the maximum number of cached pages and prevent excessive cache counts from causing front-end memory overflow.

[0045] In one embodiment, the page refresh processing method further includes: after caching the first sub-object to the page mapping, traversing multiple historical sub-objects and the first sub-object in the page mapping after caching the first sub-object, so as to determine the second rendering object and the second non-rendering object of the tab page of the target tab according to the tab routing of each sub-object in the multiple historical sub-objects and the first sub-object; and jumping from the previous tab page to the tab page of the target tab according to the second rendering object and the second non-rendering object.

[0046] After caching the first sub-object to the page mapping, the processor can traverse the multiple historical sub-objects and the first sub-object in the page mapping after caching the first sub-object to determine the second rendering object and the second non-rendering object of the tab page of the target tab according to the tab route of each sub-object in the multiple historical sub-objects and the first sub-object. Then, the processor can jump from the previous tab page to the tab page of the target tab according to the second rendering object and the second non-rendering object. Through the above scheme, the first page data and the first tab route of the target tab are stored in the page mapping, and then the sub-object that meets the conditions is selected according to the route for rendering, thereby completing the jump of the tab page.

[0047] In one embodiment, the page refresh processing method further includes: obtaining a second jump instruction for the target tab triggered again by the user; obtaining a second rendering object and a second non-rendering object according to the second jump instruction; and jumping from the previous tab page to the tab page of the target tab according to the second rendering object and the second non-rendering object.

[0048] The user can trigger the second jump instruction for the target tab again, and the processor can obtain the second jump instruction and, based on the second jump instruction, obtain the second rendering object and the second non-rendering object corresponding to the target tab. Then, the processor can jump from the previous tab page to the tab page of the target tab based on the second rendering object and the second non-rendering object. Through the above solution, when switching the tab to a tab page that has already been loaded, the tab page can be quickly displayed and restored without reloading resources.

[0049] The above technical solution allows refreshing of a separate tab page without affecting the cached data of other tab pages. After refreshing, switching tab pages does not require reloading the cached data of other tab pages, further improving the speed of tab switching. Furthermore, the maximum number of page caches can be controlled to prevent excessive caches from causing front-end memory overflow. When switching to a tab page that has already been loaded, the tab page can be quickly displayed and restored without reloading resources.

[0050] Figure 1 FIG. 1 is a flow chart of a page refresh processing method for multiple tabs in one embodiment. It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0051] In one embodiment, a storage medium is provided, on which a program is stored. When the program is executed by a processor, the above-mentioned page refresh processing method for multiple tabs is implemented.

[0052] In one embodiment, a processor is provided, which is used to run a program, wherein the program executes the above-mentioned page refresh processing method for multiple tabs when running.

[0053] In one embodiment, a page refresh processing device for multiple tabs is provided, comprising the above-mentioned processor.

[0054] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 2 As shown. The computer device includes a processor A01, a network interface A02, a memory (not shown in the figure) and a database (not shown in the figure) connected via a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02 and a database (not shown in the figure). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A04. The database of the computer device is used to store data such as rendering objects and non-rendering objects. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program B02 is executed by the processor A01, it implements a page refresh processing method for multiple tabs.

[0055] Those skilled in the art will understand that Figure 2 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0056] An embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: obtaining an operation instruction for a user to trigger a refresh button for any target tab; selecting a first sub-object corresponding to the target tab from a page mapping of a page common container according to the operation instruction, wherein the page common container is constructed based on a specific application framework, and the first sub-object includes first page data of a tab page corresponding to the target tab and a first tab route corresponding to the tab page; updating the first tab route and copying the first page data through a preset function to obtain a new sub-object to obtain an updated page mapping, wherein the updated page mapping includes multiple historical sub-objects and a new sub-object; traversing each second sub-object in the multiple historical sub-objects and the new sub-objects to re-determine a first rendering object and a first non-rendering object of the tab page of the target tab according to the second tab route of each second sub-object; and refreshing the tab page of the target tab according to the first rendering object and the first non-rendering object.

[0057] In one embodiment, re-determining the first rendering object and the first non-rendering object of the tab page of the target tab based on the second tab route of each second sub-object includes: for any second sub-object, when the second tab route of the second sub-object is the same as the first tab route, determining the second sub-object as the first rendering object; for any second sub-object, when the second tab route of the second sub-object is different from the first tab route, adding a preset hidden flag to the second sub-object, and determining the second sub-object as the first non-rendering object of the tab page of the target tab.

[0058] In one embodiment, the page refresh processing method also includes: before obtaining the operation instruction of the user triggering the refresh button for any target tab, obtaining the first jump instruction triggered by the user for the target tab for the first time; determining the total number of sub-objects of the historical sub-objects in the page mapping of the page common container according to the first jump instruction, wherein each historical sub-object corresponds to a time identifier; when the cache identifier of the target tab is the first identifier, comparing the total number of sub-objects with a preset value; when the total number of sub-objects is greater than or equal to the preset value, eliminating the historical sub-objects with the earliest time identifier in all historical sub-objects; caching the first page data of the tab page corresponding to the target tab and the first tab route corresponding to the tab page of the target tab as the first sub-object to the page mapping.

[0059] In one embodiment, the page refresh processing method further includes: when the cache identifier of the target tab is the second identifier, traversing each historical sub-object in the page mapping to determine the second rendering object and the second non-rendering object of the tab page of the target tab according to the historical tab route of each historical sub-object; and jumping from the previous tab page to the tab page of the target tab according to the second rendering object and the second non-rendering object.

[0060] In one embodiment, the page refresh processing method also includes: when the total number of sub-objects is less than a preset value, the first page data of the tab page corresponding to the target tab and the first tab route corresponding to the tab page of the target tab are cached as the first sub-object to the page mapping.

[0061] In one embodiment, the page refresh processing method further includes: after caching the first sub-object to the page mapping, traversing multiple historical sub-objects and the first sub-object in the page mapping after caching the first sub-object, so as to determine the second rendering object and the second non-rendering object of the tab page of the target tab according to the tab routing of each sub-object in the multiple historical sub-objects and the first sub-object; and jumping from the previous tab page to the tab page of the target tab according to the second rendering object and the second non-rendering object.

[0062] In one embodiment, the page refresh processing method further includes: obtaining a second jump instruction for the target tab triggered again by the user; obtaining a second rendering object and a second non-rendering object according to the second jump instruction; and jumping from the previous tab page to the tab page of the target tab according to the second rendering object and the second non-rendering object.

[0063] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing the steps of a page refresh processing method for multiple tabs.

[0064] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0065] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0066] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0067] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0068] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0069] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0070] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0071] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0072] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A page refresh processing method for multiple tabs, characterized in that: Each tab has a separate refresh button, and each tab corresponds to a tab page. The page refresh processing method includes: Get the user's operation instruction to trigger the refresh button of any target tab; Selecting, according to the operation instruction, a first sub-object corresponding to the target tab from a page mapping of a page common container, wherein the page common container is constructed based on a specific application framework, and the first sub-object includes first page data of a tab page corresponding to the target tab and a first tab route corresponding to the tab page; Updating the first tab route and copying the first page data through a preset function to obtain a new sub-object, thereby obtaining an updated page mapping, wherein the updated page mapping includes multiple historical sub-objects and the new sub-object; Traversing each second sub-object in the multiple historical sub-objects and the new sub-object to redetermine a first rendering object and a first non-rendering object of the tab page of the target tab according to the second tab route of each second sub-object, wherein each second sub-object refers to each sub-object in the multiple historical sub-objects and the new sub-object; Refresh the tab page of the target tab according to the first rendering object and the first non-rendering object.

2. The page refresh processing method for multiple tabs according to claim 1, characterized in that: Re-determining the first rendering object and the first non-rendering object of the target tab page according to the second tab route of each second sub-object includes: For any second sub-object, if the second tab route of the second sub-object is the same as the first tab route, determine the second sub-object as the first rendering object; For any second sub-object, if the second tab route of the second sub-object is different from the first tab route, a preset hidden flag is added to the second sub-object, and the second sub-object is determined to be the first non-rendering object of the tab page of the target tab.

3. The page refresh processing method for multiple tabs according to claim 1, characterized in that: The page refresh processing method further includes: Before obtaining an operation instruction of a user triggering a refresh button for any target tab, obtaining a first jump instruction for the target tab triggered by the user for the first time; Determine the total number of sub-objects of the historical sub-object in the page mapping of the page common container according to the first jump instruction, wherein each historical sub-object corresponds to a time identifier; When the cache identifier of the target tab is the first identifier, comparing the total number of sub-objects with a preset value; When the total number of sub-objects is greater than or equal to the preset value, the historical sub-objects with the earliest time point as the time identifier among all historical sub-objects are eliminated; The first page data of the tab page corresponding to the target tab and the first tab route corresponding to the tab page of the target tab are cached as the first sub-object in the page mapping.

4. The page refresh processing method for multiple tabs according to claim 3, characterized in that: The page refresh processing method further includes: When the cache identifier of the target tab is the second identifier, traverse each history sub-object in the page mapping to determine a second rendering object and a second non-rendering object of the tab page of the target tab according to the history tab route of each history sub-object; Jump from the previous tab page to the tab page of the target tab according to the second rendering object and the second non-rendering object.

5. The page refresh processing method for multiple tabs according to claim 3, characterized in that: The page refresh processing method further includes: When the total number of sub-objects is less than the preset value, the first page data of the tab page corresponding to the target tab and the first tab route corresponding to the tab page of the target tab are cached as the first sub-objects to the page mapping.

6. The page refresh processing method for multiple tabs according to claim 5, characterized in that: The page refresh processing method further includes: After caching the first sub-object in the page mapping, traversing the plurality of historical sub-objects and the first sub-object in the page mapping after caching the first sub-object, to determine a second rendering object and a second non-rendering object of the tab page of the target tab according to the tab routing of each sub-object in the plurality of historical sub-objects and the first sub-object; Jump from the previous tab page to the tab page of the target tab according to the second rendering object and the second non-rendering object.

7. The page refresh processing method for multiple tabs according to claim 6, characterized in that: The page refresh processing method further includes: Obtaining a second jump instruction for the target tab triggered again by the user; acquiring the second rendering object and the second non-rendering object according to the second jump instruction; Jump from the previous tab page to the tab page of the target tab according to the second rendering object and the second non-rendering object.

8. A machine-readable storage medium having instructions stored thereon, characterized in that: When the instruction is executed by a processor, the processor is configured to execute the page refresh processing method for multiple tabs according to any one of claims 1 to 7.

9. A processor, characterized in that: The method is configured to execute the page refresh processing method for multiple tabs according to any one of claims 1 to 7.

10. A page refresh processing device for multiple tabs, characterized in that: The page refresh processing device includes the processor according to claim 9.

Citation Information

Patent Citations

  • Processing method and device of page

    CN108255890A

  • Vue-based multi-tab instance caching method

    CN113900628A