WO2017140103A1 - 差分数据传输的方法、装置及系统 - Google Patents

差分数据传输的方法、装置及系统 Download PDF

Info

Publication number
WO2017140103A1
WO2017140103A1 PCT/CN2016/097989 CN2016097989W WO2017140103A1 WO 2017140103 A1 WO2017140103 A1 WO 2017140103A1 CN 2016097989 W CN2016097989 W CN 2016097989W WO 2017140103 A1 WO2017140103 A1 WO 2017140103A1
Authority
WO
WIPO (PCT)
Prior art keywords
differential
data
response
cache
information
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/CN2016/097989
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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Publication of WO2017140103A1 publication Critical patent/WO2017140103A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer

Definitions

  • the present invention relates to the field of Internet application technologies, and in particular, to a method, device and system for differential data transmission.
  • Differential coding is a redundancy that eliminates information and is widely used in communications and storage.
  • MPEG-1 Moving Picture Expert Group
  • MPEG-1 Moving Picture Expert Group
  • the differential coding idea is also applied in the field of Hyper Text Transfer Protocol (HTTP).
  • HTTP Hyper Text Transfer Protocol
  • RFC3229 is the authoritative specification in this field. It uses the cache feature of the HTTP protocol to design the network architecture and implement differential coding.
  • Dynamic pages have two characteristics: 1. The content of the page changes frequently; 2. The magnitude of the change is usually not very large, and the difference ratio is small relative to the size of the page itself.
  • CDN Content Delivery Network
  • dynamic pages are often not cached. That is to say, the dynamic page of the client source station does not receive any acceleration measures through the CDN network. The entire page must be retransmitted. Calculated according to the ratio of response before and after the difference, if the differential coding network architecture is not deployed, 100% of the content size must be transmitted. If a differential encoding architecture is deployed, only the parts of the difference (possibly 20% or less) may be transmitted. This greatly reduces the amount of network transmission.
  • FIG. 1 is a schematic diagram of management of a reference buffer by a differential response end in the related art. As shown in FIG.
  • the differential responder needs to cache multiple versions of the reference cache in order to match the baseline cache version of the differential request. So it will waste a lot of limited cache space.
  • the reference cache version of the differential request segment in the related art is different, which causes the differential responder to store multiple copies of the reference cache, thereby wasting a limited cache space.
  • no effective solution has been proposed.
  • the embodiments of the present invention provide a method, an apparatus, and a system for differential data transmission, so as to at least solve the problem that the differential response end needs to store multiple versions of the reference cache due to different reference cache versions of the differential request segments in the related art.
  • a method for differential data transmission including: in a case where a differential processing module switch of an intermediate server is closed, a differential response end receives data request information; and a differential response end parses data request information, Obtaining a category of the data request information, where the category of the data request information includes: a differential request and a non-differential request; when the data request information is a differential request, the differential response end determines whether the difference request carries the preset identifier; In the case that the differential response end returns the first data response information, the first data response information is used to indicate the difference between the reference cache and the real-time cache; if the determination result is no, the differential response end returns the second data response information, The two data response information is used to indicate the difference between the real-time cache and the real-time cache and the reference cache.
  • a method for differential data transmission including: in a case where a differential processing module switch of an intermediate server is closed, a differential requesting end sends data request information to a differential response end; a differential requesting end Receiving the returned first data response information; the differential requesting end parses the first data response information to obtain a real-time cache.
  • a method for differential data transmission including: in a case where a differential processing module switch of an intermediate server is closed, a differential requesting end sends data request information to a differential response end; a differential requesting end Receiving the returned second data response information; the differential requesting end parses the second data response information to obtain a real-time cache and a reference cache.
  • an apparatus for differential data transmission including: a receiving module, configured to receive data request information when a differential processing module switch of an intermediate server is closed; and a first parsing module And for analyzing the data request information, obtaining a category of the data request information, where the category of the data request information includes: a differential request and a non-differential request; and a first determining module, configured to determine the differential request when the data request information is a differential request Whether the preset identifier is carried; the first feedback module is configured to: when the determination result is yes, return a first data response information, where the first data response information is used to indicate a difference portion between the reference cache and the real-time cache; And a module, configured to return a second data response information, where the second data response information is used to indicate a difference between the real-time cache and the real-time cache and the reference cache.
  • another apparatus for differential data transmission comprising: a sending module, configured to send a number to a differential response end when a differential processing module switch of an intermediate server is closed According to the request information, the receiving module is configured to receive the returned first data response information, and the parsing module is configured to parse the first data response information to obtain a real-time cache.
  • another apparatus for differential data transmission comprising: a sending module, configured to send data request information to a differential response end when a differential processing module switch of the intermediate server is closed
  • the receiving module is configured to receive the returned second data response information
  • the parsing module is configured to parse the second data response information to obtain a real-time cache and a reference cache.
  • a system for differential data transmission including: a differential requesting end, an intermediate server, and a differential response end, a differential requesting end, an intermediate server, and a differential response end communication connection, wherein the middle
  • the server is configured with a differential processing module switch; the differential request end is a device for transmitting the differential data; and the differential response end is a device for transmitting the differential data.
  • the differential response terminal receives the data request information when the differential processing module switch of the intermediate server is closed, and the differential response terminal parses the data request information to obtain a category of the data request information, where the data request information is The category includes: a differential request and a non-differential request; when the data request information is a differential request, the differential response end determines whether the difference request carries a preset identifier; if the determination result is yes, the differential response end returns the first data response information, The first data response information is used to indicate a difference portion between the reference cache and the real-time cache; if the determination result is negative, the differential response end returns the second data response information, and the second data response information is used to indicate the real-time cache and the real-time cache and The difference portion of the baseline cache.
  • the purpose of saving limited buffer space is achieved, thereby achieving the technical effect of improving data processing efficiency, thereby solving the problem that the differential response end needs to store multiple different versions of the reference due to the different reference cache versions of the differential request segments in the related art.
  • the technical problem of caching which wastes limited cache space.
  • FIG. 1 is a schematic diagram of management of a reference buffer by a differential response end in the related art
  • FIG. 2 is a schematic flow chart of a method for differential data transmission according to an embodiment of the present invention
  • FIG. 3 is a schematic flow chart of a method for differential data transmission according to an embodiment of the present invention.
  • FIG. 4 is a flow chart showing a method of differential data transmission with a reference cache according to an embodiment of the present invention
  • FIG. 5 is a schematic flow chart of a method for differential data transmission without a reference buffer according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of a data frame structure in a method for differential data transmission according to an embodiment of the present invention.
  • FIG. 7 is a schematic flow chart of a method for differential data transmission according to another embodiment of the present invention.
  • FIG. 8 is a flow chart showing a method of differential data transmission according to still another embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of an apparatus for differential data transmission according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of an apparatus for differential data transmission according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of another apparatus for differential data transmission according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of a system for differential data transmission according to an embodiment of the present invention.
  • a method embodiment of a method of differential data transmission is provided, it being noted that the steps illustrated in the flowchart of the figures may be performed in a computer system such as a set of computer executable instructions, Also, although logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
  • FIG. 2 is a schematic flow chart of a method for differential data transmission according to an embodiment of the present invention, as shown in FIG. Differential response, the method includes the following steps:
  • Step S202 in the case that the differential processing module switch of the intermediate server is closed, the differential response terminal receives the data request information
  • Step S204 The differential response end parses the data request information to obtain a category of the data request information, where the category of the data request information includes: a differential request and a non-differential request;
  • Step S206 When the data request information is a differential request, the differential response end determines whether the difference request carries the preset identifier.
  • Step S208 in the case that the determination result is yes, the differential response end returns first data response information, and the first data response information is used to indicate a difference portion between the reference cache and the real-time cache;
  • step S210 if the determination result is no, the differential response end returns the second data response information, and the second data response information is used to indicate the difference between the real-time cache and the real-time cache and the reference cache.
  • the method for differential data transmission provided by the embodiment of the present application can be applied to page data processing of a content delivery network (CDN) in the field of Hypertext Transfer Protocol (HTTP), in particular, in the differential coding solution related technology, the differential response end needs to store multiple copies of the reference cache, which wastes limited cache space.
  • CDN content delivery network
  • HTTP Hypertext Transfer Protocol
  • the differential response end receives the data request information sent by the differential requesting end, and the differential response end obtains the type of the data request information by parsing the data request information, and according to the The data request information is processed separately.
  • the differential response end parses the header of the difference request to determine whether the difference request carries a preset identifier, and when the judgment result is yes ( That is, when the difference request carries the preset identifier, the first data response information is returned to the differential requesting end by the intermediate server; when the determination result is no (ie, the differential request does not carry the preset identifier), The second data response information is returned to the differential requesting end by the intermediate server; and when the data requesting information is a non-differential request, the differential responding end returns a non-differential response according to the non-differential request.
  • FIG. 1 the method of differential data transmission provided by the embodiment of the present application, FIG.
  • the method may further include: receiving a differential response end by the middle.
  • the data request information sent by the server is forwarded by the server.
  • the intermediate server in the embodiment of the present application performs only the role of forwarding the data request information sent by the differential requester by the shutdown of the differential processing module, so as to solve the problem.
  • the intermediate server since the intermediate server requests information for data, the response time is prolonged.
  • the receiving, by the differential response end, the data request information sent by the differential requesting end by the intermediate server may be a preferred embodiment of the embodiment of the present application.
  • the differential response end determines whether the difference request carries a reference identifier, and determines whether the reference request cache has a reference cache according to the preset identifier, and whether the reference cache of the differential request end is consistent with the reference cache version of the differential response end.
  • the differential response end calculates the difference portion through the real-time cache and the reference cache, and feeds the difference portion to the differential request end (ie, returns the first data response information), so that the differential request end passes the difference portion, and
  • the benchmark cache is calculated to obtain a real-time cache;
  • the differential response end considers the differential request end as a non-reference cache or a reference cache version inconsistency, and further passes through the differential response end.
  • the reference cache and the real-time cache obtain a difference between the two, so that when the second data response information is fed back, the real-time cache and the difference portion are returned to the differential requester (ie, the second data response information is returned), so that the differential request
  • the reference cache is calculated based on the real-time cache and the difference portion.
  • the method for differential data transmission is based on the differential decoding of the HTTP response, which refers to recalculating the real-time cache according to the difference portion and the reference cache, so that the above-mentioned operation can be obtained by using the real-time cache and the difference portion.
  • Get the benchmark cache, or the real-time cache and the benchmark cache are compared by calculation to get the difference.
  • the method for differential data transmission solves the problem that the differential response end needs to store multiple copies of the different versions of the reference cache due to different versions of the reference cache of the differential request end, thereby wasting a limited cache space.
  • the process is based on saving only one reference cache on the differential request side and the differential response side.
  • the differential requesting end indicates the version of the reference cache of the differential requesting end of the differential responding end through the request header If-None-Match of the HTTP protocol (ie, the preset identifier in step S106). If the reference buffers of the differential request and the differential responders are inconsistent, the differential responder tells the differential requester that the reference buffer needs to be synchronized by the second data response message. This ensures that all nodes in the CDN network use the same version of the reference cache, thus achieving the technical effect of improving data processing efficiency.
  • step S202 in the case that the differential processing module switch of the intermediate server is closed, by setting the differential processing module switch, opening the switch means turning on the differential encoding and the differential decoding function, and turning off the switch means being an intermediate server. , transparent transmission of differential response.
  • RFC3229 does not cache on the intermediate server by setting the 226 status code.
  • intermediate servers with differential decoding that attempt to differentially decode them, so the true differential request server cannot get 226 differences. So here the differential processing module switch solves this problem, that is, by turning off the differential processing module switch, the transparent transmission of the intermediate server avoids the intermediate server with differential decoding trying to differentially decode it, resulting in response time in the entire data processing process. Long question.
  • the differential response end receives the data request information when the differential processing module switch of the intermediate server is closed, and the differential response end parses the data request information.
  • the category of the data request information includes: a differential request and a non-differential request; when the data request information is a differential request, the differential response end determines whether the difference request carries the preset identifier; In the case that the differential response end returns the first data response information, the first data response information is used to indicate the difference between the reference cache and the real-time cache; if the determination result is no, the differential response end returns the second data response information,
  • the two data response information is used to indicate the difference between the real-time cache and the real-time cache and the reference cache.
  • the purpose of saving limited buffer space is achieved, thereby achieving the technical effect of improving data processing efficiency, thereby solving the problem that the differential response end needs to store multiple different versions of the reference due to the different reference cache versions of the differential request segments in the related art.
  • the technical problem of caching which wastes limited cache space.
  • step S204 the differential response end parses the data request information, and the categories of the data request information obtained include:
  • Step 1 The differential response end determines whether the data frame format in the data request information carries the first identifier
  • Step 2 in the case that the judgment result is yes, the data request information is a difference request
  • Step 3 in the case that the determination result is no, the data request information is a non-differential request
  • the first identifier is packet header information in a hypertext transfer protocol data frame.
  • step S204 provides a method for discriminating the type of data request information.
  • the differential response terminal receives the data request information forwarded by the intermediate server, by parsing the data frame format in the data request information, And determining whether the data frame format carries the first identifier, and when the first identifier is carried, determining that the data request is a differential request; and conversely, if the first identifier is not carried in the data frame format, determining the Data requests are non-differential requests.
  • the first identifier provided in the embodiment of the present application may be an A-IM identifier in the HTTP data frame.
  • the differential response end parses the data request information, it is determined whether the data frame format in the data request information carries the A-IM.
  • the identifier determines the type of the data request information.
  • the first identifier provided by the embodiment of the present application is only described by using the A-IM identifier as an example, and the method for implementing the differential data transmission provided by the embodiment of the present invention is applicable, and is not specifically limited.
  • a preset identifier is used to indicate whether the differential request is a differential request with a reference cache.
  • the embodiment of the present application sets a preset identifier according to the RFC3229, that is, the If-None-Match header is taken as an example.
  • the difference request carries the If-None-Match header, it indicates that the differential request end corresponding to the difference request has a reference.
  • the differential requesting end of the cache and vice versa, that is, when the differential request does not carry the If-None-Match header, indicating that the differential requesting end corresponding to the differential request is a differential requesting end without a reference cache, or the If-None-Match
  • the header cannot obtain a corresponding match on the differential response end, it will determine that the differential request end corresponding to the difference request is a difference without the reference buffer. Sub-request side.
  • the returning the first data response information by the differential response end in step S208 includes:
  • Step1 the differential response end obtains a real-time cache
  • Step 2 the differential response end obtains the differential request as a reference cache difference request according to the judgment result
  • Step 3 The differential response end determines whether the preset identifier is the same as the pre-stored identifier
  • Step 4 when the preset identifier is the same as the pre-stored identifier, the differential response terminal calculates the pre-selected stored reference cache and the real-time cache to obtain a difference portion;
  • Step 5 The differential response end encapsulates the difference portion and the first response identifier to the first data response information, where the first response identifier is used to indicate that the first data response information is a differential response with a reference cache;
  • Step 6 the differential response end returns the first data response information
  • Step 7 When the preset identifier is different from the pre-stored identifier, the differential response terminal returns the second data response information.
  • FIG. 4 is a method for differential data transmission with reference cache according to an embodiment of the present invention.
  • the differential response terminal determines that the difference request carries a preset identifier
  • the differential response terminal obtains a difference between the two through the comparison and calculation of the reference cache and the latest real-time cache. And, by encapsulating the difference portion to the first data response information, and returning the first data response information to the differential requesting end by the intermediate server.
  • the first response identifier is used to indicate that the first data response information is a differential response with a reference buffer, and the status code can be set to 226.
  • the differential request end and the differential response end of the present application only save a reference cache, and the differential response end determines whether the preset identifier in the differential request and the differential response are If the judgment result is the same, the difference request end corresponding to the difference request is the same as the reference cache version of the differential response end; otherwise, if the judgment result is different, the authentication is performed.
  • the differential request end corresponding to the difference request is inconsistent with the reference cache version of the differential response end, so that the differential response end compares the difference between the reference buffer and the real-time cache, and encapsulates the difference and the real-time cache.
  • the two data response information is returned to the differential requester through the intermediate server.
  • the process of processing the differential request is based on the reference cache: first, the differential requester sends a differential request in the case of a reference cache; secondly, the intermediate server does not perform any processing on the differential request; The differential responder receives the differential request from the intermediate server, comparing the baseline cache with the latest real-time cache. And the calculation obtains the difference between the two; fourth, the differential response responds to the difference, the status code is 226; fifth, the intermediate server responds to the received differential response without decoding; sixth, the differential request The terminal receives the differential response forwarded by the intermediate server; finally, the differential requester calculates and generates a real-time cache according to the difference and the reference cache.
  • the returning the second data response information by the differential response end in step S210 includes:
  • Step1 the differential response end obtains a real-time cache
  • Step 2 the differential response terminal calculates the pre-selected stored reference cache and the real-time cache to obtain a difference portion
  • Step 3 The differential response end encapsulates the real-time cache, the difference portion, and the second response identifier to the second data response information, where the second response identifier is used to indicate that the second data response information is a differential response without a reference cache.
  • Step 4 the differential response end returns the second data response information.
  • FIG. 5 is a schematic flowchart of a method for differential data transmission without a reference cache according to an embodiment of the present invention.
  • the differential response terminal determines that the difference request does not carry a preset identifier
  • the differential response end obtains the difference between the two through the comparison and calculation of the reference cache and the real-time cache, and then encapsulates the real-time cache and the difference portion to the second data response information, and returns the second data response information by the intermediate server.
  • the second response identifier is used to indicate that the second data response information is a differential response, and the status code can be set to 200.
  • the differential request end corresponding to the difference request is determined to be a differential request end without a reference cache, and Step 1 to Step 4 in the above step 210 are performed.
  • the differential requester When the differential requester does not have a reference cache, it sends the first differential request without the If-None-Match header, and RFC3229 specifies that the response response to the client is the reference cache. So this has the drawback, you can't get real-time cache for the first request.
  • the embodiment of the present application designs that the first data response information should include a real-time cache and a difference portion.
  • the real-time cache can respond to the browser, and the reference cache of the differential request side can also be calculated by the real-time cache and difference parts.
  • the process of processing the differential request is based on the non-reference cache: first, in the case of the first request, the differential request side has no reference cache, and the differential request is sent; secondly, the intermediate server does not perform any processing on the difference request; Third, the differential response end receives the differential request from the intermediate server, and obtains the difference between the two through the comparison and calculation of the reference cache and the real-time cache. Fourth, the differential response end sends the difference portion and the real-time cache in a response.
  • the protocol modification will be explained below.
  • the intermediate server does not perform differential decoding processing or buffering on the received modified HTTP response.
  • the differential requester receives the response packet forwarded by the intermediate server (ie, the second data). Response information); Finally, the differential requester gets a real-time cache and uses the real-time cache and difference parts to calculate the generated reference cache.
  • step S208 when the differential response terminal determines that the preset identifier carried in the difference request is different from the identifier previously stored by the differential response terminal, the reference cache stored by the differential request terminal and the differential response terminal is described. The versions are different, so Step 1 to Step 4 in the above step S210 are executed, and the second data response information is returned to the difference requesting end via the intermediate server.
  • the method for differential data transmission further includes:
  • Step S211 The differential response end determines whether a time interval between the difference request sent by the differential requesting end and the real-time buffer corresponding to the adjacent difference request stored by the differential response end is greater than a preset period;
  • Step S213 in the case that the determination result is no, the differential response end returns a third data response information, and the third data response information is used to indicate a difference portion between the real-time cache and the reference cache;
  • Step S214 in a case where the determination result is YES, the differential response terminal returns the first data response information or the second data response information.
  • dynamic pages may not change over a period of time. So for each differential request, the differential responder calculates the difference based on the real-time cache (no change over time) and the reference cache. This wastes CPU calculation time and slows down the HTTP response speed. Moreover, the intermediate server in the related art will receive the received data information (data request information or data response information) when bridging the differential response end and the differential request side. Data parsing processing will further slow down the response speed of HTTP.
  • the embodiment of the present application sets the validity period of the difference portion, and its validity period is equivalent to the validity period of the real-time cache. Then, during the cache validity period (that is, the preset period in the embodiment of the present application), for the differential request, only the difference portion needs to be directly responded from the cache. This eliminates the need for additional CPU computation time and improves HTTP response speed.
  • the differential response feedback may be performed according to the method of step S202 to step S210, that is, the first data response information or the second data response information is fed back.
  • the method for differential data transmission further includes:
  • Step S207 When the data request information is a non-differential request, the differential response end returns a corresponding non-differential response according to the non-differential request, where the non-differential response carries a second response identifier, and the second response identifier is used to indicate that the response is normal. .
  • the second response identifier is used to indicate that the response is a normal response, and the status code can be set to 200.
  • FIG. 6 is a schematic structural diagram of a data frame structure in a method for differential data transmission according to an embodiment of the present invention. As shown in FIG. 6, the modification of an HTTP frame is as follows:
  • Step 01 According to the format of RFC3229 and the HTTP protocol, the method of marking the differential request and the non-differential request is to determine whether the request header has an A-IM:delta header.
  • Step 02 According to the format of RFC3229 and the HTTP protocol, the method of indicating the differential response and the non-differential response is to determine whether the request header has an IM header.
  • Step 03 The method of indicating whether the response is a differential response or a modified HTTP response is to determine the value of IM. If the value is delta, it indicates a differential response; if the value is delta, new, the modified HTTP response contains differences. Partial and real-time caching.
  • Step 04 Modify the HTTP key points, and use the chunk transmission code uniformly.
  • Step 05 The HTTP header uses a real-time cached HTTP header.
  • the HTTP response body includes a response body of the real-time cache, a response header of the reference cache, and a difference portion.
  • Step 07 If the response body of the real-time cache is content-length, then transform it into a chunk transmission.
  • Step 08 The response header and the difference part of the reference cache are both coded by chunk transmission.
  • Step 09 The delimiter of the real-time cache and the reference cache adopts the ";" of the chunk standard delimiter.
  • Step 10 The response header and the difference portion of the reference cache are indicated by the header and body delimiter " ⁇ r ⁇ n ⁇ r ⁇ n" of the HTTP protocol standard.
  • a method embodiment of a method of differential data transmission is provided, it being noted that the steps illustrated in the flowchart of the figures may be performed in a computer system such as a set of computer executable instructions, Also, although logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
  • FIG. 7 is a schematic flowchart of a method for differential data transmission according to another embodiment of the present invention. As shown in FIG. 7, in a differential request end having a reference cache, the method includes the following steps:
  • Step S702 in the case that the differential processing module switch of the intermediate server is closed, the differential requesting end sends the data request information
  • Step S704 the differential requesting end receives the returned first data response information
  • Step S706 the differential requesting end parses the first data response information to obtain a real-time cache.
  • the differential requesting end in the case of the differential processing module switch of the intermediate server being turned off, to the differential response end. Sending data request information; and receiving the returned first data response information; finally, parsing the first data response information to obtain a real-time cache.
  • the method may further include: the difference requesting end receives the data request information sent by the intermediate server to the differential responding end, and the intermediate server in the embodiment of the present application passes the difference.
  • the processing module is closed, and only the role of forwarding the data request information sent by the differential requesting end is performed, so that the problem of prolonging the response time due to the intermediate server's request for data in the related art is solved.
  • the sending the data request information by the differential requesting end through the intermediate server may be a preferred embodiment of the embodiment of the present application.
  • the differential requesting end when the differential processing module switch of the intermediate server is closed, the differential requesting end sends data request information to the differential response end; and the differential requesting end receives the returned first data response information.
  • the differential requester parses the first data response information to obtain a real-time cache.
  • the purpose of saving limited buffer space is achieved, thereby achieving the technical effect of improving data processing efficiency, thereby solving the problem that the differential response end needs to store multiple different versions of the reference due to the different reference cache versions of the differential request segments in the related art.
  • the technical problem of caching which wastes limited cache space.
  • the method for the differential data transmission provided by the embodiment of the present application further includes:
  • Step1 The differential requesting end encapsulates the preset identifier into the data request information.
  • the preset identifier is encapsulated, so that the differential response end obtains the first data response information corresponding to the data request information by determining the preset identifier when parsing the data request information.
  • the preset identifier may be an If-None-Match header, and is used to indicate that the differential request end corresponding to the differential request is a differential request end with a reference cache.
  • step S706 the differential requesting end parses the first data response information, and obtaining the real-time cache includes:
  • Step1 The differential requesting end parses the first data response information to obtain a difference portion
  • Step 2 The differential requester calculates the difference portion and the pre-stored reference cache to obtain a real-time cache.
  • the differential decoding based on the HTTP response refers to recalculating the real-time cache according to the difference portion and the reference cache, so that the above-mentioned reference cache can be obtained.
  • the real-time cache can be obtained by the operation.
  • a method embodiment of a method of differential data transmission is provided, it being noted that the steps illustrated in the flowchart of the figures may be performed in a computer system such as a set of computer executable instructions, Also, although logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
  • FIG. 8 is a schematic flowchart of a method for differential data transmission according to still another embodiment of the present invention. As shown in FIG. 8, in a differential request end without a reference cache, the method includes the following steps:
  • Step S802 in the case that the differential processing module switch of the intermediate server is closed, the differential requesting end sends data request information to the differential response end;
  • Step S804 the differential requesting end receives the returned second data response information
  • Step S806 the differential requesting end parses the second data response information to obtain a real-time cache and a reference cache.
  • the differential requesting end in the case of the differential processing module switch of the intermediate server being turned off, to the differential response end. Sending data request information; and receiving the returned second data response information; finally, parsing the second data response information to obtain a real-time cache and a reference cache.
  • the method may further include: the difference requesting end receives the data request information sent by the intermediate server to the differential responding end, and the intermediate server in the embodiment of the present application passes the difference.
  • the processing module is closed, and only the role of forwarding the data request information sent by the differential requesting end is performed, so that the problem of prolonging the response time due to the intermediate server's request for data in the related art is solved.
  • the sending the data request information by the differential requesting end through the intermediate server may be a preferred embodiment of the embodiment of the present application.
  • the differential requesting end when the differential processing module switch of the intermediate server is closed, the differential requesting end sends data request information to the differential response end; and the differential requesting end receives the returned second data response information.
  • the differential requester parses the second data response information to obtain a real-time cache and a reference cache.
  • the purpose of saving limited buffer space is achieved, thereby achieving the technical effect of improving data processing efficiency, thereby solving the problem that the differential response end needs to store multiple different versions of the reference due to the different reference cache versions of the differential request segments in the related art.
  • the technical problem of caching which wastes limited cache space.
  • step S806 the differential requesting end parses the second data response information, and obtaining the real-time cache and the reference cache includes:
  • Step1 The differential requesting end parses the second data response information to obtain a real-time cache and a difference portion;
  • Step 2 the differential requester calculates the difference portion and the real-time cache to obtain a reference cache.
  • the differential decoding of the response refers to recalculating the real-time cache according to the difference part and the reference buffer, so that the above-mentioned real-time cache and difference parts can be obtained, and the reference cache can be obtained by operation.
  • FIG. 9 is a schematic structural diagram of an apparatus for differential data transmission according to an embodiment of the present invention. As shown in FIG. 9, at a differential response end, the apparatus includes: a receiving module 92, a first parsing module 94, a first judging module 96, and a a feedback module 98 and a second feedback module 99, wherein
  • the receiving module 92 is configured to receive data request information if the differential processing module switch of the intermediate server is closed;
  • the first parsing module 94 is configured to parse the data request information to obtain a category of the data request information, where the category of the data request information includes: a differential request and a non-differential request;
  • the first determining module 96 is configured to determine, when the data request information is a differential request, whether the difference request carries a preset identifier;
  • the first feedback module 98 is configured to: when the determination result is yes, return a first data response information, where the first data response information is used to indicate a difference portion between the reference cache and the real-time cache;
  • the second feedback module 99 is configured to: when the determination result is no, return a second data response information, where the second data response information is used to indicate a difference between the real-time cache and the real-time cache and the reference cache.
  • the differential response terminal receives the data request information when the differential processing module switch of the intermediate server is closed, and the differential response terminal parses the data request information to obtain the type of the data request information.
  • the data request information includes: a differential request and a non-differential request; when the data request information is a differential request, the differential response end determines whether the difference request carries a preset identifier; if the determination result is yes, the differential response end returns The first data response information is used to indicate a difference portion between the reference cache and the real-time cache; if the determination result is negative, the differential response end returns the second data response information, and the second data response information is used to indicate The difference between the real-time cache and the real-time cache and the benchmark cache.
  • the purpose of saving limited buffer space is achieved, thereby achieving the technical effect of improving data processing efficiency, thereby solving the problem that the differential response end needs to store multiple different versions of the reference due to the different reference cache versions of the differential request segments in the related art.
  • the technical problem of caching which wastes limited cache space.
  • the first parsing module 94 includes:
  • a determining unit configured to determine whether the data frame format in the data request information carries the first identifier
  • a first parsing unit configured to: when the determination result is yes, the data request information is a difference request;
  • a second parsing unit configured to: when the determination result is negative, the data request information is a non-differential request
  • the first identifier is packet header information in a hypertext transfer protocol data frame.
  • a preset identifier is used to indicate whether the differential request is a differential request with a reference cache.
  • the first feedback module 98 includes:
  • a first obtaining unit configured to acquire a real-time cache
  • a parsing unit configured to obtain a differential request as a reference cache difference request according to the judgment result
  • a first determining unit configured to determine whether the preset identifier is the same as the pre-stored identifier
  • a first data processing unit configured to: when the preset identifier is the same as the pre-stored identifier, calculate the pre-selected stored reference cache and the real-time cache to obtain a difference portion;
  • a first encapsulating unit configured to encapsulate the difference part and the first response identifier to the first data response information, where the first response identifier is used to indicate that the response is a differential response;
  • a first feedback unit configured to return first data response information
  • the second data processing unit is configured to return the second data response information when the preset identifier is different from the pre-stored identifier.
  • the second feedback module 99 includes:
  • a second obtaining unit configured to acquire a real-time cache
  • a third data processing unit configured to calculate a pre-selected stored reference cache and a real-time cache to obtain a difference portion
  • a second encapsulating unit configured to encapsulate the real-time cache, the difference portion, and the first response identifier to the second data response information, where the first response identifier is used to indicate that the response is a differential response;
  • the second feedback unit is configured to return the second data response information.
  • the apparatus for differential data transmission provided by the embodiment of the present application further includes:
  • a second determining module configured to determine whether a time interval between the differential request sent from the differential requesting end and the real-time buffer corresponding to the adjacent differential request stored at the differential responding end is greater than a preset period
  • a third feedback module configured to return a third data response message when the determination result is no, the third number According to the response information, used to indicate a difference between the real-time cache and the reference cache;
  • a fourth feedback module configured to return the first data response information or the second data response information if the determination result is yes.
  • the apparatus for differential data transmission provided by the embodiment of the present application further includes:
  • a fifth feedback module configured to: when the data request information is a non-differential request, return a corresponding non-differential response according to the non-differential request, where the non-differential response carries a second response identifier, and the second response identifier is used to indicate the response normal.
  • FIG. 10 is a schematic structural diagram of an apparatus for differential data transmission according to an embodiment of the present invention.
  • the apparatus in a differential request end having a reference cache, the apparatus includes: a sending module 1002, a receiving module 1004, and a parsing module 1006. ,among them,
  • the sending module 1002 is configured to send data request information to the differential response end when the differential processing module switch of the intermediate server is closed.
  • the receiving module 1004 is configured to receive the returned first data response information.
  • the parsing module 1006 is configured to parse the first data response information to obtain a real-time cache.
  • the differential requesting end when the differential processing module switch of the intermediate server is closed, the differential requesting end sends data request information to the differential response end; and the differential requesting end receives the returned first data response information.
  • the differential requester parses the first data response information to obtain a real-time cache.
  • the purpose of saving limited buffer space is achieved, thereby achieving the technical effect of improving data processing efficiency, thereby solving the problem that the differential response end needs to store multiple different versions of the reference due to the different reference cache versions of the differential request segments in the related art.
  • the technical problem of caching which wastes limited cache space.
  • the apparatus for differential data transmission provided by the embodiment of the present application further includes:
  • the encapsulating module is configured to encapsulate the preset identifier to the data request information before sending the data request information to the differential response end.
  • the parsing module 1006 includes:
  • a parsing unit configured to parse the first data response information to obtain a difference portion
  • a calculation unit is configured to calculate the difference portion and the pre-stored reference cache to obtain a real-time cache.
  • FIG. 11 is a schematic structural diagram of another apparatus for differential data transmission according to an embodiment of the present invention.
  • the apparatus in a differential request end without a reference cache, the apparatus includes: a sending module 1102, a receiving module 1104, and a parsing module. 1106, wherein
  • the sending module 1102 is configured to send data request information to the differential response end when the differential processing module switch of the intermediate server is closed.
  • the receiving module 1104 is configured to receive the returned second data response information.
  • the parsing module 1106 is configured to parse the second data response information to obtain a real-time cache and a reference cache.
  • the differential requesting end when the differential processing module switch of the intermediate server is closed, the differential requesting end sends data request information to the differential response end; and the differential requesting end receives the returned second data response information.
  • the differential requester parses the second data response information to obtain a real-time cache and a reference cache.
  • the purpose of saving limited buffer space is achieved, thereby achieving the technical effect of improving data processing efficiency, thereby solving the problem that the differential response end needs to store multiple different versions of the reference due to the different reference cache versions of the differential request segments in the related art.
  • the technical problem of caching which wastes limited cache space.
  • the parsing module 1106 includes:
  • a parsing unit configured to parse the second data response information to obtain a real-time cache and a difference portion
  • a calculation unit for calculating the difference portion and the real-time cache to obtain a reference cache is a calculation unit for calculating the difference portion and the real-time cache to obtain a reference cache.
  • the system includes: a differential requesting end 1202, an intermediate server 1204, and a differential responding end 1206, a differential requesting end 1202, and an intermediate server 1204. Communicating with the differential response terminal 1206, wherein
  • the intermediate server 1204 is configured with a differential processing module switch
  • the differential requesting end 1202 is a device for differential data transmission shown in FIG. 10 or FIG. 11;
  • the differential response terminal 1204 is a device for differential data transmission as shown in FIG.
  • the differential response end receives the data request information when the differential processing module switch of the intermediate server is closed, and the differential response end parses the data request information.
  • the category of the data request information includes: a differential request and a non-differential request; when the data request information is a differential request, the differential response end determines whether the difference request carries the preset identifier; In the case that the differential response end returns the first data response information, the first data response information is used to indicate the difference between the reference cache and the real-time cache; if the determination result is no, the differential response end returns the second data response information,
  • the two data response information is used to indicate the difference between the real-time cache and the real-time cache and the reference cache.
  • the purpose of saving limited buffer space is achieved, thereby achieving the technical effect of improving data processing efficiency, thereby solving the problem that the differential response end needs to store multiple different versions of the reference due to the different reference cache versions of the differential request segments in the related art.
  • the technical problem of caching which wastes limited cache space.
  • the disclosed technical contents may be implemented in other manners.
  • the device embodiments described above are only schematic.
  • the division of the unit may be a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, A variety of media that can store program code, such as a disk or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种差分数据传输的方法、装置及系统。其中,该方法包括:在中间服务器的差分处理模块开关关闭的情况下,差分响应端接收数据请求信息;差分响应端解析数据请求信息,得到数据请求信息的类别;当数据请求信息为差分请求时,差分响应端判断差分请求是否携带预设标识;在判断结果为是的情况下,差分响应端返回第一数据响应信息;在判断结果为否的情况下,差分响应端返回第二数据响应信息。本发明解决了由于相关技术中差分请求段的基准缓存版本不一,导致差分响应端需要存储多份不同版本的基准缓存,从而浪费有限的缓存空间的技术问题。

Description

差分数据传输的方法、装置及系统 技术领域
本发明涉及互联网应用技术领域,具体而言,涉及一种差分数据传输的方法、装置及系统。
背景技术
差分编码是一个消除信息的冗余度,广泛应用在通信和存储领域上。诸如常见的运动图像专家组合格式-1(Moving Picture Expert Group,简称MPEG-1)算法通过提取和邻近帧的差异部分,减小存储空间成本。而差分编码思想也应用在超文本传输协议(Hyper Text Transfer Protocol,简称HTTP)领域。RFC3229正是这个领域的权威规范,它利用HTTP协议的缓存特性,设计网络架构,实现了差分编码。
差分编码一般应用在动态页面。动态页面有两个特征:1、页面内容经常变化;2、变化幅度通常不是很大,相对于页面自身的大小,差异比例很小。但在传统的内容分发(Content Delivery Network,简称CDN)网络中(指的是无任何对动态页面进行缓存措施的网络),动态页面往往是不能进行缓存的。也就是说客户源站的动态页面经过CDN网络没有得到任何的加速措施。必须重新传输整个页面。按照差分前后的响应大小比例计算,如果没有部署差分编码网络架构,必须传输100%的内容大小。如果部署了差分编码架构,只传输差异的部分(可能20%以下或者更小)。这大大减少了网络的传输量。
但是RFC3229在首次差分请求如何得到实时响应、CDN网络上该如何部署差分编码等问题上,并没有解决问题。HTTP响应的差分解码指的是根据差异部分和基准缓存重新计算出实时缓存。差分响应端完成差分编码,发送差异部分给请求端。请求端收到差异部分,完成差分解码。图1是相关技术中差分响应端对基准缓存的管理示意图,如图1所示,因为不同的差分请求端有不同的基准缓存,或者不同时间点同一个差分请求端的基准缓存也有可能不同,所以差分响应端为了和差分请求端的基准缓存版本一致,差分响应端需要缓存多份不同版本的基准缓存。所以会极大浪费有限的缓存空间。
针对上述由于相关技术中差分请求段的基准缓存版本不一,导致差分响应端需要存储多份不同版本的基准缓存,从而浪费有限的缓存空间的问题,目前尚未提出有效的解决方案。
发明内容
本发明实施例提供了一种差分数据传输的方法、装置及系统,以至少解决由于相关技术中差分请求段的基准缓存版本不一,导致差分响应端需要存储多份不同版本的基准缓存,从而浪费有限的缓存空间的技术问题。
根据本发明实施例的一个方面,提供了一种差分数据传输的方法,包括:在中间服务器的差分处理模块开关关闭的情况下,差分响应端接收数据请求信息;差分响应端解析数据请求信息,得到数据请求信息的类别,其中,数据请求信息的类别包括:差分请求和非差分请求;当数据请求信息为差分请求时,差分响应端判断差分请求是否携带预设标识;在判断结果为是的情况下,差分响应端返回第一数据响应信息,第一数据响应信息用于指示基准缓存和实时缓存的差异部分;在判断结果为否的情况下,差分响应端返回第二数据响应信息,第二数据响应信息用于指示实时缓存和实时缓存与基准缓存的差异部分。
根据本发明实施例的一个方面,提供了另一种差分数据传输的方法,包括:在中间服务器的差分处理模块开关关闭的情况下,差分请求端向差分响应端发送数据请求信息;差分请求端接收返回的第一数据响应信息;差分请求端解析第一数据响应信息,得到实时缓存。
根据本发明实施例的一个方面,提供了又一种差分数据传输的方法,包括:在中间服务器的差分处理模块开关关闭的情况下,差分请求端向差分响应端发送数据请求信息;差分请求端接收返回的第二数据响应信息;差分请求端解析第二数据响应信息,得到实时缓存和基准缓存。
根据本发明实施例的另一方面,还提供了一种差分数据传输的装置,包括:接收模块,用于在中间服务器的差分处理模块开关关闭的情况下,接收数据请求信息;第一解析模块,用于解析数据请求信息,得到数据请求信息的类别,其中,数据请求信息的类别包括:差分请求和非差分请求;第一判断模块,用于当数据请求信息为差分请求时,判断差分请求是否携带预设标识;第一反馈模块,用于在判断结果为是的情况下,返回第一数据响应信息,第一数据响应信息,用于指示基准缓存和实时缓存的差异部分;第二反馈模块,用于在判断结果为否的情况下,返回第二数据响应信息,第二数据响应信息,用于指示实时缓存和实时缓存与基准缓存的差异部分。
根据本发明实施例的另一方面,还提供了另一种差分数据传输的装置,包括:发送模块,用于在中间服务器的差分处理模块开关关闭的情况下,向差分响应端发送数 据请求信息;接收模块,用于接收返回的第一数据响应信息;解析模块,用于解析第一数据响应信息,得到实时缓存。
根据本发明实施例的另一方面,还提供了又一种差分数据传输的装置,包括:发送模块,用于在中间服务器的差分处理模块开关关闭的情况下,向差分响应端发送数据请求信息;接收模块,用于接收返回的第二数据响应信息;解析模块,用于解析第二数据响应信息,得到实时缓存和基准缓存。
根据本发明实施例的又一方面,还提供了一种差分数据传输的系统,包括:差分请求端、中间服务器和差分响应端,差分请求端、中间服务器和差分响应端通信连接,其中,中间服务器配置有差分处理模块开关;差分请求端为上述差分数据传输的装置;差分响应端为上述差分数据传输的装置。
在本发明实施例中,通过在中间服务器的差分处理模块开关关闭的情况下,差分响应端接收数据请求信息;差分响应端解析数据请求信息,得到数据请求信息的类别,其中,数据请求信息的类别包括:差分请求和非差分请求;当数据请求信息为差分请求时,差分响应端判断差分请求是否携带预设标识;在判断结果为是的情况下,差分响应端返回第一数据响应信息,第一数据响应信息用于指示基准缓存和实时缓存的差异部分;在判断结果为否的情况下,差分响应端返回第二数据响应信息,第二数据响应信息用于指示实时缓存和实时缓存与基准缓存的差异部分。达到了节约有限的缓存空间的目的,从而实现了提升数据处理效率的技术效果,进而解决了由于相关技术中差分请求段的基准缓存版本不一,导致差分响应端需要存储多份不同版本的基准缓存,从而浪费有限的缓存空间的技术问题。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是相关技术中差分响应端对基准缓存的管理示意图;
图2是根据本发明实施例的差分数据传输的方法的流程示意图;
图3是根据本发明实施例的一种差分数据传输的方法的流程示意图;
图4是根据本发明实施例的有基准缓存的差分数据传输的方法的流程示意图;
图5是根据本发明实施例的无基准缓存的差分数据传输的方法的流程示意图;
图6是根据本发明实施例的差分数据传输的方法中数据帧结构的结构示意图;
图7是根据本发明另一实施例的差分数据传输的方法的流程示意图;
图8是根据本发明又一实施例的差分数据传输的方法的流程示意图;
图9是根据本发明实施例的差分数据传输的装置的结构示意图;
图10是根据本发明实施例的一种差分数据传输的装置的结构示意图;
图11是根据本发明实施例的另一种差分数据传输的装置的结构示意图;
图12是根据本发明实施例的差分数据传输的系统的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
实施例一
根据本发明实施例,提供了一种差分数据传输的方法的方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
图2是根据本发明实施例的差分数据传输的方法的流程示意图,如图2所示,在 差分响应端,该方法包括如下步骤:
步骤S202,在中间服务器的差分处理模块开关关闭的情况下,差分响应端接收数据请求信息;
步骤S204,差分响应端解析数据请求信息,得到数据请求信息的类别,其中,数据请求信息的类别包括:差分请求和非差分请求;
步骤S206,当数据请求信息为差分请求时,差分响应端判断差分请求是否携带预设标识;
步骤S208,在判断结果为是的情况下,差分响应端返回第一数据响应信息,第一数据响应信息,用于指示基准缓存和实时缓存的差异部分;
步骤S210,在判断结果为否的情况下,差分响应端返回第二数据响应信息,第二数据响应信息,用于指示实时缓存和实时缓存与基准缓存的差异部分。
本申请实施例提供的差分数据传输的方法可以适用于超文本传输协议(Hyper Text Transfer Protocol,简称HTTP)领域中的内容分发网络(Content Delivery Network,简称CDN)的页面数据处理上,特别是通过差分编码解决相关技术中由于差分请求端的基准缓存版本不一,导致差分响应端需要存储多份不同版本的基准缓存,从而浪费有限的缓存空间的问题。
具体的,结合步骤S202至步骤S210,在差分响应端,差分响应端接收由差分请求端发送的数据请求信息,差分响应端通过解析该数据请求信息,得到该数据请求信息的类型,并依据该数据请求信息的类型分别进行数据处理,当该数据请求信息为差分请求时,差分响应端通过解析该差分请求的报文头,判断该差分请求是否携带预设标识,当判断结果为是时(即,差分请求携带有预设标识的情况下),通过中间服务器向差分请求端返回第一数据响应信息;当判断结果为否时(即,差分请求未携带有预设标识的情况下),通过中间服务器向差分请求端返回第二数据响应信息;并且,当该数据请求信息为非差分请求时,差分响应端将依据非差分请求返回非差分响应。在本申请实施例提供的差分数据传输的方法中,图3是根据本发明实施例的一种差分数据传输的方法的流程示意图,如图3所示,还可以包括:差分响应端接收由中间服务器转发的由差分请求端发送的数据请求信息,区别于相关技术,本申请实施例中的中间服务器通过差分处理模块的关闭,仅执行转发差分请求端发送的数据请求信息的角色,以使得解决了相关技术中由于中间服务器对数据请求信息,延长了响应时间的问题。其中,差分响应端通过中间服务器接收差分请求端发送的数据请求信息可以为本申请实施例的优选实施方式。
这里差分响应端通过判断该差分请求是否携带预设标识,判断该差分请求端是否有基准缓存,且依据该预设标识可以查询获取差分请求端的基准缓存是否与差分响应端的基准缓存版本一致,当版本一致时,差分响应端通过实时缓存和基准缓存计算得到差异部分,并通过反馈差异部分至差分请求端(即,返回第一数据响应信息),以使得差分请求端依据该差异部分,通过与基准缓存进行计算得到实时缓存;
但是当该差分请求未携带该预设标识或该预设标识与差分响应端的预设标识不一致时,差分响应端将该差分请求端视为无基准缓存或基准缓存版本不一致,进而通过差分响应端的基准缓存和实时缓存得到两者之间的差异部分,从而在反馈第二数据响应信息时,将实时缓存和差异部分返回至差分请求端(即,返回第二数据响应信息),以使得差分请求端依据该实时缓存和差异部分计算得到基准缓存。
本申请实施例提供的差分数据传输的方法基于HTTP响应的差分解码指的是根据差异部分和基准缓存重新计算出实时缓存,从而可以得到上述在具备实时缓存和差异部分的情况下,通过运算可以得到基准缓存,或,实时缓存与基准缓存通过计算比较得到差异部分。
需要说明的是,本申请实施例提供的差分数据传输的方法在解决由于差分请求端的基准缓存版本不一,导致差分响应端需要存储多份不同版本的基准缓存,从而浪费有限的缓存空间的问题的过程中,基于在差分请求端和差分响应端只保存一份基准缓存。差分请求端通过HTTP协议的请求头If-None-Match(即,步骤S106中的预设标识)指示差分响应端该差分请求端的基准缓存的版本。如果差分请求端和差分响应端的基准缓存不一致,差分响应端会通过第二数据响应信息告诉差分请求端需要同步基准缓存。这样能保证CDN网络中所有的节点都使用相同版本的基准缓存,从而实现了提升数据处理效率的技术效果。
此外,本申请实施例提供的步骤S202中在中间服务器的差分处理模块开关关闭的情况下,通过设置差分处理模块开关,打开开关意味着开启差分编码和差分解码功能,关闭开关意味着是中间服务器,进行差分响应的透明传输。RFC3229通过设置226状态码不在中间服务器进行缓存。但是会有可能存在具备差分解码的中间服务器试图对其进行差分解码,那么真正的差分请求服务器就不能得到226差异部分。所以这里差分处理模块开关解决了这个问题,即,通过关闭差分处理模块开关,中间服务器的透明传输,避免了具备差分解码的中间服务器试图对其进行差分解码,从而导致整个数据处理过程中响应时间长的问题。
本发明实施例提供的差分数据传输的方法中,通过在中间服务器的差分处理模块开关关闭的情况下,差分响应端接收数据请求信息;差分响应端解析数据请求信息, 得到数据请求信息的类别,其中,数据请求信息的类别包括:差分请求和非差分请求;当数据请求信息为差分请求时,差分响应端判断差分请求是否携带预设标识;在判断结果为是的情况下,差分响应端返回第一数据响应信息,第一数据响应信息用于指示基准缓存和实时缓存的差异部分;在判断结果为否的情况下,差分响应端返回第二数据响应信息,第二数据响应信息用于指示实时缓存和实时缓存与基准缓存的差异部分。达到了节约有限的缓存空间的目的,从而实现了提升数据处理效率的技术效果,进而解决了由于相关技术中差分请求段的基准缓存版本不一,导致差分响应端需要存储多份不同版本的基准缓存,从而浪费有限的缓存空间的技术问题。
可选地,步骤S204中差分响应端解析数据请求信息,得到数据请求信息的类别包括:
Step1,差分响应端判断数据请求信息中的数据帧格式是否携带第一标识;
Step2,在判断结果为是的情况下,数据请求信息为差分请求;
Step3,在判断结果为否的情况下,数据请求信息为非差分请求;
其中,第一标识为超文本传输协议数据帧中的报文头信息。
具体的,结合步骤S204中的Step1至Step3,步骤S204提供了辨析数据请求信息类型的方法,当差分响应端接收中间服务器转发的数据请求信息时,通过解析该数据请求信息中的数据帧格式,并判断该数据帧格式是否携带第一标识,当携带有该第一标识时,判断该数据请求为差分请求;相反,即,在该数据帧格式中若没有携带该第一标识,则判断该数据请求为非差分请求。
这里本申请实施例中提供的第一标识可以为HTTP数据帧中的一个A-IM标识,当差分响应端解析数据请求信息时,通过判断该数据请求信息中的数据帧格式是否携带A-IM标识判断该数据请求信息的类型。
本申请实施例提供的第一标识仅以A-IM标识为例进行说明,以实现本发明实施例提供的差分数据传输的方法为准,具体不做限定。
可选地,预设标识,用于指示差分请求是否为有基准缓存的差分请求。
这里本申请实施例以RFC3229规定设置一个预设标识,即,If-None-Match头为例,当差分请求携带该If-None-Match头时,表明该差分请求对应的差分请求端为有基准缓存的差分请求端,反之,即,当差分请求未携带该If-None-Match头时,表明该差分请求对应的差分请求端为无基准缓存的差分请求端,或,该If-None-Match头无法在差分响应端得到对应匹配时,将判断该差分请求对应的差分请求端为无基准缓存的差 分请求端。
可选地,步骤S208中差分响应端返回第一数据响应信息包括:
Step1,差分响应端获取实时缓存;
Step2,差分响应端依据判断结果,得到差分请求为有基准缓存差分请求;
Step3,差分响应端判断预设标识是否与预先存储的标识相同;
Step4,当预设标识与预先存储的标识相同时,差分响应端将预选存储的基准缓存和实时缓存进行计算,得到差异部分;
Step5,差分响应端将差异部分和第一响应标识符封装至第一数据响应信息,第一响应标示符用于指示第一数据响应信息为有基准缓存的差分响应;
Step6,差分响应端返回第一数据响应信息;
Step7,当预设标识与预先存储的标识不同时,差分响应端返回第二数据响应信息。
具体的,由步骤S202至步骤S210可知,差分响应端通过中间服务器进行数据交互为本申请实施例的一个优选方案,其中,图4是根据本发明实施例的有基准缓存的差分数据传输的方法的流程示意图,如图4所示,基于上述,当差分响应端判断该差分请求携带有预设标识时,差分响应端,通过基准缓存和最新实时缓存的比较和计算,得到两者的差异部分,进而通过封装该差异部分至第一数据响应信息,并由中间服务器将该第一数据响应信息返回至差分请求端。这里第一响应标识符用于指示该第一数据响应信息为有基准缓存的差分响应,状态码可以设置为226。
这里为解决差分请求端存在多个版本基准缓存的问题,本申请实施例设置差分请求端和差分响应端只保存一份基准缓存,当差分响应端判断差分请求中的预设标识是否与差分响应端存储的标识是否相同是,在判断结果为相同的情况下,认证该差分请求对应的差分请求端与该差分响应端的基准缓存版本一致;反之,即,在判断结果为不同的情况下,认证该差分请求对应的差分请求端与该差分响应端的基准缓存版本不一致,这样差分响应端将依据自身基准缓存和实时缓存计算比较得到差异部分,并将该差异部分和实时缓存进行封装,封装为第二数据响应信息通过中间服务器返回差分请求端。
结合图4所示,这里基于有基准缓存,处理差分请求的流程:首先,差分请求端在有基准缓存的情况下,发送差分请求;其次,中间服务器对差分请求不做任何处理;第三,差分响应端收到中间服务器的差分请求,通过基准缓存和最新实时缓存的比较 和计算,得到两者的差异部分;第四,差分响应端响应差异部分,状态码是226;第五,中间服务端对收到的差分响应,不解码处理也不缓存;第六,差分请求端收到中间服务器转发的差分响应;最后,差分请求端根据差异和基准缓存,计算生成实时缓存。
可选地,步骤S210中差分响应端返回第二数据响应信息包括:
Step1,差分响应端获取实时缓存;
Step2,差分响应端将预选存储的基准缓存和实时缓存进行计算,得到差异部分;
Step3,差分响应端将实时缓存、差异部分和第二响应标识符封装至第二数据响应信息,第二响应标识符用于指示第二数据响应信息为无基准缓存的差分响应;
Step4,差分响应端返回第二数据响应信息。
具体的,图5是根据本发明实施例的无基准缓存的差分数据传输的方法的流程示意图,如图5所示,基于上述,当差分响应端判断该差分请求未携带有预设标识时,差分响应端,通过基准缓存和实时缓存的比较和计算,得到两者的差异部分,进而通过封装该实时缓存和差异部分至第二数据响应信息,并由中间服务器将该第二数据响应信息返回至差分请求端。这里第二响应标识符用于指示该第二数据响应信息为差分响应,状态码可以设置为200。
此外,该预设标识无法在差分响应端得到对应匹配时,将判断该差分请求对应的差分请求端为无基准缓存的差分请求端,将执行上述步骤210中的Step1至Step4。
当差分请求端没有基准缓存,它发出首次差分请求就没有带If-None-Match头,RFC3229规定响应端响应给客户端的是基准缓存。所以这就有个弊端,对于首次请求不能得到实时缓存。本申请实施例设计了首次数据响应信息应该包括有实时缓存和差异部分。实时缓存可以响应给浏览器,而差分请求端的基准缓存也可通过实时缓存和差异部分计算出来。
结合图5所示,这里基于无基准缓存,处理差分请求的流程:首先,在首次请求,差分请求端无基准缓存的情况下,发出差分请求;其次,中间服务器对差分请求不做任何处理;第三,差分响应端收到中间服务器的差分请求,通过基准缓存和实时缓存的比较和计算,得到两者的差异部分;第四,差分响应端在一个响应中发送差异部分和实时缓存,具体的协议改造下面会有说明;第五,中间服务端对收到的改造HTTP响应不进行差分解码处理也不缓存;第六,差分请求端收到中间服务器转发的响应包(即,第二数据响应信息);最后,差分请求端得到实时缓存,并利用实时缓存和差异部分,计算生成基准缓存。
此处需要说明的是,在步骤S208中,当差分响应端判断差分请求中携带的预设标识与该差分响应端预先存储的标识不同时,说明该差分请求端与差分响应端存储的基准缓存版本不同,因此将执行上述步骤S210中的Step1至Step4,通过中间服务器返回第二数据响应信息至差分请求端。
可选地,本申请实施例提供的差分数据传输的方法还包括:
步骤S211,差分响应端判断从差分请求端发送的差分请求与差分响应端存储的相邻差分请求对应的实时缓存之间的时间区间是否大于预设周期;
步骤S213,在判断结果为否的情况下,差分响应端返回第三数据响应信息,第三数据响应信息,用于指示实时缓存与基准缓存之间的差异部分;
步骤S214,在判断结果为是的情况下,差分响应端返回第一数据响应信息或第二数据响应信息。
相关技术在对动态页面进行数据处理的过程中,由于动态页面在一段时间内可能也不会变化。所以对于每次差分请求,差分响应端都会根据实时缓存(一段时间内无变化)和基准缓存计算出差异部分。这样浪费CPU计算时间,同时也减慢HTTP响应速度,并且,相关技术中的中间服务器在桥接差分响应端和差分请求端时,会对接收到的数据信息(数据请求信息或数据响应信息)作数据解析处理,从而将进一步减慢HTTP的响应速度。但是,结合步骤S211至步骤S214本申请实施例提供的差分数据传输的方法,本申请实施例通过设置差异部分的有效期,它的有效期等同于实时缓存的有效期。那么在缓存有效期内(即,本申请实施例中的预设周期),对于差分请求,只需要从缓存中直接响应差异部分即可。这样不需要额外的CPU计算时间,提高了HTTP响应速度。
并且当判断结果为是的情况下,可以遵循步骤S202至步骤S210的方法进行差分响应反馈,即,反馈第一数据响应信息或第二数据响应信息。
可选地,本申请实施例提供的差分数据传输的方法还包括:
步骤S207,当数据请求信息为非差分请求时,差分响应端依据非差分请求返回对应的非差分响应,其中,非差分响应携带第二响应标识符,第二响应标识符,用于指示响应正常。
这里第二响应标识符用于指示该响应为正常响应,状态码可以设置为200。
综上,结合图6,图6是根据本发明实施例的差分数据传输的方法中数据帧结构的结构示意图;如图6所示,HTTP帧的改造如下:
步骤01:根据RFC3229和HTTP协议的格式,标示差分请求和非差分请求的方法是判断请求头是否有A-IM:delta头。
步骤02:根据RFC3229和HTTP协议的格式,标示差分响应和非差分响应的方法是判断请求头是否有IM头。
步骤03:标示响应是差分响应还是改造的HTTP响应的方法,是通过判断IM的值,如果值是delta,说明是差分响应;如果值是delta,new,说明是改造的HTTP响应,它包含差异部分和实时缓存。
步骤04:改造HTTP关键点有,统一采用chunk传输编码。
步骤05:HTTP头采用实时缓存的HTTP头。
步骤06:HTTP响应体包括实时缓存的响应体,基准缓存的响应头,差异部分。
步骤07:如果实时缓存的响应体是content-length,那么把它改造成chunk传输。
步骤08:基准缓存的响应头和差异部分都采用chunk传输编码。
步骤09:实时缓存和基准缓存的分界符采用chunk标准的分界符的“;”。
步骤10:基准缓存的响应头和差异部分是由HTTP协议标准的头和体的分界符“\r\n\r\n”进行标示。
实施例二
根据本发明实施例,提供了一种差分数据传输的方法的方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
图7是根据本发明另一实施例的差分数据传输的方法的流程示意图,如图7所示,在有基准缓存的差分请求端,该方法包括如下步骤:
步骤S702,在中间服务器的差分处理模块开关关闭的情况下,差分请求端发送数据请求信息;
步骤S704,差分请求端接收返回的第一数据响应信息;
步骤S706,差分请求端解析第一数据响应信息,得到实时缓存。
具体的,结合步骤S702至步骤S706,对应图2和图4所示的实施例,在有基准缓存的情况下,差分请求端在中间服务器的差分处理模块开关关闭的情况下,向差分响应端发送数据请求信息;并接收返回的第一数据响应信息;最后,解析第一数据响应信息,得到实时缓存。在本申请实施例提供的差分数据传输的方法中,还可以包括:差分请求端接收通过中间服务器向差分响应端发送的数据请求信息,区别于相关技术,本申请实施例中的中间服务器通过差分处理模块的关闭,仅执行转发差分请求端发送的数据请求信息的角色,以使得解决了相关技术中由于中间服务器对数据请求信息,延长了响应时间的问题。其中,差分请求端通过中间服务器发送数据请求信息可以为本申请实施例的优选实施方式。
本发明实施例提供的差分数据传输的方法中,通过在中间服务器的差分处理模块开关关闭的情况下,差分请求端向差分响应端发送数据请求信息;差分请求端接收返回的第一数据响应信息;差分请求端解析第一数据响应信息,得到实时缓存。达到了节约有限的缓存空间的目的,从而实现了提升数据处理效率的技术效果,进而解决了由于相关技术中差分请求段的基准缓存版本不一,导致差分响应端需要存储多份不同版本的基准缓存,从而浪费有限的缓存空间的技术问题。
可选的,在步骤S702中差分请求端向差分响应端发送数据请求信息之前,本申请实施例提供的差分数据传输的方法还包括:
Step1,差分请求端将预设标识封装至数据请求信息。
这里通过封装预设标识,以使得差分响应端在解析该数据请求信息时,通过判断该预设标识,得到数据请求信息对应的第一数据响应信息。其中,该预设标识可以为If-None-Match头,用于表明该差分请求对应的差分请求端为有基准缓存的差分请求端。
可选的,步骤S706中差分请求端解析第一数据响应信息,得到实时缓存包括:
Step1,差分请求端解析第一数据响应信息,得到差异部分;
Step2,差分请求端将差异部分和预先存储的基准缓存进行计算,得到实时缓存。
对应图2和图4对应的实施例,结合步骤S706中的Step1和Step2,基于HTTP响应的差分解码指的是根据差异部分和基准缓存重新计算出实时缓存,从而可以得到上述在具备基准缓存和差异部分的情况下,通过运算可以得到实时缓存。
实施例三
根据本发明实施例,提供了一种差分数据传输的方法的方法实施例,需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。
图8是根据本发明又一实施例的差分数据传输的方法的流程示意图,如图8所示,在无基准缓存的差分请求端,该方法包括如下步骤:
步骤S802,在中间服务器的差分处理模块开关关闭的情况下,差分请求端向差分响应端发送数据请求信息;
步骤S804,差分请求端接收返回的第二数据响应信息;
步骤S806,差分请求端解析第二数据响应信息,得到实时缓存和基准缓存。
具体的,结合步骤S802至步骤S806,对应图2和图4所示的实施例,在无基准缓存的情况下,差分请求端在中间服务器的差分处理模块开关关闭的情况下,向差分响应端发送数据请求信息;并接收返回的第二数据响应信息;最后,解析第二数据响应信息,得到实时缓存和基准缓存。在本申请实施例提供的差分数据传输的方法中,还可以包括:差分请求端接收通过中间服务器向差分响应端发送的数据请求信息,区别于相关技术,本申请实施例中的中间服务器通过差分处理模块的关闭,仅执行转发差分请求端发送的数据请求信息的角色,以使得解决了相关技术中由于中间服务器对数据请求信息,延长了响应时间的问题。其中,差分请求端通过中间服务器发送数据请求信息可以为本申请实施例的优选实施方式。
本发明实施例提供的差分数据传输的方法中,通过在中间服务器的差分处理模块开关关闭的情况下,差分请求端向差分响应端发送数据请求信息;差分请求端接收返回的第二数据响应信息;差分请求端解析第二数据响应信息,得到实时缓存和基准缓存。达到了节约有限的缓存空间的目的,从而实现了提升数据处理效率的技术效果,进而解决了由于相关技术中差分请求段的基准缓存版本不一,导致差分响应端需要存储多份不同版本的基准缓存,从而浪费有限的缓存空间的技术问题。
可选的,步骤S806中差分请求端解析第二数据响应信息,得到实时缓存和基准缓存包括:
Step1,差分请求端解析第二数据响应信息,得到实时缓存和差异部分;
Step2,差分请求端将差异部分和实时缓存进行计算,得到基准缓存。
对应图2和图5对应的实施例,结合步骤S806中的Step1和Step2,基于HTTP 响应的差分解码指的是根据差异部分和基准缓存重新计算出实时缓存,从而可以得到上述在具备实时缓存和差异部分的情况下,通过运算可以得到基准缓存。
实施例四
图9是根据本发明实施例的差分数据传输的装置的结构示意图,如图9所示,在差分响应端,该装置包括:接收模块92、第一解析模块94、第一判断模块96、第一反馈模块98和第二反馈模块99,其中,
接收模块92,用于在中间服务器的差分处理模块开关关闭的情况下,接收数据请求信息;
第一解析模块94,用于解析数据请求信息,得到数据请求信息的类别,其中,数据请求信息的类别包括:差分请求和非差分请求;
第一判断模块96,用于当数据请求信息为差分请求时,判断差分请求是否携带预设标识;
第一反馈模块98,用于在判断结果为是的情况下,返回第一数据响应信息,第一数据响应信息,用于指示基准缓存和实时缓存的差异部分;
第二反馈模块99,用于在判断结果为否的情况下,返回第二数据响应信息,第二数据响应信息,用于指示实时缓存和实时缓存与基准缓存的差异部分。
本发明实施例提供的差分数据传输的装置中,通过在中间服务器的差分处理模块开关关闭的情况下,差分响应端接收数据请求信息;差分响应端解析数据请求信息,得到数据请求信息的类别,其中,数据请求信息的类别包括:差分请求和非差分请求;当数据请求信息为差分请求时,差分响应端判断差分请求是否携带预设标识;在判断结果为是的情况下,差分响应端返回第一数据响应信息,第一数据响应信息用于指示基准缓存和实时缓存的差异部分;在判断结果为否的情况下,差分响应端返回第二数据响应信息,第二数据响应信息用于指示实时缓存和实时缓存与基准缓存的差异部分。达到了节约有限的缓存空间的目的,从而实现了提升数据处理效率的技术效果,进而解决了由于相关技术中差分请求段的基准缓存版本不一,导致差分响应端需要存储多份不同版本的基准缓存,从而浪费有限的缓存空间的技术问题。
可选的,第一解析模块94包括:
判断单元,用于判断数据请求信息中的数据帧格式是否携带第一标识;
第一解析单元,用于在判断结果为是的情况下,数据请求信息为差分请求;
第二解析单元,用于在判断结果为否的情况下,数据请求信息为非差分请求;
其中,第一标识为超文本传输协议数据帧中的报文头信息。
可选的,预设标识,用于指示差分请求是否为有基准缓存的差分请求。
可选的,第一反馈模块98包括:
第一获取单元,用于获取实时缓存;
解析单元,用于依据判断结果,得到差分请求为有基准缓存差分请求;
第一判断单元,用于判断预设标识是否与预先存储的标识相同;
第一数据处理单元,用于当预设标识与预先存储的标识相同时,将预选存储的基准缓存和实时缓存进行计算,得到差异部分;
第一封装单元,用于将差异部分和第一响应标识符封装至第一数据响应信息,第一响应标识符用于指示响应为差分响应;
第一反馈单元,用于返回第一数据响应信息;
第二数据处理单元,用于当预设标识与预先存储的标识不同时,返回第二数据响应信息。
可选的,第二反馈模块99包括:
第二获取单元,用于获取实时缓存;
第三数据处理单元,用于将预选存储的基准缓存和实时缓存进行计算,得到差异部分;
第二封装单元,用于将实时缓存、差异部分和第一响应标识符封装至第二数据响应信息,第一响应标示符用于指示响应为差分响应;
第二反馈单元,用于返回第二数据响应信息。
可选的,本申请实施例提供的差分数据传输的装置还包括:
第二判断模块,用于判断从差分请求端发送的所述差分请求与在差分响应端存储的相邻差分请求对应的实时缓存之间的时间区间是否大于预设周期;
第三反馈模块,用于在判断结果为否的情况下,返回第三数据响应信息,第三数 据响应信息,用于指示实时缓存与基准缓存之间的差异部分;
第四反馈模块,用于在判断结果为是的情况下,返回第一数据响应信息或第二数据响应信息。
可选的,本申请实施例提供的差分数据传输的装置还包括:
第五反馈模块,用于当数据请求信息为非差分请求时,依据非差分请求返回对应的非差分响应,其中,非差分响应携带第二响应标识符,第二响应标识符,用于指示响应正常。
实施例五
图10是根据本发明实施例的一种差分数据传输的装置的结构示意图,如图10所示,在有基准缓存的差分请求端,该装置包括:发送模块1002、接收模块1004和解析模块1006,其中,
发送模块1002,用于在中间服务器的差分处理模块开关关闭的情况下,向差分响应端发送数据请求信息;
接收模块1004,用于接收返回的第一数据响应信息;
解析模块1006,用于解析第一数据响应信息,得到实时缓存。
本发明实施例提供的差分数据传输的装置中,通过在中间服务器的差分处理模块开关关闭的情况下,差分请求端向差分响应端发送数据请求信息;差分请求端接收返回的第一数据响应信息;差分请求端解析第一数据响应信息,得到实时缓存。达到了节约有限的缓存空间的目的,从而实现了提升数据处理效率的技术效果,进而解决了由于相关技术中差分请求段的基准缓存版本不一,导致差分响应端需要存储多份不同版本的基准缓存,从而浪费有限的缓存空间的技术问题。
可选的,本申请实施例提供的差分数据传输的装置还包括:
封装模块,用于在向差分响应端发送数据请求信息之前,将预设标识封装至数据请求信息。
可选的,解析模块1006包括:
解析单元,用于解析第一数据响应信息,得到差异部分;
计算单元,用于将差异部分和预先存储的基准缓存进行计算,得到实时缓存。
实施例六
图11是根据本发明实施例的另一种差分数据传输的装置的结构示意图,如图11所示,在无基准缓存的差分请求端,该装置包括:发送模块1102、接收模块1104和解析模块1106,其中,
发送模块1102,用于在中间服务器的差分处理模块开关关闭的情况下,向差分响应端发送数据请求信息;
接收模块1104,用于接收返回的第二数据响应信息;
解析模块1106,用于解析第二数据响应信息,得到实时缓存和基准缓存。
本发明实施例提供的差分数据传输的装置中,通过在中间服务器的差分处理模块开关关闭的情况下,差分请求端向差分响应端发送数据请求信息;差分请求端接收返回的第二数据响应信息;差分请求端解析第二数据响应信息,得到实时缓存和基准缓存。达到了节约有限的缓存空间的目的,从而实现了提升数据处理效率的技术效果,进而解决了由于相关技术中差分请求段的基准缓存版本不一,导致差分响应端需要存储多份不同版本的基准缓存,从而浪费有限的缓存空间的技术问题。
可选的,解析模块1106包括:
解析单元,用于解析第二数据响应信息,得到实时缓存和差异部分;
计算单元,用于将差异部分和实时缓存进行计算,得到基准缓存。
实施例七
图12是根据本发明实施例的差分数据传输的系统的结构示意图,如图12所示,该系统包括:差分请求端1202、中间服务器1204和差分响应端1206,差分请求端1202、中间服务器1204和差分响应端1206通信连接,其中,
中间服务器1204配置有差分处理模块开关;
差分请求端1202为图10或图11所示的差分数据传输的装置;
差分响应端1204为图9所示的差分数据传输的装置。
本发明实施例提供的差分数据传输的系统中,通过在中间服务器的差分处理模块开关关闭的情况下,差分响应端接收数据请求信息;差分响应端解析数据请求信息, 得到数据请求信息的类别,其中,数据请求信息的类别包括:差分请求和非差分请求;当数据请求信息为差分请求时,差分响应端判断差分请求是否携带预设标识;在判断结果为是的情况下,差分响应端返回第一数据响应信息,第一数据响应信息用于指示基准缓存和实时缓存的差异部分;在判断结果为否的情况下,差分响应端返回第二数据响应信息,第二数据响应信息用于指示实时缓存和实时缓存与基准缓存的差异部分。达到了节约有限的缓存空间的目的,从而实现了提升数据处理效率的技术效果,进而解决了由于相关技术中差分请求段的基准缓存版本不一,导致差分响应端需要存储多份不同版本的基准缓存,从而浪费有限的缓存空间的技术问题。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
在本发明的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的技术内容,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,可以为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、 磁碟或者光盘等各种可以存储程序代码的介质。
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。

Claims (23)

  1. 一种差分数据传输的方法,其特征在于,包括:
    在中间服务器的差分处理模块开关关闭的情况下,差分响应端接收数据请求信息;
    所述差分响应端解析所述数据请求信息,得到所述数据请求信息的类别,其中,所述数据请求信息的类别包括:差分请求和非差分请求;
    当所述数据请求信息为所述差分请求时,所述差分响应端判断所述差分请求是否携带预设标识;
    在判断结果为是的情况下,所述差分响应端返回第一数据响应信息,所述第一数据响应信息用于指示基准缓存和实时缓存的差异部分;
    在判断结果为否的情况下,所述差分响应端返回第二数据响应信息,所述第二数据响应信息用于指示实时缓存和所述实时缓存与基准缓存的差异部分。
  2. 根据权利要求1所述的方法,其特征在于,所述差分响应端解析所述数据请求信息,得到所述数据请求信息的类别包括:
    所述差分响应端判断所述数据请求信息中的数据帧格式是否携带第一标识;
    在判断结果为是的情况下,所述数据请求信息为所述差分请求;
    在判断结果为否的情况下,所述数据请求信息为所述非差分请求;
    其中,所述第一标识为超文本传输协议数据帧中的报文头信息。
  3. 根据权利要求1所述的方法,其特征在于,所述预设标识,用于指示所述差分请求是否为有基准缓存的差分请求。
  4. 根据权利要求3所述的方法,其特征在于,所述差分响应端返回第一数据响应信息包括:
    所述差分响应端获取所述实时缓存;
    所述差分响应端依据所述判断结果,得到所述差分请求为有基准缓存差分请求;
    所述差分响应端判断所述预设标识是否与预先存储的标识相同;
    当所述预设标识与预先存储的标识相同时,所述差分响应端将预选存储的基 准缓存和所述实时缓存进行计算,得到差异部分;
    所述差分响应端将所述差异部分和第一响应标识符封装至所述第一数据响应信息,所述第一响应标示符用于指示所述第一数据响应信息为有基准缓存的差分响应;
    所述差分响应端返回所述第一数据响应信息;
    当所述预设标识与预先存储的标识不同时,所述差分响应端返回第二数据响应信息。
  5. 根据权利要求1至4中任意一项所述的方法,其特征在于,所述所述差分响应端返回第二数据响应信息包括:
    所述差分响应端获取所述实时缓存;
    所述差分响应端将预选存储的基准缓存和所述实时缓存进行计算,得到差异部分;
    所述差分响应端将所述实时缓存、所述差异部分和第二响应标识符封装至所述第二数据响应信息,所述第二响应标识符用于指示所述第二数据响应信息为无基准缓存的差分响应;
    所述差分响应端返回所述第二数据响应信息。
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述差分响应端判断从差分请求端发送的所述差分请求与所述差分响应端存储的相邻差分请求对应的实时缓存之间的时间区间是否大于预设周期;
    在判断结果为否的情况下,所述差分响应端返回第三数据响应信息,所述第三数据响应信息,用于指示所述实时缓存与所述基准缓存之间的差异部分;
    在判断结果为是的情况下,所述差分响应端返回所述第一数据响应信息或所述第二数据响应信息。
  7. 一种差分数据传输的方法,其特征在于,包括:
    在中间服务器的差分处理模块开关关闭的情况下,差分请求端向差分响应端发送数据请求信息;
    所述差分请求端接收返回的第一数据响应信息;
    所述差分请求端解析所述第一数据响应信息,得到实时缓存。
  8. 根据权利要求7所述的方法,其特征在于,在所述差分请求端向差分响应端发送数据请求信息之前,所述方法还包括:
    所述差分请求端将预设标识封装至所述数据请求信息。
  9. 根据权利要求7所述的方法,其特征在于,所述差分请求端解析所述第一数据响应信息,得到实时缓存包括:
    所述差分请求端解析所述第一数据响应信息,得到差异部分;
    所述差分请求端将所述差异部分和预先存储的基准缓存进行计算,得到所述实时缓存。
  10. 一种差分数据传输的方法,其特征在于,包括:
    在中间服务器的差分处理模块开关关闭的情况下,所述差分请求端向差分响应端发送数据请求信息;
    所述差分请求端接收返回的第二数据响应信息;
    所述差分请求端解析所述第二数据响应信息,得到实时缓存和基准缓存。
  11. 根据权利要求10所述的方法,其特征在于,所述差分请求端解析所述第二数据响应信息,得到实时缓存和基准缓存包括:
    所述差分请求端解析所述第二数据响应信息,得到所述实时缓存和差异部分;
    所述差分请求端将所述差异部分和所述实时缓存进行计算,得到所述基准缓存。
  12. 一种差分数据传输的装置,其特征在于,包括:
    接收模块,用于在中间服务器的差分处理模块开关关闭的情况下,接收数据请求信息;
    第一解析模块,用于解析所述数据请求信息,得到所述数据请求信息的类别,其中,所述数据请求信息的类别包括:差分请求和非差分请求;
    第一判断模块,用于当所述数据请求信息为所述差分请求时,判断所述差分 请求是否携带预设标识;
    第一反馈模块,用于在判断结果为是的情况下,返回第一数据响应信息,所述第一数据响应信息,用于指示基准缓存和实时缓存的差异部分;
    第二反馈模块,用于在判断结果为否的情况下,返回第二数据响应信息,所述第二数据响应信息,用于指示实时缓存和所述实时缓存与基准缓存的差异部分。
  13. 根据权利要求12所述的装置,其特征在于,所述第一解析模块包括:
    判断单元,用于判断所述数据请求信息中的数据帧格式是否携带第一标识;
    第一解析单元,用于在判断结果为是的情况下,所述数据请求信息为所述差分请求;
    第二解析单元,用于在判断结果为否的情况下,所述数据请求信息为所述非差分请求;
    其中,所述第一标识为超文本传输协议数据帧中的报文头信息。
  14. 根据权利要求12所述的装置,其特征在于,所述预设标识,用于指示所述差分请求是否为有基准缓存的差分请求。
  15. 根据权利要求14所述的装置,其特征在于,所述第一反馈模块包括:
    第一获取单元,用于获取所述实时缓存;
    解析单元,用于依据所述判断结果,得到所述差分请求为有基准缓存差分请求;
    第一判断单元,用于判断所述预设标识是否与预先存储的标识相同;
    第一数据处理单元,用于当所述预设标识与预先存储的标识相同时,将预选存储的基准缓存和所述实时缓存进行计算,得到差异部分;
    第一封装单元,用于将所述差异部分和第一响应标识符封装至所述第一数据响应信息,所述第一响应标示符用于指示响应为差分响应;
    第一反馈单元,用于返回所述第一数据响应信息;
    第二数据处理单元,用于当所述预设标识与预先存储的标识不同时,返回第二数据响应信息。
  16. 根据权利要求12至15中任意一项所述的装置,其特征在于,所述第二反馈模块 包括:
    第二获取单元,用于获取所述实时缓存;
    第三数据处理单元,用于将预选存储的基准缓存和所述实时缓存进行计算,得到差异部分;
    第二封装单元,用于将所述实时缓存、所述差异部分和第一响应标识符封装至所述第二数据响应信息,所述第一响应标识符用于指示响应为差分响应;
    第二反馈单元,用于返回所述第二数据响应信息。
  17. 根据权利要求12所述的装置,其特征在于,所述装置还包括:
    第二判断模块,用于判断从差分请求端发送的所述差分请求与在差分响应端存储的相邻差分请求对应的实时缓存之间的时间区间是否大于预设周期;
    第三反馈模块,用于在判断结果为否的情况下,返回第三数据响应信息,所述第三数据响应信息,用于指示所述实时缓存与所述基准缓存之间的差异部分;
    第四反馈模块,用于在判断结果为是的情况下,返回所述第一数据响应信息或所述第二数据响应信息。
  18. 一种差分数据传输的装置,其特征在于,包括:
    发送模块,用于在中间服务器的差分处理模块开关关闭的情况下,向差分响应端发送数据请求信息;
    接收模块,用于接收返回的第一数据响应信息;
    解析模块,用于解析所述第一数据响应信息,得到实时缓存。
  19. 根据权利要求18所述的装置,其特征在于,所述装置还包括:
    封装模块,用于在向差分响应端发送数据请求信息之前,将预设标识封装至所述数据请求信息。
  20. 根据权利要求18所述的装置,其特征在于,所述解析模块包括:
    解析单元,用于解析所述第一数据响应信息,得到差异部分;
    计算单元,用于将所述差异部分和预先存储的基准缓存进行计算,得到所述实时缓存。
  21. 一种差分数据传输的装置,其特征在于,包括:
    发送模块,用于在中间服务器的差分处理模块开关关闭的情况下,向差分响应端发送数据请求信息;
    接收模块,用于接收返回的第二数据响应信息;
    解析模块,用于解析所述第二数据响应信息,得到实时缓存和基准缓存。
  22. 根据权利要求21所述的装置,其特征在于,所述解析模块包括:
    解析单元,用于解析所述第二数据响应信息,得到所述实时缓存和差异部分;
    计算单元,用于将所述差异部分和所述实时缓存进行计算,得到所述基准缓存。
  23. 一种差分数据传输的系统,其特征在于,包括:差分请求端、中间服务器和差分响应端,所述差分请求端、所述中间服务器和所述差分响应端通信连接,其中,
    所述中间服务器配置有差分处理模块开关;
    所述差分请求端为权利要求18至20中任一项所述的差分数据传输的装置;或者,
    所述差分请求端为权利要求21和22所述的差分数据传输的装置;
    所述差分响应端为权利要求12至17中任一项所述的差分数据传输的装置。
PCT/CN2016/097989 2016-02-19 2016-09-04 差分数据传输的方法、装置及系统 Ceased WO2017140103A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610094820.0 2016-02-19
CN201610094820.0A CN105681892B (zh) 2016-02-19 2016-02-19 差分数据传输的方法、装置及系统

Publications (1)

Publication Number Publication Date
WO2017140103A1 true WO2017140103A1 (zh) 2017-08-24

Family

ID=56193293

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/097989 Ceased WO2017140103A1 (zh) 2016-02-19 2016-09-04 差分数据传输的方法、装置及系统

Country Status (2)

Country Link
CN (1) CN105681892B (zh)
WO (1) WO2017140103A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112051974A (zh) * 2019-06-06 2020-12-08 浙江汉朔电子科技有限公司 电子价签信息传输方法及系统、电子价签、服务器

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105681892B (zh) * 2016-02-19 2019-03-15 网宿科技股份有限公司 差分数据传输的方法、装置及系统
CN121864864A (zh) * 2024-10-12 2026-04-14 北京字跳网络技术有限公司 一种信息传输方法、装置、服务器、终端设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090034938A1 (en) * 2007-07-30 2009-02-05 Masahiro Kageyama Video signal recording/reproducing apparatus
CN101573977A (zh) * 2006-11-07 2009-11-04 索尼株式会社 发送设备、发送设备的视频信号发送方法、接收设备、和接收设备的视频信号接收方法
CN102473065A (zh) * 2010-04-13 2012-05-23 松下电器产业株式会社 截图显示控制装置、截图显示控制方法、截图显示控制用集成电路、服务器装置
CN105681892A (zh) * 2016-02-19 2016-06-15 网宿科技股份有限公司 差分数据传输的方法、装置及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025593B (zh) * 2009-09-21 2013-04-24 中国移动通信集团公司 分布式用户接入系统及方法
CN102420822A (zh) * 2011-11-29 2012-04-18 中兴通讯股份有限公司 网络文件传输方法及系统
CN103731399B (zh) * 2012-10-11 2017-12-26 北京百度网讯科技有限公司 基于cdn网络的数据访问方法、系统及装置
CN105208100B (zh) * 2015-08-25 2018-11-06 联创汽车服务有限公司 一种接口数据的处理方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101573977A (zh) * 2006-11-07 2009-11-04 索尼株式会社 发送设备、发送设备的视频信号发送方法、接收设备、和接收设备的视频信号接收方法
US20090034938A1 (en) * 2007-07-30 2009-02-05 Masahiro Kageyama Video signal recording/reproducing apparatus
CN102473065A (zh) * 2010-04-13 2012-05-23 松下电器产业株式会社 截图显示控制装置、截图显示控制方法、截图显示控制用集成电路、服务器装置
CN105681892A (zh) * 2016-02-19 2016-06-15 网宿科技股份有限公司 差分数据传输的方法、装置及系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112051974A (zh) * 2019-06-06 2020-12-08 浙江汉朔电子科技有限公司 电子价签信息传输方法及系统、电子价签、服务器

Also Published As

Publication number Publication date
CN105681892B (zh) 2019-03-15
CN105681892A (zh) 2016-06-15

Similar Documents

Publication Publication Date Title
US9917887B2 (en) Methods for content inlining and devices thereof
KR102123933B1 (ko) 비동기식 데이터 딕셔너리들을 이용하는 멀티-테넌트 공유 인프라구조에서의 스트림-기반 데이터 중복 제거
CN104054068B (zh) 用于远程桌面协议的改进的带宽优化
CN104081739B (zh) 在覆盖网络中利用压缩和差异化引擎的基于主机/路径的数据差异化装置和系统
US10412135B2 (en) Stream-based data deduplication using directed cyclic graphs to facilitate on-the-wire compression
CN106534243B (zh) 基于http协议的缓存、请求、响应方法及相应装置
CN103428261A (zh) 通过硬件辅助处理http报头的方法
CN106294379A (zh) 一种页面的加载方法、装置和系统
WO2017096830A1 (zh) 用于cdn平台的内容分发方法及调度代理服务器
WO2017080459A1 (zh) 服务内容的缓存及提供方法、装置、系统和存储介质
JP2019537897A (ja) 配信性能を改善するためのリソースセグメント化
CN103532984A (zh) websocket协议的数据传输方法、设备和系统
WO2015120766A1 (zh) 一种视频优化系统及方法
CN104518968B (zh) 一种报文处理的方法和透明代理服务器
WO2017140103A1 (zh) 差分数据传输的方法、装置及系统
US8856445B2 (en) Byte caching with chunk sizes based on data type
CN105074688B (zh) 使用对等节点图的基于流的数据去重复
CN103152606B (zh) 视频文件处理方法及装置、系统
CN106209942B (zh) 一种数据压缩传输方法和系统、及其终端和服务器
WO2014205669A1 (zh) 网络设备及电子邮件请求处理方法
CN103546829A (zh) 一种视频业务处理方法及设备
WO2015169074A1 (zh) 内容中心网络中内容分发的方法及相关设备
CN106856456A (zh) 缓存集群服务的处理方法及系统
CN109474678B (zh) 一种信息传送方法及装置
CN107241451B (zh) 基于内容分发网络的篡改干预方法、装置及系统

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

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

Country of ref document: EP

Kind code of ref document: A1