CN113204726A - BS architecture page response time optimization method, device, equipment and medium - Google Patents

BS architecture page response time optimization method, device, equipment and medium Download PDF

Info

Publication number
CN113204726A
CN113204726A CN202110765599.8A CN202110765599A CN113204726A CN 113204726 A CN113204726 A CN 113204726A CN 202110765599 A CN202110765599 A CN 202110765599A CN 113204726 A CN113204726 A CN 113204726A
Authority
CN
China
Prior art keywords
page
node
decision tree
target page
index
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
CN202110765599.8A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110765599.8A priority Critical patent/CN113204726A/en
Publication of CN113204726A publication Critical patent/CN113204726A/en
Priority to PCT/CN2021/127522 priority patent/WO2023279595A1/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

Abstract

The invention discloses a method, a device, equipment and a medium for optimizing the response time of a BS framework page. The method comprises the following steps: responding to a user login client system to load a first target page, and judging whether a decision tree exists or not, wherein the decision tree comprises a menu node, a page node containing a father node and a child node, and a decision array; performing decision tree rearrangement based on the decision array in response to the presence; searching whether a child node exists in the first target page or not in the decision tree; if the first target page exists, preloading at least one child node of the first target page into a cache of the client according to the decision tree; searching whether a child node to which the second target page belongs exists in a cache of the client in response to the page switching to the second target page; if yes, loading data from a cache of the client and updating the decision tree; and if not, sending a request to the server to acquire data and update the decision tree. The scheme of the invention realizes the preloading of the page data, shortens the page response time and improves the user experience.

Description

BS architecture page response time optimization method, device, equipment and medium
Technical Field
The invention relates to the technical field of internet page processing, in particular to a method, a device, equipment and a medium for optimizing the response time of a BS architecture page.
Background
With the development of the internet, various industries embrace the internet actively, and network application becomes an indispensable tool in daily life and work. Among various network applications, a WEB system based on a B/S architecture plays a significant role.
Fig. 1 shows a schematic processing manner of a conventional B/S architecture page response, and a specific page response flow includes the following steps: the client sends a request, the server acquires and analyzes the request parameters, the server is connected with a database to inquire data, the server encapsulates the data and responds to the request of the client, and the client analyzes the response data and carries out page rendering. However, in the actual use process, due to various reasons such as high concurrency, low hardware configuration, complex server logic, high database delay and the like, the request response time is long, so that the waiting time of a user is long, and the browsing experience is poor; therefore, the conventional page response processing method of the B/S architecture needs to be improved.
Disclosure of Invention
In view of this, it is necessary to provide a BS architecture page response time optimization method, apparatus, device and medium for solving the problems of long user waiting time and poor browsing experience caused by long response time of the conventional B/S architecture page.
According to a first aspect of the present invention, there is provided a BS architecture page response time optimization method, the method comprising:
responding to a user login client system to load a first target page, and judging whether a decision tree exists in a cache of a client or not, wherein the decision tree comprises a menu node, a page node containing a parent node and a child node, and a decision array corresponding to each node one by one;
in response to the decision tree existing in the cache of the client, carrying out decision tree rearrangement based on the decision array of each node;
searching whether a child node exists in the first target page or not in a decision tree;
in response to the first target page having child nodes, preloading at least one child node of the first target page into a cache of a client according to a decision tree;
responding to the switching of the page to a second target page, and searching whether a child node to which the second target page belongs exists in a cache of the client;
if the child node to which the second target page belongs exists, loading data of the second target page from a cache of the client, and updating the decision tree based on the page switching;
and if the child node to which the second target page belongs does not exist, sending a request to a server to acquire data of the second target page, and updating the decision tree based on the page switching.
In some embodiments, the method further comprises:
enumerating menus, pages and page access paths in the system in response to the fact that no decision tree exists in the cache of the client;
taking the menu as a parent node of the page and constructing a decision tree according to a corresponding page access path;
creating a decision array for each node, wherein the decision array comprises a weighting index array and a weighting coefficient array, the weighting index array comprises a plurality of access indexes, and the weighting coefficient array comprises a weighting coefficient corresponding to each access index;
initializing each access index of each node to zero, and respectively configuring a weight coefficient of each access index based on a plurality of preset values.
In some embodiments, the weighted index array includes a first index representing access frequency, a second index representing access frequency of a last preset number of days, and a third index representing last access time and a current time interval; the weighting coefficient array comprises a first coefficient, a second coefficient and a third coefficient which are respectively corresponding to the first index, the second index and the third index.
In some embodiments, in response to the decision tree existing in the cache of the client, the step of performing decision tree reordering based on the decision array of each node comprises:
updating the first index, the second index and the third index of each node according to the current time;
respectively and correspondingly multiplying the updated first index, second index and third index with the first coefficient, second coefficient and third coefficient, and adding to obtain the total weight of each node;
and sequencing the nodes of the decision tree according to the total weight of each node and the same father node in the same hierarchy, wherein the sequencing rule is that the total weight of the nodes is arranged from left to right from big to small.
In some embodiments, the step of preloading at least one child node of the first target page into a cache of a client according to a decision tree in response to the child node existing in the first target page comprises:
acquiring the number of all child nodes taking the first target page as a parent node and comparing the number with a preset number;
in response to the fact that the number of all the child nodes is smaller than or equal to the preset number, all the child nodes of the first target page are loaded into a cache of the client;
and in response to the fact that the number of all the child nodes is larger than the preset number, loading the child nodes with the preset number on the left side in all the child nodes corresponding to the first target page in the decision tree to the cache.
In some embodiments, the loading the data of the second target page from the cache of the client if the child node to which the second target page belongs exists, and the updating the decision tree based on the page switching includes:
loading second target page data in a cache of the client and performing page rendering data;
and updating the first index, the second index and the third index of the child node of the second target page in the decision tree based on the current time.
In some embodiments, the sending a request to a server to obtain data of the second target page if there is no child node to which the second target page belongs, and the updating the decision tree based on the page switching includes:
judging whether a second target page exists in all child nodes of a first target page in the current decision tree or not;
if the second target page exists in all the child nodes, updating the decision array of the second target page;
and if the second target page does not exist in all the child nodes, the first target page is taken as the parent node, the second target page is added as the child node, and the first index, the second index and the third index of the added child node are updated.
According to a second aspect of the present invention, there is provided a BS architecture page response time optimization apparatus, the apparatus comprising:
the system comprises a judging module and a cache module, wherein the judging module is used for judging whether a decision tree exists in a cache of a client when a user logs in a client system to load a first target page, and the decision tree comprises a menu node, a page node containing a parent node and a child node, and a decision array corresponding to each node one by one;
the decision tree rearrangement module is used for carrying out decision tree rearrangement based on the decision array of each node when the decision tree exists in the cache of the client;
the first searching module is used for searching whether a child node exists in the first target page in a decision tree;
the pre-loading module is used for pre-loading at least one sub-node of the first target page into a cache of a client according to a decision tree when the sub-node exists in the first target page;
the second searching module is used for searching whether a child node to which the second target page belongs exists in a cache of the client when the page is switched to the second target page;
the first updating module is used for loading data of the second target page from a cache of the client when the child node to which the second target page belongs exists, and updating the decision tree based on the page switching;
and the second updating module is used for sending a request to the server to acquire the data of the second target page when the child node to which the second target page belongs does not exist, and updating the decision tree based on the page switching.
According to a third aspect of the present invention, there is also provided a computer apparatus comprising:
at least one processor; and
a memory storing a computer program operable on a processor, the processor executing the program to perform the BS architecture page response time optimization method described above.
According to a fourth aspect of the present invention, there is also provided a computer-readable storage medium storing a computer program which, when executed by a processor, performs the aforementioned BS architecture page response time optimization method.
According to the BS architecture page response time optimization method, the decision tree is built in the cache of the client through the page access path, the decision tree is dynamically updated according to the user page switching operation behavior, the range of the user jump operation target page is pre-judged, page data are preloaded, page response time is shortened, and user experience is improved.
In addition, the invention also provides a BS architecture page response time optimization device, a computer device and a computer readable storage medium, which can also achieve the above technical effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a diagram illustrating a page response processing method of a conventional B/S architecture;
fig. 2 is a schematic flow chart of a BS architecture page response time optimization method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a topology of a decision tree according to another embodiment of the present invention;
FIG. 4 is a diagram illustrating a complete flow of a page switch process using a decision tree according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a BS architecture page response time optimization apparatus according to another embodiment of the present invention;
fig. 6 is an internal structural view of a computer device according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In one embodiment, referring to fig. 2, the present invention provides a BS architecture page response time optimization method, including the following steps:
s100, loading a first target page in response to a user logging in a client system, and judging whether a decision tree exists in a cache of the client, wherein the decision tree comprises a menu node, a page node containing a parent node and a child node, and a decision array corresponding to each node one by one;
s200, in response to the fact that the decision tree exists in the cache of the client, carrying out decision tree rearrangement based on the decision array of each node;
s300, searching whether a child node exists in the first target page or not in a decision tree;
s400, in response to the first target page having child nodes, preloading at least one child node of the first target page into a cache of a client according to a decision tree;
s500, responding to the page switching to a second target page, and searching whether a child node to which the second target page belongs exists in a cache of a client;
s600, if the child node to which the second target page belongs exists, loading data of the second target page from a cache of the client, and updating the decision tree based on the page switching;
s700, if the child node to which the second target page belongs does not exist, a request is sent to the server to obtain data of the second target page, and the decision tree is updated based on the page switching.
According to the BS architecture page response time optimization method, the decision tree is built in the cache of the client through the page access path, the decision tree is dynamically updated according to the user page switching operation behavior, the range of the user jump operation target page is pre-judged, page data are preloaded, page response time is shortened, and user experience is improved.
In another embodiment, please refer to fig. 3, the method of the present invention further includes the following steps:
enumerating menus, pages and page access paths in the system in response to the fact that no decision tree exists in the cache of the client;
taking the menu as a parent node of the page and constructing a decision tree according to a corresponding page access path; the menu may be divided into multiple levels, for example, fig. 3 is divided into two-level menus, the first and second level menus may be application navigation, and child nodes of the second level menu are parent nodes of the final page node in the actual access process, such as: "monitor-profile- [ device, health, event ]", then "monitor" is a primary menu, "profile" is a secondary menu, "[ device, health, event ]" is three different pages belonging to the children of the secondary menu, i.e. the parents of the above-mentioned page nodes, i.e. "page 1", "page 2" in the above figure, each parent corresponding to a view page.
In actual operation, page jumps are often jumps between parent nodes, including parent nodes under the same access path and also including parent nodes under different access paths, and in the decision tree, a terminal node to which a parent node may jump is defined as a child node of a parent node, i.e., "page 1-1" and "page 1-2" in the above diagram.
Creating a decision array for each node, wherein the decision array comprises a weighting index array and a weighting coefficient array, the weighting index array comprises a plurality of access indexes, and the weighting coefficient array comprises a weighting coefficient corresponding to each access index; preferably, the weighted index array comprises a first index representing the access frequency, a second index representing the access frequency of the last preset number of days, and a third index representing the last access time and the current time interval; the weighting coefficient array comprises a first coefficient, a second coefficient and a third coefficient which are respectively corresponding to the first index, the second index and the third index.
For example, a weighted index array is maintained for all child nodes, and is denoted as R1: [ indicator 1, indicator 2, … ], a weighting coefficient array denoted R2: [ weighting factor 1, weighting factor 2, … ], for example, as follows: r1: [ frequency of access, last 5 days access frequency, last access time and current time interval ] R2: [10, 50, -5].
Initializing each access index of each node to zero, and respectively configuring a weight coefficient of each access index based on a plurality of preset values. Wherein the decision tree is maintained in the client cache to initialize the R1 data to 0.
In another embodiment, on the basis of the foregoing example, the foregoing step S200 specifically includes the following sub-steps:
updating the first index, the second index and the third index of each node according to the current time;
respectively and correspondingly multiplying the updated first index, second index and third index with the first coefficient, second coefficient and third coefficient, and adding to obtain the total weight of each node;
and sequencing the nodes of the decision tree according to the total weight of each node and the same father node in the same hierarchy, wherein the sequencing rule is that the total weight of the nodes is arranged from left to right from big to small.
In another embodiment, the foregoing step S400 specifically includes the following sub-steps:
acquiring the number of all child nodes taking the first target page as a parent node and comparing the number with a preset number;
in response to the fact that the number of all the child nodes is smaller than or equal to the preset number, all the child nodes of the first target page are loaded into a cache of the client;
and in response to the fact that the number of all the child nodes is larger than the preset number, loading the child nodes with the preset number on the left side in all the child nodes corresponding to the first target page in the decision tree to the cache.
In yet another embodiment, the aforementioned step S600 comprises the following sub-steps:
loading second target page data in a cache of the client and performing page rendering data;
and updating the first index, the second index and the third index of the child node of the second target page in the decision tree based on the current time.
In another embodiment, the foregoing step S700 specifically includes the following sub-steps:
judging whether a second target page exists in all child nodes of a first target page in the current decision tree or not;
if the second target page exists in all the child nodes, updating the decision array of the second target page;
and if the second target page does not exist in all the child nodes, the first target page is taken as the parent node, the second target page is added as the child node, and the first index, the second index and the third index of the added child node are updated.
It should be noted that, in the decision tree established at the initial moment in the detailed implementation, only the parent node is a page node (the selection of the corresponding large system parent node may only consider a page that is time-consuming or a page that is more frequently used), while the child nodes are gradually added to the decision tree along with the operation of the user, and the child nodes of the page parent node are dynamically added along with the operation of the user; continuing by way of example, when a user accesses a page, the total weight of all nodes (except the root node) is calculated according to a weighting algorithm:
total weight = visit frequency 10 + last 5 days visit frequency 50 + last visit interval (-5)
And sequencing the nodes according to the same father node in the same hierarchy according to the total weight of the nodes, wherein the sequencing rule is from left to right and from big to small. The decision tree after weighted rearrangement meets the following rule: the closer the node is to the left, the greater the probability of being visited.
When the user accesses the view page corresponding to the parent node, the following operations are executed:
a. judging whether data exists in the cache, if so, loading the data in the cache, otherwise, directly requesting data of a server;
b. preloading N sub-nodes (for example, 3, the larger the numerical value is, the higher the hit rate is, but the more resources are consumed) at the leftmost side of the parent node, and storing page data into a client cache;
c. if the page corresponding to the view does not exist under the parent node, adding the self node, namely dynamically adding child nodes under each parent node, and updating the data of the node weighting index array R1; the weighting coefficient array R2 does not need to be updated, but is set by the user when the node is established, and can be uniformly adjusted by the user when the change is needed.
By the method for updating the decision tree, the decision tree can be dynamically updated according to the operation behavior of the user, the range of the target page of the skip operation of the user is pre-judged, the page data is pre-loaded, the page response time is shortened, and the user experience is improved.
In another embodiment, please refer to fig. 4, taking a decision tree as an example for page response, the specific method for optimizing the page response time of the BS architecture performs the following steps:
step one, a user logs in a system and loads a default page;
judging whether a decision tree exists in a client cache or not; if not, enumerating the system page to construct a decision tree, constructing a weighting index R1 for each node of the decision tree except the root node, assigning an initial value to be 0, storing the decision tree in a client cache, and then executing the step six; if yes, executing the step three;
calculating the weights of all nodes except the root node by using a weighting algorithm, and sequencing the nodes according to the same father node of the same hierarchy according to the total weight of the nodes, wherein the sequencing rule is from left to right and from big to small;
step four, taking the current page as a father node, and judging whether the father node in the decision tree has a child node; if yes, executing the step five, otherwise, executing the step six;
step five, preloading a plurality of child nodes with higher total weight under the parent node, for example, loading N (when the total number is less than N, loading all) node data on the left side in the decision tree and storing the node data in a cache;
step six, waiting for a user to execute page switching operation;
step seven, the user executes the page switching operation;
step eight, updating the corresponding decision tree data of the page (adding child nodes and updating the weighted index array R1 data of the nodes of the father as required);
judging whether corresponding data exist in the cache or not; if yes, executing the step eleven, otherwise, executing the step ten;
step ten, executing step twelve after requesting server data;
step eleven, after the data in the cache is loaded, executing step twelve;
step twelve, rendering data on the page, and returning to execute step six;
the method solves the problem that the waiting time of the user is long due to long response time of the traditional B/S framework page, dynamically updates the decision tree according to the operation behavior of the user, further prejudges the range of the user jump operation target page, further preloads page data, shortens the page response time and improves the user experience.
In another embodiment, please refer to fig. 5, the present invention further provides a BS architecture page response time optimization apparatus 80, including:
the judging module 81 is configured to judge whether a decision tree exists in a cache of a client when a user logs in a client system to load a first target page, where the decision tree includes a menu node, a page node including a parent node and child nodes, and a decision array corresponding to each node one to one;
a decision tree rearrangement module 82, configured to perform decision tree rearrangement based on the decision array of each node when a decision tree exists in the cache of the client;
a first searching module 83, configured to search whether a child node exists in the first target page in a decision tree;
a preloading module 84, configured to, when a child node exists in the first target page, preload at least one child node of the first target page into a cache of a client according to a decision tree;
the second searching module 85 is configured to, when a page is switched to a second target page, search, in a cache of the client, whether a child node to which the second target page belongs exists;
a first updating module 86, configured to load data of the second target page from the cache of the client when the child node to which the second target page belongs exists, and update the decision tree based on the page switching of this time;
and a second updating module 87, configured to send a request to the server to obtain data of the second target page if there is no child node to which the second target page belongs, and update the decision tree based on the page switching this time.
According to the BS framework page response time optimization device, the decision tree is built in the cache of the client through the page access path, the decision tree is dynamically updated according to the user page switching operation behavior, the range of the user jump operation target page is pre-judged, page data are preloaded, page response time is shortened, and user experience is improved.
It should be noted that, for specific limitations of the BS architecture page response time optimization apparatus, reference may be made to the above limitations of the BS architecture page response time optimization method, which is not described herein again. The various modules in the BS architecture page response time optimization apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
According to another aspect of the present invention, a computer device is provided, and the computer device may be a server, and its internal structure is shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements the BS architecture page response time optimization method described above, in particular, the method comprising the steps of:
responding to a user login client system to load a first target page, and judging whether a decision tree exists in a cache of a client or not, wherein the decision tree comprises a menu node, a page node containing a parent node and a child node, and a decision array corresponding to each node one by one;
in response to the decision tree existing in the cache of the client, carrying out decision tree rearrangement based on the decision array of each node;
searching whether a child node exists in the first target page or not in a decision tree;
in response to the first target page having child nodes, preloading at least one child node of the first target page into a cache of a client according to a decision tree;
responding to the switching of the page to a second target page, and searching whether a child node to which the second target page belongs exists in a cache of the client;
if the child node to which the second target page belongs exists, loading data of the second target page from a cache of the client, and updating the decision tree based on the page switching;
and if the child node to which the second target page belongs does not exist, sending a request to a server to acquire data of the second target page, and updating the decision tree based on the page switching.
According to yet another aspect of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the BS architecture page response time optimization method described above, and in particular, comprises performing the steps of:
responding to a user login client system to load a first target page, and judging whether a decision tree exists in a cache of a client or not, wherein the decision tree comprises a menu node, a page node containing a parent node and a child node, and a decision array corresponding to each node one by one;
in response to the decision tree existing in the cache of the client, carrying out decision tree rearrangement based on the decision array of each node;
searching whether a child node exists in the first target page or not in a decision tree;
in response to the first target page having child nodes, preloading at least one child node of the first target page into a cache of a client according to a decision tree;
responding to the switching of the page to a second target page, and searching whether a child node to which the second target page belongs exists in a cache of the client;
if the child node to which the second target page belongs exists, loading data of the second target page from a cache of the client, and updating the decision tree based on the page switching;
and if the child node to which the second target page belongs does not exist, sending a request to a server to acquire data of the second target page, and updating the decision tree based on the page switching.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A BS architecture page response time optimization method, the method comprising:
responding to a user login client system to load a first target page, and judging whether a decision tree exists in a cache of a client or not, wherein the decision tree comprises a menu node, a page node containing a parent node and a child node, and a decision array corresponding to each node one by one, and in the decision tree, a terminal node which the parent node is possible to jump is defined as a child node of the parent node;
in response to the decision tree existing in the cache of the client, carrying out decision tree rearrangement based on the decision array of each node;
searching whether a child node exists in the first target page or not in the decision tree;
in response to the first target page having child nodes, preloading at least one child node of the first target page into a cache of a client according to a decision tree;
responding to the switching of the page to a second target page, and searching whether a child node to which the second target page belongs exists in a cache of the client;
if the child node to which the second target page belongs exists, loading data of the second target page from a cache of the client, and updating the decision tree based on the page switching;
and if the child node to which the second target page belongs does not exist, sending a request to a server to acquire data of the second target page, and updating the decision tree based on the page switching.
2. The BS architecture page response time optimization method of claim 1, further comprising:
enumerating menus, pages and page access paths in the system in response to the fact that no decision tree exists in the cache of the client;
taking the menu as a parent node of the page and constructing a decision tree according to a corresponding page access path;
creating a decision array for each node, wherein the decision array comprises a weighting index array and a weighting coefficient array, the weighting index array comprises a plurality of access indexes, and the weighting coefficient array comprises a weighting coefficient corresponding to each access index;
initializing each access index of each node to zero, and respectively configuring a weight coefficient of each access index based on a plurality of preset values.
3. The BS architecture page response time optimization method of claim 2, wherein the weighted index array comprises a first index representing access frequency, a second index representing access frequency of a last preset number of days, and a third index representing last access time and current time interval; the weighting coefficient array comprises a first coefficient, a second coefficient and a third coefficient which respectively correspond to the first index, the second index and the third index.
4. The BS architecture page response time optimization method of claim 3, wherein in response to the decision tree existing in the cache of the client, the step of performing decision tree reordering based on the decision array of each node comprises:
updating the first index, the second index and the third index of each node according to the current time;
respectively and correspondingly multiplying the updated first index, second index and third index with the first coefficient, second coefficient and third coefficient, and adding to obtain the total weight of each node;
and sequencing the nodes of the decision tree according to the total weight of each node and the same father node in the same hierarchy, wherein the sequencing rule is that the total weight of the nodes is arranged from left to right from big to small.
5. The BS architecture page response time optimization method of claim 4, wherein the step of preloading at least one child node of the first target page into a cache of a client according to a decision tree in response to the child node being present in the first target page comprises:
acquiring the number of all child nodes taking the first target page as a parent node and comparing the number with a preset number;
in response to the fact that the number of all the child nodes is smaller than or equal to the preset number, all the child nodes of the first target page are loaded into a cache of the client;
and in response to that the number of all the child nodes is larger than the preset number, loading the child nodes with the preset number on the left side in all the child nodes corresponding to the first target page in the decision tree to a cache.
6. The BS architecture page response time optimization method of claim 3, wherein the step of loading data of the second target page from a cache of the client if the child node to which the second target page belongs exists, and updating the decision tree based on the current page switch includes:
loading second target page data in a cache of the client and performing page rendering data;
and updating the first index, the second index and the third index of the child node of the second target page in the decision tree based on the current time.
7. The BS architecture page response time optimization method of claim 3, wherein the step of sending a request to a server to obtain data of the second target page if there is no child node to which the second target page belongs, and updating the decision tree based on the current page switch includes:
judging whether a second target page exists in all child nodes of a first target page in the current decision tree or not;
if the second target page exists in all the child nodes, updating the decision array of the child node to which the second target page belongs;
and if the second target page does not exist in all the child nodes, the first target page is taken as the parent node, the second target page is added as the child node, and the first index, the second index and the third index of the added child node are updated.
8. An apparatus for BS architecture page response time optimization, the apparatus comprising:
the system comprises a judging module, a cache module and a cache module, wherein the judging module is used for judging whether a decision tree exists in the cache of a client when a user logs in a client system to load a first target page, the decision tree comprises menu nodes, page nodes containing parent nodes and child nodes and decision arrays corresponding to each node one by one, and in the decision tree, terminal nodes which the parent nodes can jump are defined as child nodes of the parent nodes;
the decision tree rearrangement module is used for carrying out decision tree rearrangement based on the decision array of each node when the decision tree exists in the cache of the client;
the first searching module is used for searching whether a child node exists in the first target page in the decision tree;
the pre-loading module is used for pre-loading at least one sub-node of the first target page into a cache of a client according to a decision tree when the sub-node exists in the first target page;
the second searching module is used for searching whether a child node to which the second target page belongs exists in a cache of the client when the page is switched to the second target page;
the first updating module is used for loading data of the second target page from a cache of the client when the child node to which the second target page belongs exists, and updating the decision tree based on the page switching;
and the second updating module is used for sending a request to the server to acquire the data of the second target page when the child node to which the second target page belongs does not exist, and updating the decision tree based on the page switching.
9. A computer device, comprising:
at least one processor; and
a memory storing a computer program operable in the processor, the processor when executing the program performing the BS architecture page response time optimization method of any of claims 1-7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, performs the BS architecture page response time optimization method of any one of claims 1-7.
CN202110765599.8A 2021-07-07 2021-07-07 BS architecture page response time optimization method, device, equipment and medium Pending CN113204726A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110765599.8A CN113204726A (en) 2021-07-07 2021-07-07 BS architecture page response time optimization method, device, equipment and medium
PCT/CN2021/127522 WO2023279595A1 (en) 2021-07-07 2021-10-29 Method and apparatus for optimizing b/s architecture page response time, device, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110765599.8A CN113204726A (en) 2021-07-07 2021-07-07 BS architecture page response time optimization method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN113204726A true CN113204726A (en) 2021-08-03

Family

ID=77022747

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110765599.8A Pending CN113204726A (en) 2021-07-07 2021-07-07 BS architecture page response time optimization method, device, equipment and medium

Country Status (2)

Country Link
CN (1) CN113204726A (en)
WO (1) WO2023279595A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590100A (en) * 2021-09-28 2021-11-02 深圳市信润富联数字科技有限公司 Front-end interface processing method, system, electronic equipment and storage medium
CN114764354A (en) * 2022-04-19 2022-07-19 卡奥斯工业智能研究院(青岛)有限公司 Dependency management method and device based on PAAS, electronic equipment and medium
CN114816639A (en) * 2022-04-24 2022-07-29 招银云创信息技术有限公司 Page display method, device, equipment, storage medium and program product
WO2023279595A1 (en) * 2021-07-07 2023-01-12 苏州浪潮智能科技有限公司 Method and apparatus for optimizing b/s architecture page response time, device, and medium
CN115795203A (en) * 2023-01-30 2023-03-14 北京志翔科技股份有限公司 Menu page construction method and device, electronic equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116701791B (en) * 2023-07-20 2023-10-20 国信蓝桥教育科技股份有限公司 Course recommendation method and system based on artificial intelligence

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102446222A (en) * 2011-12-22 2012-05-09 华为技术有限公司 Method, device and system of webpage content preloading
CN103152426A (en) * 2013-03-19 2013-06-12 北京奇虎科技有限公司 Server, system and method for preloading webpage browsed by client side
CN103279538A (en) * 2013-06-03 2013-09-04 北京奇虎科技有限公司 Server, browser client side and method for preloading webpages in visited websites
CN110007978A (en) * 2018-11-20 2019-07-12 阿里巴巴集团控股有限公司 A kind of method, device and equipment preloading the page
CN111737616A (en) * 2020-06-05 2020-10-02 苏州浪潮智能科技有限公司 Page caching method, device, equipment and medium based on B/S architecture

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109600447B (en) * 2018-12-21 2021-08-10 北京百度网讯科技有限公司 Method, device and system for processing data
CN113204726A (en) * 2021-07-07 2021-08-03 苏州浪潮智能科技有限公司 BS architecture page response time optimization method, device, equipment and medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102446222A (en) * 2011-12-22 2012-05-09 华为技术有限公司 Method, device and system of webpage content preloading
CN103152426A (en) * 2013-03-19 2013-06-12 北京奇虎科技有限公司 Server, system and method for preloading webpage browsed by client side
CN103279538A (en) * 2013-06-03 2013-09-04 北京奇虎科技有限公司 Server, browser client side and method for preloading webpages in visited websites
CN110007978A (en) * 2018-11-20 2019-07-12 阿里巴巴集团控股有限公司 A kind of method, device and equipment preloading the page
CN111737616A (en) * 2020-06-05 2020-10-02 苏州浪潮智能科技有限公司 Page caching method, device, equipment and medium based on B/S architecture

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023279595A1 (en) * 2021-07-07 2023-01-12 苏州浪潮智能科技有限公司 Method and apparatus for optimizing b/s architecture page response time, device, and medium
CN113590100A (en) * 2021-09-28 2021-11-02 深圳市信润富联数字科技有限公司 Front-end interface processing method, system, electronic equipment and storage medium
CN114764354A (en) * 2022-04-19 2022-07-19 卡奥斯工业智能研究院(青岛)有限公司 Dependency management method and device based on PAAS, electronic equipment and medium
CN114764354B (en) * 2022-04-19 2024-01-05 卡奥斯工业智能研究院(青岛)有限公司 PAAS-based dependency management method, PAAS-based dependency management device, electronic equipment and medium
CN114816639A (en) * 2022-04-24 2022-07-29 招银云创信息技术有限公司 Page display method, device, equipment, storage medium and program product
CN115795203A (en) * 2023-01-30 2023-03-14 北京志翔科技股份有限公司 Menu page construction method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
WO2023279595A1 (en) 2023-01-12

Similar Documents

Publication Publication Date Title
CN113204726A (en) BS architecture page response time optimization method, device, equipment and medium
Zhou et al. Multi-population parallel self-adaptive differential artificial bee colony algorithm with application in large-scale service composition for cloud manufacturing
CN110677433B (en) Method, system, equipment and readable storage medium for predicting network attack
KR102456900B1 (en) Data analysis system based on edge computing and method thereof
CN111881477A (en) Indexing method and device of data content, computer equipment and storage medium
EP4250593A1 (en) Satellite terminal access management method, core network, computer apparatus, and storage medium
JP2020060922A (en) Hyper parameter tuning method, device and program
JP2016173784A (en) Tensor factorization processing device, tensor factorization processing method, and tensor factorization processing program
CN113504918A (en) Equipment tree configuration optimization method and device, computer equipment and storage medium
CN108965016B (en) Mapping method and device of virtual network
CN109245948B (en) Security-aware virtual network mapping method and device
CN111539517A (en) Graph convolution neural network generation method based on graph structure matrix characteristic vector
KR102484694B1 (en) Method, apparatus and computer program for inspecting work quality of gig workers qa platform worker and calculating rewards
CN111008873A (en) User determination method and device, electronic equipment and storage medium
CN111343259B (en) Binary code-based cloud task scheduling method, server and storage medium
CN113449863A (en) Neural network quantization method based on table lookup
CN111427890A (en) Multi-table connection processing method, device, equipment and storage medium
CN112181831A (en) Script performance verification method, device and equipment based on keywords and storage medium
CN112118135A (en) Minimum resource configuration method and device for cloud edge cooperative architecture industrial internet platform
CN112256705A (en) Multi-table connection optimization method in Gaia system
JP5375065B2 (en) Information analysis apparatus and program
CN117175664B (en) Energy storage charging equipment output power self-adaptive adjusting system based on use scene
CN110926524B (en) Method for predicting coupling relation between network resources and environment
CN114817315B (en) Data processing method and system
CN112118278B (en) Computing node access method, device, electronic equipment and machine-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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210803