CN116049588A - Page loading method, device, computer equipment and storage medium - Google Patents

Page loading method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116049588A
CN116049588A CN202211724685.5A CN202211724685A CN116049588A CN 116049588 A CN116049588 A CN 116049588A CN 202211724685 A CN202211724685 A CN 202211724685A CN 116049588 A CN116049588 A CN 116049588A
Authority
CN
China
Prior art keywords
node
target
current node
current
address
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
CN202211724685.5A
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.)
Glenfly Tech Co Ltd
Original Assignee
Glenfly Tech Co Ltd
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 Glenfly Tech Co Ltd filed Critical Glenfly Tech Co Ltd
Priority to CN202211724685.5A priority Critical patent/CN116049588A/en
Publication of CN116049588A publication Critical patent/CN116049588A/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/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to a page loading method, a page loading device, computer equipment and a storage medium. The method comprises the following steps: in the process of analyzing the target webpage address, a tree data structure of the target webpage is obtained, a target path from a root node to a target node of the target webpage corresponding to the target webpage address is searched based on the tree data structure, only data under each node on the target path is displayed, the whole tree data structure is not required to be loaded, the loading data volume is reduced, the loading speed is improved, and the problem that the page does not respond or even collapses when the loading data volume is large is avoided.

Description

Page loading method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of page loading technologies, and in particular, to a page loading method, device, computer device, and storage medium.
Background
With the continuous development of web technology, most software systems adopt a browser/server mode (B/S structure mode), but when a navigation tree with a large data volume needs to be built, if the loading mode of tree data is improperly processed, no response or even breakdown of web front-end pages can be caused.
Taking a performance_web system as an example, the performance_web system is a web version document database, url addresses of corresponding performance analysis documents are input into an address bar, the documents are displayed in a tree structure, a user clicks the corresponding html documents, the content of the performance analysis documents can be displayed, and the left directory tree selects the performance analysis documents and positions the performance analysis documents in a visible range. Sometimes, when accessing a certain performance analysis document, the performance analysis document may be updated, which may cause the problem that the corresponding performance analysis document cannot be selected, so that when accessing the performance analysis document, the whole directory tree is updated first, that is, all data is requested from the background at one time during initialization.
The mode of requesting all data at one time during initialization can seriously affect the loading speed under the condition of large data volume, so that the response time is long, and the front page does not respond or even crashes, thereby causing bad user experience; and users sometimes only access a specific performance analysis document, and all data are loaded or updated each time, so that resource waste is caused.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a page loading method, apparatus, computer device, and storage medium that can increase the page loading speed and avoid page unresponsiveness and even crashes.
In a first aspect, the present application provides a page loading method, where the method includes:
acquiring a target webpage address; the target webpage address is used for jumping to the target webpage;
in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage, and searching a target path from a root node to a target node of the target webpage corresponding to the target webpage address based on the tree data structure; the tree data structure comprises a mapping relation between a root node of the target webpage and each child node;
and displaying the data under each node on the target path based on the target path.
In one embodiment, in the process of resolving the target web page address, acquiring a tree data structure of the target web page, and searching a target path from a root node to a target node of the target web page corresponding to the target web page address based on the tree data structure, including:
in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage corresponding to the target webpage address, and taking a first level child node in the tree data structure as a current node;
if the current node is not the target node, triggering the current node, loading a direct child node of the current node in the tree data structure, taking the direct child node of the current node as the current node of the next iteration loop, returning to execute the step of triggering the current node and continuing to execute until the current node is the target node, and acquiring a target path from the root node of the target webpage to the target node.
In one embodiment, loading the immediate child node of the current node in the tree data structure includes:
inquiring whether node data for accessing the current node is recorded in the local cache; the node data comprises the address of the current node, the address of the father node of the current node, the name of the current node and the searching path of the current node in the tree data structure;
if the local cache does not record the node data for accessing the current node, inquiring the node data of each direct child node of the current node from a database, and storing the node data of the current node and each direct child node of the current node into the local cache;
if the node data recorded in the local buffer memory is used for accessing the current node, the node data of each direct child node of the current node is directly read from the local buffer memory, and the node data of the current node in the local buffer memory is updated.
In one embodiment, updating node data of a current node in a local cache includes:
acquiring a broadcast message sent by a current node; the broadcast message comprises the address of the current node, the address of the father node of the current node, the storage field of the current node in the database and the change information of the current node;
And updating the node data of the current node in the local buffer according to the change information of the current node in the broadcast message.
In one embodiment, in the process of resolving the target web page address, acquiring a tree data structure of the target web page, and searching a target path from a root node to a target node of the target web page corresponding to the target web page address based on the tree data structure, including:
in the process of analyzing the target webpage address, acquiring a target node of the target webpage;
if the node data recorded for accessing the target node exists in the local cache, the target node is taken as the current node, and the node data of the direct father node of the current node and the node data of the brother nodes of the current node are obtained from the local cache;
if the direct father node of the current node is not the root node, taking the direct father node of the current node as the current node of the next iteration loop, returning to execute the steps of acquiring the direct father node of the current node and each brother node of the current node from the local cache and continuing to execute until the direct father node of the current node is the root node;
and acquiring a tree data structure of the target webpage, and searching a target path from the target node to the root node in the tree data structure.
In one embodiment, if the target node changes, the node data of the immediate parent node of the target node is updated.
In a second aspect, the present application further provides a page loading device. The device comprises:
the acquisition module is used for acquiring the target webpage address; the target webpage address is used for jumping to the target webpage;
the searching module is used for acquiring a tree data structure of the target webpage in the process of analyzing the target webpage address, and searching a target path from a root node to a target node of the target webpage corresponding to the target webpage address based on the tree data structure; the tree data structure comprises a mapping relation between a root node of the target webpage and each child node;
and the display module is used for displaying the data under each node on the target path based on the target path.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
acquiring a target webpage address; the target webpage address is used for jumping to the target webpage;
in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage, and searching a target path from a root node to a target node of the target webpage corresponding to the target webpage address based on the tree data structure; the tree data structure comprises a mapping relation between a root node of the target webpage and each child node;
And displaying the data under each node on the target path based on the target path.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring a target webpage address; the target webpage address is used for jumping to the target webpage;
in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage, and searching a target path from a root node to a target node of the target webpage corresponding to the target webpage address based on the tree data structure; the tree data structure comprises a mapping relation between a root node of the target webpage and each child node;
and displaying the data under each node on the target path based on the target path.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
acquiring a target webpage address; the target webpage address is used for jumping to the target webpage;
in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage, and searching a target path from a root node to a target node of the target webpage corresponding to the target webpage address based on the tree data structure; the tree data structure comprises a mapping relation between a root node of the target webpage and each child node;
And displaying the data under each node on the target path based on the target path.
According to the page loading method, the device, the computer equipment and the storage medium, the tree data structure of the target webpage is obtained in the process of analyzing the target webpage address, the target path from the root node of the target webpage corresponding to the target webpage address to the target node is searched based on the tree data structure, only the data under each node on the target path is displayed, the whole tree data structure is not required to be loaded, the loading data amount is reduced, the loading speed is improved, and the problem that the page does not respond or even crashes when the loading data amount is large is avoided.
Drawings
FIG. 1 is an application environment diagram of a page loading method in one embodiment;
FIG. 2 is a flow diagram of a page loading method in one embodiment;
FIG. 3 is a schematic diagram of a tree data structure in one embodiment;
FIG. 4 is a flow diagram of a target path acquisition in one embodiment;
FIG. 5 is a flow diagram of a direct child node of a current node in a load tree data structure in one embodiment;
FIG. 6 is a flow diagram of updating node data of a current node in a local cache in one embodiment;
FIG. 7 is a flowchart of another embodiment for acquiring a target path;
FIG. 8 is a block diagram of a page loader in one embodiment;
fig. 9 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The page loading method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. The terminal 102 obtains a target webpage address; the target webpage address is used for jumping to the target webpage; in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage, and searching a target path from a root node to a target node of the target webpage corresponding to the target webpage address based on the tree data structure; the tree data structure comprises a mapping relation between a root node of the target webpage and each child node; and displaying the data under each node on the target path based on the target path. The terminal 102 communicates with the server 104 via a network. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, portable wearable devices, and the internet of things devices may be smart televisions, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In the existing performance_web website, all the relevant document data of performance analysis under all files are loaded at one time when a main page is initialized, when the data volume is large, the response time of the page is long, the front page does not respond or even crashes, and poor user experience is caused; sometimes, the user only accesses the appointed document, and when the html tree node is loaded each time, all data of the tree structure data needs to be updated, and the loading speed is seriously influenced under the condition of large data quantity. Therefore, in order to solve the above problem, this embodiment provides a page loading method, in which only elements of a root node are loaded during initialization, a direct child node of a current node is loaded when clicking a certain node, data of a direct parent node of an html node is locally updated when clicking a certain html node instead of updating a whole tree, accessed nodes are stored in a local cache, accessed nodes are directly read from the local cache when accessed again, a message broadcasting mechanism is introduced, the local cache is updated in real time, and the loading speed is improved, so that the user experience is better.
In one embodiment, as shown in fig. 2, a page loading method is provided, and the method is applied to the terminal in fig. 1 for illustration, and includes the following steps:
Step 202, obtaining a target webpage address; the target web page address is used to jump to the target web page.
The target webpage address can be a URL address, and the user inputs the URL address of the corresponding target webpage in the address bar of the browser, so that the content of the target webpage can be displayed. The target web page may be a static web page or a specified document. For example, the target web page may be a specified performance analysis related document (profiling).
Step 204, in the process of resolving the target webpage address, obtaining a tree data structure of the target webpage, and searching a target path from a root node to a target node of the target webpage corresponding to the target webpage address based on the tree data structure; the tree data structure includes a mapping relationship between a root node of the target web page and each child node.
The target webpage address analysis process is to obtain a tree data structure of the target webpage. The tree data structure includes all nodes of the target page, wherein the nodes are the most basic components of the target web page, and each of the target web pages may be referred to as a node, e.g., the portion of the target page for accessing the specified performance analysis related document is a node. The tree data structure is also called a navigation tree, and can display hierarchical information by using a clear hierarchical structure, so that a user can search corresponding nodes and data step by step according to the relation between the data, and the tree data structure is widely applied to web front ends, such as navigation, logic or space organization, cascade selection, anchor point positioning of pages and the like.
The target node refers to the position of the document to be loaded by the user in the tree data structure, and the element corresponding to the target node is the document to be loaded by the user.
The method for acquiring the tree data structure of the target webpage can start from the root node and trigger the nodes according to the hierarchical sequence, so that the tree data structure of the target webpage is acquired, or the root node can be searched upwards from the last-stage node corresponding to the address of the target webpage, and the tree data structure of the target webpage is acquired according to the searching sequence.
Taking a performance_web system as an example, the performance_web system is a web version document database, and displays documents in a tree structure according to project names (project names), module names (module names) and sub-module names (sub-module names), so that a user clicks a corresponding html document and can browse online.
As shown in fig. 3, a structure diagram of a tree data structure is shown, wherein nodes are basic units in the tree structure, and the nodes can be used to represent the composition relationship between different data. The beginning of the entire tree structure is called the root node. A tree structure must have only one root, such as root node R in fig. 3, which is typically hidden in actual use and is typically shown starting from the first level child node. Nodes outside the root node are called children, and a direct child of a node refers to a node directly subordinate to the node, for example, a direct child of a child node a is child node a1 and child node a2. The nodes to which the child nodes depend are referred to as parent nodes, e.g., node a is the parent of child node a1 and child node a2.
For example, what needs to be loaded is a 4-level tree structure data: A-AA-AAA-xxx. Html, assuming that there are 10 primary nodes, each primary node has 10 direct child nodes, each 2 primary node has 10 direct child nodes, each 3 primary child node has 10 direct child nodes, so according to the design of loading all data at one time, 10+10+10+10×10+10×10=11110 data is loaded in total during initialization, if the target path from the root node of the target web page corresponding to the target web page address to the target node is searched according to the embodiment instead of loading the whole tree structure data, only 10+10+10+10=40 data are needed to be loaded when accessing a certain html file, even if a plurality of html files are accessed at one time, the data amount to be loaded is far from each other, and is not even an order of magnitude, so that the loading speed is improved, the user experience is improved, and the resource waste is well avoided.
Optionally, the user inputs the target webpage address in the address bar of the browser, the terminal analyzes the target webpage address, loads the root node and the first level child node of the target webpage, displays page information corresponding to the root node and the first level child node, triggers the nodes on the tree data structure step by step according to the actual demand in a hierarchical order until reaching the target node, acquires the tree data structure of the target webpage according to the search order, and determines a target path from the root node to the target node of the target webpage corresponding to the target webpage address according to the tree data structure. Or the user inputs the target webpage address in the address bar of the browser, the terminal analyzes the target webpage address, loads the final node of the target webpage, searches the root node upwards from the final node corresponding to the target webpage address, acquires the tree data structure of the target webpage according to the search sequence, and determines the target path from the root node of the target webpage corresponding to the target webpage address to the target node according to the tree data structure.
Step 206, based on the target path, displaying the data under each node on the target path.
Before the target webpage is displayed, the target path from the root node to the target node needs to be determined, and after the target path is determined, only data corresponding to each node on the target path is displayed, and node data on the whole tree data structure does not need to be displayed, so that the loading data amount is reduced, and the page loading speed is improved.
Optionally, after determining the target path from the root node of the target webpage to the target node, the terminal renders the elements corresponding to each node on the target path, and displays the data corresponding to each node on the target path in the webpage of the browser.
In the page loading method, in the process of analyzing the target webpage address, the tree data structure of the target webpage is obtained, the target path from the root node of the target webpage corresponding to the target webpage address to the target node is searched based on the tree data structure, and only the data under each node on the target path is displayed, so that the whole tree data structure is not required to be loaded, the loading data volume is reduced, the loading speed is improved, and the problem that the page has no response or even collapses when the loading data volume is large is avoided.
In one embodiment, the target path from the root node to the target node of the target web page may be determined by looking up the target node from the root node or looking up the root node from the target node. The embodiment provides a page initialization loading method, namely an embodiment of searching a target node downwards from a root node and acquiring a target path from the root node to the target node of a target webpage. As shown in fig. 4, in the process of resolving the target web page address, a tree data structure of the target web page is obtained, and based on the tree data structure, a target path from a root node to a target node of the target web page corresponding to the target web page address is searched, including:
step 402, in the process of resolving the target webpage address, obtaining a tree data structure of the target webpage corresponding to the target webpage address, and taking a first level child node in the tree data structure as a current node.
The method comprises the steps that a webpage is required to be executed on a browser, but the effect of displaying the webpage on different browsers is different due to the fact that the default style of the labels is different from the different browsers, so that the styles of the labels can be uniformly set through page initialization, and the consistency of initial values of the pages is ensured. The existing page initialization scheme is that when a user opens a webpage initialization page, all data are loaded once, namely all data are queried once by calling a back-end server interface and rendered on the page, when the data volume is large, the response time is long, and the front-end page does not respond or even crashes, so that bad user experience is caused. Therefore, in this embodiment, when the user opens the webpage to initialize, only the first level child node is loaded, when the user clicks the first level child node, the user loads the direct child node of the first level child node, when clicking a certain direct child node, the user loads the child node of the current direct child node, and so on, until the user loads the target node.
It should be noted that: the target web page address in this embodiment is the first address for initializing the web page, so when initializing the web page, only the first level child node is loaded, and the first level child node is used as the current node.
Optionally, the terminal acquires the tree data structure of the target webpage corresponding to the target webpage address according to the process of analyzing the target webpage address, hides the root node in the tree data structure, and takes the first level child node in the tree data structure as the current node.
Step 404, if the current node is not the target node, triggering the current node, loading the direct child node of the current node in the tree data structure, taking the direct child node of the current node as the current node of the next iteration loop, and returning to execute the step of triggering the current node and continuing to execute until the current node is the target node, and obtaining the target path from the root node of the target webpage to the target node.
In this embodiment, when the user opens the webpage to initialize, only the first level child node is loaded, when the user clicks the first level child node, the user loads the direct child node of the first level child node, when clicking a certain direct child node, the user loads the child node of the current direct child node, and so on, until the user loads the target node. For example, it is the tree data with 4 level nodes that need to be loaded, like a-aa-aaa-aaaa, each level of nodes has n sub-nodes, then the existing scheme requires loading n + n data, the optimization scheme requires loading n + n + n data, when the value of n is gradually increased from 1, the difference in the number of data pieces that need to be loaded is larger and larger, as shown in the following table.
n Existing scheme for loading data number Optimizing scheme loading data number Load data stripe number difference
1 4 4 0
2 30 8 22
3 120 12 108
4 340 16 324
5 780 20 760
6 1554 24 1530
7 2800 28 2772
8 4680 32 4648
9 7380 36 7344
10 11110 40 11070
11 16104 44 16060
12 22620 48 22572
13 30940 52 30888
14 41370 56 41314
15 54240 60 54180
In some embodiments, when loading a child node, firstly, inquiring whether the node data of the node exists in the local cache, and if the node data of the node exists in the local cache, loading the node data of the node from the cache; if the node data is not in the cache, the node data of the node is queried from a background database and added into a local cache.
Specifically, as shown in fig. 5, loading the direct child node of the current node in the tree data structure includes: inquiring whether node data for accessing the current node is recorded in the local cache; the node data comprises the address of the current node, the address of the father node of the current node, the name of the current node and the searching path of the current node in the tree data structure; if the local cache does not record the node data for accessing the current node, inquiring the node data of each direct child node of the current node from a database, and storing the node data of the current node and each direct child node of the current node into the local cache; if the node data recorded in the local buffer memory is used for accessing the current node, the node data of each direct child node of the current node is directly read from the local buffer memory, and the node data of the current node in the local buffer memory is updated.
Wherein, the database is designed to record each piece of data by adopting id, pid, name, path fields and record the father-son relationship of each piece of data. Each field has the following meaning:
id: a current node id;
pid: parent node id of the current node;
name: a current node name;
path: searching paths of the current node in the whole tree structure;
assuming that the root node R has an id of 0, the child node a has an id of 1, the child node a1 has an id of 2, the child node a2 has an id of 3, the child node a11 has an id of 4, the child node a12 has an id of 5, the child node a21 has an id of 6, and the child node a22 has an id of 7, the following modes are stored in the database:
id pid name path
1 0 child node a Child node a
2 1 Child node a1 Child node a-child node a1
3 1 Child node a2 Child node a-child node a2
4 2 Child node a11 Child node a-child node a 1-child node a11
5 2 Child node a12 Child node a-child node a 1-child node a12
6 3 Child node a21 Child node a-child node a 2-child node a21
7 3 Child node a22 Child node a-child node a 2-child node a22
In some embodiments, as shown in fig. 6, updating node data of a current node in a local cache includes the steps of:
step 1, acquiring a broadcast message sent by a current node; the broadcast message includes an address of the current node, an address of a parent node of the current node, a storage field of the current node in a database, and change information of the current node.
The change information may be that element data corresponding to the current node changes, or that an access record of the current node in the local cache changes. The address of the current node, the address of the parent node of the current node, the storage field of the current node in the database and the change information of the current node in the broadcast message are in the JSON format of the storage field in the data re-database of the tree data structure. Updating of local cache data, in particular updating key-value pairs.
And step 2, updating the node data of the current node in the local buffer according to the change information of the current node in the broadcast message.
Optionally, the terminal queries whether node data recorded for accessing the current node exists in the local cache according to the address of the current node in the broadcast message, if so, the node data of the current node in the local cache is updated, and timeliness of the data in the local cache is ensured; if not, ending the local cache searching flow.
In this embodiment, when the user opens the webpage to initialize, only the first level child node is loaded, when the user clicks the first level child node, the direct child node of the first level child node is loaded, when clicking a certain direct child node, the child node of the current direct child node is loaded, and so on, until the user loads the target node, the loading data volume can be reduced, the page loading speed is improved, the resource waste is avoided, meanwhile, the accessed node data is stored in the local buffer, a message broadcasting mechanism is introduced to update the locally buffered node data in real time, and when the accessed node is accessed again, the data is directly read from the local buffer, the interaction with the background server is reduced, and the unnecessary resource loading is reduced.
In one embodiment, the target path from the root node to the target node of the target web page may be determined by looking up the target node from the root node or looking up the root node from the target node. The embodiment provides a loading method of a designated page when accessing other designated nodes except the first level child node on a tree data structure, namely, the embodiment of searching a root node upwards from a target node and acquiring a target path from the root node of a target webpage to the target node. As shown in fig. 7, in the process of resolving the target web page address, a tree data structure of the target web page is obtained, and based on the tree data structure, a target path from a root node to a target node of the target web page corresponding to the target web page address is searched, including:
step 702, in the process of resolving the address of the target webpage, obtaining the target node of the target webpage.
The target web page address in this embodiment is used for jumping to other designated nodes except the first level child node on the tree data structure. For example, the target web page address is used for jumping to the level 4 child node on the tree data structure, and when the target web page address is input in the address bar, the target web page address can directly jump to the page corresponding to the level 4 child node without the need of downward triggering from the level 4 child node by the user until triggering to the level 4 child node.
If there is a record in the local cache for accessing the node data of the target node, step 704, the target node is taken as the current node, and the node data of the direct parent node of the current node and the node data of each brother node of the current node are obtained from the local cache.
The existing method for jumping to other designated nodes except the first level child node on the tree data structure is as follows: after the URL address corresponding to the target performance debugging related document is input into the address bar of the browser, all data of the whole tree is queried through calling a background port, and the front end requests the data of the target performance debugging related document after the rendering of the whole tree is completed by the obtained data. In order to solve the above problem, in this embodiment, when accessing the target web page corresponding to the target web page address, the target node is used as a starting point, the root node is used as an end point, and the node data under the direct parent node of the target node is only updated, without updating the whole tree data structure.
Optionally, after the user inputs the target webpage address in the address bar of the browser, the terminal degree target webpage address is analyzed to obtain a target node corresponding to the target webpage; the terminal inquires whether node data recorded for accessing the target node exists in the local cache according to the address of the target node, if the node data recorded for accessing the target node exists in the local cache, the target node is used as a current node, and the node data of a direct father node of the current node and the node data of all brothers nodes of the current node are obtained from the local cache. If the node data recorded for accessing the target node does not exist in the local cache, the node data of the target node is queried in the database, and if the node data does not exist in the database, the user is prompted by popping up error information.
If the direct parent node of the current node is not the root node, step 706, taking the direct parent node of the current node as the current node of the next iteration loop, and returning to execute the step of obtaining the direct parent node of the current node and the brothers of the current node from the local cache and continuing to execute until the direct parent node of the current node is the root node.
Optionally, after the terminal obtains the target node and the direct parent node of the target node, judging whether the direct parent node of the current node is a root node or not; if the direct father node of the current node is not the root node, taking the direct father node of the current node as the current node of the next iteration loop, returning to execute the steps of acquiring the direct father node of the current node and each brother node of the current node from the local cache, and continuing to execute until the direct father node of the current node is the root node. If the immediate parent node of the current node is the root node, step 708 is performed.
In some embodiments, it is assumed that all that needs to be loaded is tree data with level 4 nodes, like a-aa-aaa-aaaa, each level of nodes has n sub-nodes, then the existing scheme requires loading n + n data, the optimization scheme requires loading n + n + n data, when the value of n is gradually increased from 1, the difference between the number of data to be loaded is larger and larger, as shown in the following table:
n Existing scheme for loading data number Optimizing scheme loading data number Load data stripe number difference
1 4 4 0
2 30 8 22
3 120 12 108
4 340 16 324
5 780 20 760
6 1554 24 1530
7 2800 28 2772
8 4680 32 4648
9 7380 36 7344
10 11110 40 11070
11 16104 44 16060
12 22620 48 22572
13 30940 52 30888
14 41370 56 41314
15 54240 60 54180
Step 708, obtaining a tree data structure of the target web page, and searching a target path from the target node to the root node in the tree data structure.
All nodes can be queried through step 706, a tree data structure of the target webpage is established according to the lookup record and the composition relation among the nodes, a target path from the target node to the root node is found in the tree data structure, and data corresponding to the nodes on the target path is rendered.
In some embodiments, if the target node changes, the node data of the immediate parent node of the target node is updated. In order to enter the target webpage, only the node data under the direct father node of the target node corresponding to the target webpage needs to be updated, and the whole tree data structure does not need to be updated.
In this embodiment, the root node is searched upwards from the target node, the target path from the root node of the target webpage to the target node is obtained, and only the node data under the direct parent node of the target node is updated, so that the whole tree data structure is not required to be updated.
In one embodiment, detailed steps of a page loading method are provided, specifically including:
Step 1, obtaining a target webpage address; the target web page address is used to jump to the target web page.
Step 2, judging the type of the target webpage address, and if the target webpage address is the head address for initializing the webpage, executing the step 3; if the target web page address is used for accessing other designated nodes except the first level child node on the tree data structure, step 8 is executed.
And step 3, in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage corresponding to the target webpage address, and taking a first level child node in the tree data structure as a current node.
Step 4, if the current node is not the target node, triggering the current node, and inquiring whether node data for accessing the current node is recorded in the local cache; the node data comprises the address of the current node, the address of the father node of the current node, the name of the current node and the searching path of the current node in the tree data structure; if the node data for accessing the current node is not recorded in the local cache, executing the step 5; if there is a record in the local cache for accessing the node data of the current node, step 6 is performed.
And 5, inquiring node data of each direct child node of the current node from the database, storing the current node and the node data of each direct child node of the current node into a local cache, and executing the step 7.
Step 6, directly reading node data of each direct child node of the current node from the local buffer, and acquiring a broadcast message sent by the current node; the broadcast message comprises the address of the current node, the address of the father node of the current node, the storage field of the current node in the database and the change information of the current node; and (7) updating the node data of the current node in the local buffer according to the change information of the current node in the broadcast message, and executing the step (7).
And 7, taking the direct child node of the current node as the current node of the next iteration loop, returning to execute the step of triggering the current node and continuing to execute until the current node is a target node, acquiring a target path from the root node of the target webpage to the target node, and executing the step 12.
And 8, in the process of analyzing the target webpage address, acquiring a target node of the target webpage, and executing the step 9.
And 9, if the node data recorded for accessing the target node exists in the local cache, taking the target node as the current node, acquiring the node data of the direct father node of the current node and the node data of the brother nodes of the current node from the local cache, and executing the step 10.
And step 10, if the direct father node of the current node is not the root node, taking the direct father node of the current node as the current node of the next iteration loop, returning to execute the step of acquiring the direct father node of the current node and each brother node of the current node from the local cache, and continuing to execute until the direct father node of the current node is the root node, and executing step 11.
Step 11, obtaining a tree data structure of the target webpage, searching a target path from the target node to the root node in the tree data structure, and executing step 12.
And step 12, based on the target path, displaying the data under each node on the target path.
In this embodiment, only a node is clicked to load a direct child node of the node, and a scheme for locally updating tree data only updates the data required by the current access; storing the accessed data into a local cache, introducing a message broadcasting mechanism to update the local cache data, and reducing interaction with a background database; the data volume to be loaded is greatly reduced, the access speed is improved, and the user experience is optimized.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a page loading device for realizing the above-mentioned page loading method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in one or more embodiments of the page loading device provided below may refer to the limitation of the page loading method described above, and will not be repeated here.
In one embodiment, as shown in fig. 8, there is provided a page loading apparatus including: an acquisition module 100, a search module 200, and a display module 300, wherein:
an obtaining module 100, configured to obtain a target web page address; the target webpage address is used for jumping to the target webpage;
the searching module 200 is configured to obtain a tree data structure of the target webpage in a process of resolving the target webpage address, and search a target path from a root node to a target node of the target webpage corresponding to the target webpage address based on the tree data structure; the tree data structure comprises a mapping relation between a root node of the target webpage and each child node;
and the display module 300 is used for displaying the data under each node on the target path based on the target path.
In one embodiment, the lookup module 200 is further configured to: in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage corresponding to the target webpage address, and taking a first level child node in the tree data structure as a current node;
if the current node is not the target node, triggering the current node, loading a direct child node of the current node in the tree data structure, taking the direct child node of the current node as the current node of the next iteration loop, returning to execute the step of triggering the current node and continuing to execute until the current node is the target node, and acquiring a target path from the root node of the target webpage to the target node.
In one embodiment, the lookup module 200 is further configured to: inquiring whether node data for accessing the current node is recorded in the local cache; the node data comprises the address of the current node, the address of the father node of the current node, the name of the current node and the searching path of the current node in the tree data structure;
if the local cache does not record the node data for accessing the current node, inquiring the node data of each direct child node of the current node from a database, and storing the node data of the current node and each direct child node of the current node into the local cache;
If the node data recorded in the local buffer memory is used for accessing the current node, the node data of each direct child node of the current node is directly read from the local buffer memory, and the node data of the current node in the local buffer memory is updated.
In one embodiment, the lookup module 200 is further configured to: acquiring a broadcast message sent by a current node; the broadcast message comprises the address of the current node, the address of the father node of the current node, the storage field of the current node in the database and the change information of the current node;
and updating the node data of the current node in the local buffer according to the change information of the current node in the broadcast message.
In one embodiment, the lookup module 200 is further configured to: in the process of analyzing the target webpage address, acquiring a target node of the target webpage;
if the node data recorded for accessing the target node exists in the local cache, the target node is taken as the current node, and the node data of the direct father node of the current node and the node data of the brother nodes of the current node are obtained from the local cache;
if the direct father node of the current node is not the root node, taking the direct father node of the current node as the current node of the next iteration loop, returning to execute the steps of acquiring the direct father node of the current node and each brother node of the current node from the local cache and continuing to execute until the direct father node of the current node is the root node;
And acquiring a tree data structure of the target webpage, and searching a target path from the target node to the root node in the tree data structure.
In one embodiment, the lookup module 200 is further configured to: if the target node changes, updating the node data of the direct father node of the target node.
The various modules in the page loading device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 9. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a page loading method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 9 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application applies, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
acquiring a target webpage address; the target webpage address is used for jumping to the target webpage;
in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage, and searching a target path from a root node to a target node of the target webpage corresponding to the target webpage address based on the tree data structure; the tree data structure comprises a mapping relation between a root node of the target webpage and each child node;
and displaying the data under each node on the target path based on the target path.
In one embodiment, the processor when executing the computer program further performs the steps of: in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage corresponding to the target webpage address, and taking a first level child node in the tree data structure as a current node;
If the current node is not the target node, triggering the current node, loading a direct child node of the current node in the tree data structure, taking the direct child node of the current node as the current node of the next iteration loop, returning to execute the step of triggering the current node and continuing to execute until the current node is the target node, and acquiring a target path from the root node of the target webpage to the target node.
In one embodiment, the processor when executing the computer program further performs the steps of: inquiring whether node data for accessing the current node is recorded in the local cache; the node data comprises the address of the current node, the address of the father node of the current node, the name of the current node and the searching path of the current node in the tree data structure;
if the local cache does not record the node data for accessing the current node, inquiring the node data of each direct child node of the current node from a database, and storing the node data of the current node and each direct child node of the current node into the local cache;
if the node data recorded in the local buffer memory is used for accessing the current node, the node data of each direct child node of the current node is directly read from the local buffer memory, and the node data of the current node in the local buffer memory is updated.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a broadcast message sent by a current node; the broadcast message comprises the address of the current node, the address of the father node of the current node, the storage field of the current node in the database and the change information of the current node;
and updating the node data of the current node in the local buffer according to the change information of the current node in the broadcast message.
In one embodiment, the processor when executing the computer program further performs the steps of: in the process of analyzing the target webpage address, acquiring a target node of the target webpage;
if the node data recorded for accessing the target node exists in the local cache, the target node is taken as the current node, and the node data of the direct father node of the current node and the node data of the brother nodes of the current node are obtained from the local cache;
if the direct father node of the current node is not the root node, taking the direct father node of the current node as the current node of the next iteration loop, returning to execute the steps of acquiring the direct father node of the current node and each brother node of the current node from the local cache and continuing to execute until the direct father node of the current node is the root node;
And acquiring a tree data structure of the target webpage, and searching a target path from the target node to the root node in the tree data structure.
In one embodiment, the processor when executing the computer program further performs the steps of: if the target node changes, updating the node data of the direct father node of the target node.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a target webpage address; the target webpage address is used for jumping to the target webpage;
in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage, and searching a target path from a root node to a target node of the target webpage corresponding to the target webpage address based on the tree data structure; the tree data structure comprises a mapping relation between a root node of the target webpage and each child node;
and displaying the data under each node on the target path based on the target path.
In one embodiment, the computer program when executed by the processor further performs the steps of: in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage corresponding to the target webpage address, and taking a first level child node in the tree data structure as a current node;
If the current node is not the target node, triggering the current node, loading a direct child node of the current node in the tree data structure, taking the direct child node of the current node as the current node of the next iteration loop, returning to execute the step of triggering the current node and continuing to execute until the current node is the target node, and acquiring a target path from the root node of the target webpage to the target node.
In one embodiment, the computer program when executed by the processor further performs the steps of: inquiring whether node data for accessing the current node is recorded in the local cache; the node data comprises the address of the current node, the address of the father node of the current node, the name of the current node and the searching path of the current node in the tree data structure;
if the local cache does not record the node data for accessing the current node, inquiring the node data of each direct child node of the current node from a database, and storing the node data of the current node and each direct child node of the current node into the local cache;
if the node data recorded in the local buffer memory is used for accessing the current node, the node data of each direct child node of the current node is directly read from the local buffer memory, and the node data of the current node in the local buffer memory is updated.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a broadcast message sent by a current node; the broadcast message comprises the address of the current node, the address of the father node of the current node, the storage field of the current node in the database and the change information of the current node;
and updating the node data of the current node in the local buffer according to the change information of the current node in the broadcast message.
In one embodiment, the computer program when executed by the processor further performs the steps of: in the process of analyzing the target webpage address, acquiring a target node of the target webpage;
if the node data recorded for accessing the target node exists in the local cache, the target node is taken as the current node, and the node data of the direct father node of the current node and the node data of the brother nodes of the current node are obtained from the local cache;
if the direct father node of the current node is not the root node, taking the direct father node of the current node as the current node of the next iteration loop, returning to execute the steps of acquiring the direct father node of the current node and each brother node of the current node from the local cache and continuing to execute until the direct father node of the current node is the root node;
And acquiring a tree data structure of the target webpage, and searching a target path from the target node to the root node in the tree data structure.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the target node changes, updating the node data of the direct father node of the target node.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
acquiring a target webpage address; the target webpage address is used for jumping to the target webpage;
in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage, and searching a target path from a root node to a target node of the target webpage corresponding to the target webpage address based on the tree data structure; the tree data structure comprises a mapping relation between a root node of the target webpage and each child node;
and displaying the data under each node on the target path based on the target path.
In one embodiment, the computer program when executed by the processor further performs the steps of: in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage corresponding to the target webpage address, and taking a first level child node in the tree data structure as a current node;
If the current node is not the target node, triggering the current node, loading a direct child node of the current node in the tree data structure, taking the direct child node of the current node as the current node of the next iteration loop, returning to execute the step of triggering the current node and continuing to execute until the current node is the target node, and acquiring a target path from the root node of the target webpage to the target node.
In one embodiment, the computer program when executed by the processor further performs the steps of: inquiring whether node data for accessing the current node is recorded in the local cache; the node data comprises the address of the current node, the address of the father node of the current node, the name of the current node and the searching path of the current node in the tree data structure;
if the local cache does not record the node data for accessing the current node, inquiring the node data of each direct child node of the current node from a database, and storing the node data of the current node and each direct child node of the current node into the local cache;
if the node data recorded in the local buffer memory is used for accessing the current node, the node data of each direct child node of the current node is directly read from the local buffer memory, and the node data of the current node in the local buffer memory is updated.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a broadcast message sent by a current node; the broadcast message comprises the address of the current node, the address of the father node of the current node, the storage field of the current node in the database and the change information of the current node;
and updating the node data of the current node in the local buffer according to the change information of the current node in the broadcast message.
In one embodiment, the computer program when executed by the processor further performs the steps of: in the process of analyzing the target webpage address, acquiring a target node of the target webpage;
if the node data recorded for accessing the target node exists in the local cache, the target node is taken as the current node, and the node data of the direct father node of the current node and the node data of the brother nodes of the current node are obtained from the local cache;
if the direct father node of the current node is not the root node, taking the direct father node of the current node as the current node of the next iteration loop, returning to execute the steps of acquiring the direct father node of the current node and each brother node of the current node from the local cache and continuing to execute until the direct father node of the current node is the root node;
And acquiring a tree data structure of the target webpage, and searching a target path from the target node to the root node in the tree data structure.
In one embodiment, the computer program when executed by the processor further performs the steps of: if the target node changes, updating the node data of the direct father node of the target node.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile memory may include Read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high density embedded nonvolatile memory, resistive random access memory (ReRAM), magnetic random access memory (Magnetoresistive RandomAccess Memory, MRAM), ferroelectric memory (Ferroelectric RandomAccess Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, and the like. Volatile memory can include random access memory (RandomAccess Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static RandomAccess Memory, SRAM) or dynamic random access memory (Dynamic RandomAccess Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A method of page loading, the method comprising:
acquiring a target webpage address; the target webpage address is used for jumping to a target webpage;
in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage, and searching a target path from a root node to a target node of the target webpage corresponding to the target webpage address based on the tree data structure; the tree data structure comprises a mapping relation between a root node and each child node of the target webpage;
And displaying the data under each node on the target path based on the target path.
2. The method according to claim 1, wherein the step of obtaining a tree data structure of the target web page during the process of resolving the target web page address, and searching for a target path from the root node of the target web page corresponding to the target web page address to the target node based on the tree data structure, comprises:
in the process of analyzing the target webpage address, acquiring a tree data structure of the target webpage corresponding to the target webpage address, and taking a first level child node in the tree data structure as a current node;
if the current node is not the target node, triggering the current node, loading the direct child node of the current node in the tree data structure, taking the direct child node of the current node as the current node of the next iteration loop, and returning to execute the step of triggering the current node and continuing to execute until the current node is the target node, and acquiring the target path from the root node of the target webpage to the target node.
3. The method of claim 1, wherein loading the immediate child node of the current node in the tree data structure comprises:
Inquiring whether node data for accessing the current node is recorded in the local cache; the node data comprises the address of the current node, the address of the father node of the current node, the name of the current node and the searching path of the current node in the tree data structure;
if the local cache does not record the node data for accessing the current node, inquiring the node data of each direct child node of the current node from a database, and storing the node data of the current node and each direct child node of the current node into the local cache;
if the node data recorded in the local buffer memory is used for accessing the current node, the node data of each direct child node of the current node is directly read from the local buffer memory, and the node data of the current node in the local buffer memory is updated.
4. A method according to claim 3, wherein updating the node data of the current node in the local cache comprises:
acquiring a broadcast message sent by the current node; the broadcast message comprises the address of the current node, the address of the father node of the current node, the storage field of the current node in the database and the change information of the current node;
And updating the node data of the current node in the local buffer according to the change information of the current node in the broadcast message.
5. The method according to claim 1, wherein the step of obtaining a tree data structure of the target web page during the process of resolving the target web page address, and searching for a target path from the root node of the target web page corresponding to the target web page address to the target node based on the tree data structure, comprises:
in the process of analyzing the target webpage address, acquiring a target node of the target webpage;
if the node data recorded for accessing the target node exists in the local cache, the target node is taken as the current node, and the node data of the direct father node of the current node and the node data of the brother nodes of the current node are obtained from the local cache;
if the direct father node of the current node is not the root node, taking the direct father node of the current node as the current node of the next iteration loop, returning to execute the step of acquiring the direct father node of the current node and each brother node of the current node from the local cache and continuing to execute until the direct father node of the current node is the root node;
And acquiring a tree data structure of the target webpage, and searching a target path from the target node to the root node in the tree data structure.
6. The method of claim 5, wherein the method further comprises: if the target node changes, updating the node data of the direct father node of the target node.
7. A page loading apparatus, the apparatus comprising:
the acquisition module is used for acquiring the target webpage address; the target webpage address is used for jumping to a target webpage;
the searching module is used for acquiring a tree data structure of the target webpage in the process of analyzing the target webpage address, and searching a target path from a root node to a target node of the target webpage corresponding to the target webpage address based on the tree data structure; the tree data structure comprises a mapping relation between a root node and each child node of the target webpage;
and the display module is used for displaying the data under each node on the target path based on the target path.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202211724685.5A 2022-12-30 2022-12-30 Page loading method, device, computer equipment and storage medium Pending CN116049588A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211724685.5A CN116049588A (en) 2022-12-30 2022-12-30 Page loading method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211724685.5A CN116049588A (en) 2022-12-30 2022-12-30 Page loading method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116049588A true CN116049588A (en) 2023-05-02

Family

ID=86119385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211724685.5A Pending CN116049588A (en) 2022-12-30 2022-12-30 Page loading method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116049588A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530379A (en) * 2013-10-15 2014-01-22 福建榕基软件股份有限公司 Tree structure data display method and device
CN106599280A (en) * 2016-12-23 2017-04-26 北京奇虎科技有限公司 Webpage node path information determination method and apparatus
CN107818163A (en) * 2017-11-01 2018-03-20 平安科技(深圳)有限公司 Page display method, device, computer equipment and storage medium
CN108121802A (en) * 2017-12-22 2018-06-05 东软集团股份有限公司 The thermodynamic analysis method, apparatus and its equipment of web page access
CN112100550A (en) * 2019-06-17 2020-12-18 北京京东尚科信息技术有限公司 Page construction method and device
CN113094674A (en) * 2021-04-28 2021-07-09 平安国际智慧城市科技股份有限公司 Page display method and device, electronic equipment and storage medium
CN113656723A (en) * 2021-09-15 2021-11-16 腾讯数码(深圳)有限公司 Webpage view display method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103530379A (en) * 2013-10-15 2014-01-22 福建榕基软件股份有限公司 Tree structure data display method and device
CN106599280A (en) * 2016-12-23 2017-04-26 北京奇虎科技有限公司 Webpage node path information determination method and apparatus
CN107818163A (en) * 2017-11-01 2018-03-20 平安科技(深圳)有限公司 Page display method, device, computer equipment and storage medium
CN108121802A (en) * 2017-12-22 2018-06-05 东软集团股份有限公司 The thermodynamic analysis method, apparatus and its equipment of web page access
CN112100550A (en) * 2019-06-17 2020-12-18 北京京东尚科信息技术有限公司 Page construction method and device
CN113094674A (en) * 2021-04-28 2021-07-09 平安国际智慧城市科技股份有限公司 Page display method and device, electronic equipment and storage medium
CN113656723A (en) * 2021-09-15 2021-11-16 腾讯数码(深圳)有限公司 Webpage view display method and device

Similar Documents

Publication Publication Date Title
US9507480B1 (en) Interface optimization application
US8843360B1 (en) Client-side localization of network pages
TW201723897A (en) Method, device, and system for displaying information associated with a web page
WO2008154114A1 (en) Web clip using anchoring
US20120110002A1 (en) Data Rendering Optimization
CN111061533A (en) Page multi-language display method and device, electronic equipment and computer storage medium
CN112667330A (en) Page display method and computer equipment
CN113535164A (en) Front-end interface generation method and device, electronic equipment and storage medium
CN110968314A (en) Page generation method and device
CN110866202A (en) Front-end paging method and device and readable storage medium
CN114579912A (en) Page layout method, device, equipment and medium
CN113330432A (en) Asynchronous predictive caching of content listed in search results
CN116910405A (en) Page processing method, device, computer equipment and storage medium
CN116821533A (en) Page rendering method, computer device and computer-readable storage medium
CN116049588A (en) Page loading method, device, computer equipment and storage medium
US20170286473A1 (en) Element identifier generation
CN109240660B (en) Access method of advertisement data, storage medium, electronic device and system
US9704178B2 (en) Customizable sequence of content
CN113961298A (en) Page switching method, device, equipment and medium
US11301498B2 (en) Multi-cloud object store access
CN113626032A (en) List page configuration method and device and storage medium
CN116700725B (en) Page generation method, page generation device, computer equipment and storage medium
US20180373688A1 (en) Sharing annotations to web pages
CN116304407A (en) Page rendering method, device, computer equipment and storage medium
WO2023220973A1 (en) Data processing method and apparatus, and electronic device and computer-readable 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