WO2016110206A1 - 页面访问方法、装置及系统 - Google Patents

页面访问方法、装置及系统 Download PDF

Info

Publication number
WO2016110206A1
WO2016110206A1 PCT/CN2015/099542 CN2015099542W WO2016110206A1 WO 2016110206 A1 WO2016110206 A1 WO 2016110206A1 CN 2015099542 W CN2015099542 W CN 2015099542W WO 2016110206 A1 WO2016110206 A1 WO 2016110206A1
Authority
WO
WIPO (PCT)
Prior art keywords
digest
processing result
server
request
client
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.)
Ceased
Application number
PCT/CN2015/099542
Other languages
English (en)
French (fr)
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Publication of WO2016110206A1 publication Critical patent/WO2016110206A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the present application relates to the field of mobile Internet technologies, and in particular, to a page access method, apparatus, and system.
  • the user experience of the mobile Internet shopping platform is largely dependent on the network quality of the device.
  • the current network quality is uneven, and it cannot meet the needs of all users.
  • it is easy to cause network congestion the time required for loading is long, and even the loading failure may occur.
  • the damage user experience is largely dependent on the network quality of the device.
  • the content displayed on the homepage mainly includes the latest product activities, classified navigation, recommended businesses and products.
  • the content is usually dynamically changed, so each time the user accesses the home page, the user needs to download the data from the server to enable the user to see the latest content.
  • Each time downloading all the content not only consumes a large amount of traffic of the user but also causes a longer transmission time if the network is not good, so that the user waits for a longer time.
  • the purpose of the present application is to provide a method, device, and system for accessing a page, which solves the problem that the data to be loaded in the mobile Internet, especially when the network quality is poor, causes network congestion, resulting in long transmission time.
  • the application provides a page access method, and the method includes:
  • the server Sending a first request to the server, where the first request carries a first digest, the first digest is a digest of the first processing result, and the first processing result is that the server processes the last request a result, so that the server determines the first processing result according to the first digest;
  • the second processing result is a processing result of the first request by the server
  • the application further provides a page access method, the method comprising:
  • the client Receiving a first request sent by the client, where the first request carries a first digest, and the first digest is a digest of a processing result of a previous request before the first request;
  • the application further provides a client for the mobile terminal, where the client includes:
  • a sending unit configured to send a first request to the server, where the first request carries a first digest, the first digest is a digest of the first processing result, and the first processing result is that the server is configured by the server The processing result of the last request of the client, so that the server determines the first processing result according to the first digest;
  • a receiving unit configured to receive a first response message returned by the server, where the first response message carries first difference information, where the first difference information is between the second processing result and the first processing result
  • the difference between the second processing result is a processing result of the first request by the server
  • a processing unit configured to update the display page according to the first difference information received by the receiving unit.
  • the application further provides a server, where the server includes:
  • a receiving unit configured to receive a first request sent by the client, where the first request carries a first digest, and the first digest is a digest of a processing result of a previous request before the first request;
  • a processing unit configured to determine, according to the first digest, a first processing result, where the first processing result is a processing result of a last request by the server to the client;
  • the processing unit is further configured to process the first request to obtain a second processing result
  • the processing unit is further configured to compare the second processing result with the first processing result to obtain first difference information
  • a sending unit configured to send a first response message to the client, where the first response message includes first difference information obtained by the processing unit.
  • the application further provides a page access system, the system comprising: a client and a server;
  • the client sends a first request to the server, where the first request carries a first digest, the first digest is a digest of the first processing result, and the first processing result is that the server is to the client The processing result of the last request of the terminal;
  • the server processes the first request to obtain a second processing result
  • the server compares the second processing result with the first processing result to obtain first difference information
  • the client updates the display page according to the first difference information.
  • the page access method, device and system provided by the present application can transmit data in a manner of transmitting data digests and different parts, thereby reducing data transmitted in the mobile internet, so that the transmission process takes less time, especially in network quality.
  • Shorten the transmission delay which can speed up the loading of page content, so that users can see the page content in a shorter time and improve the user experience.
  • FIG. 1 is a schematic structural diagram of a page access system according to an embodiment of the present application
  • FIG. 2 is a flowchart of a page access method according to an embodiment of the present application.
  • FIG. 3 is a flowchart of a method for accessing a page on a client side according to an embodiment of the present application
  • FIG. 4 is a flowchart of a method for accessing a page on a server side according to an embodiment of the present application
  • FIG. 5 is a flowchart of still another page access method according to an embodiment of the present application.
  • FIG. 6 is a flowchart of still another page access method on the client side according to an embodiment of the present application.
  • FIG. 7 is a flowchart of still another page access method on the server side according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a device of a client according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram of an apparatus of a server according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of still another apparatus of a client according to an embodiment of the present application.
  • FIG. 11 is a schematic diagram of another apparatus of a server according to an embodiment of the present application.
  • the page access method, device and system provided by the embodiments of the present application are applicable to various mobile Internet display platforms, and are particularly applicable to a mobile Internet shopping platform with a large number of categories and large data volume, including a server and a client.
  • FIG. 1 is a schematic structural diagram of a page access system according to an embodiment of the present application.
  • the system includes: a server 1 and a mobile terminal 2, and a client 3 is installed on the mobile terminal, and the user initiates through the client 3
  • the server 1 performs a corresponding processing operation upon receiving the request sent by the client 3, and returns the processing result to the client 3 for display to the user on the client 3.
  • FIG. 2 is a schematic diagram of a page access method of the page access system of FIG. 1 according to an embodiment of the present application. As shown in FIG. 2, the method includes:
  • the client sends a first request to the server.
  • the user initiates a request through the client, and the first request sent by the client may include information such as a Uniform Resource Locator (URL) of the URL requested by the user, for example, a URL of a homepage of a shopping website.
  • URL Uniform Resource Locator
  • the client When a user opens a client (APP) of a shopping website, the client sends a request for the home page of the website. Alternatively, when the user browses a product of a certain category, the client sends a request to access the product list page of the category to the server. Alternatively, when the user clicks on an item on the client, the client sends a request to access the item details page to the server.
  • APP client
  • the server processes the first request, and obtains a first processing result and a first digest obtained by performing digest processing on the first processing result.
  • the server processes the first request, obtains a first processing result, and performs a digest processing on the first processing result to obtain a first digest.
  • the first request here is a page request, that is, requesting access to the page data of the page. Processing the first request, that is, acquiring corresponding page data according to the first request.
  • the page data can be adapted to the information of the user who initiated the page request. Sexual configuration.
  • different page data can be configured according to different user characteristics. Therefore, the page data here can include shared data and personalized data.
  • the shared data is the same portion of page data that is configured for any user in the page.
  • the personalized data is a page data portion correspondingly configured for the personalized information of the user who initiated the page request in the page. Different personalized data can be configured for different users. For example, in a display page of an e-commerce website, the personalized data may be personalized product data recommended according to the user's historical transaction data, browsing history, and the like.
  • the method for performing the digest processing on the first processing result may include separately performing the digest processing on the shared data and the personalized data of the page to obtain the shared data digest and the personalized data digest respectively. That is, the first summary can include a shared data digest and a personalized data digest.
  • the first digest is a redeemable digest
  • the resumable digest is formed by a symbolic concatenation of a shared data digest and a personalized digest.
  • shared data summaries and personalized data summaries can consist of letters, numbers, and/or punctuation. Therefore, the shared data digest and the personalized digest can be obtained by parsing the first digest, respectively.
  • the server that subsequently receives the first digest may use the first digest to obtain the first processing result.
  • the server may store the first digest and the first processing result in a one-to-one correspondence to the database of the server, and form a reductible digest in the database of the server.
  • a mapping table corresponding to the correspondence of the processing results, and the reductible digest is used as an index of the processing result.
  • the processing result corresponding to the reductible digest can be obtained by querying the mapping table.
  • the first processing result corresponding to the first digest can be obtained by querying the mapping table.
  • performing the digest processing on the first processing result to obtain the first digest and performing the following calculation: S1021: performing digest calculation on the shared data to obtain a shared data digest; S1022, extracting the personalized data, And the summary calculation of the extracted personalized data, To the personalized data digest; S1023, performing string concatenation processing on the shared data digest and the personalized data digest to obtain the first digest.
  • RD stands for the first summary
  • S stands for shared data
  • SD shared data summary
  • P personalized data
  • PD personalized data summary
  • join stands for string splicing process
  • extract stands for personalized data extraction process
  • Digest represents the digest calculation process
  • the shared data digest, personalized data digest, and first digest can be expressed as:
  • digest can use the existing general digest algorithm (such as MD5) for digest calculation.
  • personalized data is data that varies from person to person, it is not possible to reduce storage by eliminating duplicates like shared data.
  • the personalized data is extracted in this application, and only personalized is saved. Key information in the data. For example, in the product data of the personalized recommendation of a shopping website, only the identification (ID) of the product can be extracted to represent the product information, so that the storage amount of the personalized data can be greatly reduced.
  • ID identification
  • the server sends a first response message to the client.
  • the first response message carries the first processing result and the first digest.
  • the first processing result is a processing result of the first request by the server. For example, if the first request is a request to access the home page of the website, the processing result returned by the server to the client is the corresponding web page. If the second request is to access the details page of an item, the processing result returned by the server to the client is the detail page of the item.
  • the client generates a first display page according to the first processing result.
  • the processing result returned by the client receiving server is the webpage page of the homepage of the website, the corresponding webpage page is generated and displayed to the user. If the client receives the detail page of the product, the detail page for generating the corresponding product is displayed to the user.
  • the client sends a second request to the server.
  • the second request carries the first digest.
  • the client sends a first digest to the server, where the server determines, according to the first digest, a processing result that the client receives from the server last time.
  • the server processes the second request to obtain a second processing result.
  • the second request may be a request for the client to update the first processing result corresponding to the first request, for example, a request for updating or partially updating the page corresponding to the first request. If the page has an update, the second processing result is the updated page data.
  • the server determines, by using the first digest, the first processing result, and compares the first processing result with the second processing result to obtain first difference information.
  • the first summary corresponding to the first processing result may be stored in a distributed cache of the server.
  • the server may find the first processing result corresponding to the first digest in the distributed cache according to the obtained first digest.
  • the first difference information is difference information obtained by the server comparing the difference between the second processing result and the first processing result.
  • the server sends a second response message to the client.
  • the first difference information in the second response message is the first difference information in the second response message.
  • the client updates the first display page according to the first difference information.
  • the client updates the display page according to the received first difference information.
  • This incremental transmission method that only transmits the difference information is beneficial to reduce the content of the transmission, and the update method is agreed in the transmission protocol between the client and the server, and the client knows how to handle the incremental difference information.
  • the details of the processing are related to the specific business scenario. For example, it can be agreed that both the client and the server support incremental update of a picture, then the server needs to pass a picture link and content ID when it meets the incremental transmission, and after the client receives the ID, the corresponding component is found by the ID. Update the picture of the component to a new link.
  • the method further includes: storing the first processing result and the first digest into a memory of the server.
  • the first processing result and the first digest may be stored in a distributed cache.
  • the type of memory can use different storage media according to different needs. For example, when the demand requirement response time is as short as possible, a memory-based storage medium such as a high-performance distributed memory object cache system memcache, a structured data storage system tair, a structured data storage redis, etc. can be used; Demand does not require response time, but when you need to support a large number of users, you can use storage facilities based on disk storage, such as database system mysql, database system hbase, database Oracle.
  • a memory-based storage medium such as a high-performance distributed memory object cache system memcache, a structured data storage system tair, a structured data storage redis, etc.
  • Demand does not require response time, but when you need to support a large number of users, you can use storage facilities based on disk storage, such as database system mysql, database system hbase, database Oracle.
  • the server processes the second request, and the second processing result further includes:
  • the second processing result is subjected to digest processing to obtain a second digest.
  • the second processing result and the second digest may be further stored in a memory of the server, such as a distributed cache of the server. Further, the second digest message may further carry the second digest.
  • the second digest is sent to the server, and the server determines the second processing result according to the second digest, and compares the processing result after processing the next request to obtain new difference information, and sends the new difference information.
  • the server determines the second processing result according to the second digest, and compares the processing result after processing the next request to obtain new difference information, and sends the new difference information.
  • the client updates based on the new difference information.
  • the client may store the first digest in the first response message on the memory of the mobile terminal to persist the first digest to the client local.
  • the client stores the second digest in the second response message to the memory of the mobile terminal, so that the second digest is persisted to the client local.
  • FIG. 3 is a flowchart of a method for accessing a page on a client side according to an embodiment of the present application, as shown in FIG. 3
  • the page access method of the present application includes:
  • the first response message carries a first processing result that is responsive to the first request and a first summary of the first processing result.
  • the second response message carries the first difference information.
  • the first difference information is difference information obtained by the server comparing the difference between the second processing result and the first processing result.
  • the first request sent by the client further carries the first service parameter; the first processing result received by the client is that the server is configured according to the first service parameter, to the first The result of the request processing.
  • the second request further includes a second service parameter, where the second processing result is a processing result of the second request by the server according to the second service parameter.
  • the first service parameter and the second service parameter may include context information when the client sends the request, and the like.
  • the second response message received by the server 205 further carries a second digest, where the second digest is a digest of the processing result of the second request by the server.
  • the client sends the second digest to the server.
  • FIG. 4 is a flowchart of a page access method of the server provided by this embodiment.
  • the page access method of the present application includes:
  • the server receives the first request sent by the client.
  • the server processes the first request, and obtains a first processing result and a first digest obtained by performing digest processing on the first processing result.
  • the server processes the first request, obtains a first processing result, and performs a digest processing on the first processing result to obtain a first digest.
  • the server sends a first response message to the client.
  • the first response message carries the first processing result and the first digest.
  • the server receives the second request sent by the client.
  • the first request is carried in the second request.
  • the server processes the second request to obtain a second processing result.
  • the server obtains the first processing result by using the first digest, and compares the first processing result with the second processing result to obtain first difference information.
  • the server sends a second response message to the client.
  • the second response message carries the first difference information.
  • the server processes the second request to obtain the second processing result, and the method further includes: performing a digest processing on the second processing result by the server to obtain the second digest.
  • the second response message is also carried in the second response message sent by S307.
  • the second digest is formed by splicing the shared data digest and the personalized digest by symbols.
  • the server processes the first request according to the first service parameter. If the second request further carries the second service parameter, the second processing result is a processing result of the second request by the server according to the second service parameter.
  • the client may directly send the first request carrying the first digest to the server, as shown in FIG. 5, including:
  • the client sends a first request to the server, where the first request carries the first digest.
  • the first digest is a digest of the first processing result
  • the first processing result is a processing result of the last request by the server.
  • the processing of the last request is before S401, and specifically includes: the client sends the last request to the server, and receives a response message returned by the server to the last request, where the response message carries The first processing result and the first digest are further described, and the display page is further generated according to the first processing result.
  • the server determines, according to the first digest carried in the first request, a first processing result.
  • the server determines the first processing result according to the first digest carried in the first request sent by the client, that is, determines a processing result of the last request by the server to the client.
  • the server processes the first request to obtain a second processing result.
  • the server compares the second processing result with the first processing result to obtain first difference information.
  • the server sends a first response message to the client, where the first response message includes first difference information.
  • the client updates the display page according to the first difference information.
  • the server processes the first request to obtain the second processing result in S403, and further includes: performing a digest processing on the second processing result by the server to obtain a second digest.
  • the second response is also carried in the first response message sent by the server in S405.
  • the second summary includes a shared data digest and a personalized data digest
  • the shared data digest is a digest obtained by the server performing digest calculation on the shared data in the processing result of the first request, the personalized data digest Personality in the processing result of the server for the first request
  • the method further includes: the server storing the second processing result and the second digest into the memory.
  • FIG. 6 is a flowchart of a method for accessing a page on the client side according to an embodiment of the present application. As shown in FIG. 6, the method includes:
  • the client sends a first request to the server.
  • the first request carries a first digest
  • the first digest is a digest of a processing result (first processing result) of the last request by the server to the client.
  • the server may determine, according to the first digest, a processing result (first processing result) of the last request of the server to the client.
  • the client receives the first response message returned by the server.
  • the first response message carries the first difference information.
  • the first difference information is a processing result of the first request by the server to the client (a second processing result) and a processing result of the server last request by the server (first processing result) difference between.
  • the first response message further carries a second digest, where the second digest is a digest of the processing result (second processing result) of the first request by the server.
  • the second summary includes a shared data digest and a personalized data digest
  • the shared data digest is a digest obtained by performing a digest calculation on the shared data in the processing result (second processing result) of the first request by the server.
  • the personalized data digest is a digest obtained by performing a digest calculation on the personalized data in the processing result (second processing result) of the first request by the server.
  • the client updates the display page according to the first difference information.
  • the method further includes: the client storing the second digest into a memory of the mobile terminal.
  • the first request further carries a first service parameter, where the second digest is a digest of the processing result of the first request by the server according to the first service parameter.
  • FIG. 7 is a flowchart of a page access method of the server provided by this embodiment. As shown in FIG. 7, the method includes:
  • the server receives the first request sent by the client.
  • the first request carries a first digest
  • the first digest is a digest of a processing result of a previous request before the first request.
  • the server determines, according to the first digest, a first processing result, where the first processing result is a processing result of a last request by the server to the client.
  • the server processes the first request to obtain a second processing result.
  • the server compares the second processing result with the first processing result to obtain first difference information.
  • the server sends a first response message to the client, where the first response message includes first difference information.
  • the method further includes: performing a digest processing on the second processing result by the server to obtain a second digest.
  • the first response message sent by the server in S605 may further include a second digest, where the client sends the second digest to the server when sending the next request, and the server determines to obtain the second according to the second digest. Processing the result, and comparing the obtained second processing result with the new processing result obtained by processing the received next request, obtaining new difference information and a new digest, and sending the new digest to the client, the client according to the new The difference information is updated, and so on.
  • the method further includes: the server storing the second processing result and the second digest into the memory.
  • the page access method provided by the embodiment of the present application can transmit data by transmitting a summary and a difference part of the data, thereby reducing data transmitted in the mobile internet, so that the time consumed for transmission is short, especially in the case of poor network quality.
  • the transmission delay is shortened, and the loading speed of the page content is accelerated, so that the user can see the page content in a shorter time and improve the user experience.
  • FIG. 8 is a schematic diagram of a device of a client according to an embodiment of the present disclosure.
  • the client includes: a first sending unit 701, a first receiving unit 702, and a first processing unit. 703.
  • the first sending unit 701 is configured to send the first request to the server.
  • the first receiving unit 702 is configured to receive a first response message returned by the server.
  • the first response message carries a first processing result and a first digest
  • the first processing result is a processing result of the first request by the server
  • the first digest is the first processing result
  • the first processing unit 703 is configured to generate a first display page according to the first processing result received by the first receiving unit 702.
  • the second sending unit 704 is configured to send a second request to the server.
  • the second request carries the first digest received by the first receiving unit.
  • the second receiving unit 705 is configured to receive a second response message returned by the server.
  • the second response message carries the first difference information, where the first difference information is difference information obtained by the server comparing the difference between the second processing result and the first processing result.
  • the second processing unit 706 is configured to use the first difference information received by the second receiving unit 705, Update the first display page.
  • the second response message received by the second receiving unit 705 further carries the second digest, and the second digest is a digest of the second processing result.
  • the first request sent by the first sending unit 701 further carries a first service parameter;
  • the first processing result received by the first receiving unit 702 is that the server is configured according to the first service parameter. The result of processing the first request.
  • the client further includes: a storage unit, configured to: after the first receiving unit 702 receives the first response message returned by the server, store the first digest into a memory, and, in the After receiving the second response message returned by the server, the second receiving unit 702 stores the second digest into the memory.
  • a storage unit configured to: after the first receiving unit 702 receives the first response message returned by the server, store the first digest into a memory, and, in the After receiving the second response message returned by the server, the second receiving unit 702 stores the second digest into the memory.
  • the first sending unit 701 and the second sending unit 705 may be the same module, and the first receiving unit 702 and the second receiving unit 705 may be the same module, and the first processing unit 703 and the second processing unit 706 may be the same. A module.
  • the functions of the above units may correspond to the processing steps of the above page access method described in detail in FIG. 3, and details are not described herein again.
  • FIG. 9 is a schematic diagram of a device of a server according to an embodiment of the present disclosure.
  • the server includes: a first receiving unit 801, a first processing unit 802, and a first sending unit 803. a second receiving unit 804, a second processing unit 805, a third processing unit 806, and a second transmitting unit 807.
  • the first receiving unit 801 is configured to receive the first request sent by the client.
  • the first processing unit 802 is configured to process the first request received by the first receiving unit 801 to obtain a first processing result and a first digest.
  • the first sending unit 803 is configured to send a first response message to the client.
  • the first response message carries the first processing result and the first digest obtained by the first processing unit.
  • the second receiving unit 804 is configured to receive a second request sent by the client, where the second request carries the first digest.
  • the second processing unit 805 is configured to process the second request received by the second receiving unit 804 to obtain a second processing result.
  • the third processing unit 806 is configured to determine, by using the first digest received by the second receiving unit 804, the first processing result, and the second processing result obtained by the first processing result and the second processing unit 805. The difference is compared to obtain the first difference information.
  • the second sending unit 807 is configured to send a second response message to the client.
  • the second response message carries the first difference information obtained by the third processing unit 806.
  • the second processing unit 805 is further configured to perform digest processing on the second processing result to obtain a second digest.
  • the second response message sent by the second sending unit 807 further carries the second digest obtained by the second processing unit 805.
  • the server further includes: a storage unit, configured to store the first processing result and the first digest into a memory after the first processing unit 802 obtains the first processing result and the first digest And after the second processing unit 805 obtains the second processing result and the second digest, storing the second processing result and the second digest into the memory.
  • a storage unit configured to store the first processing result and the first digest into a memory after the first processing unit 802 obtains the first processing result and the first digest
  • the second processing unit 805 obtains the second processing result and the second digest, storing the second processing result and the second digest into the memory.
  • the first receiving unit 801 and the second receiving unit 804 may be the same module, and the first sending unit 803 and the second sending unit 807 may be the same module, the first processing unit 802, the second processing unit 805, and the third unit.
  • Processing unit 806 can be the same module.
  • the functions of the above units may correspond to the processing steps of the above page access method described in detail in FIG. 4, and details are not described herein again.
  • FIG. 10 is a schematic diagram of a device of a client according to an embodiment of the present disclosure.
  • the client includes: a sending unit 901 , a receiving unit 902 , and a processing unit 903 .
  • the sending unit 901 is configured to send a first request to the server, where the first request carries the first digest that is already in the client.
  • the first digest is a summary of a processing result (first processing result) of the last request by the server to the client, so that the server determines that the server is on the client according to the first digest.
  • the processing result of one request (first processing result).
  • the receiving unit 902 is configured to receive a first response message returned by the server.
  • the first response message carries first difference information, where the first difference information is a processing result (second processing result) of the first request by the server to the client, and the server pair The difference between the processing result (first processing result) of the last request of the client.
  • the processing unit 903 is configured to update the display page according to the first difference information received by the receiving unit 902.
  • the first response message further carries a second digest, where the second digest is a digest of the second processing result obtained by the server processing the first request.
  • the first request sent by the sending unit 901 further carries the first service parameter, where the second digest received by the receiving unit 902 is a processing result of the first request by the server according to the first service parameter.
  • the client further includes: a storage unit, configured to store the second digest into the memory after the receiving unit receives the first response message.
  • the functions of the above units may correspond to the processing steps of the above page access method described in detail in FIG. 6, and details are not described herein again.
  • FIG. 11 is a schematic diagram of a device of a server according to an embodiment of the present disclosure.
  • the server includes: a receiving unit 1001 , a processing unit 1002 , and a sending unit 1003 .
  • the receiving unit 1001 is configured to receive a first request sent by the client, where the first request carries a first digest, and the first digest is a digest of a processing result of a previous request before the first request.
  • the processing unit 1002 is configured to determine, according to the first digest, a first processing result, where the first The result of the processing is the processing result of the last request of the server to the client.
  • the processing unit 1002 is further configured to process the first request to obtain a second processing result.
  • the processing unit 1002 is further configured to compare the second processing result with the first processing result to obtain first difference information.
  • the sending unit 1003 is configured to send a first response message to the client, where the first response message includes first difference information obtained by the processing unit.
  • the processing unit 1002 is further configured to perform a digest processing on the second processing result.
  • the second response sent by the sending unit 1003 further includes the second digest.
  • the server further includes: a storage unit, configured to store the second processing result and the second digest into the memory after the processing unit 1002 obtains the second processing result and the second digest in.
  • a storage unit configured to store the second processing result and the second digest into the memory after the processing unit 1002 obtains the second processing result and the second digest in.
  • the functions of the above units may correspond to the processing steps of the above page access method described in detail in FIG. 7, and details are not described herein again.
  • the page access method, device and system provided by the application can transmit data by transmitting a summary and a difference part of the data, thereby reducing data transmitted in the mobile internet, so that the transmission takes less time, especially in the network quality.
  • the transmission delay is shortened, and the loading speed of the page content is accelerated, so that the user can see the page content in a shorter time and improve the user experience.
  • the steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both.
  • the software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请涉及一种页面访问方法、装置及系统,所述方法包括:发送第一请求给服务器,所述第一请求中携带有第一摘要,所述第一摘要为第一处理结果的摘要,所述第一处理结果为所述服务器对上一次请求的处理结果;接收所述服务器返回的第一响应消息,所述第一响应消息中携带有第一差异信息,所述第一差异信息为第二处理结果与所述第一处理结果之间的差异,所述第二处理结果为所述服务器对所述第一请求的处理结果;根据所述第一差异信息,更新显示页面。本申请可减少在移动互联网中传输的数据,使得传输过程所消耗的时间较短,尤其在网络质量不好的情况下,可加快页面内容的加载速度,使用户在更短的时间内能看到页面内容,提升用户体验。

Description

页面访问方法、装置及系统 技术领域
本申请涉及移动互联网技术领域,尤其涉及一种页面访问方法、装置及系统。
背景技术
移动互联网购物平台的用户体验很大程度上依赖于设备的网络质量。而目前的网络质量参差不齐,还无法满足所有用户的需求,尤其是需要加载很多数据的时候,容易造成网络拥塞,加载所需要的时间长,甚至会出现加载失败的情况,更会极大的损伤用户体验。
在一些移动互联网购物平台的首页通常需要展现许多内容。首页展现的内容主要包含最新的商品活动、分类导航、推荐的商家和商品。而且这些内容通常是动态变化的,因此每次用户访问首页时都需要从服务端去下载数据,才能使用户看到最新的内容。而每次下载所有的内容不仅消耗用户较大的流量而且在网络不好的情况下会使传输的时间更长,使用户等待更长的时间。
发明内容
本申请的目的是,提供一种页面访问方法、装置及系统,解决移动互联网中尤其在网络质量较差时,需要加载的数据较多造成网络拥塞,导致传输时间长的问题。
本申请提供了一种页面访问方法,所述方法包括:
发送第一请求给服务器,所述第一请求中携带有第一摘要,所述第一摘要为第一处理结果的摘要,所述第一处理结果为所述服务器对所述上一次请求的处理结果,以使所述服务器根据所述第一摘要确定所述第一处理结果;
接收所述服务器返回的第一响应消息,所述第一响应消息中携带有第一差异信息,所述第一差异信息为第二处理结果与所述第一处理结果之间的差异,所述第二处理结果为所述服务器对所述第一请求的处理结果;
根据所述第一差异信息,更新显示页面。
又一方面,本申请还提供了一种页面访问方法,所述方法包括:
接收客户端发送的第一请求,所述第一请求中携带有第一摘要,所述第一摘要为对所述第一请求之前的上一次请求的处理结果的摘要;
根据所述第一摘要确定得到第一处理结果,所述第一处理结果为服务器对所述客户端的上一次请求的处理结果;
对所述第一请求进行处理,得到第二处理结果;
将所述第二处理结果与所述第一处理结果进行比较,得到第一差异信息;
发送第一响应消息给所述客户端,所述第一响应消息包括第一差异信息。
又一方面,本申请还提供了一种客户端,用于移动终端上,所述客户端包括:
发送单元,用于发送第一请求给服务器,所述第一请求中携带有第一摘要,所述第一摘要为第一处理结果的摘要,所述第一处理结果为所述服务器对所述客户端的上一次请求的处理结果,以使所述服务器根据所述第一摘要确定所述第一处理结果;
接收单元,用于接收所述服务器返回的第一响应消息,所述第一响应消息中携带有第一差异信息,所述第一差异信息为第二处理结果与所述第一处理结果之间的差异,所述第二处理结果为所述服务器对所述第一请求的处理结果;
处理单元,用于根据所述接收单元接收的所述第一差异信息,更新显示页面。
又一方面,本申请还提供了一种服务器,所述服务器包括:
接收单元,用于接收客户端发送的第一请求,所述第一请求中携带有第一摘要,所述第一摘要为对所述第一请求之前的上一次请求的处理结果的摘要;
处理单元,用于根据所述第一摘要确定得到第一处理结果,所述第一处理结果为所述服务器对所述客户端的上一次请求的处理结果;
所述处理单元还用于对所述第一请求进行处理,得到第二处理结果;
所述处理单元还用于将所述第二处理结果与所述第一处理结果进行比较,得到第一差异信息;
发送单元,用于发送第一响应消息给所述客户端,所述第一响应消息包括所述处理单元得到的第一差异信息。
又一方面,本申请还提供了一种页面访问系统,所述系统包括:客户端和服务器;
所述客户端发送第一请求给服务器,所述第一请求中携带有第一摘要,所述第一摘要为第一处理结果的摘要,所述第一处理结果为所述服务器对所述客户端的上一次请求的处理结果;
所述服务器根据所述第一摘要确定得到所述第一处理结果;
所述服务器对所述第一请求进行处理,得到第二处理结果;
所述服务器将所述第二处理结果与所述第一处理结果进行比较,得到第一差异信息;
所述服务器发送第一响应消息给所述客户端,所述第一响应消息包括第一差异信息;
所述客户端根据所述第一差异信息,更新显示页面。
本申请提供的页面访问方法、装置及系统,通过传输数据的摘要及差异部分的方式来传输数据,可以减少在移动互联网中传输的数据,使得传输过程所消耗的时间较短,尤其在网络质量不好的情况下加载动态页面数据时, 缩短传输时延,可加快页面内容的加载速度,使用户在更短的时间内能看到页面内容,提升用户体验。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种页面访问系统的结构示意图;
图2为本申请实施例提供的一种页面访问方法流程图;
图3为本申请实施例提供的客户端侧的一种页面访问方法流程图;
图4为本申请实施例提供的服务器端的一种页面访问方法流程图;
图5为本申请实施例提供的又一种页面访问方法流程图;
图6为本申请实施例提供的客户端侧的又一种页面访问方法流程图;
图7为本申请实施例提供的服务器端的又一种页面访问方法流程图;
图8为本申请实施例提供的一种客户端的装置示意图;
图9为本申请实施例提供的一种服务器的装置示意图;
图10为本申请实施例提供的又一种客户端的装置示意图;
图11为本申请实施例提供的又一种服务器的装置示意图。
具体实施方式
为使得本申请的发明目的、特征、优点能够更加的明显和易懂,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本申请一部分实施例,而非全部实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所 有其他实施例,都属于本申请保护的范围。
本申请实施例提供的页面访问方法、装置及系统,适用于各类移动互联网的展示平台,尤其适用于类目较多、数据量大的移动互联网购物平台,包括服务器及客户端。
图1是本申请实施例提供的一种页面访问系统的结构示意图,如图1所示,该系统包括:服务器1和移动终端2,移动终端上安装有客户端3,用户通过客户端3发起请求,服务器1在接收到客户端3发送的请求时,进行相应的处理操作,并将处理结果返回给客户端3,以在客户端3上显示给用户。
图2是本申请实施例提供的图1中的页面访问系统的一种页面访问方法的示意图,如图2所示,包括:
S101、客户端发送第一请求给服务器。
用户通过客户端发起请求,客户端发送的第一请求中可以包括用户所请求的网址的统一资源定位符(Uniform Resource Locator,URL)等信息,例如,某购物网站的首页的URL等。
当用户打开某购物网站的客户端(APP)时,客户端即发送请求网站首页的请求。或者,当用户浏览某个类目的商品时,客户端发送访问该类目的商品列表页面的请求给服务器。或者,当用户点击客户端上的某个商品时,客户端发送访问该商品详情页面的请求给服务器。
S102、服务器对所述第一请求进行处理,得到第一处理结果及对第一处理结果进行摘要处理后得到的第一摘要。
服务器对所述第一请求进行处理,得到第一处理结果,并对所述第一处理结果进行摘要处理,得到第一摘要。
这里第一请求为页面请求,即请求访问页面的页面数据。对所述第一请求进行的处理,即根据第一请求获取相应的页面数据。
在某些页面中,页面数据可以根据发起页面请求的用户的信息进行适应 性配置。在所述页面中,可以根据不同的用户的特性配置不同的页面数据。因此,这里的页面数据可以包括共享数据及个性化数据。所述共享数据为在所述页面中针对任何用户都有配置的相同的页面数据部分。所述个性化数据为在所述页面中针对发起页面请求的用户的个性化信息而对应配置的页面数据部分。针对不同用户可以配置不同的个性化数据。例如,在某一电子商务网站的展示页面中,个性化数据可以为根据用户的历史交易数据、浏览记录等推荐的个性化的商品数据。
因此,在某些实施例中,对第一处理结果进行摘要处理的方法可以包括分别对页面的共享数据及个性化数据分别进行摘要处理,以分别获得共享数据摘要和个性化数据摘要。即,第一摘要可以包括共享数据摘要和个性化数据摘要。
该第一摘要为可还原摘要,所述可还原摘要由共享数据摘要和个性化摘要通过符号拼接而成。例如,共享数据摘要和个性化数据摘要可以由字母、数字和/或标点符合组成。因此,共享数据摘要和个性化摘要可以分别通过对该第一摘要的解析获得。后续接收到第一摘要的服务器可以利用第一摘要还原得到所述第一处理结果。
具体地,服务器在得到第一处理结果及第一摘要之后,可以将第一摘要与第一处理结果以一一对应的方式存储到服务器的数据库中,在服务器的数据库中,形成可还原摘要与对应的处理结果的对应关系的映射表,并将可还原摘要作为处理结果的索引。当服务器获得可还原摘要之后,可以通过查询映射表的方式获取到该可还原摘要对应的处理结果。当服务器获得第一摘要时,即可以通过查询该映射表查询得到第一摘要对应的第一处理结果。
可选地,对所述第一处理结果进行摘要处理,得到第一摘要,可以采用以下方式进行计算:S1021、对共享数据进行摘要计算,得到共享数据摘要;S1022、对个性化数据进行抽取,并对抽取后的个性化数据进行摘要计算,得 到个性化数据摘要;S1023、对所述共享数据摘要和个性化数据摘要进行字符串拼接处理,得到第一摘要。
具体地,如果RD代表第一摘要,S代表共享数据,SD代表共享数据摘要,P代表个性化数据,PD代表个性化数据摘要,join代表字符串拼接处理过程,extract代表个性化数据的抽取过程,digest代表摘要计算过程,则共享数据摘要、个性化数据摘要及第一摘要可以分别表示为:
SD=digest(S);
PD=digest(extract(P));
RD=join(SD,PD)=join(digest(S),digest(extract(P)))。
其中,digest可以采用现有通用的摘要算法(例如MD5)进行摘要计算。
由于个性化数据是因人而异的数据,无法像共享数据那样通过消除重复的方式达到减少存储的目的,为了达到减少存储的目的,本申请中对个性化数据进行抽取操作,只保存个性化数据中的关键信息。例如,某购物网站的个性化推荐的商品数据中,可以只抽取商品的标识(ID)来表示该商品信息,这样,可以极大地减少个性化数据的存储量。
S103、服务器发送第一响应消息给客户端。
所述第一响应消息中携带有所述第一处理结果及第一摘要。
所述第一处理结果为所述服务器对所述第一请求的处理结果。例如,如果第一请求是访问网站首页的请求,则服务器返回给客户端的处理结果为对应的网页页面。如果第二请求是访问某个商品的详情页面,则服务器返回给客户端的处理结果为该商品的详情页面。
S104、客户端根据所述第一处理结果生成第一显示页面。
如果客户端接收服务器返回的处理结果为网站首页的网页页面,则生成对应的网页页面显示给用户。如果客户端接收的为商品的详情页面,则生成对应商品的详情页面显示给用户。
S105、客户端发送第二请求给服务器。
所述第二请求中携带有第一摘要。
客户端向服务器发送第一摘要,用以供服务器根据所述第一摘要确定所述客户端上一次从服务器中接收的处理结果。
S106、服务器对所述第二请求进行处理,得到第二处理结果。
所述第二请求可以为客户端对第一请求对应的第一处理结果进行更新的请求,例如,对第一请求对应的页面进行更新或部分更新的请求。如果,所述页面存在更新,则所述第二处理结果为更新后的页面数据。
S107、服务器通过所述第一摘要确定所述第一处理结果,将所述第一处理结果与所述第二处理结果进行差异比较,得到第一差异信息。
在本申请的某些实施例中,第一处理结果与第一处理结果对应的第一摘要可以存储在服务器的分布式缓存中。在本步骤中,服务器可以根据得到的第一摘要在所述分布式缓存中查找到与第一摘要对应的第一处理结果。
第一差异信息为所述服务器对所述第二处理结果与所述第一处理结果进行差异比较后得到的差异信息。
S108、服务器发送第二响应消息给客户端。
所述第二响应消息中所述第一差异信息。
S109、客户端根据所述第一差异信息,更新所述第一显示页面。
客户端根据接收到的第一差异信息,更新显示页面。
这种只传输差异信息的增量式传输方式,有利于减少传输的内容,在客户端与服务器之间的传输协议中约定好更新方式,客户端即知道如何处理增量式的差异信息,具体处理的细节与具体的业务场景相关。例如,可以约定客户端与服务端都支持增量更新一张图片,那么服务端在符合增量传输时需要传递一个图片的链接和内容ID,客户端接收到后,通过ID找到相应的组件,将该组件的图片更新为新的链接。
可选的,在S102服务器得到第一处理结果和第一摘要之后,还包括:将所述第一处理结果和第一摘要存储至服务器的存储器中。在本申请实施例中,为了减少存取响应时间,可以将所述第一处理结果和第一摘要存储到分布式缓存中。
存储器的类型可以根据不同的需求使用不同的存储介质。例如,当使用需求要求响应时间尽可能短时,可以选用基于内存实现的存储介质,如,高性能分布式的内存对象缓存系统memcache、结构数据存储系统tair、结构化数据存储redis等;当使用需求对响应时间无要求,但是需要支持海量的用户时,可以选用基于磁盘存储实现的存储设施,如,数据库系统mysql、数据库系统hbase、数据库Oracle。
同理,S106步骤中服务器对所述第二请求进行处理,得到第二处理结果还包括:
对第二处理结果进行摘要处理,得到第二摘要。所述第二处理结果和第二摘要可以进一步存储至服务器的存储器中,例如服务器的分布式缓存中。进一步地,所述第二响应消息中还可以携带所述第二摘要。
客户端在发起下一次请求时,将第二摘要发送给服务器,服务器根据该第二摘要确定第二处理结果,并与对下一次请求进行处理后的处理结果进行比较得到新的差异信息,发送给客户端。客户端根据新的差异信息进行更新。
当客户端接收到第一响应消息之后,客户端可以将第一响应消息中的第一摘要存储到移动终端的存储器上,使第一摘要持久化到客户端本地。同理,当客户端接收到第二响应消息之后,客户端将第二响应消息中的第二摘要存储到移动终端的存储器上,使第二摘要持久化到客户端本地。
具体地,本申请实施例在客户端侧和服务器侧各自所需要的方法流程,下面通过图3和图4进行详细的说明。
图3是本申请实施例提供的客户端侧的页面访问方法流程图,如图3所 示,本申请的页面访问方法包括:
S201、发送第一请求给服务器。
S202、接收所述服务器返回的第一响应消息。
所述第一响应消息中携带有响应第一请求的第一处理结果及该第一处理结果的第一摘要。
S203、根据所述第一处理结果生成第一显示页面。
S204、发送第二请求给所述服务器,所述第二请求中携带有第一摘要。
S205、接收所述服务器返回的第二响应消息。
所述第二响应消息中携带第一差异信息。第一差异信息为所述服务器对所述第二处理结果与所述第一处理结果进行差异比较后得到的差异信息。
S206、根据所述第一差异信息,更新所述第一显示页面。
可选的,客户端发送的所述第一请求中还携带有第一业务参数;则客户端接收的所述第一处理结果为所述服务器根据所述第一业务参数,对所述第一请求的处理结果。所述第二请求中还携带有第二业务参数,则所述第二处理结果为所述服务器根据所述第二业务参数,对所述第二请求的处理结果。其中,第一业务参数和第二业务参数可以包括客户端发送请求时的上下文信息等。
可选地,在S205接收的第二响应消息中还携带有第二摘要,所述第二摘要是所述服务器对第二请求的处理结果的摘要。在S206之后发送下一次请求时,客户端将所述第二摘要发送给所述服务器。
上述各步骤的具体处理过程可以对应于图2中所示的客户端侧的处理过程,于此不在赘述。
与图3相对应地,图4是本实施例提供的服务器端的页面访问方法流程图,如图4所示,本申请的页面访问方法包括:
S301、服务器接收客户端发送的第一请求。
S302、服务器对所述第一请求进行处理,得到第一处理结果及对第一处理结果进行摘要处理后得到的第一摘要。
服务器对所述第一请求进行处理,得到第一处理结果,并对所述第一处理结果进行摘要处理,得到第一摘要。
S303、服务器发送第一响应消息给所述客户端。
所述第一响应消息中携带有所述第一处理结果及第一摘要。
S304、服务器接收所述客户端发送的第二请求。
所述第二请求中携带有所述第一摘要。
S305、服务器对所述第二请求进行处理,得到第二处理结果。
S306、服务器通过所述第一摘要还原得到所述第一处理结果,将所述第一处理结果与所述第二处理结果进行差异比较,得到第一差异信息。
S307、服务器发送第二响应消息给所述客户端。
所述第二响应消息中携带有所述第一差异信息。
同样可选地,在S305中服务器对第二请求进行处理,得到第二处理结果,还包括:服务器对所述第二处理结果进行摘要处理,得到第二摘要。在S307发送的第二响应消息中还携带有第二摘要。与第一摘要相同地,该第二摘要由共享数据摘要和个性化摘要通过符号拼接而成。当客户端再一次发送更新的请求时,该请求中则携带有第二摘要,用以服务器根据该第二摘要确定所述客户端上一次从服务器中接收的处理结果。
可选的,如果客户端发送的第一请求中携带有第一业务参数,服务器则根据该第一业务参数对所述第一请求的处理结果。如果第二请求中还携带有第二业务参数,所述第二处理结果为所述服务器根据所述第二业务参数,对所述第二请求的处理结果。
上述各步骤的具体处理过程可以对应于图2中所示的服务器侧的处理过程,于此不在赘述。
另外,如果客户端并非第一次访问,或者,客户端所在的移动终端上已经存储有对应的摘要,则所述客户端也可以直接发送携带第一摘要的第一请求给服务器,具体如图5所示,包括:
S401、客户端发送第一请求给服务器,所述第一请求中携带有第一摘要。
所述第一摘要为第一处理结果的摘要,所述第一处理结果为所述服务器对上一次请求的处理结果。
对于上一次请求的处理是在S401之前,具体还包括:客户端发送上一次请求给所述服务器,并接收所述服务器对所述上一次请求返回的响应消息,所述响应消息中携带有所述第一处理结果及所述第一摘要,进而再根据所述第一处理结果生成所述显示页面。
S402、服务器根据所述第一请求中携带的第一摘要确定第一处理结果。
服务器根据客户端发送的第一请求中携带的第一摘要,确定所述第一处理结果,即确定所述服务器对所述客户端的上一次请求的处理结果。
S403、服务器对所述第一请求进行处理,得到第二处理结果。
S404、服务器将所述第二处理结果与所述第一处理结果进行比较,得到第一差异信息。
S405、服务器发送第一响应消息给客户端,所述第一响应消息包括第一差异信息。
S406、客户端根据所述第一差异信息,更新显示页面。
可选地,在S403中服务器对第一请求进行处理,得到第二处理结果,还包括:服务器对所述第二处理结果进行摘要处理,得到第二摘要。在S405中服务器发送的第一响应消息中还携带有所述第二摘要。
所述第二摘要包括共享数据摘要和个性化数据摘要,所述共享数据摘要为所述服务器对所述第一请求的处理结果中共享数据进行摘要计算后得到的摘要,所述个性化数据摘要为所述服务器对所述第一请求的处理结果中个性 化数据进行摘要计算后得到的摘要。
可选的,在得到第二处理结果及第二摘要之后,还包括:服务器将所述第二处理结果及所述第二摘要存储至所述存储器中。
上述图5的实施例的步骤与图2中实施例的步骤S105~S109对应相同,于此不再赘述。
对应地,图5实施例中对应的客户端侧和服务器侧的方法流程图如图6和图7所示。
图6是本申请实施例提供的客户端侧的一种页面访问方法流程图,如图6所示,包括:
S501、客户端发送第一请求给服务器。
所述第一请求中携带有第一摘要,所述第一摘要为所述服务器对所述客户端的上一次请求的处理结果(第一处理结果)的摘要。所述服务器可以根据所述第一摘要确定出所述服务器对所述客户端的上一次请求的处理结果(第一处理结果)。
S502、客户端接收所述服务器返回的第一响应消息。
所述第一响应消息中携带有第一差异信息。
所述第一差异信息为所述服务器对所述客户端的所述第一请求的处理结果(第二处理结果)与所述服务器对所述客户端的上一次请求的处理结果(第一处理结果)之间的差异。
可选地,所述第一响应消息中还携带有第二摘要,所述第二摘要为所述服务器对所述第一请求的处理结果(第二处理结果)的摘要。
所述第二摘要包括共享数据摘要和个性化数据摘要,所述共享数据摘要为所述服务器对所述第一请求的处理结果(第二处理结果)中共享数据进行摘要计算后得到的摘要,所述个性化数据摘要为所述服务器对所述第一请求的处理结果(第二处理结果)中个性化数据进行摘要计算后得到的摘要。
S503、客户端根据所述第一差异信息,更新显示页面。
可选的,在S502接收所述第一响应消息之后,还包括:客户端将所述第二摘要存储至移动终端的存储器中。
可选的,所述第一请求中还携带有第一业务参数;所述第二摘要为所述服务器根据所述第一业务参数对所述第一请求的处理结果的摘要。
与图6相对应地,图7是本实施例提供的服务器端的页面访问方法流程图,如图7所示,包括:
S601、服务器接收客户端发送的第一请求。
所述第一请求中携带有第一摘要,所述第一摘要为对所述第一请求之前的上一次请求的处理结果的摘要。
S602、服务器根据所述第一摘要确定第一处理结果,所述第一处理结果为所述服务器对所述客户端的上一次请求的处理结果。
S603、服务器对所述第一请求进行处理,得到第二处理结果。
S604、服务器将所述第二处理结果与所述第一处理结果进行比较,得到第一差异信息。
S605、服务器发送第一响应消息给所述客户端,所述第一响应消息包括第一差异信息。
值得一提的是,S602和S603的步骤可以不分先后顺序。
可选地,在S603之后,还包括:服务器对所述第二处理结果进行摘要处理,得到第二摘要。在S605中服务器发送的第一响应消息中还可以包括第二摘要,用以所述客户端在发送下一次请求时一并将该第二摘要发送给服务器,服务器根据第二摘要确定得到第二处理结果,再将得到的第二处理结果与对接收到的下一次请求进行处理得到的新的处理结果进行比较,得到新的差异信息和新的摘要,发送给客户端,客户端根据新的差异信息进行更新,以此类推。
可选的,在S603得到第二处理结果及第二摘要之后,还包括:服务器将所述第二处理结果及所述第二摘要存储至所述存储器中。
本申请实施例提供的页面访问方法,通过传输数据的摘要及差异部分的方式来传输数据,可以减少在移动互联网中传输的数据,使得传输所消耗的时间较短,尤其在网络质量不好的情况下加载动态页面数据时,缩短传输时延,加快页面内容的加载速度,使用户在更短的时间内能看到页面内容,提升用户体验。
以上是对本申请实施例所提供的页面访问方法进行的详细描述,下面对本申请提供的页面访问装置进行详细描述。
与图3对应地,图8是本申请实施例提供的一种客户端的装置示意图,如图8所示,所述客户端包括:第一发送单元701、第一接收单元702、第一处理单元703、第二发送单元704、第二接收单元705和第二处理单元706。
第一发送单元701用于发送第一请求给服务器。
第一接收单元702用于接收所述服务器返回的第一响应消息。
所述第一响应消息中携带有第一处理结果及第一摘要,所述第一处理结果为所述服务器对所述第一请求的处理结果,所述第一摘要为所述第一处理结果的摘要。
第一处理单元703用于根据所述第一接收单元702接收的所述第一处理结果生成第一显示页面。
第二发送单元704用于发送第二请求给所述服务器。
所述第二请求中携带有所述第一接收单元接收的第一摘要。
第二接收单元705用于接收所述服务器返回的第二响应消息。
所述第二响应消息中携带有第一差异信息,第一差异信息为所述服务器对所述第二处理结果与所述第一处理结果进行差异比较后得到的差异信息。
第二处理单元706用于根据第二接收单元705接收的所述第一差异信息, 更新所述第一显示页面。
可选地,第二接收单元705接收的所述第二响应消息中还携带有所述第二摘要,所述第二摘要为第二处理结果的摘要。
可选的,第一发送单元701发送的所述第一请求中还携带有第一业务参数;第一接收单元702接收的所述第一处理结果为所述服务器根据所述第一业务参数,对所述第一请求的处理结果。
可选的,所述客户端还包括:存储单元,用于在第一接收单元702接收到所述服务器返回的第一响应消息之后,将所述第一摘要存储至存储器中,以及,在第二接收单元702接收到所述服务器返回的第二响应消息之后,将所述第二摘要存储至存储器中。
其中,第一发送单元701和第二发送单元704可以是同一个模块,第一接收单元702和第二接收单元705可以是同一个模块,第一处理单元703和第二处理单元706可以是同一个模块。
上述各单元的功能可对应于图3详细描述的上述页面访问方法的处理步骤,于此不再赘述。
与图4对应地,图9是本申请实施例提供的一种服务器的装置示意图,如图9所示,所述服务器包括:第一接收单元801、第一处理单元802、第一发送单元803、第二接收单元804、第二处理单元805、第三处理单元806和第二发送单元807。
第一接收单元801用于接收客户端发送的第一请求。
第一处理单元802用于对第一接收单元801接收的所述第一请求进行处理,得到第一处理结果及第一摘要。
第一发送单元803用于发送第一响应消息给所述客户端。
所述第一响应消息中携带有所述第一处理单元得到的所述第一处理结果及第一摘要。
第二接收单元804用于接收所述客户端发送的第二请求,所述第二请求中携带有所述第一摘要。
第二处理单元805用于对第二接收单元804接收的所述第二请求进行处理,得到第二处理结果。
第三处理单元806用于通过第二接收单元804接收的所述第一摘要确定得到所述第一处理结果,将所述第一处理结果与第二处理单元805得到的所述第二处理结果进行差异比较,得到第一差异信息。
第二发送单元807用于发送第二响应消息给所述客户端。
所述第二响应消息中携带有第三处理单元806得到的所述第一差异信息。
可选地,第二处理单元805还用于对所述第二处理结果进行摘要处理后得到第二摘要。第二发送单元807发送的所述第二响应消息中还携带有第二处理单元805得到的第二摘要。
可选的,所述服务器还包括:存储单元,用于在第一处理单元802得到所述第一处理结果和第一摘要之后,将所述第一处理结果及所述第一摘要存储至存储器中,以及,在第二处理单元805得到所述第二处理结果和第二摘要之后,将所述第二处理结果及所述第二摘要存储至所述存储器中。
其中,第一接收单元801和第二接收单元804可以是同一个模块,第一发送单元803和第二发送单元807可以是同一个模块,第一处理单元802、第二处理单元805和第三处理单元806可以是同一个模块。
上述各单元的功能可对应于图4详细描述的上述页面访问方法的处理步骤,于此不再赘述。
与图6对应地,图10是本申请实施例提供的一种客户端的装置示意图,如图10所示,所述客户端包括:发送单元901、接收单元902和处理单元903。
发送单元901用于发送第一请求给服务器,所述第一请求中携带有所述客户端中已有的第一摘要。
所述第一摘要为所述服务器对所述客户端的上一次请求的处理结果(第一处理结果)的摘要,以使所述服务器根据所述第一摘要确定所述服务器对所述客户端的上一次请求的处理结果(第一处理结果)。
接收单元902用于接收所述服务器返回的第一响应消息。
所述第一响应消息中携带有第一差异信息,所述第一差异信息为所述服务器对所述客户端的所述第一请求的处理结果(第二处理结果)与所述服务器对所述客户端的上一次请求的处理结果(第一处理结果)之间的差异。
处理单元903用于根据接收单元902接收的所述第一差异信息,更新显示页面。
可选地,所述第一响应消息中还携带有第二摘要,所述第二摘要为所述服务器对所述第一请求进行处理得到的第二处理结果的摘要。
可选的,发送单元901发送的第一请求中还携带有第一业务参数,则接收单元902接收的第二摘要为所述服务器根据所述第一业务参数对所述第一请求的处理结果的摘要。
可选的,所述客户端还包括:存储单元,用于在所述接收单元接收到所述第一响应消息之后,将所述第二摘要存储至存储器中。
上述各单元的功能可对应于图6详细描述的上述页面访问方法的处理步骤,于此不再赘述。
与图7对应地,图11是本申请实施例提供的一种服务器的装置示意图,如图11所示,所述服务器包括:接收单元1001、处理单元1002和发送单元1003。
接收单元1001用于接收客户端发送的第一请求,所述第一请求中携带有第一摘要,所述第一摘要为对所述第一请求之前的上一次请求的处理结果的摘要。
处理单元1002用于根据所述第一摘要确定得到第一处理结果,所述第一 处理结果为所述服务器对所述客户端的上一次请求的处理结果。
处理单元1002还用于对所述第一请求进行处理,得到第二处理结果。
处理单元1002还用于将所述第二处理结果与所述第一处理结果进行比较,得到第一差异信息。
发送单元1003用于发送第一响应消息给所述客户端,所述第一响应消息包括所述处理单元得到的第一差异信息。
可选地,处理单元1002在对所述第一请求进行处理,得到第二处理结果之后,还用于对所述第二处理结果进行摘要处理得到的第二摘要。发送单元1003发送的第一响应消息中还包括所述第二摘要。
可选的,所述服务器还包括:存储单元,用于在处理单元1002得到所述第二处理结果及第二摘要之后,将所述第二处理结果及所述第二摘要存储至所述存储器中。
上述各单元的功能可对应于图7详细描述的上述页面访问方法的处理步骤,于此不再赘述。
本申请提供的页面访问方法、装置及系统,通过传输数据的摘要及差异部分的方式来传输数据,可以减少在移动互联网中传输的数据,使得传输所消耗的时间较短,尤其在网络质量不好的情况下加载动态页面数据时,缩短传输时延,加快页面内容的加载速度,使用户在更短的时间内能看到页面内容,提升用户体验。
专业人员应该还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为 超出本申请的范围。
结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
以上所述的具体实施方式,对本申请的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本申请的具体实施方式而已,并不用于限定本申请的保护范围,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (19)

  1. 一种页面访问方法,其特征在于,所述方法包括:
    发送第一请求给服务器,所述第一请求中携带有第一摘要,所述第一摘要为第一处理结果的摘要,所述第一处理结果为所述服务器对上一次请求的处理结果,以使所述服务器根据所述第一摘要确定所述第一处理结果;
    接收所述服务器返回的第一响应消息,所述第一响应消息中携带有第一差异信息,所述第一差异信息为第二处理结果与所述第一处理结果之间的差异,所述第二处理结果为所述服务器对所述第一请求的处理结果;
    根据所述第一差异信息,更新显示页面。
  2. 根据权利要求1所述的方法,其特征在于,在所述发送第一请求给服务器之前,还包括:
    发送所述上一次请求给所述服务器;
    接收所述服务器对所述上一次请求返回的响应消息,所述响应消息中携带有所述第一处理结果及所述第一摘要;
    根据所述第一处理结果生成所述显示页面。
  3. 根据权利要求1所述的方法,其特征在于,所述第一响应消息中还携带有第二摘要,所述第二摘要为所述第二处理结果的摘要。
  4. 根据权利要求3所述的方法,其特征在于,所述第二摘要包括共享数据摘要和个性化数据摘要,所述共享数据摘要为所述服务器对所述第一请求的处理结果中共享数据进行摘要计算后得到的摘要,所述个性化数据摘要为所述服务器对所述第一请求的处理结果中个性化数据进行摘要计算后得到的摘要。
  5. 根据权利要求3所述的方法,其特征在于,在接收所述服务器返回的第一响应消息之后,还包括:
    将所述第二处理结果及第二摘要存储至存储器中。
  6. 一种页面访问方法,其特征在于,所述方法包括:
    接收客户端发送的第一请求,所述第一请求中携带有第一摘要,所述第一摘要为对所述第一请求之前的上一次请求的处理结果的摘要;
    根据所述第一摘要确定得到第一处理结果,所述第一处理结果为服务器对所述客户端的上一次请求的处理结果;
    对所述第一请求进行处理,得到第二处理结果;
    将所述第二处理结果与所述第一处理结果进行比较,得到第一差异信息;
    发送第一响应消息给所述客户端,所述第一响应消息包括第一差异信息。
  7. 根据权利要求6所述的方法,其特征在于,在所述接收客户端发送的第一请求之前,还包括:
    接收所述客户端发送的上一次请求;
    对所述上一次请求进行处理,得到所述第一处理结果;
    对所述第一处理结果进行摘要处理,得到所述第一摘要;
    返回所述上一次请求的响应消息给所述客户端,所述响应消息中携带有所述第一处理结果及所述第一摘要。
  8. 根据权利要求6所述的方法,其特征在于,在对所述第一请求进行处理,得到第二处理结果之后,还包括:
    对所述第二处理结果进行摘要处理,得到第二摘要;
    所述第一响应消息中还包括所述第二摘要,所述第二摘要为所述第二处理结果的摘要。
  9. 根据权利要求8所述的方法,其特征在于,在所述得到第二摘要之后,还包括:
    将所述第二处理结果及所述第二摘要存储至所述存储器中。
  10. 根据权利要求8所述的方法,其特征在于,所述第二摘要包括共享数据摘要和个性化数据摘要,所述共享数据摘要为所述服务器对所述第一请求的处理结果中共享数据进行摘要计算后得到的摘要,所述个性化数据摘要为所述服务器对所述第一请求的处理结果中个性化数据进行摘要计算后得到的摘要。
  11. 一种客户端,用于移动终端上,其特征在于,所述客户端包括:
    发送单元,用于发送第一请求给服务器,所述第一请求中携带有第一摘要,所述第一摘要为第一处理结果的摘要,所述第一处理结果为所述服务器对所述客户端的上一次请求的处理结果,以使所述服务器根据所述第一摘要 确定所述第一处理结果;
    接收单元,用于接收所述服务器返回的第一响应消息,所述第一响应消息中携带有第一差异信息,所述第一差异信息为第二处理结果与所述第一处理结果之间的差异,所述第二处理结果为所述服务器对所述第一请求的处理结果;
    处理单元,用于根据所述接收单元接收的所述第一差异信息,更新显示页面。
  12. 根据权利要求11所述的客户端,其特征在于,所述发送单元在发送第一请求给服务器之前,还用于发送所述上一次请求给所述服务器;
    所述接收单元接收所述服务器对所述上一次请求返回的响应消息,所述响应消息中携带有所述第一处理结果及所述第一摘要;
    所述处理单元根据所述接收单元接收的所述第一处理结果,生成所述显示页面。
  13. 根据权利要求11所述的客户端,其特征在于,所述接收单元接收的所述第一响应消息中还携带有第二摘要,所述第二摘要为所述第二处理结果的摘要。
  14. 根据权利要求13所述的客户端,其特征在于,所述客户端还包括:
    存储单元,用于在所述接收单元接收到所述第一响应消息的第二摘要之后,将所述第二摘要存储至存储器中。
  15. 一种服务器,其特征在于,所述服务器包括:
    接收单元,用于接收客户端发送的第一请求,所述第一请求中携带有第一摘要,所述第一摘要为对所述第一请求之前的上一次请求的处理结果的摘要;
    处理单元,用于根据所述第一摘要确定得到第一处理结果,所述第一处理结果为所述服务器对所述客户端的上一次请求的处理结果;
    所述处理单元还用于对所述第一请求进行处理,得到第二处理结果;
    所述处理单元还用于将所述第二处理结果与所述第一处理结果进行比较,得到第一差异信息;
    发送单元,用于发送第一响应消息给所述客户端,所述第一响应消息包 括所述处理单元得到的第一差异信息。
  16. 根据权利要求15所述的服务器,其特征在于,所述接收单元在接收客户端发送的第一请求之前,还用于接收所述客户端发送的上一次请求;
    所述处理单元对所述上一次请求进行处理,得到所述第一处理结果,并对所述第一处理结果进行摘要处理,得到所述第一摘要;
    所述发送单元返回所述上一次请求的响应消息给所述客户端,所述响应消息中携带有所述第一处理结果及所述第一摘要。
  17. 根据权利要求15所述的服务器,其特征在于,所述处理单元在得到第二处理结果之后,还用于对所述第二处理结果进行摘要处理,得到第二摘要。
  18. 根据权利要求17所述的服务器,其特征在于,所述服务器还包括:
    存储单元,用于在所述处理单元得到所述第二处理结果及第二摘要之后,将所述第二处理结果及所述第二摘要存储至所述存储器中。
  19. 一种页面访问系统,其特征在于,所述系统包括:客户端和服务器;
    所述客户端发送第一请求给服务器,所述第一请求中携带有第一摘要,所述第一摘要为第一处理结果的摘要,所述第一处理结果为所述服务器对所述客户端的上一次请求的处理结果;
    所述服务器根据所述第一摘要确定得到所述第一处理结果;
    所述服务器对所述第一请求进行处理,得到第二处理结果;
    所述服务器将所述第二处理结果与所述第一处理结果进行比较,得到第一差异信息;
    所述服务器发送第一响应消息给所述客户端,所述第一响应消息包括第一差异信息;
    所述客户端根据所述第一差异信息,更新显示页面。
PCT/CN2015/099542 2015-01-09 2015-12-29 页面访问方法、装置及系统 Ceased WO2016110206A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510012597.6A CN105827580B (zh) 2015-01-09 2015-01-09 页面访问方法、装置及系统
CN201510012597.6 2015-01-09

Publications (1)

Publication Number Publication Date
WO2016110206A1 true WO2016110206A1 (zh) 2016-07-14

Family

ID=56355512

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/099542 Ceased WO2016110206A1 (zh) 2015-01-09 2015-12-29 页面访问方法、装置及系统

Country Status (2)

Country Link
CN (1) CN105827580B (zh)
WO (1) WO2016110206A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112333787B (zh) * 2020-11-13 2023-09-12 Oppo广东移动通信有限公司 数据传输方法、装置、存储介质、终端及网络接入点设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100169364A1 (en) * 2008-06-30 2010-07-01 Blame Canada Holdings Inc. Metadata Enhanced Browser
CN103188097A (zh) * 2011-12-30 2013-07-03 金蝶软件(中国)有限公司 一种实现补丁管理的方法、装置及系统
CN103200219A (zh) * 2013-02-05 2013-07-10 北京小米科技有限责任公司 数据包更新方法、装置、终端设备和服务器
CN103593466A (zh) * 2013-11-26 2014-02-19 优视科技有限公司 网页加载方法及客户端和服务器

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102169501A (zh) * 2011-04-26 2011-08-31 北京百度网讯科技有限公司 基于搜索结果对应文档的类型信息生成摘要的方法与设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100169364A1 (en) * 2008-06-30 2010-07-01 Blame Canada Holdings Inc. Metadata Enhanced Browser
CN103188097A (zh) * 2011-12-30 2013-07-03 金蝶软件(中国)有限公司 一种实现补丁管理的方法、装置及系统
CN103200219A (zh) * 2013-02-05 2013-07-10 北京小米科技有限责任公司 数据包更新方法、装置、终端设备和服务器
CN103593466A (zh) * 2013-11-26 2014-02-19 优视科技有限公司 网页加载方法及客户端和服务器

Also Published As

Publication number Publication date
CN105827580A (zh) 2016-08-03
CN105827580B (zh) 2020-04-10

Similar Documents

Publication Publication Date Title
CA2732540C (en) Methods for optimizing a web content proxy server and devices thereof
CN108319468B (zh) 灰度发布方法、装置、系统及电子设备
US9451046B2 (en) Managing CDN registration by a storage provider
JP7611318B2 (ja) 強化されたオンラインプライバシ
CN104065632B (zh) 分享内容的处理方法、服务器、客户端及系统
US8966118B2 (en) Unauthenticated redirection requests with protection
US9473592B2 (en) Methods for optimizing a web content proxy server and devices thereof
CN103778236B (zh) 网页数据分发处理方法和装置及网页生成处理方法和装置
US20150100429A1 (en) Methods and apparatus for generating a message for a wireless device
CN107329963B (zh) 加速网页访问的方法和装置
CN112001747B (zh) 用于将用户与社交数据匹配的系统和方法
CN106357539A (zh) 一种数据获取方法和设备
CN108023867A (zh) 移动端网页广告过滤的方法、网关服务器及过滤服务器
EP2787454A1 (en) Methods for optimizing a web content proxy server and devices thereof
CN103379163A (zh) 一种业务对象的确定方法以及确定装置
JP5220090B2 (ja) 広告配信装置、広告配信方法及びプログラム
WO2016110206A1 (zh) 页面访问方法、装置及系统
CN105847400A (zh) 基于代理服务器的业务变更方法和系统
CN113760965A (zh) 数据查询的方法和装置
CN105915584A (zh) 基于代理服务器的业务请求方法和系统
WO2021005808A1 (ja) 情報処理装置、情報処理方法及びプログラム
CN106790176B (zh) 一种访问网络的方法及系统
US10693999B2 (en) Method and server for displaying access content
CN109600452B (zh) 服务器集群、消息推送方法及相关服务器
US9571605B1 (en) System, method, and computer program for identifying a social network user identifier based on a user message

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15876706

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15876706

Country of ref document: EP

Kind code of ref document: A1