WO2017079893A1 - 数据推送方法、系统及装置 - Google Patents

数据推送方法、系统及装置 Download PDF

Info

Publication number
WO2017079893A1
WO2017079893A1 PCT/CN2015/094179 CN2015094179W WO2017079893A1 WO 2017079893 A1 WO2017079893 A1 WO 2017079893A1 CN 2015094179 W CN2015094179 W CN 2015094179W WO 2017079893 A1 WO2017079893 A1 WO 2017079893A1
Authority
WO
WIPO (PCT)
Prior art keywords
client
data
server
response
response data
Prior art date
Application number
PCT/CN2015/094179
Other languages
English (en)
French (fr)
Inventor
郑智宏
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2015/094179 priority Critical patent/WO2017079893A1/zh
Publication of WO2017079893A1 publication Critical patent/WO2017079893A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/18Information format or content conversion, e.g. adaptation by the network of the transmitted or received information for the purpose of wireless delivery to users or terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the present invention relates to the field of Internet technologies, and in particular, to a data push method, system, and device.
  • HTTP HyperText Transfer Protocol
  • the client browser exchanges information with the server through a HyperText Transfer Protocol (HTTP).
  • HTTP1.x protocol is used for data transmission.
  • 1 is a schematic diagram of the HTTP1.x protocol in the prior art.
  • the main working principle is as follows: after the client establishes a Transmission Control Protocol (TCP) with the server, the client sends a request for obtaining the server to the server. According to the client browser's acquisition request, the client browser responds with a 200 response and related data, and the client browser analyzes the relevant data, obtains the analysis result, and obtains other data from the server by obtaining the request according to the analysis result.
  • TCP Transmission Control Protocol
  • the client browser analyzes the relevant data, obtains the analysis result, and obtains other data from the server by obtaining the request according to the analysis result.
  • the client browser detects that the acquired data can completely present the webpage content that the user wants to see, the webpage content is presented in the client browser.
  • the HTTP1.x protocol uses the data transmission mode of the request and response, that is, one-to-one transmission mode, the transmission delay is large, and the data transmission efficiency is low.
  • a method for data transmission based on the HTTP2.0 protocol is proposed in the prior art.
  • the HTTP2.0 protocol increases the server push function, and the server actively pushes the associated data in the server to the client browser according to the request sent by the client browser, thereby avoiding the associated data that the client browser subsequently requests the server to know. Reduce the interaction process between the client browser and the server request data, and improve the data transmission efficiency.
  • the push technology in the HTTP2.0 protocol can improve the data transmission efficiency
  • the associated data actively pushed by the server may be redundant or not desired by the client browser, for example, the user accesses the Internet through the mobile phone. Because of limited traffic, you don't want to see pictures and other content on the webpage. However, the server may push data that the user does not want to see, such as images, to the client browser. This will result in wasted traffic and reduced data transmission efficiency.
  • the embodiment of the invention provides a data pushing method, system and device, which avoid waste of traffic and improve data transmission efficiency.
  • a first aspect of the present invention provides a data push method, including:
  • the client sends an acquisition request to the server, where the acquisition request carries a filtering domain, where the filtering domain is used to indicate a file type that the client is allowed to receive;
  • the client receives the first response data corresponding to the acquisition request sent by the server and the second response data corresponding to the target association data, where the target association data is used to indicate that the server is configured according to the filtering domain Defining a file type obtained by filtering the initial associated data corresponding to the request;
  • the client displays an internet page according to the first response data and the second response data.
  • the client before receiving, by the server, the first response data corresponding to the acquiring request and the second response data corresponding to the associated data ,Also includes:
  • the client receives a push frame sent by the server, where the push frame includes the target associated data;
  • the client sends a response message to the server according to the push frame, where the response message is used to indicate that the client is capable of receiving the second response data sent by the server.
  • the client sends a response message to the server according to the push frame, including:
  • the client sends the response message to the server.
  • the method further includes:
  • the filtering domain is determined according to a local configuration of the client or a network mode.
  • a second aspect of the present invention provides a data push method, including:
  • the server receives the acquisition request sent by the client, where the acquisition request carries a filtering domain.
  • the filter field is used to indicate a file type that the client is allowed to receive;
  • the server obtains first response data and initial associated data according to the obtaining request
  • the server performs filtering processing on the initial associated data according to the filtering domain to obtain target associated data.
  • the server obtains second response data according to the target association data
  • the server sends the first response data and the second response data to the client.
  • the method before the server sends the first response data and the second response data to the client, the method further includes:
  • the server receives the response message sent by the client, where the response message is used to indicate that the client is capable of receiving the second response data sent by the server.
  • the sending, by the server, the first response data and the second response data to the client includes:
  • the server sends the second response data to the client.
  • a third aspect of the present invention provides a data pushing apparatus, including:
  • a receiving module configured to receive an obtaining request sent by the client, where the obtaining request carries a filtering domain, where the filtering domain is used to indicate a file type received by the client;
  • An obtaining module configured to acquire first response data and initial associated data according to the acquisition request received by the receiving module
  • the obtaining module is further configured to perform filtering processing on the initial associated data according to the filtering domain to obtain target associated data.
  • the obtaining module is further configured to obtain second response data according to the target association data
  • the sending module is configured to send the first response data and the second response data to the client.
  • the receiving module is further configured to receive a push frame sent by the server, where the push The frame includes the target associated data;
  • the sending module is further configured to send a response message to the server according to the push frame received by the receiving module, where the response message is used to indicate that the client is capable of receiving the second sent by the server Answer the data. .
  • the sending module is further configured to:
  • the apparatus further includes:
  • a determining module configured to determine the filtering domain according to a local configuration of the client or a network mode.
  • a fourth aspect of the present invention provides a data pushing apparatus, including:
  • a receiving module configured to receive an obtaining request sent by the client, where the obtaining request carries a filtering domain, where the filtering domain is used to indicate a file type received by the client;
  • An obtaining module configured to acquire first response data and initial associated data according to the acquisition request received by the receiving module
  • the obtaining module is further configured to perform filtering processing on the initial associated data according to the filtering domain to obtain target associated data.
  • the obtaining module is further configured to obtain second response data according to the target association data
  • a sending module configured to send the first response data and the second response data to the client.
  • the sending module is further configured to send a push frame to the client, where the push frame includes the target associated data;
  • the receiving module is further configured to receive a response message sent by the client, where the response message is used to indicate that the client is capable of receiving the second response data sent by the server.
  • the sending module is specifically configured to:
  • a fifth aspect of the present invention provides a client, including:
  • the sender is configured to send an acquisition request to the server, where the acquisition request carries a filtering domain, where the filtering domain is used to indicate a file type that the client is allowed to receive;
  • a receiver configured to receive first response data corresponding to the acquisition request and second response data corresponding to the target association data, where the target association data is used to indicate that the server is configured according to the a file type obtained by filtering the initial associated data corresponding to the obtaining request by the filtering domain;
  • a processor configured to display an internet page according to the first response data and the second response data received by the receiver.
  • the receiver is further configured to receive a push frame sent by the server, where the push frame includes the target associated data;
  • the transmitter is further configured to send a response message to the server according to the push frame received by the receiver, where the response message is used to indicate that the client is capable of receiving the second sent by the server Answer the data.
  • the transmitter is further configured to:
  • the processor is further used according to a client
  • the local configuration of the end or the network mode determines the filtering domain.
  • a sixth aspect of the present invention provides a server, including:
  • a receiver configured to receive an acquisition request sent by the client, where the acquisition request carries a filtering domain, where the filtering domain is used to indicate a file type of the data received by the client;
  • a processor configured to obtain first response data and initial associated data according to the acquisition request received by the receiver
  • the processor is further configured to perform filtering processing on the initial associated data according to the filtering domain to obtain target associated data.
  • the processor is further configured to obtain second response data according to the target association data
  • a transmitter configured to send the first response data and the second response data to the client.
  • the transmitter is further configured to send a push frame to the client, where the push frame includes the target associated data;
  • the receiver is further configured to receive a response message sent by the client, where the response message is used to indicate that the client is capable of receiving the second response data sent by the server.
  • the transmitter is specifically configured to:
  • a seventh aspect of the present invention provides a data push system, including: a client and a server.
  • the data push method, system and device provided by the embodiment of the present invention, the method sends an acquisition request to the server by the client, where the acquisition request carries a filtering domain, the filtering domain is used to indicate the file type that the client allows to receive, and the client receives The first response data corresponding to the acquisition request sent by the server and the second response data corresponding to the target association data, where the target association data is used to instruct the server to filter the initial associated data corresponding to the acquisition request according to the filtering domain Type; the client displays an internet page based on the first response data and the second response data.
  • the invention sends a filtering domain for indicating the type of the file that the client is allowed to receive to the server through the client, so that the server determines the pushed data according to the filtering domain, so that the pushing behavior of the server is based on the evidence, and the client is prevented from receiving the unexpected. Data, avoiding waste of traffic and improving data transmission efficiency.
  • FIG. 1 is a schematic diagram of an HTTP1.x protocol in the prior art
  • FIG. 2 is a schematic structural diagram of a webpage system in the prior art
  • FIG. 3 is a schematic diagram of a HTTP2.0 protocol in the prior art
  • Embodiment 4 is a flowchart of Embodiment 1 of a data pushing method according to an embodiment of the present invention
  • FIG. 5 is a flowchart of Embodiment 2 of a data pushing method according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of a data pushing apparatus according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a data pushing apparatus according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a client according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of a server according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a data pushing system according to an embodiment of the present invention.
  • FIG. 2 is a schematic structural diagram of a webpage system in the prior art.
  • a client 20 such as a mobile user and a fixed user accesses the server 22 through the firewall 21 of the website, and browses the content of the webpage.
  • the specific working principle is First, the client 20 obtains a Hyper Text Markup Language (HTML) by using an HTTP request, and the server 22 searches for the data resource in the resource server 23 and the database 24 of the server according to the HTTP request made by the client 20, and this The server obtains data resources such as js, css, jpeg, and png associated with the HTML.
  • HTML Hyper Text Markup Language
  • the client 20 includes a mobile terminal browser, such as a QQ browser on a mobile phone terminal, a UC browser, etc., or a fixed browser such as a personal computer (PC) browser, and the client is mainly used to connect to the server. Parse the rendered web page. It should be noted that browsers may not be used in certain services of the webpage, such as downloading through the HTTP protocol, and should be summarized in the current browser scenario.
  • the server 22 is mainly used to provide web services to the outside. It should be noted that in the actual network, there may be multiple computer caches and proxy server devices supporting the webpage between the client 20 and the server 22. If the devices support the HTTP2.0 protocol, It can also be summarized into the current server scenario.
  • the firewall 21 is a security protection device of the server front end, and the resource server 23 of the server is used to provide data resources required in the web service.
  • the resource server 23 of the server may belong to the same device as the server.
  • the server's database 24 is used to provide web services with the required database information, such as user information or configuration information.
  • FIG 3 is a schematic diagram of the HTTP2.0 protocol in the prior art.
  • the HTTP2.0 protocol specifies a push (PUSH) mechanism.
  • the push mechanism causes the server to actively push data to the client based on its own resources.
  • the main operation process of the HTTP2.0 protocol is as follows: First, the client sends a header HEADERS frame carrying an acquisition request.
  • the HEADERS frame is a data structure that carries the HTTP message header data defined in HTTP2.0.
  • the HTTP message header data refers to the acquisition request.
  • the server receives the acquisition request, and obtains the association according to the content of the acquisition request. Data, after the server determines the associated data to be pushed, sends the push commitment PUSH-PROMISE corresponding to the associated data to the client, starts the data push process, and the client receives the push commitment corresponding to the associated data, and starts receiving the push data. Finally, the server sends the response data corresponding to the acquisition request and the response data corresponding to the associated data to the client through the HEADERS frame.
  • FIG. 4 is a flowchart of Embodiment 1 of a data pushing method according to an embodiment of the present invention. As shown in FIG. 4, the data pushing method provided by Embodiment 1 of the present invention specifically includes the following steps:
  • Step S401 The client sends an acquisition request to the server.
  • the obtaining request carries a filtering domain, and the filtering domain is used to indicate a file type that the client is allowed to receive.
  • the filtering domain may be set in the obtaining request in the form of a header field.
  • This filter field indicates that the client receives the push.
  • the js file does not accept push png, jpeg files, but also wants the server to push the abc.css file.
  • the above is only an example.
  • the header field indicates a manner of filtering the domain, and the filtering domain may also be in other manners. The present invention does not specifically limit the form of the filtering domain.
  • the filtering domain may not be carried in the obtaining request, and the client may send the filtering domain and the obtaining request to the server at the same time.
  • the client sends a get request to the server through the HEADERS frame. If the acquisition request is too large and the HEADERS frame cannot be fully loaded, the remaining messages of the HEADERS frame need to be loaded by continuing the CONTINUATION frame, wherein the number of CONTINUATION frames is greater than or equal to zero.
  • the filtering field indicates the type of the file that the client is allowed to receive, that is, the willingness of the client to receive the data pushed by the server, and not only the initial associated data may be filtered and used, but also may be used as an increase request push. For example, when the client refreshes an HTML page, first, the HTML setting does not accept any push. After the server returns the new HTML, after the client parses the HTML file, the data that needs to be updated according to the local cache situation. It is added to the filtering domain and sent to the server through a request. After receiving the request, the server pushes all the resources required by the client.
  • Step S402 The server obtains first response data and initial association data according to the acquisition request.
  • the server searches the resource server of the server and the database for the first response data that can display the webpage content corresponding to the acquisition request and the initial association data associated with the acquisition request. For example, if the request is the page html.index, the server searches for the data related to the request html.index in the resource server of the server and the database, and the obtained initial associated data may be data resources such as js, css, jpeg, and png.
  • Step S403 The server performs filtering processing on the initial associated data according to the filtering domain to obtain target associated data.
  • the target association data is used to indicate a file type obtained by the server after filtering the initial associated data corresponding to the acquisition request according to the filtering domain.
  • the initial associated data obtained according to the acquisition request is a data resource such as a.js, b.css, c.jpeg, and d.png.
  • the server can obtain the content that the client is not allowed to receive the image according to the filtering domain, and jpeg and png are both image formats, therefore, the server does not serve the client.
  • the server After the server filters the initial associated data a.js, b.css, c.jpeg, and d.png according to the filter domain, the server obtains the a.js, b.css file type, that is, the target associated data is a. Js and b.css.
  • the server can obtain the client not allowed to receive js and jpeg file types according to the filtering domain. Therefore, the server does not send a.js and c.jpeg to the client.
  • the server After filtering the initial associated data a.js, c.jpeg, and d.png according to the filter domain, the server obtains b.css and d.png, that is, the target associated data is b.css and d.png. .
  • Step S404 The server obtains second response data according to the target association data.
  • the server searches for the second response data corresponding to the target associated data in the resource server of the server and the database, wherein the client can display the content of the webpage corresponding to the target associated data part according to the second response data, for example, displaying The corresponding picture and other content.
  • Step S405 The server sends the first response data and the second response data to the client.
  • Step S406 The client displays the Internet page according to the first response data and the second response data.
  • the first response data and the second response data are carried in the HEADERS frame.
  • the client realizes displaying the Internet page for the user by acquiring and analyzing the first response data capable of displaying the webpage content corresponding to the acquisition request and the second response data capable of displaying the webpage content corresponding to the target association data.
  • the data pushing method is provided by the embodiment of the present invention.
  • the method sends a request to the server by the client, where the obtaining request carries a filtering domain, and the filtering domain is used to indicate a file type that the client allows to receive; the server obtains the first according to the obtaining request. a response data and initial associated data; and filtering the initial associated data according to the filtering domain to obtain target associated data; and obtaining second response data according to the target associated data, and the server sends the first response data to the client The second response data; the client displays the internet page according to the first response data and the second response data.
  • the invention sends a filtering domain for indicating the type of the file that the client is allowed to receive to the server through the client, so that the server determines the second response data pushed according to the filtering domain, so that the pushing behavior of the server is evidence-based, and the client is prevented from receiving the packet.
  • Unexpected data avoids waste of traffic and improves data transfer efficiency.
  • FIG. 5 is a flowchart of Embodiment 2 of a data pushing method according to an embodiment of the present invention. As shown in FIG. 5, the data pushing method provided by Embodiment 2 of the present invention is based on the technical solution provided in Embodiment 1, step S404. After that, the specific steps include the following steps:
  • Step S407 The server sends a push frame to the client.
  • the push frame includes target association data.
  • the push frame is a data format similar to the HEADERS frame for encapsulating files, and is a data frame unique to the HTTP2.0 protocol.
  • the push frame in this embodiment is used to encapsulate target associated data.
  • Step S408 The client sends a response message to the server according to the push frame.
  • the response message is used to indicate that the client can receive the second response data sent by the server.
  • the client sends a response message to the server, and indicates to the server that the client agrees to receive the second response data sent by the server. Then, the server receives the response message and proceeds to step S405.
  • the client does not agree to receive the second response data sent by the server. Then, the server sends the first response data to the client, and the client displays the content of the webpage according to the first response data.
  • the filtering domain is determined according to the local configuration of the client or the network mode.
  • the filter domain can be set to not receive pictures or animations, and is used to indicate to the server that the client does not The file type of the image or animation is received; when the local configuration of the client is no picture mode, the filtering domain is set according to the no picture mode, indicating that the client does not receive the file type of the picture; when the client is in the WIFI network environment, only wants to watch You don't want to see text in the image.
  • the filter field can be set to receive only images.
  • the client sends an acquisition request page index.html to the server, and the server searches for the first response data of the webpage content corresponding to the acquisition request and the initial association associated with the acquisition request in the resource server and the database of the server according to the acquisition request.
  • the data a.jpeg, b.css, and c.js
  • the filter field in the file indicates the file type that the client does not accept the image, and jpeg belongs to a format of the image.
  • the server obtains the target associated data b.css and c.js; then, the server sends the b.css to the client.
  • the client determines, according to the push frame, whether the file type indicated by the target associated data belongs to a file type that the client allows to send a response message to the server, and if not, the client sends the response message to the server. Instructing the client to agree to receive the response message of the second response data sent by the server, after receiving the response message, the server sends the first response data and the second response data to the client, and the client displays according to the first response data and the second response data.
  • Internet page Instructing the client to agree to receive the response message of the second response data sent by the server, after receiving the response message, the server sends the first response data and the second response data to the client, and the client displays according to the first response data and the second response data.
  • FIG. 6 is a schematic structural diagram of a data pushing apparatus according to an embodiment of the present invention.
  • the data pushing apparatus provided by the embodiment of the present invention includes: a sending module 601, a receiving module 602, and a display module 603.
  • the sending module 601 is configured to send an obtaining request to the server, where the obtaining request carries a filtering domain, the filtering domain is used to indicate a file type that the client is allowed to receive, and the receiving module 602 is configured to receive the sending by the server. a first response data corresponding to the acquisition request and a second response data corresponding to the target association data, where the target association data is used to indicate a file type obtained by the server after filtering the initial associated data corresponding to the acquisition request according to the filtering domain;
  • the display module 603 is configured to display an internet page according to the first response data and the second response data received by the receiving module 602.
  • the data pushing device in this embodiment can perform the technical solution of the method embodiment of FIG. 4, and the implementation principle and the implementation effect are similar, and details are not described herein again.
  • the receiving module 602 is further configured to receive a push frame sent by the server, where the push frame includes target association data, and the sending module 601, The method is further configured to send a response message to the server according to the push frame received by the receiving module 602, where the response message is used to indicate that the client can receive the second response data sent by the server.
  • the sending module 601 is further configured to: if the file type indicated by the target association data does not belong to a file type that the client allows to receive, send a response message to the server.
  • the data pushing apparatus further includes: a determining module (not shown) for determining a filtering domain according to a local configuration of the client or a network mode.
  • the data pushing device in this embodiment can perform the technical solution of the method embodiment in FIG. 5, and the implementation principle and the implementation effect are similar, and details are not described herein again.
  • FIG. 7 is a schematic structural diagram of a data pushing apparatus according to an embodiment of the present invention.
  • the data pushing apparatus provided in this embodiment includes: a receiving module 701, an obtaining module 702, and a sending module 703.
  • the receiving module 701 is configured to receive an acquisition request sent by the client, where The obtaining request carries a filtering domain, and the filtering domain is used to indicate the type of the file received by the client.
  • the obtaining module 702 is configured to obtain the first response data and the initial associated data according to the obtaining request received by the receiving module 701.
  • the filtering process is performed on the initial association data according to the filtering domain to obtain the target association data.
  • the obtaining module 702 is further configured to obtain the second response data according to the target association data, and the sending module 703 is configured to send the first response data to the client. Second response data.
  • the data pushing device in this embodiment can perform the technical solution of the method embodiment of FIG. 4, and the implementation principle and the implementation effect are similar, and details are not described herein again.
  • the sending module 703 is further configured to send a push frame to the client, where the push frame includes target associated data, and the receiving module 701, The method is further configured to receive a response message sent by the client, where the response message is used to indicate that the client is capable of receiving the second response data sent by the server.
  • the sending module 703 is specifically configured to: send the first response data to the client; and if the receiving module 701 receives the second response data, send the second response data to the client.
  • the data pushing device in this embodiment can perform the technical solution of the method embodiment in FIG. 5, and the implementation principle and the implementation effect are similar, and details are not described herein again.
  • FIG. 8 is a schematic structural diagram of a client according to an embodiment of the present invention.
  • a server provided by an embodiment of the present invention includes: a transmitter 801, a receiver 802, and a processor 803.
  • the sender 801 is configured to send an acquisition request to the server, where the acquisition request carries a filtering domain, the filtering domain is used to indicate a file type that the client is allowed to receive, and the receiver 802 is configured to receive the sending by the server. a first response data corresponding to the acquisition request and a second response data corresponding to the target association data, wherein the target association data is a file type obtained by instructing the server to filter the initial associated data corresponding to the acquisition request according to the filtering domain
  • the processor 803 is configured to display an internet page according to the first response data and the second response data received by the receiver 802.
  • the client in this embodiment can perform the technical solution of the method embodiment of FIG. 4, and the implementation principle is similar to the implementation effect, and details are not described herein again.
  • the receiver 802 is further configured to receive a push frame sent by the server, where the push frame includes target association data, and the transmitter 801.
  • the method is further configured to send a response message to the server according to the push frame received by the receiver 802, where the response message is used to indicate that the client can receive the second response data sent by the server.
  • the sender 801 is further configured to: if the file type indicated by the target association data does not belong to a file type that the client allows to receive, send a response message to the server.
  • the processor 803 is further configured to determine a filtering domain according to a local configuration of the client or a network mode.
  • the client in this embodiment can perform the technical solution of the method embodiment of FIG. 5, and the implementation principle is similar to the implementation effect, and details are not described herein again.
  • FIG. 9 is a schematic structural diagram of a server according to an embodiment of the present invention. As shown in FIG. 9, the client provided by the embodiment of the present invention includes: a receiver 901, a processor 902, and a transmitter 903.
  • the receiver 901 is configured to receive an acquisition request sent by the client, where the acquisition request carries a filtering domain, the filtering domain is used to indicate a file type of the client to receive data, and the processor 902 is configured to receive
  • the processor 902 is further configured to perform filtering processing on the initial association data according to the filter domain to obtain target association data, and the processor 902 is further configured to associate with the target according to the acquisition request received by the device 901.
  • the client in this embodiment can perform the technical solution of the method embodiment of FIG. 5, and the implementation principles are similar, and details are not described herein again.
  • the transmitter 903 is further configured to send a push frame to the client, where the push frame includes target associated data, and the receiver 901, The method is further configured to receive a response message sent by the client, where the response message is used to indicate that the client is capable of receiving the second response data sent by the server.
  • the transmitter 903 is specifically configured to: send the first response data to the client; if the receiver 901 receives the second response data, send the second response data to the client.
  • FIG. 10 is a schematic structural diagram of a data pushing system according to an embodiment of the present invention.
  • the data pushing apparatus provided by the embodiment of the present invention includes: a client 100 and a server 200.
  • the client 100 is the data push device shown in FIG. 6, and the server 200 is the data push device shown in FIG.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the steps including the foregoing method embodiments are performed; and the foregoing storage medium includes: various storage programs such as a ROM, a RAM, a magnetic disk, or an optical disk.
  • various storage programs such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

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

Abstract

本发明提供一种数据推送方法、系统及装置,其中,该方法通过客户端向服务器发送获取请求,其中,获取请求携带有过滤域,过滤域用于指示客户端允许接收的文件类型;客户端接收服务器发送的获取请求对应的第一应答数据和与目标关联数据对应的第二应答数据,其中,目标关联数据用于指示服务器根据过滤域对获取请求对应的初始关联数据进行过滤处理后得到的文件类型;客户端根据第一应答数据和第二应答数据,显示互联网页面。本发明通过客户端向服务器发送用于指示客户端允许接收的文件类型的过滤域,使得服务器根据过滤域决定推送的数据,使得服务器的推送行为有据可依,避免客户端接收到非预期的数据,避免了流量的浪费,同时提高数据传输效率。

Description

数据推送方法、系统及装置 技术领域
本发明涉及互联网技术领域,尤其涉及一种数据推送方法、系统及装置。
背景技术
现有技术中,使用浏览器上网浏览网页时,客户端浏览器通过超文本传输协议(HyperText Transfer Protocol,简称HTTP)与服务器进行信息交互,具体的,采用HTTP1.x协议进行数据传输。图1为现有技术中HTTP1.x协议原理图,其主要的工作原理为:客户端浏览器在与服务器建立传输控制协议(Transmission Control Protocol,简称TCP)后,向该服务器发送获取请求,服务器根据客户端浏览器的获取请求,向客户端浏览器回应一个200应答及相关数据,客户端浏览器分析相关数据,获取分析结果,并根据该分析结果,通过获取请求再从服务器获取其他数据,当客户端浏览器检测到获取到的数据能够完整呈现用户希望看到的网页内容时,将该网页内容呈现在客户端浏览器。
采用HTTP1.x协议这种请求与应答的数据传输方式,即一来一回的传输方式,传输时延较大,数据传输效率低。作为克服上述缺点的一种技术手段,现有技术中提出了一种基于HTTP2.0协议进行数据传输的方式。HTTP2.0协议通过增加服务器推送功能,由服务器根据客户端浏览器发送的请求,将服务器中的关联数据主动推送到客户端浏览器,避免了客户端浏览器后续请求服务器已知的关联数据,减少客户端浏览器到服务器请求数据的一个交互过程,提升了数据传输效率。
然而,HTTP2.0协议中的推送技术虽然可以提升数据的传输效率,但是,由服务器主动推送的的关联数据可能是冗余的或者客户端浏览器不希望看到的,例如:用户通过手机上网,由于流量有限,并不希望看到网页上的图片等内容,但是,服务器可能将图像等用户不希望看到的数据推送到客户端浏览器,这样会导致流量浪费,并且降低数据传输效率。
发明内容
本发明实施例提供一种数据推送方法、系统及装置,避免流量的浪费,提高数据传输效率。
本发明第一方面提供一种数据推送方法,包括:
客户端向服务器发送获取请求,其中,所述获取请求携带有过滤域,所述过滤域用于指示所述客户端允许接收的文件类型;
所述客户端接收所述服务器发送的获取请求对应的第一应答数据和与目标关联数据对应的第二应答数据,其中,所述目标关联数据用于指示所述服务器根据所述过滤域对所述获取请求对应的初始关联数据进行过滤处理后得到的文件类型;
所述客户端根据所述第一应答数据和所述第二应答数据,显示互联网页面。
结合第一方面,在第一方面第一种可能的实现方式中,所述客户端接收所述服务器发送的与所述获取请求对应的第一应答数据和与关联数据对应的第二应答数据之前,还包括:
所述客户端接收所述服务器发送的推送帧,其中,所述推送帧包括所述目标关联数据;
所述客户端根据所述推送帧,向所述服务器发送响应消息,其中,所述响应消息用于指示所述客户端能够接收所述服务器发送的所述第二应答数据。
结合第一方面第一种可能的实现方式,在第一方面第二种可能的实现方式中,所述客户端根据所述推送帧,向所述服务器发送响应消息,包括:
若所述目标关联数据指示的文件类型不属于所述客户端允许接收的文件类型,则所述客户端向所述服务器发送所述响应消息。
结合第一方面、第一方面第一种可能的实现方式及第一方面第二种可能的实现方式,在第一方面第三种可能的实现方式中,所述方法还包括:
根据客户端的本地配置或者网络模式,确定所述过滤域。
本发明第二方面提供一种数据推送方法,包括:
服务器接收客户端发送的获取请求,其中,所述获取请求携带有过滤域, 所述过滤域用于指示所述客户端允许接收的文件类型;
所述服务器根据所述获取请求,获得第一应答数据和初始关联数据;
所述服务器根据所述过滤域对所述初始关联数据进行过滤处理,获得目标关联数据;
所述服务器根据所述目标关联数据,获得第二应答数据;
所述服务器向所述客户端发送所述第一应答数据和所述第二应答数据。
结合第二方面,在第二方面第一种可能的实现方式中,所述服务器向所述客户端发送所述第一应答数据和所述第二应答数据之前,还包括:
所述服务器向所述客户端发送推送帧,其中,所述推送帧包括所述目标关联数据;
所述服务器接收所述客户端发送的响应消息,其中,所述响应消息用于指示所述客户端能够接收所述服务器发送的所述第二应答数据。
结合第二方面第一种可能的实现方式,在第二方面第二种可能的实现方式中,所述服务器向所述客户端发送所述第一应答数据和所述第二应答数据,包括:
所述服务器向所述客户端发送所述第一应答数据;
若所述服务器接收到所述响应消息,则所述服务器向所述客户端发送所述第二应答数据。
本发明第三方面提供一种数据推送装置,包括:
接收模块,用于接收客户端发送的获取请求,其中,所述获取请求携带有过滤域,所述过滤域用于指示所述客户端接收的文件类型;
获取模块,用于根据所述接收模块接收的获取请求,获取第一应答数据和初始关联数据;
所述获取模块,还用于根据所述过滤域对所述初始关联数据进行过滤处理,获得目标关联数据;
所述获取模块,还用于根据所述目标关联数据,获得第二应答数据;
所述发送模块,用于向所述客户端发送所述第一应答数据和所述第二应答数据。
结合第三方面,在本发明第三方面的第一种可能的实现方式中,
所述接收模块,还用于接收所述服务器发送的推送帧,其中,所述推送 帧包括所述目标关联数据;
所述发送模块,还用于根据所述接收模块接收的推送帧,向所述服务器发送响应消息,其中,所述响应消息用于指示所述客户端能够接收所述服务器发送的所述第二应答数据。。
结合第三方面的第一种可能的实现方式中,在第三方面的第二种可能的实现方式中,所述发送模块还用于:
若所述目标关联数据指示的文件类型不属于所述客户端允许接收的文件类型,则向所述服务器发送所述响应消息。
结合第三方面、第三方面第一种可能的实现方式及第三方面第二种可能的实现方式,在第三方面第二种可能的实现方式中,所述装置还包括:
确定模块,用于根据客户端的本地配置或者网络模式,确定所述过滤域。
本发明第四方面提供一种数据推送装置,包括:
接收模块,用于接收客户端发送的获取请求,其中,所述获取请求携带有过滤域,所述过滤域用于指示所述客户端接收的文件类型;
获取模块,用于根据所述接收模块接收的获取请求,获取第一应答数据和初始关联数据;
所述获取模块,还用于根据所述过滤域对所述初始关联数据进行过滤处理,获得目标关联数据;
所述获取模块,还用于根据所述目标关联数据,获得第二应答数据;
发送模块,用于向所述客户端发送所述第一应答数据和所述第二应答数据。
结合第四方面,在第四方面的第一种可能的实现方式中,
所述发送模块,还用于向所述客户端发送推送帧,其中,所述推送帧包括所述目标关联数据;
所述接收模块,还用于接收所述客户端发送的响应消息,其中,所述响应消息用于指示所述客户端能够接收所述服务器发送的所述第二应答数据。
结合第四方面第一种可能的实现方式中,在第四方面的第二种可能的实现方式中,所述发送模块具体用于:
向所述客户端发送第一应答数据;
若所述接收模块接收到所述第二应答数据,则向所述客户端发送所述第 二应答数据。
本发明第五方面提供一种客户端,包括:
所述发送器,用于向服务器发送获取请求,其中,所述获取请求携带有过滤域,所述过滤域用于指示所述客户端允许接收的文件类型;
接收器,用于接收所述服务器发送的与所述获取请求对应的第一应答数据和与目标关联数据对应的第二应答数据,其中,所述目标关联数据为用于指示所述服务器根据所述过滤域对所述获取请求对应的初始关联数据进行过滤处理后得到的文件类型;
处理器,用于根据所述接收器接收的所述第一应答数据和所述第二应答数据,显示互联网页面。
结合第五方面,在第五方面的第一种可能实现的方式中,
所述接收器,还用于接收所述服务器发送的推送帧,其中,所述推送帧包括所述目标关联数据;
所述发送器,还用于根据所述接收器接收的推送帧,向所述服务器发送响应消息,其中,所述响应消息用于指示所述客户端能够接收所述服务器发送的所述第二应答数据。
结合第五方面的第一种可能的实现方式中,所述发送器还用于:
若所述目标关联数据指示的文件类型不属于所述客户端允许接收的文件类型,所述向所述服务器发送所述响应消息。
结合第五方面、第五方面第一种可能的实现方式、第五方面第二种可能的实现方式,在第五方面第三种可能的实现方式中,所述处理器,还用于根据客户端的本地配置或者网络模式,确定所述过滤域。
本发明第六方面提供一种服务器,包括:
接收器,用于接收客户端发送的获取请求,其中,所述获取请求携带有过滤域,所述过滤域用于指示所述客户端接收数据的文件类型;
处理器,用于根据所述接收器接收的获取请求,获得第一应答数据和初始关联数据;
所述处理器,还用于根据所述过滤域对所述初始关联数据进行过滤处理,获得目标关联数据;
所述处理器,还用于根据所述目标关联数据,获得第二应答数据;
发送器,用于向所述客户端发送所述第一应答数据和所述第二应答数据。
结合第六方面,在第六方面的第一种可能的实现方式中,
所述发送器,还用于向所述客户端发送推送帧,其中,所述推送帧包括所述目标关联数据;
所述接收器,还用于接收所述客户端发送的响应消息,其中,所述响应消息用于指示所述客户端能够接收所述服务器发送的所述第二应答数据。
结合第六方面和第六方面的第二种可能的实现方式中,所述发送器具体用于:
向所述客户端发送第一应答数据;
若所述接收器接收到所述第二应答数据,则向所述客户端发送所述第二应答数据。
本发明第七方面提供一种数据推送系统,包括:客户端和服务器。
本发明实施例提供的数据推送方法、系统及装置,该方法通过客户端向服务器发送获取请求,其中,获取请求携带有过滤域,过滤域用于指示客户端允许接收的文件类型;客户端接收服务器发送的获取请求对应的第一应答数据和与目标关联数据对应的第二应答数据,其中,目标关联数据用于指示服务器根据过滤域对获取请求对应的初始关联数据进行过滤处理后得到的文件类型;客户端根据第一应答数据和第二应答数据,显示互联网页面。本发明通过客户端向服务器发送用于指示客户端允许接收的文件类型的过滤域,使得服务器根据过滤域决定推送的数据,使得服务器的推送行为有据可依,避免客户端接收到非预期的数据,避免了流量的浪费,同时提高数据传输效率。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为现有技术中HTTP1.x协议原理图;
图2为现有技术中的网页系统结构示意图;
图3为现有技术中HTTP2.0协议原理图;
图4为本发明实施例提供的数据推送方法实施例一的流程图;
图5为本发明实施例提供的数据推送方法实施例二的流程图;
图6为本发明实施例提供的数据推送装置的结构示意图;
图7为本发明实施例提供的数据推送装置的结构示意图;
图8为本发明实施例提供的客户端的结构示意图;
图9为本发明实施例提供的服务器的结构示意图;
图10为本发明实施例提供的数据推送系统的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例可以应用于HTTP2.0协议或者HTTP2.0后续的协议中,进行网页浏览或者网页其他相关的业务。图2为现有技术中的网页系统结构示意图,如图2所示,移动用户和固定用户等客户端20通过网站的防火墙21接入到服务器22中,浏览网页内容,其具体的工作原理为:首先客户端20通过HTTP请求获取超文本标记语言(Hyper Text Markup Language,简称HTML),服务器22根据客户端20提出的HTTP请求,在服务器的资源服务器23以及数据库24中查找获取数据资源,此时服务器获取到HTML相关联的js、css、jpeg、png等数据资源。
具体的,客户端20包括移动终端浏览器例如手机终端上的QQ浏览器、UC浏览器等,或者固定浏览器例如个人电脑(Personal Computer,简称PC)浏览器,客户端主要用于连接服务器,解析呈现网页。需要说明的是,可能在网页某些业务中并不使用浏览器,譬如通过HTTP协议进行下载,都应该归纳在当前的浏览器的场景内。服务器22主要用于对外提供网页服务。需要说明的是,在实际网络中,客户端20和服务器22中间可能有多个支持网页的电脑高速缓冲存储器、代理服务器设备,如果该些设备支持HTTP2.0协议, 则也可归纳到当前的服务器的场景内。
另外,防火墙21为服务器前端的安全防护设备,服务器的资源服务器23用于提供网页服务中所需要的数据资源,对于小型网站来说,服务器的资源服务器23可能与服务器属于同一台设备。服务器的数据库24用于为网页服务提供所需要的数据库信息,例如,用户信息或者配置信息等。
下面具体阐述在HTTP2.0协议中客户端与服务器的交互过程,图3为现有技术中HTTP2.0协议原理图,如图3,HTTP2.0协议规定了一种推送(PUSH)机制,该推送机制使得服务器根据自身资源主动推送数据到客户端。
HTTP2.0协议的主要运行过程如下:首先,客户端发送携带有获取请求的报头HEADERS帧。其中,HEADERS帧为HTTP2.0中定义的一种携带HTTP消息头数据的数据结构,这里的HTTP消息头数据指的就是获取请求;其次,服务器接收获取请求,并根据获取请求的内容,获取关联数据,当服务器确定要推送的关联数据之后,向客户端发送关联数据对应的推送承诺PUSH-PROMISE到客户端,启动数据推送过程,客户端接收关联数据对应的推送承诺,并启动接收推送数据的过程;最后,服务器向客户端通过HEADERS帧发送获取请求对应的应答数据和关联数据对应的应答数据。
下面对本发明实施例的原理进行说明:
图4为本发明实施例提供的数据推送方法实施例一的流程图;如图4所示,本发明实施例一提供的数据推送方法,具体包括以下步骤:
步骤S401、客户端向服务器发送获取请求。
其中,获取请求携带有过滤域,过滤域用于指示客户端允许接收的文件类型。
具体的,过滤域可以以头域形式设置在获取请求中,例如:过滤域可以设置为(Req-source:exclude=image/*),该过滤域表示的是客户端不接受任何格式的图片文件。另外,还可以将过滤域设置为如下的头域形式(Req-Source:include=*.js,exclude=image/jpeg;image/png,src=abc.css),该过滤域表示客户端接收推送的是js文件,不接收推送png、jpeg文件,同时希望服务器推送abc.css文件。以上仅为举例说明。需要说明的是,头域指示过滤域的一种方式,过滤域还可以为其他的方式,本发明并不对过滤域的形式进行具体限定。
另外,过滤域还可以不携带在获取请求中,客户端可以将过滤域与获取请求同时向服务器发送。
可选的,客户端通过HEADERS帧向服务器发送获取请求。若获取请求过大,HEADERS帧不能全部装载,则还需要通过延续CONTINUATION帧装载HEADERS帧剩余的消息,其中,CONTINUATION帧的数量为大于或等于0。
具体的,过滤域指示客户端允许接收的文件类型,即为客户端接收服务器推送数据的意愿,不仅可以对初始关联数据进行过滤处理使用,而且还可以作为增加请求推送使用。例如,当客户端在刷新一个HTML页面的场景下,首先,对HTML设置不接受任何推送,等服务器返回新的HTML之后,客户端解析HTML文件之后,根据本地的缓存情况,将需要更新的数据添加到过滤域中,通过一个请求发送给服务器,服务器接收到该请求后,将客户端需要的资源全部推送。
步骤S402、服务器根据获取请求,获得第一应答数据和初始关联数据。
具体的,服务器在服务器的资源服务器以及数据库中查找能够显示出获取请求对应的网页内容的第一应答数据和与获取请求关联的初始关联数据。例如,若获取请求为页面html.index,则服务器在服务器的资源服务器以及数据库中查找获取请求html.index相关的数据,获得的初始关联数据可以为js、css、jpeg和png等数据资源。
步骤S403、服务器根据过滤域对初始关联数据进行过滤处理,获得目标关联数据。
其中,目标关联数据用于指示服务器根据过滤域对获取请求对应的初始关联数据进行过滤处理后得到的文件类型。
具体的,举例来说,若获取请求为页面html.index,根据获取请求,获得的初始关联数据为a.js、b.css、c.jpeg和d.png等数据资源。当过滤域为(Req-source:exclude=image/*)时,则服务器根据过滤域可以得到客户端不允许接收图片的内容,而jpeg和png都是图片的格式,因此,服务器并不向客户端发送c.jpeg和d.png。因此,服务器根据过滤域对初始关联数据a.js、b.css、c.jpeg和d.png进行过滤处理后,得到的是a.js,b.css文件类型,即目标关联数据为a.js和b.css。当过滤域为(Req-Source:include=*.js, exclude=image/jpeg)时,则服务器根据过滤域可以得到客户端不允许接收js和jpeg文件类型,因此,服务器并不向客户端发送a.js和c.jpeg。因此,服务器根据过滤域对初始关联数据a.js、、c.jpeg和d.png进行过滤处理后,得到的是b.css和d.png,即目标关联数据为b.css和d.png。
步骤S404、服务器根据目标关联数据,获得第二应答数据。
具体的,服务器在服务器的资源服务器以及数据库中查找能够显示出目标关联数据对应的第二应答数据,其中,客户端根据第二应答数据能够显示出目标关联数据部分对应的网页内容,例如,显示出对应的图片等内容。
步骤S405、服务器向客户端发送第一应答数据和第二应答数据。
步骤S406、客户端根据第一应答数据和第二应答数据,显示互联网页面。
具体的,在本实施例中,第一应答数据和第二应答数据是承载在HEADERS帧中的。
具体的,客户端通过获取并分析能够显示获取请求对应的网页内容的第一应答数据和能够显示目标关联数据对应的网页内容的第二应答数据,实现为用户显示互联网页面。
本发明实施例提供的数据推送方法,该方法通过客户端向服务器发送获取请求,其中,获取请求携带有过滤域,过滤域用于指示客户端允许接收的文件类型;服务器根据获取请求,获得第一应答数据和初始关联数据;并根据过滤域对初始关联数据进行过滤处理,获得目标关联数据;同时根据所述目标关联数据,获得第二应答数据,服务器向客户端发送第一应答数据和第二应答数据;客户端根据第一应答数据和第二应答数据,显示互联网页面。本发明通过客户端向服务器发送用于指示客户端允许接收的文件类型的过滤域,使得服务器根据过滤域决定推送的第二应答数据,使得服务器的推送行为有据可依,避免客户端接收到非预期的数据,避免了流量的浪费,同时提高数据传输效率。
图5为本发明实施例提供的数据推送方法实施例二的流程图;如图5所示,本发明实施例二提供的数据推送方法,在实施例一提供的技术方案的基础上,步骤S404之后,具体还包括以下步骤:
步骤S407、服务器向客户端发送推送帧。
其中,推送帧包括目标关联数据。
具体的,推送帧为类似于HEADERS帧的一种用于封装文件的数据格式,是HTTP2.0协议中特有的数据帧。本实施例中的推送帧是用于封装目标关联数据。
步骤S408、客户端根据推送帧,向服务器发送响应消息。
其中,响应消息用于指示客户端能够接收服务器发送的第二应答数据。
具体的,若目标关联数据指示的文件类型不属于客户端允许接收的文件类型,则客户端向服务器发送响应消息,向服务器指示客户端同意接收服务器发送的第二应答数据。然后,服务器接收响应消息,执行步骤S405。
另外,若目标关联数据指示的文件类型属于客户端允许接收的文件类型,则客户端不同意接收服务器发送的第二应答数据。然后,服务器向客户端发送第一应答数据,客户端根据第一应答数据显示网页内容。
可选地,过滤域是根据客户端的本地配置或者网络模式确定的。
具体的,当客户端处于2G或3G模式,且流量不足时,不希望看到网页上的图片和动画,此时,过滤域可以设置为不接收图片或者动画,用于向服务器指示客户端不接收图片或动画的文件类型;当客户端的本地配置为无图片模式,则过滤域根据无图片模式设置,指示客户端不接收图片的文件类型;当客户端处于WIFI网络环境中时,只希望看到图片不希望看到文字,此时,过滤域可以设置为只接收图片。
下面以获取请求为页面index.html及过滤域为(Req-source:exclude=image/*)为例,结合数据推送方法的实施例一和实施例二,进一步说明本发明提供的数据推送方法的实现原理:
首先、客户端向服务器发送获取请求页面index.html,服务器根据获取请求,在服务器的资源服务器以及数据库中查找能够显示出获取请求对应的网页内容的第一应答数据和与获取请求关联的初始关联数据a.jpeg、b.css和c.js,服务器根据过滤域(Req-source:exclude=image/*)对初始关联数据进行过滤处理a.jpeg、b.css和c.js,由于本例中的过滤域是指示客户端不接受图片的文件类型,而jpeg属于图片的一种格式,因此,服务器获得目标关联数据b.css和c.js;然后,服务器向客户端发送包含b.css和c.js的推送帧,客户端根据推送帧,判断目标关联数据指示的文件类型是否属于客户端允许接收的文件类型向服务器发送响应消息,若不属于,则客户端向所述服务器发送 指示客户端同意接收服务器发送的第二应答数据的响应消息,服务器接收响应消息之后,向客户端发送第一应答数据和第二应答数据,客户端根据第一应答数据和第二应答数据,显示互联网页面。
图6为本发明实施例提供的数据推送装置的结构示意图,如图6所示,本发明实施例提供的数据推送装置,包括:发送模块601、接收模块602和显示模块603。
在本实施例中,发送模块601,用于向服务器发送获取请求,其中,获取请求携带有过滤域,过滤域用于指示客户端允许接收的文件类型;接收模块602,用于接收服务器发送的与获取请求对应的第一应答数据和与目标关联数据对应的第二应答数据,其中,目标关联数据用于指示服务器根据过滤域对获取请求对应的初始关联数据进行过滤处理后得到的文件类型;显示模块603,用于根据接收模块602接收的第一应答数据和第二应答数据,显示互联网页面。
本实施例中的数据推送装置,并可以执行图4方法实施例的技术方案,其实现原理及实现效果相类似,此处不再赘述。
进一步地,在上述实施例一的技术方案的基础上,在本发明实施例二中,接收模块602,还用于接收服务器发送的推送帧,其中,推送帧包括目标关联数据;发送模块601,还用于根据接收模块602接收的推送帧,向服务器发送响应消息,其中,响应消息用于指示客户端能够接收服务器发送的第二应答数据。
具体的,发送模块601还用于:若目标关联数据指示的文件类型不属于客户端允许接收的文件类型,则向服务器发送响应消息。
另外,在本实施例提供的数据推送装置还包括:确定模块(图中未示出),用于根据客户端的本地配置或者网络模式,确定过滤域。
本实施例中的数据推送装置,并可以执行图5方法实施例的技术方案,其实现原理及实现效果相类似,此处不再赘述。
图7为本发明实施例提供的数据推送装置的结构示意图,如图7所示,本实施例提供的数据推送装置,包括:接收模块701、获取模块702和发送模块703。
在本实施例中,接收模块701,用于接收客户端发送的获取请求,其中, 获取请求携带有过滤域,过滤域用于指示客户端接收的文件类型;获取模块702,用于根据接收模块701接收的获取请求,获取第一应答数据和初始关联数据;获取模块702,还用于根据过滤域对初始关联数据进行过滤处理,获得目标关联数据;获取模块702,还用于根据目标关联数据,获得第二应答数据;发送模块703,用于向客户端发送第一应答数据和第二应答数据。
本实施例中的数据推送装置,并可以执行图4方法实施例的技术方案,其实现原理及实现效果相类似,此处不再赘述。
进一步地,在上述实施例一的技术方案的基础上,在本发明实施例二中,发送模块703,还用于向客户端发送推送帧,其中,推送帧包括目标关联数据;接收模块701,还用于接收客户端发送的响应消息,其中,响应消息用于指示客户端能够接收服务器发送的第二应答数据。
具体的,发送模块703具体用于:向客户端发送第一应答数据;若接收模块701接收到第二应答数据,则向客户端发送第二应答数据。
本实施例中的数据推送装置,并可以执行图5方法实施例的技术方案,其实现原理及实现效果相类似,此处不再赘述。
图8为本发明实施例提供的客户端的结构示意图,如图8所示,本发明实施例提供的服务器,包括:发送器801、接收器802和处理器803。
在本实施例中,发送器801,用于向服务器发送获取请求,其中,获取请求携带有过滤域,过滤域用于指示客户端允许接收的文件类型;接收器802,用于接收服务器发送的与获取请求对应的第一应答数据和与目标关联数据对应的第二应答数据,其中,目标关联数据为用于指示服务器根据过滤域对获取请求对应的初始关联数据进行过滤处理后得到的文件类型;处理器803,用于根据接收器802接收的第一应答数据和第二应答数据,显示互联网页面。
本实施例中的客户端,并可以执行图4方法实施例的技术方案,其实现原理与实现效果类似,此处不再赘述。
进一步地,在本发明的实施例一的技术方案的基础上,在实施例二中,接收器802,还用于接收服务器发送的推送帧,其中,推送帧包括目标关联数据;发送器801,还用于根据接收器802接收的推送帧,向服务器发送响应消息,其中,响应消息用于指示客户端能够接收服务器发送的第二应答数据。
具体的,发送器801还用于:若目标关联数据指示的文件类型不属于客户端允许接收的文件类型,向服务器发送响应消息。
另外,处理器803,还用于根据客户端的本地配置或者网络模式,确定过滤域。
本实施例中的客户端,并可以执行图5方法实施例的技术方案,其实现原理与实现效果类似,此处不再赘述。
图9为本发明实施例提供的服务器的结构示意图;如图9所示,本发明实施例提供的客户端,包括:接收器901、处理器902和发送器903。
在本实施例中,接收器901,用于接收客户端发送的获取请求,其中,获取请求携带有过滤域,过滤域用于指示客户端接收数据的文件类型;处理器902,用于根据接收器901接收的获取请求,获得第一应答数据和初始关联数据;处理器902,还用于根据过滤域对初始关联数据进行过滤处理,获得目标关联数据;处理器902,还用于根据目标关联数据,获得第二应答数据;发送器903,用于向客户端发送第一应答数据和第二应答数据。
本实施例中的客户端,并可以执行图5方法实施例的技术方案,其实现原理相类似,此处不再赘述。
进一步地,在本发明的实施例一的技术方案的技术上,在实施例二中,发送器903,还用于向客户端发送推送帧,其中,推送帧包括目标关联数据;接收器901,还用于接收客户端发送的响应消息,其中,响应消息用于指示客户端能够接收服务器发送的第二应答数据。
具体的,发送器903具体用于:向客户端发送第一应答数据;若接收器901接收到第二应答数据,则向客户端发送第二应答数据。
图10为本发明实施例提供的数据推送系统的结构示意图,如图10所示,本发明实施例提供的数据推送装置,包括:客户端100和服务器200。
其中,客户端100为图6所示的数据推送装置,服务器200为图7所示的数据推送装置。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储电介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储电介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序 代码的电介质。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换。因此,本发明的保护范围应以权利要求的保护范围为准。

Claims (22)

  1. 一种数据推送方法,其特征在于,包括:
    客户端向服务器发送获取请求,其中,所述获取请求携带有过滤域,所述过滤域用于指示所述客户端允许接收的文件类型;
    所述客户端接收所述服务器发送的获取请求对应的第一应答数据和与目标关联数据对应的第二应答数据,其中,所述目标关联数据用于指示所述服务器根据所述过滤域对所述获取请求对应的初始关联数据进行过滤处理后得到的文件类型;
    所述客户端根据所述第一应答数据和所述第二应答数据,显示互联网页面。
  2. 根据权利要求1所述的方法,其特征在于,所述客户端接收所述服务器发送的与所述获取请求对应的第一应答数据和与目标关联数据对应的第二应答数据之前,还包括:
    所述客户端接收所述服务器发送的推送帧,其中,所述推送帧包括所述目标关联数据;
    所述客户端根据所述推送帧,向所述服务器发送响应消息,其中,所述响应消息用于指示所述客户端能够接收所述服务器发送的所述第二应答数据。
  3. 根据权利要求2所述的方法,其特征在于,所述客户端根据所述推送帧,向所述服务器发送响应消息,包括:
    若所述目标关联数据指示的文件类型不属于所述客户端允许接收的文件类型,则所述客户端向所述服务器发送所述响应消息。
  4. 根据权利要求1-3任一所述的方法,其特征在于,所述方法还包括:
    根据客户端的本地配置或者网络模式,确定所述过滤域。
  5. 一种数据推送方法,其特征在于,包括:
    服务器接收客户端发送的获取请求,其中,所述获取请求携带有过滤域,所述过滤域用于指示所述客户端允许接收的文件类型;
    所述服务器根据所述获取请求,获得第一应答数据和初始关联数据;
    所述服务器根据所述过滤域对所述初始关联数据进行过滤处理,获得目标关联数据;
    所述服务器根据所述目标关联数据,获得第二应答数据;
    所述服务器向所述客户端发送所述第一应答数据和所述第二应答数据。
  6. 根据权利要求5所述的方法,其特征在于,所述服务器向所述客户端发送所述第一应答数据和所述第二应答数据之前,还包括:
    所述服务器向所述客户端发送推送帧,其中,所述推送帧包括所述目标关联数据;
    所述服务器接收所述客户端发送的响应消息,其中,所述响应消息用于指示所述客户端能够接收所述服务器发送的所述第二应答数据。
  7. 根据权利要求6所述的方法,其特征在于,所述服务器向所述客户端发送所述第一应答数据和所述第二应答数据,包括:
    所述服务器向所述客户端发送所述第一应答数据;
    若所述服务器接收到所述响应消息,则所述服务器向所述客户端发送所述第二应答数据。
  8. 一种数据推送装置,其特征在于,包括:
    发送模块,用于向服务器发送获取请求,其中,所述获取请求携带有过滤域,所述过滤域用于指示所述客户端允许接收的文件类型;
    接收模块,用于接收所述服务器发送的与所述获取请求对应的第一应答数据和与目标关联数据对应的第二应答数据,其中,所述目标关联数据用于指示所述服务器根据所述过滤域对所述获取请求对应的初始关联数据进行过滤处理后得到的文件类型;
    显示模块,用于根据所述接收模块接收的所述第一应答数据和所述第二应答数据,显示互联网页面。
  9. 根据权利要求8所述的装置,其特征在于,
    所述接收模块,还用于接收所述服务器发送的推送帧,其中,所述推送帧包括所述目标关联数据;
    所述发送模块,还用于根据所述接收模块接收的推送帧,向所述服务器发送响应消息,其中,所述响应消息用于指示所述客户端能够接收所述服务器发送的所述第二应答数据。
  10. 根据权利要求9所述的装置,其特征在于,所述发送模块还用于:
    若所述目标关联数据指示的文件类型不属于所述客户端允许接收的文件 类型,则向所述服务器发送所述响应消息。
  11. 根据权利要求8-10任一所述的装置,其特征在于,所述装置还包括:
    确定模块,用于根据客户端的本地配置或者网络模式,确定所述过滤域。
  12. 一种数据推送装置,其特征在于,包括:
    接收模块,用于接收客户端发送的获取请求,其中,所述获取请求携带有过滤域,所述过滤域用于指示所述客户端接收的文件类型;
    获取模块,用于根据所述接收模块接收的获取请求,获取第一应答数据和初始关联数据;
    所述获取模块,还用于根据所述过滤域对所述初始关联数据进行过滤处理,获得目标关联数据;
    所述获取模块,还用于根据所述目标关联数据,获得第二应答数据;
    发送模块,用于向所述客户端发送所述第一应答数据和所述第二应答数据。
  13. 根据权利要求12所述的装置,其特征在于,
    所述发送模块,还用于向所述客户端发送推送帧,其中,所述推送帧包括所述目标关联数据;
    所述接收模块,还用于接收所述客户端发送的响应消息,其中,所述响应消息用于指示所述客户端能够接收所述服务器发送的所述第二应答数据。
  14. 根据权利要求13所述的装置,其特征在于,所述发送模块具体用于:向所述客户端发送第一应答数据;
    若所述接收模块接收到所述第二应答数据,则向所述客户端发送所述第二应答数据。
  15. 一种客户端,其特征在于,包括:
    发送器,用于向服务器发送获取请求,其中,所述获取请求携带有过滤域,所述过滤域用于指示所述客户端允许接收的文件类型;
    接收器,用于接收所述服务器发送的与所述获取请求对应的第一应答数据和与目标关联数据对应的第二应答数据,其中,所述目标关联数据为用于指示所述服务器根据所述过滤域对所述获取请求对应的初始关联数据进行过滤处理后得到的文件类型;
    处理器,用于根据所述接收器接收的所述第一应答数据和所述第二应答 数据,显示互联网页面。
  16. 根据权利要求15所述的客户端,其特征在于,
    所述接收器,还用于接收所述服务器发送的推送帧,其中,所述推送帧包括所述目标关联数据;
    所述发送器,还用于根据所述接收器接收的推送帧,向所述服务器发送响应消息,其中,所述响应消息用于指示所述客户端能够接收所述服务器发送的所述第二应答数据。
  17. 根据权利要求16所述的客户端,其特征在于,所述发送器还用于:
    若所述目标关联数据指示的文件类型不属于所述客户端允许接收的文件类型,所述向所述服务器发送所述响应消息。
  18. 根据权利要求15-17任一所述的客户端,其特征在于,所述处理器,还用于根据客户端的本地配置或者网络模式,确定所述过滤域。
  19. 一种服务器,其特征在于,包括:
    接收器,用于接收客户端发送的获取请求,其中,所述获取请求携带有过滤域,所述过滤域用于指示所述客户端接收数据的文件类型;
    处理器,用于根据所述接收器接收的获取请求,获得第一应答数据和初始关联数据;
    所述处理器,还用于根据所述过滤域对所述初始关联数据进行过滤处理,获得目标关联数据;
    所述处理器,还用于根据所述目标关联数据,获得第二应答数据;
    发送器,用于向所述客户端发送所述第一应答数据和所述第二应答数据。
  20. 根据权利要求19所述的服务器,其特征在于,
    所述发送器,还用于向所述客户端发送推送帧,其中,所述推送帧包括所述目标关联数据;
    所述接收器,还用于接收所述客户端发送的响应消息,其中,所述响应消息用于指示所述客户端能够接收所述服务器发送的所述第二应答数据。
  21. 根据权利要求20所述的服务器,其特征在于,所述发送器具体用于:
    向所述客户端发送第一应答数据;
    若所述接收器接收到所述第二应答数据,则向所述客户端发送所述第二应答数据。
  22. 一种数据推送系统,其特征在于,包括:客户端和服务器,所述客户端为如权利要求8-11任一所述的数据推送装置,所述服务器为如权利要求12至14任一所述的数据推送装置。
PCT/CN2015/094179 2015-11-10 2015-11-10 数据推送方法、系统及装置 WO2017079893A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/094179 WO2017079893A1 (zh) 2015-11-10 2015-11-10 数据推送方法、系统及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/094179 WO2017079893A1 (zh) 2015-11-10 2015-11-10 数据推送方法、系统及装置

Publications (1)

Publication Number Publication Date
WO2017079893A1 true WO2017079893A1 (zh) 2017-05-18

Family

ID=58694655

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/094179 WO2017079893A1 (zh) 2015-11-10 2015-11-10 数据推送方法、系统及装置

Country Status (1)

Country Link
WO (1) WO2017079893A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2575189A (en) * 2015-05-27 2020-01-01 Canon Kk Adaptive client-driven push of resources by a server device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067423A (zh) * 2011-10-20 2013-04-24 腾讯科技(深圳)有限公司 浏览器内核适配的方法和浏览器
CN103593354A (zh) * 2012-08-15 2014-02-19 腾讯科技(深圳)有限公司 一种过滤网络页面广告的方法、装置、服务器及系统
CN103729458A (zh) * 2014-01-10 2014-04-16 湖南神州祥网科技有限公司 一种网页请求的区分方法及装置
US8788612B1 (en) * 2006-08-07 2014-07-22 Unwired Planet, Llc Cache based enhancement to optimization protocol

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8788612B1 (en) * 2006-08-07 2014-07-22 Unwired Planet, Llc Cache based enhancement to optimization protocol
CN103067423A (zh) * 2011-10-20 2013-04-24 腾讯科技(深圳)有限公司 浏览器内核适配的方法和浏览器
CN103593354A (zh) * 2012-08-15 2014-02-19 腾讯科技(深圳)有限公司 一种过滤网络页面广告的方法、装置、服务器及系统
CN103729458A (zh) * 2014-01-10 2014-04-16 湖南神州祥网科技有限公司 一种网页请求的区分方法及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2575189A (en) * 2015-05-27 2020-01-01 Canon Kk Adaptive client-driven push of resources by a server device
GB2575189B (en) * 2015-05-27 2020-06-17 Canon Kk Adaptive client-driven push of resources by a server device

Similar Documents

Publication Publication Date Title
US10671691B2 (en) Methods and apparatus for accelerating content authored for multiple devices
EP3340633B1 (en) Terminal, cache server, and method for acquiring video slices and device thereof
US10057734B2 (en) System and method for transmitting and receiving media messages
US9571556B2 (en) Browser kernel adaptation method and browser therefor
CA2591782C (en) System and method for enhancing network browsing speed by setting a proxy server on a handheld device
US9954970B1 (en) System and method of determining latency
CN106534243B (zh) 基于http协议的缓存、请求、响应方法及相应装置
US20150189036A1 (en) Offline caching method and apparatus
EP2763494A1 (en) Internet access method, terminal and storage medium
EP2083359B1 (en) System and method for enhancing network-browsing speed by setting a proxy server on a handheld device
EP2727317B1 (en) Method and apparatus for operating an intermediary server
US20120054295A1 (en) Method and apparatus for providing or acquiring the contents of a network resource for a mobile device
KR20180004093A (ko) 인스턴트 메시징 동안의 미디어 콘텐츠의 전송
CN107918619B (zh) 广告展示方法和装置
WO2013013556A1 (zh) 数据上报的方法及设备
WO2016086755A1 (zh) 一种报文处理的方法和透明代理服务器
CN104426985A (zh) 显示网页的方法、装置及系统
WO2013060144A1 (zh) 浏览网页图片的方法及客户端装置
WO2018133772A1 (zh) 网页资源的获取方法和装置、存储介质、电子装置
WO2015196442A1 (zh) 一种网页优化的设备及方法
US20140006918A1 (en) Method and system for web page rearrangement
CN106557584A (zh) 一种网址收藏方法及装置
WO2017020597A1 (zh) 一种资源缓存方法及装置
WO2017079893A1 (zh) 数据推送方法、系统及装置
WO2013170903A1 (en) Providing data to a network terminal

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: 15908023

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: 15908023

Country of ref document: EP

Kind code of ref document: A1