CN108804195B - Page display method and device, server and client - Google Patents

Page display method and device, server and client Download PDF

Info

Publication number
CN108804195B
CN108804195B CN201810611988.3A CN201810611988A CN108804195B CN 108804195 B CN108804195 B CN 108804195B CN 201810611988 A CN201810611988 A CN 201810611988A CN 108804195 B CN108804195 B CN 108804195B
Authority
CN
China
Prior art keywords
identification code
page
response identification
client
current
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
CN201810611988.3A
Other languages
Chinese (zh)
Other versions
CN108804195A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201810611988.3A priority Critical patent/CN108804195B/en
Publication of CN108804195A publication Critical patent/CN108804195A/en
Application granted granted Critical
Publication of CN108804195B publication Critical patent/CN108804195B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The embodiment of the invention provides a page display method, a page display device, a server and a client, wherein the page display method comprises the following steps: receiving a page updating request sent by a client, wherein the page updating request comprises a response identification code; acquiring full data aiming at the page updating request; generating a current response identification code according to the full data, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data; judging whether a response identification code contained in the page updating request is consistent with a current response identification code or not; and if the response identification code contained in the page updating request is consistent with the current response identification code, sending a preset non-updating instruction to the client so as to enable the client to keep the current page display. According to the scheme of the embodiment of the invention, when the response identification code contained in the page updating request is consistent with the current response identification code, only the preset non-updating instruction is sent without sending the full data, so that the bandwidth resource between the server and the client can be saved.

Description

Page display method and device, server and client
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a page display method, an apparatus, a server, and a client.
Background
With the rapid development of the internet technology, the types of application software suitable for the terminal device are more and more, and users can obtain information of interest of the users by browsing application software page data, such as hot news, commodity information, advertisement push and the like.
In order to ensure the real-time performance of information, when page data is displayed, the display method adopted in the prior art mainly comprises the following steps: each time the server receives a network request sent by the client, the server usually returns the full amount of data corresponding to the specified page in the network request to the client, so that the updated display of the page is completed.
When the method is adopted to display the page, no matter whether the total data corresponding to the specified page changes before and after the network request is sent, the server sends the total data of the specified page to the client, namely, after the network request is received, even if the total data corresponding to the specified page in the request is not changed (namely, the specified page data is not updated), the server still sends the unchanged total data of the specified page to the client again, so that the waste of broadband resources between the server and the client is caused.
Disclosure of Invention
The embodiment of the invention aims to provide a page display method, a page display device, a server and a client so as to save bandwidth resources between the server and the client. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a page display method, applied to a server, including:
receiving a page updating request sent by a client, wherein the page updating request comprises a response identification code;
acquiring full data aiming at the page updating request;
generating a current response identification code according to the full data, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data;
judging whether a response identification code contained in the page updating request is consistent with the current response identification code or not;
and if the response identification code contained in the page updating request is consistent with the current response identification code, sending a preset updating-free instruction to the client so as to enable the client to keep the current page display.
Further, the method further comprises:
and if the response identification code contained in the page updating request is not consistent with the current response identification code, sending the full data and the current response identification code to the client so that the client updates page display according to the full data and stores the current response identification code.
In a second aspect, an embodiment of the present invention provides a page display method, applied to a client, including:
sending a page updating request to a server, wherein the page updating request comprises a response identification code;
receiving a response result returned by the server based on the response identification code;
and if the response result is that no updating instruction is preset, keeping the current page to be displayed.
Further, the method further comprises:
and if the response result comprises the full data and the current response identification code, updating page display according to the full data, and storing the current response identification code, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data.
Further, the method further comprises:
updating the response identification code in the page updating request as the current response identification code according to the current response identification code;
and when a specified request period is reached, sending an updated page updating request to the server.
In a third aspect, an embodiment of the present invention provides a page display apparatus, located in a server, including:
the request receiving module is used for receiving a page updating request sent by a client, wherein the page updating request comprises a response identification code;
the data acquisition module is used for acquiring the full data aiming at the page updating request;
the identification code generation module is used for generating a current response identification code according to the full data, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data;
an identification code judging module, configured to judge whether a response identification code included in the page update request is consistent with the current response identification code;
and the instruction sending module is used for sending a preset no-update instruction to the client if the response identification code contained in the page update request is consistent with the current response identification code, so that the client keeps displaying the current page.
Further, the apparatus further comprises:
and the full data sending module is used for sending the full data and the current response identification code to the client if the response identification code contained in the page updating request is inconsistent with the current response identification code, so that the client updates page display according to the full data and stores the current response identification code.
In a fourth aspect, an embodiment of the present invention provides a page display apparatus, located at a client, including:
the request sending module is used for sending a page updating request to the server, wherein the page updating request comprises a response identification code;
the response result receiving module is used for receiving a response result returned by the server based on the response identification code;
and the first page display module is used for keeping the current page display if the response result is a preset update-free instruction.
Further, the apparatus further comprises:
and the second page display module is used for updating page display according to the full data and storing the current response identification code if the response result comprises the full data and the current response identification code, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data.
Further, the apparatus further comprises:
a request updating module, configured to update the response identification code in the page updating request as the current response identification code according to the current response identification code;
the request sending module is specifically configured to:
and when a specified request period is reached, sending an updated page updating request to the server.
In a fifth aspect, an embodiment of the present invention provides a server, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any step of the page display method applied to the server when executing the program stored in the memory.
In a sixth aspect, an embodiment of the present invention provides a client, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any step of the page display method applied to the client when executing the program stored in the memory.
In a seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute any one of the above-mentioned page display methods applied to a server.
In an eighth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer is caused to execute any one of the above-mentioned page display methods applied to the client.
In a ninth aspect, an embodiment of the present invention further provides a computer program product including instructions, which when run on a computer, causes the computer to execute any one of the above-mentioned page display methods applied to a server.
In a tenth aspect, an embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any one of the above-mentioned page display methods applied to the client.
In the page display method provided by the embodiment of the invention, a server receives a page updating request sent by a client, wherein the page updating request comprises a response identification code; acquiring full data aiming at the page updating request; generating a current response identification code according to the full data, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data; judging whether a response identification code contained in the page updating request is consistent with a current response identification code or not; and if the response identification code contained in the page updating request is consistent with the current response identification code, sending a preset non-updating instruction to the client so as to enable the client to keep the current page display. In the scheme of the embodiment of the invention, when the response identification code contained in the page updating request is consistent with the current response identification code, only the preset non-updating instruction is sent without sending the full data, so that the bandwidth resource between the server and the client can be saved.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic flowchart of a page display method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a page display method according to another embodiment of the present invention;
fig. 3 is a schematic flowchart of a page display method according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of a page display device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a page display device according to another embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a page display apparatus according to another embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a page display apparatus according to another embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a page display apparatus according to another embodiment of the present invention;
fig. 9 is a schematic structural diagram of a server according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a client according to another embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
Fig. 1 is a schematic flowchart of a page display method according to an embodiment of the present invention, which is applied to a server and includes:
step 101, receiving a page update request sent by a client.
Wherein, the page update request includes a response identification code.
In order to ensure the real-time performance of the page information, the client sends a page updating request aiming at the specified page to the server according to a certain rule so as to obtain the page data returned by the server.
In this step, the page update request sent by the client to the server may include a response identification code, and if the client sends the page update request related to a certain specified page to the server for the first time, the identification code may be null, may also be a preset value, and may also be a random value, which is not limited in this embodiment; if the page updating request is a request sent again to the server by the same page from the client, the response identification code contained in the request is the response identification code sent by the server and received by the client last time.
In this embodiment, the rule may specifically be: starting from the moment of sending the page updating request once, and when the time reaches the preset time length, the client side can send the page updating request related to the page to the server again; the method can also be as follows: the client may send a page update request related to the page to the server again after a certain preset condition is satisfied from a time when the page update request is sent once, which is not limited.
Step 102, obtaining the full amount of data for the page update request.
After receiving a page update request sent by a client, a server can obtain the total data of a specified page in the request according to the request.
And 103, generating a current response identification code according to the full data.
And the current response identification code is an identification code which has a unique corresponding relation with the full data.
After acquiring the full data of the designated page in the page update request, the server may generate a current response identification code having a unique corresponding relationship with the full data according to the full data.
Specifically, the method for generating the current response identification code according to the full data may be: firstly, obtaining effective data in the full data, wherein the effective data can refer to a certain type of data or a certain number of types of data in the full data agreed in advance between a server and a client before data interaction is carried out, for example, data except data (such as timestamp data) which can dynamically change along with time and the like are removed from the full data; and generating a current response identification code which is only corresponding to the valid data according to the valid data and the rule agreed with the client, wherein the corresponding response identification codes are different for different valid data. In the embodiment of the present invention, the method of generating the current reply identification code is not limited.
Step 104, judging whether the response identification code contained in the page updating request is consistent with the current response identification code, if so, executing step 105; if not, go to step 106.
In this step, the criterion for determining whether the response identifier included in the page update request is consistent with the current response identifier may be: when the response identification code contained in the page updating request is completely the same as the current response identification code, the response identification code contained in the page updating request is considered to be consistent with the current response identification code; it can also be: setting a threshold value according to experience and the like, and when the difference value between the response identification code contained in the page updating request and the current response identification code is smaller than the threshold value, considering that the response identification code contained in the page updating request is consistent with the current response identification code; and when the difference value between the response identification code contained in the page updating request and the current response identification code is greater than or equal to the threshold value, the response identification code contained in the page updating request is considered to be inconsistent with the current response identification code. In the embodiment of the present invention, specific contents of the criterion for determining whether the response identifier included in the page update request is consistent with the current response identifier are not limited.
And 105, sending a preset no-update instruction to the client so that the client keeps displaying the current page.
If the response identification code included in the page updating request sent by the client is consistent with the current response identification code, it indicates that the content of the page data displayed in the client is the same as or has a small difference with the content of the full data obtained by the server for the page updating request, that is, the page information of the client is not updated or is updated less, and at this time, in order to save broadband resources, the server may not send the full data to the client, but send a preset no-update instruction, so that the client continues to maintain the current page display.
The preset no-update instruction in this step may be preset before the client and the server perform service interaction, and the specific form of the instruction may be a certain specified/appointed character string, etc., which is not limited herein.
And 106, sending the full data and the current response identification code to the client so that the client updates page display according to the full data and stores the current response identification code.
When the response identification code included in the page updating request is inconsistent with the current response identification code, it is indicated that there is a difference or a large difference between the page data displayed in the client and the full data for the page updating request acquired by the server, that is, there is an update or a large update on the page of the client, at this time, the server sends the full data to the client again, so that the client updates the page display according to the full data, and meanwhile, the server can send the current response identification code to the client for use in the next interaction.
In the page display method shown in fig. 1 provided by the embodiment of the present invention, a server receives a page update request sent by a client; acquiring full data aiming at the page updating request; generating a current response identification code according to the full data, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data; judging whether a response identification code contained in the page updating request is consistent with a current response identification code or not; and if the response identification code contained in the page updating request is consistent with the current response identification code, sending a preset non-updating instruction to the client so as to enable the client to keep the current page display. In the scheme of the embodiment of the invention, when the response identification code contained in the page updating request is consistent with the current response identification code, only the preset non-updating instruction is sent without sending the full data, so that the bandwidth resource between the server and the client can be saved.
Fig. 2 is a schematic flowchart of a page display method according to another embodiment of the present invention, which is applied to a client and includes:
step 201, a page update request is sent to a server.
Wherein, the page update request includes a response identification code.
In this step, the page update request sent by the client to the server may include a response identification code, and if the client sends the page update request related to a certain specified page to the server for the first time, the identification code may be null, may also be a preset value, and may also be a random value, which is not limited in this embodiment; if the page updating request is a request sent again to the server by the same page from the client, the response identification code contained in the request is the response identification code sent by the server and received by the client last time.
Step 202, receiving a response result returned by the server based on the response identification code.
After receiving a page updating request containing a response identification code sent by the client, the server determines a response result returned to the client based on the response identification code.
And step 203, if the response result is that no updating instruction is preset, keeping the current page to be displayed.
If the response result returned by the server is a preset no-update instruction, the page data is indicated to have no update, and at this time, the client can continue to keep the current page display.
Further, if the response result comprises the full data and the current response identification code, updating the page display according to the full data, and storing the current response identification code, wherein when the response identification code is the identification code which has the unique corresponding relation with the full data.
If the response result returned by the server is the full data and the current response identification code, the page data is updated or has larger update, at this time, after the client receives the full data, the client can update and display the page according to the full data, and meanwhile, the client can also store the current response identification code sent by the server.
Furthermore, the client can update the response identification code in the page updating request as the current response identification code according to the stored current response identification code;
and when a specified request period is reached, sending an updated page updating request to the server.
The specified request period may be a preset time period, or may be a time period satisfying a certain preset condition, which is not limited.
In the page display method shown in fig. 2 provided in the embodiment of the present invention, a client sends a page update request to a server, where the page update request includes a response identification code; then receiving a response result returned by the server based on the response identification code; and if the response result received by the client is a preset updating-free instruction, keeping the current page display. In the scheme of the embodiment of the invention, when the preset update-free instruction is received, the client and the server do not need to carry out full data interaction, and the client keeps the current page display, so that the bandwidth resource between the server and the client can be saved.
As shown in fig. 3, a page display method according to another embodiment of the present invention specifically includes the following steps:
in step 301, a client sends a page request to a server.
In this step, the page update request sent by the client to the server may include a response identification code, and if the client sends the page update request related to a certain specified page to the server for the first time, the identification code may be null, may also be a preset value, and may also be a random value, which is not limited in this embodiment; if the page updating request is a request sent again to the server by the same page from the client, the response identification code contained in the request is the response identification code sent by the server and received by the client last time.
In step 302, the server obtains the full amount of data for the page request and generates a current response identification code.
And the current response identification code is an identification code which has a unique corresponding relation with the full data.
After acquiring the full data of the designated page in the page update request, the server may generate a current response identification code having a unique corresponding relationship with the full data according to the full data.
Specifically, the method for generating the current response identification code according to the full data may be: firstly, obtaining effective data in the full data, wherein the effective data can refer to a certain type of data or a certain number of types of data in the full data agreed in advance between a server and a client before data interaction is carried out, for example, data except data (such as timestamp data) which can dynamically change along with time and the like are removed from the full data; and generating a current response identification code which is only corresponding to the valid data according to the valid data and the rule agreed with the client, wherein the corresponding response identification codes are different for different valid data. In the embodiment of the present invention, the method of generating the current reply identification code is not limited.
Step 303, the server determines whether the response identification code included in the page request is consistent with the current response identification code.
In step 304, if the response identification code included in the page update request is consistent with the current response identification code, the server sends a preset no-update instruction to the client.
The contents of step 303 and step 304 correspond to the contents of step 104 and step 105, respectively, and are not described herein again.
Step 305, the client keeps the current page displayed.
In the page display method shown in fig. 3 provided by the embodiment of the present invention, a client sends a page request to a server; the server acquires the full data aiming at the page request and generates a current response identification code; the server judges whether the response identification code contained in the page request is consistent with the current response identification code; if the response identification code contained in the page updating request is consistent with the current response identification code, the server sends a preset non-updating instruction to the client; and when the client receives a preset update-free instruction sent by the server, keeping the current page display. In the scheme of the embodiment of the invention, when the preset update-free instruction is received, the client and the server do not need to carry out full data interaction, and the client keeps the current page display, so that the bandwidth resource between the server and the client can be saved.
Based on the same inventive concept, according to the page display method applied to the server provided in the above embodiment of the present invention, correspondingly, an embodiment of the present invention further provides a page display apparatus located on the server, a schematic structural diagram of which is shown in fig. 4, including:
a request receiving module 401, configured to receive a page update request sent by a client, where the page update request includes a response identification code;
a data obtaining module 402, configured to obtain full data for the page update request;
an identification code generation module 403, configured to generate a current response identification code according to the full data, where the current response identification code is an identification code having a unique corresponding relationship with the full data;
an identification code determining module 404, configured to determine whether a response identification code included in the page update request is consistent with a current response identification code;
the instruction sending module 405 is configured to send a preset no-update instruction to the client if the response identification code included in the page update request is consistent with the current response identification code, so that the client keeps displaying the current page.
Further, as shown in fig. 5, the apparatus further includes:
and a full data sending module 406, configured to send the full data and the current response identification code to the client if the response identification code included in the page update request is inconsistent with the current response identification code, so that the client updates the page display according to the full data and stores the current response identification code.
In the embodiment of the present invention, the request receiving module 401 receives a page update request sent by a client; the data acquisition module 402 acquires the full amount of data for the page update request; the identification code generation module 403 generates a current response identification code according to the full data; the identification code determination module 404 determines whether the response identification code included in the page update request is consistent with the current response identification code; if the response identification code included in the page update request is consistent with the current response identification code, the instruction sending module 405 sends a preset update-free instruction to the client, so that the client keeps displaying the current page. In the scheme of the embodiment of the invention, when the response identification code contained in the page updating request is consistent with the current response identification code, only the preset non-updating instruction is sent without sending the full data, so that the bandwidth resource between the server and the client can be saved.
Based on the same inventive concept, according to the page display method applied to the client provided in the foregoing embodiment of the present invention, correspondingly, an embodiment of the present invention further provides a page display apparatus located at the client, a schematic structural diagram of which is shown in fig. 6, including:
a request sending module 501, configured to send a page update request to a server, where the page update request includes a response identification code;
a response result receiving module 502, configured to receive a response result returned by the server based on the response identification code;
the first page display module 503 is configured to keep displaying the current page if the response result is that no update instruction is preset.
Further, as shown in fig. 7, the apparatus further includes:
the second page display module 504 is configured to, if the response result includes the full data and the current response identification code, update the page display according to the full data, and store the current response identification code, where the response identification code is an identification code having a unique corresponding relationship with the full data.
Further, as shown in fig. 8, the apparatus further includes:
a request updating module 505, configured to update the response identifier in the page updating request as the current response identifier according to the current response identifier;
the request sending module 501 is specifically configured to:
and when the specified request period is reached, sending an updated page updating request to the server.
In the embodiment of the present invention, the request sending module 501 sends a page update request to the server, where the page update request includes a response identification code; the response result receiving module 502 receives a response result returned by the server based on the response identification code; if the answer result is that there is no update command, the first page display module 503 keeps displaying the current page. In the scheme of the embodiment of the invention, when the preset update-free instruction is received, the client and the server do not need to carry out full data interaction, and the client keeps the current page display, so that the bandwidth resource between the server and the client can be saved.
Based on the same inventive concept, according to the page display method applied to the server provided by the above embodiment of the present invention, correspondingly, the embodiment of the present invention further provides a server, as shown in fig. 9, including a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602 and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the page display method applied to the server according to the embodiment of the present invention when executing the program stored in the memory 603.
For example, the following steps may be included:
receiving a page updating request sent by a client, wherein the page updating request comprises a response identification code;
acquiring full data aiming at the page updating request;
generating a current response identification code according to the full data, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data;
judging whether a response identification code contained in the page updating request is consistent with a current response identification code or not;
and if the response identification code contained in the page updating request is consistent with the current response identification code, sending a preset non-updating instruction to the client so as to enable the client to keep the current page display.
Further, other processing flows in the above-mentioned page display method applied to the server provided by the embodiment of the present invention may also be included, and are not described in detail herein.
The communication bus mentioned in the above server may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the server and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
The server provided by the embodiment of the invention adopts the following method: the method comprises the steps that a server receives a page updating request sent by a client, wherein the page updating request comprises a response identification code; acquiring full data aiming at the page updating request; generating a current response identification code according to the full data, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data; judging whether a response identification code contained in the page updating request is consistent with a current response identification code or not; and if the response identification code contained in the page updating request is consistent with the current response identification code, sending a preset non-updating instruction to the client so as to enable the client to keep the current page display. In the scheme of the embodiment of the invention, when the response identification code contained in the page updating request is consistent with the current response identification code, only the preset non-updating instruction is sent without sending the full data, so that the bandwidth resource between the server and the client can be saved.
Based on the same inventive concept, according to the page display method applied to the client provided by the above embodiment of the present invention, correspondingly, the embodiment of the present invention further provides a client, as shown in fig. 10, including a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702 and the memory 703 complete mutual communication through the communication bus 704,
a memory 703 for storing a computer program;
the processor 701 is configured to implement the page display method applied to the server according to the embodiment of the present invention when executing the program stored in the memory 703.
For example, the following steps may be included:
sending a page updating request to a server, wherein the page updating request comprises a response identification code;
receiving a response result returned by the server based on the response identification code;
and if the response result is that no updating instruction is preset, keeping the current page to be displayed.
Further, other processing flows in the above-mentioned page display method applied to the client provided by the embodiment of the present invention may also be included, and are not described in detail herein.
The communication bus mentioned in the above-mentioned client may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the client and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
The client provided by the embodiment of the invention adopts the following method: the client sends a page updating request to the server, wherein the page updating request contains a response identification code; then receiving a response result returned by the server based on the response identification code; and if the response result received by the client is a preset updating-free instruction, keeping the current page display. In the scheme of the embodiment of the invention, when the preset update-free instruction is received, the client and the server do not need to carry out full data interaction, and the client keeps the current page display, so that the bandwidth resource between the server and the client can be saved.
In another embodiment of the present invention, there is also provided a computer-readable storage medium, having stored therein instructions, which when run on a computer, cause the computer to execute any one of the above-mentioned page display methods applied to a server.
In the computer-readable storage medium provided in the embodiment of the present invention, the method adopted is: a server receives a page updating request sent by a client; acquiring full data aiming at the page updating request; generating a current response identification code according to the full data, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data; judging whether a response identification code contained in the page updating request is consistent with a current response identification code or not; and if the response identification code contained in the page updating request is consistent with the current response identification code, sending a preset non-updating instruction to the client so as to enable the client to keep the current page display. In the scheme of the embodiment of the invention, when the response identification code contained in the page updating request is consistent with the current response identification code, only the preset non-updating instruction is sent without sending the full data, so that the bandwidth resource between the server and the client can be saved.
In another embodiment of the present invention, there is also provided a computer-readable storage medium, having stored therein instructions, which when run on a computer, cause the computer to execute any one of the above-mentioned page display methods applied to a client.
In the computer-readable storage medium provided in the embodiment of the present invention, the method adopted is: the client sends a page updating request to the server, wherein the page updating request contains a response identification code; then receiving a response result returned by the server based on the response identification code; and if the response result received by the client is a preset updating-free instruction, keeping the current page display. In the scheme of the embodiment of the invention, when the preset update-free instruction is received, the client and the server do not need to carry out full data interaction, and the client keeps the current page display, so that the bandwidth resource between the server and the client can be saved.
In another embodiment of the present invention, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute any of the above-mentioned page display methods applied to a server.
In the computer program product including instructions provided by the embodiment of the present invention, the method adopted is: a server receives a page updating request sent by a client; acquiring full data aiming at the page updating request; generating a current response identification code according to the full data, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data; judging whether a response identification code contained in the page updating request is consistent with a current response identification code or not; and if the response identification code contained in the page updating request is consistent with the current response identification code, sending a preset non-updating instruction to the client so as to enable the client to keep the current page display. In the scheme of the embodiment of the invention, when the page updating request contains the current response identification code, only the preset non-updating instruction is sent without sending the full data, so that the bandwidth resource between the server and the client can be saved.
In another embodiment of the present invention, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute any of the above-mentioned page display methods applied to a client.
In the computer program product including instructions provided by the embodiment of the present invention, the method adopted is: the client sends a page updating request to the server, wherein the page updating request contains a response identification code; then receiving a response result returned by the server based on the response identification code; and if the response result received by the client is a preset updating-free instruction, keeping the current page display. In the scheme of the embodiment of the invention, when the preset update-free instruction is received, the client and the server do not need to carry out full data interaction, and the client keeps the current page display, so that the bandwidth resource between the server and the client can be saved.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described above in accordance with the embodiments of the invention may be generated, in whole or in part, when the computer program instructions described above are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. The term "comprising" is used to specify the presence of stated features, integers, steps, operations, elements, components, and/or groups thereof, but does not exclude the presence of other similar features, integers, steps, operations, components, or groups thereof.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device, server and client embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A page display method is applied to a server and comprises the following steps:
receiving a page updating request sent by a client, wherein the page updating request comprises a response identification code;
acquiring full data aiming at the page updating request;
generating a current response identification code according to the full data, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data;
judging whether a response identification code contained in the page updating request is consistent with the current response identification code or not;
and if the response identification code contained in the page updating request is consistent with the current response identification code, sending a preset updating-free instruction to the client so as to enable the client to keep the current page display.
2. The method of claim 1, further comprising:
and if the response identification code contained in the page updating request is not consistent with the current response identification code, sending the full data and the current response identification code to the client so that the client updates page display according to the full data and stores the current response identification code.
3. A page display method is applied to a client and comprises the following steps:
sending a page updating request to a server, wherein the page updating request comprises a response identification code;
receiving a response result returned by the server based on the response identification code;
if the response result is that no updating instruction is preset, keeping the current page to be displayed;
and if the response result comprises the full data and the current response identification code, updating page display according to the full data, and storing the current response identification code, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data.
4. The method of claim 3, further comprising:
updating the response identification code in the page updating request as the current response identification code according to the current response identification code;
and when a specified request period is reached, sending an updated page updating request to the server.
5. A page display device, applied to a server, includes:
the request receiving module is used for receiving a page updating request sent by a client, wherein the page updating request comprises a response identification code;
the data acquisition module is used for acquiring the full data aiming at the page updating request;
the identification code generation module is used for generating a current response identification code according to the full data, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data;
an identification code judging module, configured to judge whether a response identification code included in the page update request is consistent with the current response identification code;
and the instruction sending module is used for sending a preset no-update instruction to the client if the response identification code contained in the page update request is consistent with the current response identification code, so that the client keeps displaying the current page.
6. The apparatus of claim 5, further comprising:
and the full data sending module is used for sending the full data and the current response identification code to the client if the response identification code contained in the page updating request is inconsistent with the current response identification code, so that the client updates page display according to the full data and stores the current response identification code.
7. A page display device is applied to a client and comprises:
the request sending module is used for sending a page updating request to the server, wherein the page updating request comprises a response identification code;
the response result receiving module is used for receiving a response result returned by the server based on the response identification code;
the first page display module is used for keeping the current page display if the response result is a preset update-free instruction;
and the second page display module is used for updating page display according to the full data and storing the current response identification code if the response result comprises the full data and the current response identification code, wherein the current response identification code is an identification code which has a unique corresponding relation with the full data.
8. The apparatus of claim 7, further comprising:
a request updating module, configured to update the response identification code in the page updating request as the current response identification code according to the current response identification code;
the request sending module is specifically configured to:
and when a specified request period is reached, sending an updated page updating request to the server.
9. A server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-2 when executing a program stored in the memory.
10. The client is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 3 to 4 when executing a program stored in the memory.
CN201810611988.3A 2018-06-14 2018-06-14 Page display method and device, server and client Active CN108804195B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810611988.3A CN108804195B (en) 2018-06-14 2018-06-14 Page display method and device, server and client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810611988.3A CN108804195B (en) 2018-06-14 2018-06-14 Page display method and device, server and client

Publications (2)

Publication Number Publication Date
CN108804195A CN108804195A (en) 2018-11-13
CN108804195B true CN108804195B (en) 2021-08-13

Family

ID=64085812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810611988.3A Active CN108804195B (en) 2018-06-14 2018-06-14 Page display method and device, server and client

Country Status (1)

Country Link
CN (1) CN108804195B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113221049B (en) * 2021-04-27 2023-09-01 北京奇艺世纪科技有限公司 Page updating method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9426200B2 (en) * 2013-03-12 2016-08-23 Sap Se Updating dynamic content in cached resources
CN107025111A (en) * 2017-03-17 2017-08-08 烽火通信科技股份有限公司 The method and system that a kind of browser target pages entire screen switch is shown
CN107168999A (en) * 2017-03-30 2017-09-15 咪咕数字传媒有限公司 A kind of method for updating pages and device
CN107797817A (en) * 2017-03-13 2018-03-13 平安科技(深圳)有限公司 Using update method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130124971A1 (en) * 2011-11-16 2013-05-16 International Business Machines Corporation Real time web script refresh using asynchronous polling without full web page reload

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9426200B2 (en) * 2013-03-12 2016-08-23 Sap Se Updating dynamic content in cached resources
CN107797817A (en) * 2017-03-13 2018-03-13 平安科技(深圳)有限公司 Using update method and device
CN107025111A (en) * 2017-03-17 2017-08-08 烽火通信科技股份有限公司 The method and system that a kind of browser target pages entire screen switch is shown
CN107168999A (en) * 2017-03-30 2017-09-15 咪咕数字传媒有限公司 A kind of method for updating pages and device

Also Published As

Publication number Publication date
CN108804195A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
CN110263275B (en) Method and device for accessing webpage, mobile terminal and storage medium
CN107622135B (en) Method and apparatus for displaying information
US11086962B2 (en) Webpage loading method, client and server
CN109741060B (en) Information inquiry system, method, device, electronic equipment and storage medium
US20190166216A1 (en) Information pushing method and device
CN109451333B (en) Bullet screen display method, device, terminal and system
CN105468707A (en) Cache-based data processing method and device
CN105740330B (en) Method and device for displaying data in paging mode
CN108334516B (en) Information pushing method and device
CN111666113A (en) Application program starting management method and device, electronic equipment and storage medium
CN108319619B (en) Data processing method and device
CN111563199A (en) Data processing method and device
CN109902726B (en) Resume information processing method and device
CN111368226A (en) Screening method and device, electronic equipment and computer readable storage medium
CN109446445B (en) Resource acquisition method and device
CN112187622B (en) Instant message display method and device and server
CN108804195B (en) Page display method and device, server and client
CN112437148B (en) Service request processing method and device, service server and system
CN107918617B (en) Data query method and device
CN111783005B (en) Method, device and system for displaying web page, computer system and medium
CN111783010B (en) Webpage blank page monitoring method, device, terminal and storage medium
CN109885729B (en) Method, device and system for displaying data
CN111367606A (en) Application page display method, device, terminal and medium
CN111078219A (en) Page display method, device and system, electronic equipment and storage medium
CN111199137A (en) Cloud font loading method and device 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