CN111597475B - Page returning method and device, electronic equipment and computer storage medium - Google Patents

Page returning method and device, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN111597475B
CN111597475B CN202010316911.0A CN202010316911A CN111597475B CN 111597475 B CN111597475 B CN 111597475B CN 202010316911 A CN202010316911 A CN 202010316911A CN 111597475 B CN111597475 B CN 111597475B
Authority
CN
China
Prior art keywords
page
operation instruction
specified
identifier
data
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.)
Active
Application number
CN202010316911.0A
Other languages
Chinese (zh)
Other versions
CN111597475A (en
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.)
Wuba Co Ltd
Original Assignee
Wuba 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 Wuba Co Ltd filed Critical Wuba Co Ltd
Priority to CN202010316911.0A priority Critical patent/CN111597475B/en
Publication of CN111597475A publication Critical patent/CN111597475A/en
Application granted granted Critical
Publication of CN111597475B publication Critical patent/CN111597475B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

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

Abstract

The application discloses a method, a device, electronic equipment and a computer storage medium for returning a page, wherein a first operation instruction generated when a user browses a specified page is received, the specified page jumps to a next-level page, and a specified identifier is generated; receiving a second operation instruction which is generated when a user browses a next-level page and carries an identifier; comparing the designated identifier with the identifier, and if the designated identifier is consistent with the identifier, determining that the second operation instruction is a jump return instruction; at the moment, the appointed cache data of the appointed page is obtained and displayed according to the jump return instruction. Therefore, the method provided by the invention can cache the data of the upper-level page after jumping from one page to another page, so that when the current page returns to the upper-level page, the data of the upper-level page is not refreshed, but the cached data of the upper-level page is displayed. The user can continue browsing according to the positioned position of the page, so that the user is prevented from browsing the page again, and the problem of time consumption is solved.

Description

Page returning method and device, electronic equipment and computer storage medium
Technical Field
The present application relates to the field of web page design technologies, and in particular, to a method and an apparatus for returning a page, an electronic device, and a computer storage medium.
Background
When a user browses a page through a browser, when the user jumps to a next-level page from a specified page, data of the specified page can be recycled, and if the user wants to jump to the specified page from the next-level page again, new data of the specified page presented by the browser is caused, so that user experience is influenced.
For example, when a user browses a list page of a commodity on a shopping website, the user usually sets a screening condition in a category presented in the list page, and after screening, selects one of the commodity items in a screening result to browse, and clicks to enter a detail page. If the user wants to browse the next item, the list page needs to be jumped back again from the details page. However, after the browser performs a jump operation, the setting data of the list page is cleared, so that when the user jumps back to the list page from the detail page, the refreshed list page is displayed, which may be a page without category screening setting.
It can be seen that, during browsing, if a user wants to return to a specified page and continue browsing from a previously browsed location, it usually takes time to reload to the previously visited location. For example, if a user wants to continue browsing from a list page with a set filtering condition, it usually takes time to set the filtering condition on the list page again, which is a problem of labor and time consumption and poor user experience.
Disclosure of Invention
The application provides a page returning method, a page returning device, electronic equipment and a computer storage medium, which are used for solving the problems that when the existing page is returned, the page is easy to refresh again, and the time consumed for browsing the page is shortened.
In a first aspect, the present application provides a method for returning a page, including the following steps:
receiving a first operation instruction generated when a user browses a specified page, wherein the first operation instruction is used for realizing the jump operation of a next-level page from the specified page;
generating a designated identifier in the process of jumping from the designated page to a next-level page, wherein the designated identifier is used for identifying the jumping process from the designated page to the next-level page;
receiving a second operation instruction generated when a user operates the next-level page, wherein the second operation instruction carries an identifier; the second operation instruction is used for realizing one operation of jump return, jump to the next level or page refreshing, and the identifier is used for identifying the process of jumping to other pages from the next level page;
if the identifier carried in the second operation instruction is consistent with the designated identifier, determining that the second operation instruction is a jump return instruction;
acquiring appointed cache data of the appointed page, wherein the appointed cache data is stored when the upper-level page jumps to the appointed page;
and responding to the jump return instruction, jumping and returning to a specified page by the next-level page, and displaying the specified page according to the specified cache data.
Further, if the identifier carried in the second operation instruction is consistent with the specified identifier, determining that the second operation instruction is a jump return instruction includes:
when the identifier carried in the second operation instruction is consistent with the designated identifier, acquiring the generation time of the first operation instruction and the generation time of the second operation instruction;
calculating a time interval of the generation time of the first operation instruction and the generation time of the second operation instruction;
and if the time interval does not exceed the waiting time threshold, determining that the second operation instruction is a jump return instruction.
Further, the obtaining of the specified cache data of the specified page includes:
after the second operation instruction is determined to be a jump return instruction, judging whether specified cache data of a specified page are stored or not;
and if the specified cache data of the specified page is stored, loading the specified cache data of the specified page.
Further, still include:
if the specified cache data of the specified page is not stored, generating a page data request, and sending the page data request to the server, wherein the page data request is used for the server to issue new page data of the specified page, and the new page data refers to the refreshed data of the specified page;
receiving new page data of the specified page returned by the server;
and displaying the new page data.
Further, still include:
if the identifier carried in the second operation instruction is not consistent with the designated identifier, determining that the second operation instruction is a normal operation instruction, wherein the normal operation instruction is used for realizing the jump from the next-level page to another page;
generating a page data request and sending the page data request to a server, wherein the page data request is used for the server to issue page data of another page;
receiving page data of another page returned by the server;
and displaying the page data.
Further, the normal operation instruction comprises a refresh next-level page operation instruction and a new page jump operation instruction; and if the identifier carried in the second operation instruction is inconsistent with the specified identifier, determining that the second operation instruction is a normal operation instruction, including:
when the identifier carried in the second operation instruction is not consistent with the designated identifier, acquiring a page information ID corresponding to the next level page and a page information ID corresponding to the second operation instruction;
if the page information ID corresponding to the next-level page is consistent with the page information ID corresponding to the second operation instruction, determining that the second operation instruction is a next-level page refreshing operation instruction;
and if the page information ID corresponding to the next-level page is not consistent with the page information ID corresponding to the second operation instruction, determining that the second operation instruction is a new page jump operation instruction.
In a second aspect, the present application provides an apparatus for returning a page, comprising:
the first operation instruction receiving module is used for receiving a first operation instruction generated when a user browses a specified page, and the first operation instruction is used for realizing the jump operation of a next-level page from the specified page;
the designated identifier generating module is used for generating a designated identifier in the process of jumping from the designated page to the next page, and the designated identifier is used for identifying the jumping process from the designated page to the next page;
a second operation instruction receiving module, configured to receive a second operation instruction generated when a user operates the next-level page, where the second operation instruction carries an identifier; the second operation instruction is used for realizing one operation of jump return, jump to the next level or page refreshing, and the identifier is used for identifying the process of jumping to other pages from the next level page;
a jump return instruction determining module, configured to determine that the second operation instruction is a jump return instruction when the identifier carried in the second operation instruction is consistent with the specified identifier;
the specified cache data acquisition module is used for acquiring specified cache data of the specified page, wherein the specified cache data is stored when the upper-level page jumps to the specified page;
and the jump return instruction response module is used for responding to the jump return instruction, returning to the specified page by the next-level page jump, and displaying the specified page according to the specified cache data.
Further, the jump return instruction determination module includes:
the time acquisition unit is used for acquiring the generation time of the first operation instruction and the generation time of the second operation instruction when the identifier carried in the second operation instruction is consistent with the specified identifier;
a time interval calculation unit for calculating a time interval of a generation time of the first operation instruction and a generation time of the second operation instruction;
a jump return instruction determination unit, configured to determine that the second operation instruction is a jump return instruction when the time interval does not exceed the latency threshold.
Further, the specified cache data obtaining module includes:
the judging unit is used for judging whether specified cache data of a specified page are stored or not after the second operation instruction is determined to be a jump return instruction;
and the specified cache data acquisition unit is used for loading the specified cache data of the specified page when the specified cache data of the specified page is stored.
Further, still include:
the page data request generating unit is used for generating a page data request and sending the page data request to the server when the specified cache data of the specified page is not stored, wherein the page data request is used for the server to issue new page data of the specified page, and the new page data refers to the refreshed data of the specified page;
a new page data receiving unit, configured to receive new page data of the specified page returned by the server;
and the new page data display unit is used for displaying the new page data.
Further, still include:
a normal operation instruction determining module, configured to determine that the second operation instruction is a normal operation instruction when the identifier carried in the second operation instruction is inconsistent with the specified identifier, where the normal operation instruction is used to implement a jump from a next-level page to another page;
the page data request generating module is used for generating a page data request and sending the page data request to the server, wherein the page data request is used for the server to issue page data of another page;
the page data receiving module is used for receiving page data of another page returned by the server;
and the page data display module is used for displaying the page data.
Further, the normal operation instruction comprises a refresh next-level page operation instruction and a new page jump operation instruction; and the normal operation instruction determining module comprises:
an information ID acquisition unit, configured to acquire, when the identifier carried in the second operation instruction is inconsistent with the specified identifier, a page information ID corresponding to the next-level page and a page information ID corresponding to the second operation instruction;
the refresh instruction determining unit is used for determining that the second operation instruction is a refresh next-level page operation instruction when the page information ID corresponding to the next-level page is consistent with the page information ID corresponding to the second operation instruction;
and the new page jump instruction determining unit is used for determining that the second operation instruction is the new page jump operation instruction when the page information ID corresponding to the next-level page is not consistent with the page information ID corresponding to the second operation instruction.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing program instructions;
a processor, configured to call and execute the program instructions in the memory to implement the method for returning a page according to the first aspect.
In a fourth aspect, the present application provides a computer storage medium having a computer program stored therein, where when the computer program is executed by at least one processor of an apparatus for returning a page, the apparatus for returning a page performs the method for returning a page according to the first aspect.
As can be seen from the foregoing technical solutions, in the method, the apparatus, the electronic device, and the computer storage medium for returning a page provided in the embodiments of the present invention, a first operation instruction generated when a user browses a specified page is received, the specified page jumps to a next-level page, and a specified identifier is generated at the same time; receiving a second operation instruction which is generated when a user browses a next-level page and carries an identifier; comparing the designated identifier with the identifier, and if the designated identifier is consistent with the identifier, determining that the second operation instruction is a jump return instruction; at the moment, according to the jump return instruction, the designated cache data of the designated page is obtained, the next-level page jumps back to the designated page, and meanwhile, the designated page corresponding to the designated cache data is displayed, wherein the designated cache data refers to data stored when the previous-level page jumps to the designated page. Therefore, the method provided by the invention can cache the data of the upper-level page after the page jumps to another page, so that when the current page returns to the upper-level page, the data of the upper-level page is not refreshed, but the cached data of the upper-level page is displayed, so that a user can continue browsing according to the preset position of the page, the user is prevented from browsing the page again, and the problem of time consumption is solved.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a flowchart of a method for returning to a page according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for determining a jump return instruction according to an embodiment of the present invention;
FIG. 3 is a data flow diagram of a method for returning to a page according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for obtaining specified cache data according to an embodiment of the present invention;
FIG. 5 is another flowchart of a method for returning to a page according to an embodiment of the present invention;
FIG. 6 is a block diagram of an apparatus for returning a page according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to avoid that a user needs to reload a list page due to the fact that the list page is recovered when the user jumps back to the list page from a detail page, the list page needs to be reloaded, time is consumed, and user experience is poor. After the cache data can jump to the designated page from the upper-level page, storing the data or the category and the like of the designated page to obtain the cache data of the designated page; and when the specified page jumps to the next level page, storing the data or the category and the like of the next level page to obtain the cache data of the next level page.
According to the method provided by the embodiment, when the page returns, the upper-level page is not refreshed, but the cache data of the upper-level page is displayed, so that a user can continue browsing at a previously visited position, time is not consumed when browsing the page, and user experience is better.
Fig. 1 is a flowchart of a method for returning a page according to an embodiment of the present invention. Referring to fig. 1, a method for returning a page provided in an embodiment of the present invention is applied to a browser, where a page for a user to browse is presented in the browser, and the method includes the following steps:
and S1, receiving a first operation instruction generated when a user browses the specified page, wherein the first operation instruction is used for realizing the jump operation of the specified page to the next page.
When a user browses a specified page in a browser, if the user accesses a next-level page based on the specified page, a first operation instruction is generated to realize the jump from the specified page to the next-level page.
For example, a user browses on a list page, a plurality of commodity pictures are presented in the list page, if the user wants to access detailed information of a certain commodity based on the displayed commodity pictures, the user can click on the commodity pictures to enter a detail page of the commodity. Therefore, the process of skipping from the list page to the detail page is a process of skipping from the specified page to the next page, and the detail page is the next page of the list page.
And S2, generating a designated identifier in the process of jumping the designated page to the next level page, wherein the designated identifier is used for identifying the jumping process from the designated page to the next level page.
The designated identifier is used for identifying the jump process from the designated page to the next-level page, so that whether the instruction re-entering the designated page is a jump return instruction or not is conveniently judged in the subsequent process.
And S3, receiving a second operation instruction generated when the user operates the next-level page, wherein the second operation instruction carries an identifier, the second operation instruction is used for realizing one operation of returning, jumping to the next level or refreshing the page, and the identifier is used for identifying the process of jumping to other pages from the next-level page.
When the user browses at the next page, the user may also generate the next operation, such as jumping back to the previous page, entering the next page or refreshing the page. And jumping back to the upper-level page, namely, returning to the specified page.
In order to accurately judge whether the second operation instruction is a jump return instruction, the second operation instruction generated when the user operates the next-level page carries an identifier, and the identifier is used for identifying the process of jumping from the next-level page to other pages.
And S4, if the identifier carried in the second operation instruction is consistent with the designated identifier, determining that the second operation instruction is a jump return instruction.
According to the method provided by the embodiment of the invention, if the browser jumps back to the specified page, the specified page is not refreshed, but the browser jumps back to the previous access position, and the previous data, types and the like are reserved. Therefore, whether the second operation instruction is a jump return instruction or not needs to be determined according to the comparison between the identifier corresponding to the second operation instruction and the designated identifier corresponding to the first operation instruction.
If the identifier is consistent with the designated identifier, the process of jumping from the next-level page to the next page is the process of jumping back to the designated page from the next-level page, and the second operation instruction can be determined to be a jump back instruction.
According to the method provided by the embodiment of the invention, the storage validity period is set for the cache data of each page, namely the cache data is valid in the storage validity period, and the storage validity period of the cache data is related to the time interval between two adjacent operation instructions. If the storage period of validity is exceeded, the cache data is deleted, a new request is sent to the network, the data of the page is obtained again, and then the refreshing operation is executed.
Therefore, in order to accurately determine whether the second operation instruction is a jump return instruction, it is further determined whether a time interval between the second operation instruction and the first operation instruction exceeds a waiting time threshold.
FIG. 2 is a flowchart of a method for determining a jump return instruction according to an embodiment of the present invention; fig. 3 is a data flow diagram of a method for returning a page according to an embodiment of the present invention. Specifically, referring to fig. 2 and fig. 3, in step S4, if the identifier carried in the second operation instruction is consistent with the specified identifier, the method provided in the embodiment of the present invention determines that the second operation instruction is a jump return instruction, and includes:
s411, when the identifier carried in the second operation instruction is consistent with the designated identifier, acquiring the generation time of the first operation instruction and the generation time of the second operation instruction.
And judging the time interval of the two operation instructions again when the identifiers of the two operation instructions are compared and are consistent. And each operation instruction is generated corresponding to the generation time, and therefore, the browser acquires the generation time of the first operation instruction and the generation time of the second operation instruction.
S412, calculating the time interval between the generation time of the first operation instruction and the generation time of the second operation instruction.
And the browser calculates the time interval of the two operation instructions according to the generation time of the first operation instruction and the generation time of the second operation instruction.
And S413, if the time interval does not exceed the waiting time threshold, determining that the second operation instruction is a jump return instruction.
The browser compares the calculated time interval with a waiting time threshold value, wherein the waiting time threshold value corresponds to the valid period of the cache data. If the time interval does not exceed the waiting time threshold, the second operation instruction is a jump return instruction, and the cached data is in the validity period.
If the time interval exceeds the latency threshold, the second operating instruction may be determined to be a new operating instruction, the request may be resent to the network, and the page may be refreshed. In this embodiment, the waiting time threshold may be set to 5 minutes, 10 minutes, or 30 minutes, which is not particularly limited and may be determined according to specific application.
And after the second operation instruction is determined to be the jump return instruction, acquiring the specified cache data of the specified page by the browser for displaying the specified cache data of the specified page in the previous browsing position of the specified page.
And S5, acquiring the designated cache data of the designated page, wherein the designated cache data refers to data stored when the upper-level page jumps to the designated page.
The method provided by the embodiment of the invention can store the page which does not need to be refreshed, namely, the session storage object (sessionStorage) is called to cache the currently loaded data, the category and other information. For example, when the list page jumps to enter the detail page, the session storage object is called to store the information such as the data and the category of the detail page, and the cache data of the detail page is obtained.
Calling the session storage object to cache data of a certain page is the data of the page, not the whole page. The speed of loading the page can be increased by only caching the data, and because different pages include the same data, such as user information, a page title bar, a post category, a user name and the like, by adopting the method for only storing the data provided by the embodiment, the cached data can be applied to other pages besides the page, can be globally multiplexed, and can increase the speed and browse speed when the page is loaded.
The page which does not need to be refreshed is a page which is opened before, for example, the page A jumps to the page B and then jumps back to the page A, and the page A is a page which does not need to be refreshed; and jumping from the page A to the page B, then jumping back to the page A, and then jumping back to the page B, wherein the page B jumped for the second time is a page which does not need to be refreshed, and the page jumped for the second time to the page A is also a page which is not refreshed.
And the browser can acquire the specified cache data of the specified page after judging that the second operation instruction is converted from the next level page back to the specified page. The designated cache data comprises data, categories, information IDs, user settings and other information presented by the designated page after the user jumps to the designated page from the upper-level page.
Fig. 4 is a flowchart of a method for obtaining specified cache data according to an embodiment of the present invention. Referring to fig. 4, in this embodiment, when obtaining the specified cache data of the specified page, the method specifically includes:
and S51, after the second operation instruction is determined to be the jump return instruction, judging whether the specified cache data of the specified page is stored.
And S52, if the specified cache data of the specified page is stored, loading the specified cache data of the specified page.
After the browser receives the second operation instruction and judges that the instruction is the jump return instruction, whether the specified cache data of the specified page exceeds the storage period or not needs to be continuously judged, namely whether the specified cache data is stored in the browser or not is judged. Judging whether the time interval according to the second operation instruction and the first operation instruction exceeds a waiting time threshold value, if so, determining that the designated cache data exceeds a storage validity period, deleting the designated cache data, and at the moment, determining that the designated cache data is not stored in the browser; if not, the specified cache data does not exceed the storage validity period, and the specified cache data is still stored in the browser.
And after judging that the designated cache data of the designated page is stored in the browser, calling the designated cache data of the designated page to perform subsequent display operation.
S6, responding to the jump return instruction, jumping to return to the appointed page by the next level page, and displaying the appointed page according to the appointed cache data.
The browser returns the page from the next level page to the specified page according to the jump return instruction, displays the called specified cache data of the specified page, does not refresh the specified page, but returns the page to the position browsed by the user before, so that the user can continue browsing at the position visited before, the browsing time is short, and the user experience is good.
In other embodiments, if the browser does not determine the specified cache data of the specified page in the browser after receiving the second operation instruction and determining that the instruction is the jump return instruction, it indicates that the current specified cache data exceeds the storage validity period, or the browser does not cache the data of the specified page when the previous page jumps to the specified page. At this time, the browser sends a request to the network again, refreshes the designated page and displays the page.
Specifically, the method provided in this embodiment further includes:
and S53, if the specified cache data of the specified page are not stored, generating a page data request, and sending the page data request to the server, wherein the page data request is used for the server to issue new page data of the specified page, and the new page data refers to the refreshed data of the specified page.
And S54, receiving new page data of the specified page returned by the server.
And S55, displaying the new page data.
When the designated cache data of the designated page is not stored in the browser, the designated page needs to be requested again, namely, the designated page is refreshed, at the moment, the browser generates a page data request and sends the page data request to the server so as to request the server to refresh the designated page, so that new page data can be acquired.
And after receiving the new page data of the specified page sent by the server, the browser displays the new page data so that the browser can present the refreshed page.
In the above embodiment, after the second operation instruction is determined to be the jump return instruction according to the identifier of the second operation instruction and the specified identifier of the first operation instruction, the method of acquiring and displaying the specified cache data of the specified page is performed. However, when the identifier of the second operation instruction is not consistent with the specified identifier of the first operation instruction, it is described that the second operation instruction is not a jump return instruction, and at this time, the method of obtaining and displaying the specified cache data of the specified page is not executed, and new data is obtained from the server again and displayed.
Fig. 5 is another flowchart of a method for returning to a page according to an embodiment of the present invention. Specifically, referring to fig. 5, in other embodiments, the method provided in the embodiments of the present invention further includes:
s421, if the identifier carried in the second operation instruction is not consistent with the designated identifier, determining that the second operation instruction is a normal operation instruction, wherein the normal operation instruction is used for realizing the jump from the next-level page to another page.
And after receiving the second operation instruction, the browser compares the identifier of the second operation instruction with the specified identifier of the first operation instruction, and if the identifier of the second operation instruction is not consistent with the specified identifier of the first operation instruction, the browser indicates that the second operation instruction is not a jump return instruction but an instruction of a normal operation page.
The normal operation process is a jump process from the next-level page to another page, and the other page may be a page operated based on the next-level page, that is, a jump is made to a page other than the designated page, or a page re-refreshed for the next-level page.
It can be seen that the normal operation instruction includes a refresh next-level page operation instruction and a new page jump operation instruction, and at this time, in order to further determine which specific instruction the normal operation instruction is, the determination may be performed in a manner of comparing the page information ID of each page.
Specifically, the process of determining that the second operation instruction is a normal operation instruction when the identifier carried in the second operation instruction is inconsistent with the specified identifier includes:
and S4211, acquiring the page information ID corresponding to the next level page and the page information ID corresponding to the second operation instruction when the identifier carried in the second operation instruction is inconsistent with the designated identifier.
S4212, if the page information ID corresponding to the next-level page is consistent with the page information ID corresponding to the second operation instruction, determining that the second operation instruction is a refresh next-level page operation instruction.
S4213, if the page information ID corresponding to the next level page is not consistent with the page information ID corresponding to the second operation instruction, determining that the second operation instruction is a new page jump operation instruction.
The method provided by the embodiment determines whether the page is a refreshed page or other pages according to the information ID of each page. The page information ID is used to distinguish each page.
And when the identifiers are not consistent in comparison, the browser acquires the page information ID corresponding to the next page and the page information ID corresponding to the second operation instruction, wherein the page information ID corresponding to the second operation instruction is the page information ID of the other page when the next page jumps to the other page.
And comparing the page information ID corresponding to the next-level page with the page information ID of the other page, if the page information ID is consistent with the page information ID of the other page, indicating that the next-level page is still in the next-level page after the second operation instruction is executed, and at the moment, refreshing the next-level page, so that the second operation instruction can be determined to be the operation instruction for refreshing the next-level page. If the two operation instructions are not consistent, the browser jumps to another page from the next page after the second operation instruction is executed, and therefore the second operation instruction can be determined to be a new page jump operation instruction.
And S422, generating a page data request and sending the page data request to the server, wherein the page data request is used for the server to issue page data of another page.
And S423, receiving page data of another page returned by the server.
And S424, displaying the page data.
And the identifier of the second operation instruction is inconsistent with the specified identifier of the first operation instruction, so that the second operation instruction is judged to be not a jump return instruction but a normal operation instruction. At this time, when the browser executes a normal operation instruction, the page data request is regenerated, that is, new data jumped to other pages from the next page is acquired. And sending the page data request to a server, and issuing page data jumped to other pages by the server.
And after receiving page data of another page sent by the server, the browser displays the page data so that the browser presents a refreshed next-level page or jumps to another page.
As can be seen from the foregoing technical solutions, in the method, the apparatus, the electronic device, and the computer storage medium for returning a page provided in the embodiments of the present invention, a first operation instruction generated when a user browses a specified page is received, the specified page jumps to a next-level page, and a specified identifier is generated at the same time; receiving a second operation instruction which is generated when a user browses a next-level page and carries an identifier; comparing the designated identifier with the identifier, and if the designated identifier is consistent with the identifier, determining that the second operation instruction is a jump return instruction; at the moment, according to the jump return instruction, the designated cache data of the designated page is obtained, the next-level page jumps back to the designated page, and meanwhile, the designated page corresponding to the designated cache data is displayed, wherein the designated cache data refers to data stored when the previous-level page jumps to the designated page. Therefore, the method provided by the invention can cache the data of the upper-level page after the page jumps to another page, so that when the current page returns to the upper-level page, the data of the upper-level page is not refreshed, but the cached data of the upper-level page is displayed, so that a user can continue browsing according to the preset position of the page, the user is prevented from browsing the page again, and the problem of time consumption is solved.
Fig. 6 is a block diagram of an apparatus for returning a page according to an embodiment of the present invention. Referring to fig. 6, the present application provides an apparatus for returning a page, for performing the method for returning a page shown in fig. 1, the apparatus including: a first operation instruction receiving module 10, configured to receive a first operation instruction generated when a user browses a specified page, where the first operation instruction is used to implement a jump operation on a next-level page from the specified page; a designated identifier generating module 20, configured to generate a designated identifier in a process of jumping from the designated page to a next page, where the designated identifier is used to identify a jumping process from the designated page to the next page; a second operation instruction receiving module 30, configured to receive a second operation instruction generated when the user operates the next-level page, where the second operation instruction carries an identifier; the second operation instruction is used for realizing one operation of jump return, jump to the next level or page refreshing, and the identifier is used for identifying the process of jumping to other pages from the next level page; a jump return instruction determining module 40, configured to determine that the second operation instruction is a jump return instruction when the identifier carried in the second operation instruction is consistent with the specified identifier; a designated cache data obtaining module 50, configured to obtain designated cache data of the designated page, where the designated cache data is data stored when a previous page jumps to the designated page; and a jump return instruction response module 60, configured to respond to the jump return instruction, jump from the next-level page back to the specified page, and display the specified page according to the specified cache data.
Further, the jump return instruction determination module 40 includes: the time acquisition unit is used for acquiring the generation time of the first operation instruction and the generation time of the second operation instruction when the identifier carried in the second operation instruction is consistent with the specified identifier; a time interval calculation unit for calculating a time interval of a generation time of the first operation instruction and a generation time of the second operation instruction; a jump return instruction determination unit, configured to determine that the second operation instruction is a jump return instruction when the time interval does not exceed the latency threshold.
Further, the specified cache data obtaining module 50 includes: the judging unit is used for judging whether specified cache data of a specified page are stored or not after the second operation instruction is determined to be a jump return instruction; and the specified cache data acquisition unit is used for loading the specified cache data of the specified page when the specified cache data of the specified page is stored.
Further, still include: the page data request generating unit is used for generating a page data request and sending the page data request to the server when the specified cache data of the specified page is not stored, wherein the page data request is used for the server to issue new page data of the specified page, and the new page data refers to the refreshed data of the specified page; a new page data receiving unit, configured to receive new page data of the specified page returned by the server; and the new page data display unit is used for displaying the new page data.
Further, still include: a normal operation instruction determining module, configured to determine that the second operation instruction is a normal operation instruction when the identifier carried in the second operation instruction is inconsistent with the specified identifier, where the normal operation instruction is used to implement a jump from a next-level page to another page; the page data request generating module is used for generating a page data request and sending the page data request to the server, wherein the page data request is used for the server to issue page data of another page; the page data receiving module is used for receiving page data of another page returned by the server; and the page data display module is used for displaying the page data.
Further, the normal operation instruction comprises a refresh next-level page operation instruction and a new page jump operation instruction; and the normal operation instruction determining module comprises: an information ID acquisition unit, configured to acquire, when the identifier carried in the second operation instruction is inconsistent with the specified identifier, a page information ID corresponding to the next-level page and a page information ID corresponding to the second operation instruction; the refresh instruction determining unit is used for determining that the second operation instruction is a refresh next-level page operation instruction when the page information ID corresponding to the next-level page is consistent with the page information ID corresponding to the second operation instruction; and the new page jump instruction determining unit is used for determining that the second operation instruction is the new page jump operation instruction when the page information ID corresponding to the next-level page is not consistent with the page information ID corresponding to the second operation instruction.
Fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention. As shown in fig. 7, the present application provides an electronic device comprising: a memory 601 for storing program instructions; the processor 602 is configured to call and execute the program instructions in the memory to implement the method for returning a page according to the foregoing embodiment.
In this embodiment, the processor 602 and the memory 601 may be connected by a bus or other means. The processor may be a general-purpose processor, such as a central processing unit, a digital signal processor, an application specific integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention. The memory may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk.
The present application provides a computer storage medium having a computer program stored therein, which when executed by at least one processor of an apparatus for returning a page, performs the method for returning a page according to the foregoing embodiments.
The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the device embodiment of the return page, since it is basically similar to the method embodiment, the description is simple, and the relevant points can be referred to the description in the method embodiment.
The above-described embodiments of the present invention should not be construed as limiting the scope of the present invention.

Claims (8)

1. A method of returning pages, comprising the steps of:
receiving a first operation instruction generated when a user browses a specified page, wherein the first operation instruction is used for realizing the jump operation of a next-level page from the specified page;
generating a designated identifier in the process of jumping from the designated page to a next-level page, wherein the designated identifier is used for identifying the jumping process from the designated page to the next-level page;
receiving a second operation instruction generated when a user operates the next-level page, wherein the second operation instruction carries an identifier; the second operation instruction is used for realizing one operation of jump return, jump to the next level or page refreshing, and the identifier is used for identifying the process of jumping to other pages from the next level page; the identifier includes: an identifier identifying a jump return page, an identifier identifying an entry into a next page, and an identifier identifying a refresh page;
if the identifier carried in the second operation instruction is consistent with the designated identifier, determining that the second operation instruction is a jump return instruction; when the identifier carried in the second operation instruction is consistent with the designated identifier, acquiring the generation time of the first operation instruction and the generation time of the second operation instruction; calculating a time interval of the generation time of the first operation instruction and the generation time of the second operation instruction; if the time interval does not exceed the waiting time threshold, determining that the second operation instruction is a jump return instruction;
acquiring appointed cache data of the appointed page, wherein the appointed cache data is stored when the upper-level page jumps to the appointed page;
and responding to the jump return instruction, jumping and returning to a specified page by the next-level page, and displaying the specified page according to the specified cache data.
2. The method of claim 1, wherein obtaining the specified cache data for the specified page comprises:
after the second operation instruction is determined to be a jump return instruction, judging whether specified cache data of a specified page are stored or not;
and if the specified cache data of the specified page is stored, loading the specified cache data of the specified page.
3. The method of claim 2, further comprising:
if the specified cache data of the specified page is not stored, generating a page data request, and sending the page data request to the server, wherein the page data request is used for the server to issue new page data of the specified page, and the new page data refers to the refreshed data of the specified page;
receiving new page data of the specified page returned by the server;
and displaying the new page data.
4. The method of claim 1, further comprising:
if the identifier carried in the second operation instruction is not consistent with the designated identifier, determining that the second operation instruction is a normal operation instruction, wherein the normal operation instruction is used for realizing the jump from the next-level page to another page;
generating a page data request and sending the page data request to a server, wherein the page data request is used for the server to issue page data of another page;
receiving page data of another page returned by the server;
and displaying the page data.
5. The method of claim 4, wherein the normal operation instruction comprises a flush next level page operation instruction and a new page jump operation instruction; and if the identifier carried in the second operation instruction is inconsistent with the specified identifier, determining that the second operation instruction is a normal operation instruction, including:
when the identifier carried in the second operation instruction is not consistent with the designated identifier, acquiring a page information ID corresponding to the next level page and a page information ID corresponding to the second operation instruction;
if the page information ID corresponding to the next-level page is consistent with the page information ID corresponding to the second operation instruction, determining that the second operation instruction is a next-level page refreshing operation instruction;
and if the page information ID corresponding to the next-level page is not consistent with the page information ID corresponding to the second operation instruction, determining that the second operation instruction is a new page jump operation instruction.
6. An apparatus for returning pages, comprising:
the first operation instruction receiving module is used for receiving a first operation instruction generated when a user browses a specified page, and the first operation instruction is used for realizing the jump operation of a next-level page from the specified page;
the designated identifier generating module is used for generating a designated identifier in the process of jumping from the designated page to the next page, and the designated identifier is used for identifying the jumping process from the designated page to the next page;
a second operation instruction receiving module, configured to receive a second operation instruction generated when a user operates the next-level page, where the second operation instruction carries an identifier; the second operation instruction is used for realizing one operation of jump return, jump to the next level or page refreshing, and the identifier is used for identifying the process of jumping to other pages from the next level page; the identifier includes: an identifier identifying a jump return page, an identifier identifying an entry into a next page, and an identifier identifying a refresh page;
a jump return instruction determining module, configured to determine that the second operation instruction is a jump return instruction when the identifier carried in the second operation instruction is consistent with the specified identifier; when the identifier carried in the second operation instruction is consistent with the designated identifier, acquiring the generation time of the first operation instruction and the generation time of the second operation instruction; calculating a time interval of the generation time of the first operation instruction and the generation time of the second operation instruction; if the time interval does not exceed the waiting time threshold, determining that the second operation instruction is a jump return instruction;
the specified cache data acquisition module is used for acquiring specified cache data of the specified page, wherein the specified cache data is stored when the upper-level page jumps to the specified page;
and the jump return instruction response module is used for responding to the jump return instruction, returning to the specified page by the next-level page jump, and displaying the specified page according to the specified cache data.
7. An electronic device, comprising:
a memory for storing program instructions;
a processor for calling and executing program instructions in said memory to implement a method of returning pages as claimed in any one of claims 1 to 5.
8. A computer storage medium, characterized in that a computer program is stored in the computer storage medium, and when the computer program is executed by at least one processor of a device for returning pages, the device for returning pages performs the method for returning pages according to any one of claims 1 to 5.
CN202010316911.0A 2020-04-21 2020-04-21 Page returning method and device, electronic equipment and computer storage medium Active CN111597475B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010316911.0A CN111597475B (en) 2020-04-21 2020-04-21 Page returning method and device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010316911.0A CN111597475B (en) 2020-04-21 2020-04-21 Page returning method and device, electronic equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN111597475A CN111597475A (en) 2020-08-28
CN111597475B true CN111597475B (en) 2021-10-29

Family

ID=72191944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010316911.0A Active CN111597475B (en) 2020-04-21 2020-04-21 Page returning method and device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN111597475B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112333462A (en) * 2020-11-04 2021-02-05 北京字节跳动网络技术有限公司 Live broadcast room page jumping method, returning device and electronic equipment
CN115309312A (en) * 2021-04-21 2022-11-08 花瓣云科技有限公司 Content display method and electronic equipment
CN113139142A (en) * 2021-05-10 2021-07-20 广州欢网科技有限责任公司 Method and device for skipping pages of set top box
CN113253988B (en) * 2021-06-11 2022-10-18 山石网科通信技术股份有限公司 Page processing method and device
CN114327453B (en) * 2021-12-17 2023-04-14 中科大数据研究院 Page display method, device, equipment and storage medium
CN114339369A (en) * 2021-12-29 2022-04-12 四川九州电子科技股份有限公司 Television end page display method suitable for set top box

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106470351A (en) * 2016-09-08 2017-03-01 Tcl集团股份有限公司 Page display method and page display device
CN106919620A (en) * 2015-12-28 2017-07-04 北京国双科技有限公司 Single-page processing method and processing device
CN108268622A (en) * 2018-01-08 2018-07-10 金行家(深圳)文化传播有限公司 Method and device for returning page and computer readable storage medium
CN108416011A (en) * 2018-03-02 2018-08-17 中国平安人寿保险股份有限公司 A kind of page processing method, device, terminal and computer readable storage medium
CN109740083A (en) * 2018-12-29 2019-05-10 贵阳朗玛信息技术股份有限公司 A kind of method and device of page jump

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815276B (en) * 2015-11-27 2020-06-16 阿里巴巴集团控股有限公司 Page skipping method and device
CN107229665B (en) * 2016-03-25 2021-04-13 阿里巴巴集团控股有限公司 Page skipping method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106919620A (en) * 2015-12-28 2017-07-04 北京国双科技有限公司 Single-page processing method and processing device
CN106470351A (en) * 2016-09-08 2017-03-01 Tcl集团股份有限公司 Page display method and page display device
CN108268622A (en) * 2018-01-08 2018-07-10 金行家(深圳)文化传播有限公司 Method and device for returning page and computer readable storage medium
CN108416011A (en) * 2018-03-02 2018-08-17 中国平安人寿保险股份有限公司 A kind of page processing method, device, terminal and computer readable storage medium
CN109740083A (en) * 2018-12-29 2019-05-10 贵阳朗玛信息技术股份有限公司 A kind of method and device of page jump

Also Published As

Publication number Publication date
CN111597475A (en) 2020-08-28

Similar Documents

Publication Publication Date Title
CN111597475B (en) Page returning method and device, electronic equipment and computer storage medium
CN110187931B (en) Method and device for running small program
US9116999B2 (en) Pre-fetching of network page content
US20160232252A1 (en) Method for loading webpage, device and browser thereof
CN110209966B (en) Webpage refreshing method, webpage system and electronic equipment
CN111651703B (en) Page jump method and device, electronic equipment and readable storage medium
CN109361948B (en) Interface management method, intelligent terminal and readable storage medium
US9299030B1 (en) Predictive page loading based on navigation
WO2019085598A1 (en) Method and apparatus for calculating above-the-fold rendering duration of page, and electronic device
CN111459503B (en) Web front-end project deployment method, device, server and storage medium
CN113703893B (en) Page rendering method, device, terminal and storage medium
CN111079048B (en) Page loading method and device
CN110780939A (en) Method and device for loading resource file, computer equipment and storage medium
CN108920203A (en) A kind of page loading method and equipment
CN108363793B (en) Webpage application access method and device, storage medium and electronic equipment
CN108038150B (en) Webpage opening method and device and terminal equipment
CN108268298B (en) Desktop icon generation method and device, storage medium and electronic equipment
US9305090B1 (en) Predictive page loading based on suggestion data
CN114996507B (en) Video recommendation method and device
CN111538453A (en) Book detail page display method, terminal and computer storage medium
CN108268274B (en) Application management method and device, storage medium and electronic equipment
CN112597416B (en) Webpage element display method and device, server and storage medium
CN113010820B (en) Page data updating method, device, electronic equipment, medium and program product
CN112035765B (en) Page rendering method, device and equipment
CN110287397B (en) Content searching method and device based on screen saver and electronic equipment

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
GR01 Patent grant
GR01 Patent grant