Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: when a page display instruction is received, judging whether a cache list caches page parameters of a page to be displayed corresponding to the page display instruction; when the page parameters are cached in the cache list, generating a page request according to the page parameters, and sending the page request to a corresponding server;
in the prior art, when a user opens the same page, the server issues the page to the browser according to the default page parameter of the page, that is, the page contents are the same when the user opens the same page each time; therefore, the user needs to operate the page again to browse the corresponding page content, and the user experience is reduced.
The invention provides a solution, the page parameter of the page to be displayed is the page parameter after the page to be displayed last time is opened, so that the content on the currently displayed page to be displayed is consistent with the content of the page to be displayed last time, and the user experience is ensured.
As shown in fig. 1, the system architecture related to the method of the present embodiment includes a terminal and a server.
The terminal of the embodiment of the invention can be a PC, and can also be a mobile terminal device which has a display function and is provided with a browser, such as a smart phone, a tablet computer, an electronic book reader and the like.
The terminal is used for acquiring page parameters and default page parameters of the page to be displayed, generating a page request, sending the page request to the server and receiving the page to be displayed sent by the server;
and the server is used for receiving the page request sent by the terminal, acquiring the page to be displayed according to the page request, and sending the page to be displayed to the terminal by the user.
As an implementation scheme, the hardware structure of the terminal may be as shown in fig. 2.
Referring to fig. 2, the terminal may include: a processor 1001, such as a CPU, a memory 1005, a communication bus 1002, a network interface 1004, and a user interface 1003. The communication bus 1002 is used for implementing connection communication between the components in the server. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration of the terminal shown in fig. 2 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 2, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a display program of pages.
In the terminal shown in fig. 2, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call a display program of a page stored in the memory 1005 and perform the following operations:
when a page display instruction is received, judging whether a cache list caches page parameters of a page to be displayed corresponding to the page display instruction;
when the page parameters are cached in the cache list, generating a page request according to the page parameters, and sending the page request to a corresponding server;
and displaying the page fed back by the server.
Further, the processor 1001 may call a display program of a page stored in the memory 1005, and also perform the following operations:
when the page parameters are not cached in the cache list, generating a page request according to default page parameters, and sending the page request to a corresponding server;
and displaying the page fed back by the server.
Further, the processor 1001 may call a display program of a page stored in the memory 1005, and also perform the following operations:
when the capacity of the cache space is detected to reach a preset threshold value, judging whether a page corresponding to each page parameter of the cache space is displayed within a preset time length;
and deleting the page parameters corresponding to the pages which are not displayed within the preset time length.
Further, the processor 1001 may call a display program of a page stored in the memory 1005, and also perform the following operations:
when the operation aiming at the current display page is detected, acquiring the page parameters after the operation;
and updating the cached page parameters by adopting the page parameters.
Further, the processor 1001 may call a display program of a page stored in the memory 1005, and also perform the following operations:
when the closing of the page is detected, acquiring the current page parameters of the page to be closed;
and updating the cached page parameters by adopting the page parameters.
According to the scheme, when a display instruction of the page is received, the page parameters of the page to be displayed in the cache list are obtained, then, a page request is generated according to the page parameters and is sent to the server, so that the page to be displayed is displayed; because the page parameter is the page parameter after the last page to be displayed is opened, the content on the currently displayed page to be displayed is consistent with the content of the last displayed page to be displayed, and therefore the user experience is ensured.
Based on the hardware architecture, the embodiment of the page display method is provided.
Referring to fig. 3, fig. 3 is a first embodiment of a page display method according to the present invention, where the page display method includes:
step S10, when a page display instruction is received, judging whether a cache list caches page parameters of a page to be displayed corresponding to the page display instruction;
in the invention, the page to be displayed refers to a page that a user wants to browse. The page to be displayed is stored in the server in a document form, and a user can display the page to be displayed through a browser connected with the server. The name (image or text) representing the page to be displayed is displayed on the browser page, and the user can click the name representing the page to be displayed on the browser to display the page to be displayed for browsing, of course, the user can also directly input the name of the page to be displayed in a search bar of the browser page to search for the page to be displayed, or the user can directly input the IP address of the page to be displayed in an address bar of the browser page to display. The behavior that a user clicks the name of a page to be displayed on a browser page, inputs the name of the page to be displayed on the browser page and inputs the address of the page to be displayed on an address bar of the browser page can trigger a display instruction of the page.
The page parameters of a page include the state, attributes, content, and address of the page, among others. When a user browses a page, if a page parameter of the page changes when the user operates the page, for example, when the user clicks an item on a shopping website, the page displays a pull-down menu of the item content, and at this time, the content of the page increases, and then the corresponding page parameter of the page also changes. In the invention, the page parameters cached in the page in the cache list can be updated, and certainly, the server can also receive and bind the updated page parameters and the page corresponding to the updated page parameters.
Step S20, when the page parameter is cached in the cache list, a page request is generated according to the page parameter and is sent to a corresponding server;
step S30, displaying the page fed back by the server;
the page request comprises page parameters of a page to be displayed and an acquisition request of the page to be displayed, when the server receives the page request, the server analyzes the page parameters of the page to be displayed according to the page request, then searches the page to be displayed bound with the page parameters, and sends the page to be displayed to the browser, so that the browser displays the page to be displayed.
When the user finishes browsing the page, the browser records the page parameters of the sub-page where the user is located last and uploads the page parameters to the server, and when the user browses the page next time, the user directly jumps to the sub-page. For example, a certain page contains 5 sub-pages, when a user closes the page, the browsed page is the 5 th sub-page, the browser records the page parameters of the 5 th sub-page in a cache (cache list cache), replaces the previous page parameters, uploads the page parameters of the 5 th page to the server, when the user requests to open the page again, the page parameters of the 5 th page are obtained from the cache list, generates a page request and sends the page request to the server, and the server obtains the 5 th sub-page (binding the sub-page with the parameters of the sub-page) according to the page request and sends the 5 th sub-page to the browser for display, so that the 5 th sub-page of the page is directly opened by the user instead of the 1 st sub-page. In addition, the browser can record the behaviors of the sub-pages operated by the user, reorganize and sort the contents corresponding to the operations, and when the user opens the page next time, the 1 st sub-page of the page shows the contents of the page browsed last by the user, for example, when the user views trousers of the 2 nd sub-page, shoes of the 3 rd sub-page and socks of the 4 th sub-page, then when the page is opened next time, the 1 st sub-page of the page shows the trousers, shoes and socks watched last time by the user.
The user can register an account number on a server connected with the browser, and the user account number is bound with a cache list of the browser, so that when the user opens a page opened before, the browser can directly acquire cached page parameters according to the cache list bound by the user account number, and certainly, the server can directly bind an identity of a terminal (a mobile phone or a computer) loaded with the browser with the cache list.
According to the technical scheme, when a display instruction of a page is received, page parameters of the page to be displayed in a cache list are obtained, then, a page request is generated according to the page parameters and sent to a server so as to display the page to be displayed; because the page parameter is the page parameter after the last page to be displayed is opened, the content on the currently displayed page to be displayed is consistent with the content of the last displayed page to be displayed, and therefore the user experience is ensured.
Referring to fig. 4, fig. 4 is a second embodiment of the page display method according to the present invention, and based on the above embodiment, after step S10, the method further includes: the method for displaying the page according to claim 1, wherein after the step of determining whether the first page parameter of the page to be displayed is cached in the cache list, the method further comprises:
step S40, when the page parameter is not cached in the cache list, generating a page request according to the default page parameter, and sending the page request to a corresponding server;
step S50, displaying the page fed back by the server;
when the page parameters of the page are not cached in the cache list of the browser, the browser generates a page request according to the default page parameters and sends the page request to the server, the server generates a page to be displayed according to the page analysis request and the default page parameter configuration of the page, and then the page to be displayed is sent to the browser, so that the browser displays the page to be displayed.
The following description is made with reference to specific examples:
the user inputs 'cool dog' into the browser to browse the cool dog page, and the browser is provided with default page parameters of the cool dog page, so that the browser generates a page request according to the default page parameters of the cool dog page and sends the page request to the server, the server analyzes the default page parameters of the cool dog page according to the page request, searches the cool dog page according to the default page parameters and sends the cool dog page to the browser.
When the browser does not store the default parameters of the page, that is, the user randomly inputs content, such as 'mail', the browser sends a request for displaying a mail page to the server, the server receives the request, extracts the content (mail) input by the user, then generates the page, the page is configured with all content related to the mail, and the server binds and stores the parameters represented by the content and the page and sends the parameters and the content to the browser together, so that the browser displays the page.
In the technical scheme provided by this embodiment, when the page parameter of the page to be displayed is not cached in the cache list, the page request is generated according to the default page parameter and is sent to the server, and after the server generates the page according to the page request configuration, the page is fed back to the browser, so that the browser displays the page to be displayed, and the display of the page to be displayed is more reasonable.
Referring to fig. 5, fig. 5 is a third embodiment of the page display method according to the present invention, and based on any one of the first to second embodiments, the page display method further includes:
step S60, when the capacity of the cache space is detected to reach a preset threshold value, judging whether the page corresponding to each page parameter of the cache space is displayed within a preset time length;
step S70, deleting the page parameters corresponding to the page which is not displayed in the preset duration;
when a user browses a page each time, the terminal caches the page parameters of the page in the cache list, and the capacity of the cache space of the terminal is limited, so that when the capacity of data stored in the cache space of the terminal reaches a certain value (preset threshold), some page parameters which are not commonly used in the cache list in the cache space need to be cleared to vacate the space.
When the page parameters of the page are cached in the cache list, the cache time moment of the page parameters is also recorded, and when the page parameters need to be cleared, if the time interval between the page parameter cache time point of the page and the current time point is longer than the preset time length, the terminal clears the page parameters.
If the page corresponding to the page parameter is set by the terminal and is not displayed within 7 days, deleting the page parameter, for example, if the cache time point of a certain page parameter is 2017, month 1, 12 and 30 minutes, and the time point of the terminal for clearing the page parameter is 2017, month 1, 9, 12 and 30 minutes, and the time interval is 8 days, deleting the page parameter by the terminal. The preset time period may be any suitable value.
According to the technical scheme, when the capacity of the cache space reaches a certain value, the page parameters corresponding to the page which is not displayed within the preset time length are deleted, so that the user can store the page parameters of the browsed page, and the user experience is guaranteed.
Referring to fig. 6, fig. 6 is a fourth embodiment of the page display method according to the present invention, and based on any one of the first to third embodiments, after step S30, the method further includes:
step S80, when detecting the operation aiming at the current display page, obtaining the page parameter after the operation;
step S90, updating the cached page parameters by adopting the page parameters;
and displaying the page to be displayed, updating the page parameters of the page to be displayed after detecting the operation based on the page to be displayed, and sending the updated page parameters and the updated page to be displayed to the server. After the page to be displayed is displayed, the user operates the page, the page changes according to the operation of the user, the page parameters of the page also change, and the terminal sends the changed page and the page parameters to the server, so that the user opens the page next time and displays the page content browsed by the current user. By adopting the mode, when the page is abnormally closed, the browser can recover the page operated by the user for the last time according to the randomly updated page parameters.
In the technical scheme provided by this embodiment, after the page to be displayed is displayed, if the user operates the page, the page parameters of the page may change, and the cache list may update the page parameters of the page, so that when the user opens the page next time, browsing is an updated page, and the user experience is increased.
Referring to fig. 7, fig. 7 is a fifth embodiment of the page displaying method according to the present invention, and based on any one of the first to third embodiments, after step S30, the method further includes:
step S100, when the closing of the page is detected, acquiring the current page parameters of the page to be closed;
step S110, updating cached page parameters by adopting the page parameters;
when the page is closed, the browser acquires the page parameters of the page at the moment and caches the page parameters in the cache list. By adopting the mode, the cache list of the browser does not need to update the page parameters of the page all the time, and the operation of the browser is reduced.
In the technical scheme provided by this embodiment, when the page is closed, the page parameters of the page at the moment are cached in the cache list, so that the browser does not need to update the page parameters of the page all the time, and the operation of the browser is reduced.
Referring to fig. 8, fig. 8 is a first embodiment of a display apparatus of a page of the present invention, which includes a judgment program 10, a generation program 20, and a display program 30;
the judging program 10 is configured to, when a page display instruction is received, judge whether a cache list caches a page parameter of a page to be displayed corresponding to the page display instruction;
in the invention, the page to be displayed refers to a page that a user wants to browse. The page to be displayed is stored in the server in a document form, and a user can display the page to be displayed through a browser connected with the server. The name (image or text) representing the page to be displayed is displayed on the browser page, and the user can click the name representing the page to be displayed on the browser to display the page to be displayed for browsing, of course, the user can also directly input the name of the page to be displayed in a search bar of the browser page to search for the page to be displayed, or the user can directly input the IP address of the page to be displayed in an address bar of the browser page to display. The behavior that a user clicks the name of a page to be displayed on a browser page, inputs the name of the page to be displayed on the browser page and inputs the address of the page to be displayed on an address bar of the browser page can trigger a display instruction of the page.
The page parameters of a page include the state, attributes, content, and address of the page, among others. When a user browses a page, if a page parameter of the page changes when the user operates the page, for example, when the user clicks an item on a shopping website, the page displays a pull-down menu of the item content, and at this time, the content of the page increases, and then the corresponding page parameter of the page also changes. In the invention, the page parameters cached in the page in the cache list can be updated, and certainly, the server can also receive and bind the updated page parameters and the page corresponding to the updated page parameters.
The generating program 20 is configured to generate a page request according to the page parameter when the page parameter is cached in the cache list, and send the page request to a corresponding server;
the display program 30 is configured to display a page fed back by the server;
the page request comprises page parameters of a page to be displayed and an acquisition request of the page to be displayed, when the server receives the page request, the server analyzes the page parameters of the page to be displayed according to the page request, then searches the page to be displayed bound with the page parameters, and sends the page to be displayed to the browser, so that the browser displays the page to be displayed.
When the user finishes browsing the page, the browser records the page parameters of the sub-page where the user is located last and uploads the page parameters to the server, and when the user browses the page next time, the user directly jumps to the sub-page. For example, a certain page contains 5 sub-pages, when a user closes the page, the browsed page is the 5 th sub-page, the browser records the page parameters of the 5 th sub-page in a cache (cache list cache), replaces the previous page parameters, uploads the page parameters of the 5 th page to the server, when the user requests to open the page again, the page parameters of the 5 th page are obtained from the cache list, generates a page request and sends the page request to the server, and the server obtains the 5 th sub-page (binding the sub-page with the parameters of the sub-page) according to the page request and sends the 5 th sub-page to the browser for display, so that the 5 th sub-page of the page is directly opened by the user instead of the 1 st sub-page. In addition, the browser can record the behaviors of the sub-pages operated by the user, reorganize and sort the contents corresponding to the operations, and when the user opens the page next time, the 1 st sub-page of the page shows the contents of the page browsed last by the user, for example, when the user views trousers of the 2 nd sub-page, shoes of the 3 rd sub-page and socks of the 4 th sub-page, then when the page is opened next time, the 1 st sub-page of the page shows the trousers, shoes and socks watched last time by the user.
The user can register an account number on a server connected with the browser, and the user account number is bound with a cache list of the browser, so that when the user opens a page opened before, the browser can directly acquire cached page parameters according to the cache list bound by the user account number, and certainly, the server can directly bind an identity of a terminal (a mobile phone or a computer) loaded with the browser with the cache list.
According to the technical scheme, when a display instruction of a page is received, page parameters of the page to be displayed in a cache list are obtained, then, a page request is generated according to the page parameters and sent to a server so as to display the page to be displayed; because the page parameter is the page parameter after the last page to be displayed is opened, the content on the currently displayed page to be displayed is consistent with the content of the last displayed page to be displayed, and therefore the user experience is ensured.
Based on the embodiment shown in fig. 8, the generating program 20 is further configured to generate a page request according to a default page parameter when the page parameter is not cached in the cache list, and send the page request to a corresponding server;
the display program 30 is further configured to display a page fed back by the server;
when the page parameters of the page are not cached in the cache list of the browser, the browser generates a page request according to the default page parameters and sends the page request to the server, the server generates a page to be displayed according to the page analysis request and the default page parameter configuration of the page, and then the page to be displayed is sent to the browser, so that the browser displays the page to be displayed.
The following description is made with reference to specific examples:
the user inputs 'cool dog' into the browser to browse the cool dog page, and the browser is provided with default page parameters of the cool dog page, so that the browser generates a page request according to the default page parameters of the cool dog page and sends the page request to the server, the server analyzes the default page parameters of the cool dog page according to the page request, searches the cool dog page according to the default page parameters and sends the cool dog page to the browser.
When the browser does not store the default parameters of the page, that is, the user randomly inputs content, such as 'mail', the browser sends a request for displaying a mail page to the server, the server receives the request, extracts the content (mail) input by the user, then generates the page, the page is configured with all content related to the mail, and the server binds and stores the parameters represented by the content and the page and sends the parameters and the content to the browser together, so that the browser displays the page.
In the technical scheme provided by this embodiment, when the page parameter of the page to be displayed is not cached in the cache list, the page request is generated according to the default page parameter and is sent to the server, and after the server generates the page according to the page request configuration, the page is fed back to the browser, so that the browser displays the page to be displayed, and the display of the page to be displayed is more reasonable.
Referring to fig. 9, fig. 9 is a second embodiment of the display device of the page of the present invention, and based on the first embodiment, the display device of the page further includes a deleting program 40;
the interpretation program 10 is further configured to, when it is detected that the capacity of the cache space reaches a preset threshold, determine whether a page corresponding to each page parameter of the cache space is displayed within a preset time period;
the deleting program 40 is configured to delete a page parameter corresponding to a page that is not displayed within the preset duration;
when a user browses a page each time, the terminal caches the page parameters of the page in the cache list, and the capacity of the cache space of the terminal is limited, so that when the capacity of data stored in the cache space of the terminal reaches a certain value (preset threshold), some page parameters which are not commonly used in the cache list in the cache space need to be cleared to vacate the space.
When the page parameters of the page are cached in the cache list, the cache time moment of the page parameters is also recorded, and when the page parameters need to be cleared, if the time interval between the page parameter cache time point of the page and the current time point is longer than the preset time length, the terminal clears the page parameters.
If the page corresponding to the page parameter is set by the terminal and is not displayed within 7 days, deleting the page parameter, for example, if the cache time point of a certain page parameter is 2017, month 1, 12 and 30 minutes, and the time point of the terminal for clearing the page parameter is 2017, month 1, 9, 12 and 30 minutes, and the time interval is 8 days, deleting the page parameter by the terminal. The preset time period may be any suitable value.
According to the technical scheme, when the capacity of the cache space reaches a certain value, the page parameters corresponding to the page which is not displayed within the preset time length are deleted, so that the user can store the page parameters of the browsed page, and the user experience is guaranteed.
Referring to fig. 10, fig. 10 shows a third embodiment of the apparatus for displaying a page according to the present invention, which further includes an acquiring program 50 and an updating program 60
The acquiring program 50 is configured to, when an operation for a currently displayed page is detected, acquire a page parameter after the operation;
the updating program 60 is configured to update the cached page parameters by using the page parameters;
and displaying the page to be displayed, updating the page parameters of the page to be displayed after detecting the operation based on the page to be displayed, and sending the updated page parameters and the updated page to be displayed to the server. After the page to be displayed is displayed, the user operates the page, the page changes according to the operation of the user, the page parameters of the page also change, and the terminal sends the changed page and the page parameters to the server, so that the user opens the page next time and displays the page content browsed by the current user. By adopting the mode, when the page is abnormally closed, the browser can recover the page operated by the user for the last time according to the randomly updated page parameters.
In the technical scheme provided by this embodiment, after the page to be displayed is displayed, if the user operates the page, the page parameters of the page may change, and the cache list may update the page parameters of the page, so that when the user opens the page next time, browsing is an updated page, and the user experience is increased.
Based on the embodiment shown in fig. 10, the obtaining program 50 is further configured to obtain a current page parameter of a page to be closed when detecting that the page is closed;
the updating program 60 is further configured to update the cached page parameters by using the page parameters;
when the page is closed, the browser acquires the page parameters of the page at the moment and caches the page parameters in the cache list. By adopting the mode, the cache list of the browser does not need to update the page parameters of the page all the time, and the operation of the browser is reduced.
In the technical scheme provided by this embodiment, when the page is closed, the page parameters of the page at the moment are cached in the cache list, so that the browser does not need to update the page parameters of the page all the time, and the operation of the browser is reduced.
The present invention also provides a computer-readable storage medium, in which a display program of a page is stored, and when executed by the processor, the steps of the display method of a page according to the above embodiment are implemented.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a television, a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.