CN106559404A - A kind of client for accessing data, proxy server and system - Google Patents

A kind of client for accessing data, proxy server and system Download PDF

Info

Publication number
CN106559404A
CN106559404A CN201510643034.7A CN201510643034A CN106559404A CN 106559404 A CN106559404 A CN 106559404A CN 201510643034 A CN201510643034 A CN 201510643034A CN 106559404 A CN106559404 A CN 106559404A
Authority
CN
China
Prior art keywords
data
source
reply data
proxy server
module
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.)
Pending
Application number
CN201510643034.7A
Other languages
Chinese (zh)
Inventor
游九龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510643034.7A priority Critical patent/CN106559404A/en
Publication of CN106559404A publication Critical patent/CN106559404A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields

Abstract

The invention provides a kind of client for accessing data, proxy server and system.The proxy server, including:Cache module, is suitable to cache the process of Jing default data processing rules to reduce the data taken up space by data;Input interface, is suitable to receive the request of the access data from client;Data search module, is suitable to call the cache module, and according to the request, the reply data processed with the presence or absence of default data processing rule described in corresponding Jing in searching the cache module;First package module, if there is the corresponding reply data in being suitable to the cache module, is packaged to generate the first response message to the reply data;Output interface, is suitable to for first response message to return to the client.In the embodiment of the present invention, cache module caching is that Jing default data processing rules are processed to reduce the data taken up space by data, is supplied to client by being compressed to data, can save the consumption of client traffic.

Description

A kind of client for accessing data, proxy server and system
Technical field
The present invention relates to technical field of internet application, particularly a kind of client for accessing data, agency's clothes Business device and system.
Background technology
Http (Hypertext transfer protocol, HTTP) defines browser (i.e. Web clients process) how web documents are asked to Web server, and how server is text Shelves send browser to.From from the point of view of level, Http is application-oriented layer protocol, and it is energy on WWW The important foundation of enough reliably swap files (including the various multimedia files such as text, sound, image).
Agency (Proxy) is a kind of special network service in internet, and which allows a network terminal (such as client) is carried out non-immediate by this agency service and another network terminal (such as source server) Connection, also referred to as network agent.As a example by between client and source server by the communication of network agent, Client and source server connect proxy server respectively, and client is visited according to the Http agency agreements of standard Source server is asked, source server returns request data to client by proxy server.However, right at present Still have to be hoisted by the communication efficiency of network agent between client and source server.
The content of the invention
In view of the above problems, it is proposed that the present invention overcomes the problems referred to above or at least in part to provide one kind The client of the access data for solving the above problems, proxy server and system.
According to an aspect of of the present present invention, there is provided a kind of proxy server, including:
Cache module, is suitable to cache the process of Jing default data processing rules to reduce the number taken up space by data According to;
Input interface, is suitable to receive the request of the access data from client;
Data search module, is suitable to call the cache module, and according to the request, searches the caching The reply data processed with the presence or absence of default data processing rule described in corresponding Jing in module;
First package module, if there is the corresponding reply data in being suitable to the cache module, to described Reply data is packaged to generate the first response message;
Output interface, is suitable to for first response message to return to the client.
Alternatively, first package module is further adapted for:
The reply data is encapsulated by default packing rule, encapsulation of data is generated;
Add the Http heads of the mark proxy server for the encapsulation of data, to generate described first Response message.
Alternatively, the proxy server also includes pre-updated cache module, is suitable to:
Judge whether reply data reaches fixed time limit described in the cache module;
If so, then encapsulate the request to ask for user datagram protocol UDP;
UDP requests are sent to server is prefetched, is asked by the server modification UDP that prefetches Ask, return after adding the Http heads of mandatory requirement source server;
Receive the amended described request for prefetching server return, and described asked according to amended Ask, source reply data is obtained from the source server;
Using the source reply data for obtaining, the reply data is updated.
Alternatively, the default data processing rule includes province's stream mode data processing rule.
Alternatively, province's stream mode data processing rule includes different degrees of data compression pattern.
Alternatively, the different degrees of data compression pattern includes at least one following:
Mild compression, moderate compression, severe compression, white-black pattern, without chart-pattern.
Alternatively, the pre-updated cache module is further adapted for:
Using province's stream mode data processing rule, the source reply data to obtaining is compressed place Reason;
Data after being processed using compression, update the reply data.
Alternatively, the proxy server also includes:
Data acquisition module, if there is no the corresponding reply data, root in being suitable to the cache module According to the request, source reply data is obtained from source server;
Online processing module, be suitable to according to the default data processing rule to the source reply data at Reason, obtains the reply data;
Second package module, is suitably packaged the reply data, generates the second response message;
The output interface, is further adapted for for second response message returning to the client.
Alternatively, the online processing module includes line compression unit, is suitable to enter the source reply data The compression of the specified data compression pattern of row is processed, and obtains the reply data.
Alternatively, the line compression unit is further adapted for:
The source reply data is sent to the thread pool for providing line compression function, with by the thread pool pair The source reply data carries out specifying the compression of data compression pattern to process, and obtains the reply data;
Receive the reply data that the thread pool is returned.
Alternatively, the data acquisition module is further adapted for:
By domain name resolution server, the IP address of the corresponding source server of domain name in the request is searched;
According to the IP address of the source server, the source reply data is obtained from the source server.
Alternatively, the data acquisition module is further adapted for:
According to the IP address of the source server, asynchronous transmission to the source server obtains the source response The request of data;
Receive the source response message for carrying the source reply data that the source server is returned.
Alternatively, the proxy server also includes:
Field modified module, represents response contents class in being suitably modified to the Http heads of the source response message The field of type and response contents length, to be consistent with the reply data;
Second package module, be further adapted for encapsulating the Http heads of the amended source response message with And the reply data, generate second response message.
Alternatively, the proxy server also includes:
Field add module, is suitable to the addition in the Http heads of second response message and represents the source The field of the length of reply data.
Alternatively, the cache module is further adapted for:At the online processing module is according to the preset data Reason rule is processed to the source reply data, after obtaining the reply data, caches the answer number According to.
According to another aspect of the present invention, a kind of client for accessing data is additionally provided, including:
Sending module, is suitable to proxy server send the request for accessing data;
Receiver module, is suitable to receive the process of Jing default data processing rules and the quilt that the proxy server is returned The reply data of encapsulation.
Alternatively, the client also includes:
Parsing module, is suitable to obtain the default data processing rule from the proxy server, using described Default data processing rule parses the reply data.
According to another aspect of the present invention, a kind of system for accessing data is additionally provided, including:It is any of the above-described Individual proxy server and any of the above-described individual client.
According to another aspect of the present invention, a kind of method for accessing data is additionally provided, agency service is applied to Device, including:
Receive the request of the access data from client;
Cache module is called, and according to the request, in searching the cache module, whether there is corresponding Jing The reply data of default data processing rule process;
If there is the corresponding reply data in the cache module, the reply data is packaged with Generate the first response message;
First response message is returned to into the client.
Alternatively, the reply data is packaged to generate the first response message, including:
The reply data is encapsulated by default packing rule, encapsulation of data is generated;
Add the Http heads of the mark proxy server for the encapsulation of data, to generate described first Response message.
Alternatively, methods described also includes:
Judge whether reply data reaches fixed time limit described in the cache module;
If so, then encapsulate the request to ask for user datagram protocol UDP;
UDP requests are sent to server is prefetched, is asked by the server modification UDP that prefetches Ask, return after adding the Http heads of mandatory requirement source server;
Receive the amended described request for prefetching server return, and described asked according to amended Ask, source reply data is obtained from the source server;
Using the source reply data for obtaining, the reply data is updated.
Alternatively, the default data processing rule includes province's stream mode data processing rule.
Alternatively, province's stream mode data processing rule includes different degrees of data compression pattern.
Alternatively, the different degrees of data compression pattern includes at least one following:
Mild compression, moderate compression, severe compression, white-black pattern, without chart-pattern.
Alternatively, using the source reply data for obtaining, the reply data is updated, including:
Using province's stream mode data processing rule, the source reply data to obtaining is compressed place Reason;
Data after being processed using compression, update the reply data.
Alternatively, methods described also includes:
If there is no the corresponding reply data in the cache module, according to the request, take from source Source reply data is obtained at business device;
The source reply data is processed according to the default data processing rule, obtain the answer number According to;
Encapsulate the reply data and generate the second response message;
Second response message is returned to into the client.
Alternatively, the default data processing rule includes different degrees of data compression pattern, according to described Default data processing rule is processed to the source reply data, obtains the reply data, including:
Carry out specifying to the source reply data compression of data compression pattern to process, obtain the answer number According to.
Alternatively, carry out specifying the compression of data compression pattern to process the source reply data, obtain described Reply data, including:
The source reply data is sent to the thread pool for providing line compression function, with by the thread pool pair The source reply data carries out specifying the compression of data compression pattern to process, and obtains the reply data;
Receive the reply data that the thread pool is returned.
Alternatively, according to the request, source reply data is obtained from source server, including:
By domain name resolution server, the IP address of the corresponding source server of domain name in the request is searched;
According to the IP address of the source server, the source reply data is obtained from the source server.
Alternatively, the IP address according to the source server, obtains the source response from the source server Data, including:
According to the IP address of the source server, asynchronous transmission to the source server obtains the source response The request of data;
Receive the source response message for carrying the source reply data that the source server is returned.
Alternatively, before encapsulating the second response message of the reply data generation, also include:Change the source The field of response contents type and response contents length is represented in the Http heads of response message, so as to institute State reply data to be consistent;
Encapsulate the reply data and generate the second response message, including:Encapsulate the amended source response to disappear The Http heads and the reply data of breath, generates second response message.
Alternatively, methods described also includes:
The addition in the Http heads of second response message represents the word of the length of the source reply data Section.
Alternatively, the source reply data is being processed according to the default data processing rule, is being obtained After the reply data, the reply data is cached.
According to another aspect of the present invention, a kind of method for accessing data is additionally provided, client is applied to, Including:
The request for accessing data is sent to proxy server;
Receive the process of Jing default data processing rules and packed answer number that the proxy server is returned According to.
Alternatively, process and packed in the Jing default data processing rules for receiving the proxy server return Reply data after, also include:
The default data processing rule is obtained from the proxy server to process, at the preset data Reason rule process parses the reply data.
The embodiment of the present invention provides a kind of proxy server, and the proxy server includes cache module, is suitable to delay Deposit Jing default data processing rules to process to reduce the data taken up space by data.When the input of proxy server When interface is to request from the access data of client, the data search module of proxy server is called Cache module, according to the request, searches what corresponding Jing default data processing rules were processed from cache module Reply data, afterwards the first package module reply data is packaged to generate the first response message, by defeated First response message is returned to client by outgoing interface.In the embodiment of the present invention, proxy server is using caching Module is in advance to source server, the process of Jing default data processing rules reducing the resource taken up space by data Data are cached, and directly can provide reply data to client by the cache module proxy server, And without the need for the source server request data to distal end, the visit capacity of source server can be reduced, alleviate source service Device is accessed for pressure, while the speed of client access can be significantly improved.Also, proxy server Cache module caching is that Jing default data processing rules are processed to reduce the data taken up space by data, is passed through Data are compressed and are supplied to client, the consumption of client traffic can be saved, reduce client user Campus network.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technology of the present invention Means, and being practiced according to the content of specification, and in order to allow above and other objects of the present invention, Feature and advantage can become apparent, below especially exemplified by the specific embodiment of the present invention.
According to the detailed description below in conjunction with accompanying drawing to the specific embodiment of the invention, those skilled in the art will More understand above-mentioned and other purposes, the advantages and features of the present invention.
Description of the drawings
By the detailed description for reading hereafter preferred embodiment, various other advantages and benefit are for ability Domain those of ordinary skill will be clear from understanding.Accompanying drawing is only used for the purpose for illustrating preferred embodiment, and and It is not considered as limitation of the present invention.And in whole accompanying drawing, it is denoted by the same reference numerals identical Part.In the accompanying drawings:
Fig. 1 shows the structural representation of proxy server according to an embodiment of the invention;
Fig. 2 shows the structural representation of proxy server in accordance with another embodiment of the present invention;
Fig. 3 shows the structural representation of the proxy server according to another embodiment of the invention;
Fig. 4 shows the structural representation of the client for accessing data according to an embodiment of the invention;
Fig. 5 shows the structural representation of the client for accessing data in accordance with another embodiment of the present invention;
Fig. 6 shows the structural representation of the system for accessing data according to an embodiment of the invention;
The flow chart that Fig. 7 shows the method for accessing data according to an embodiment of the invention;And
The flow chart that Fig. 8 shows the method for accessing data in accordance with another embodiment of the present invention.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing in accompanying drawing The exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure and should not be by Embodiments set forth here is limited.On the contrary, there is provided these embodiments are able to be best understood from this It is open, and the scope of the present disclosure complete can be conveyed to those skilled in the art.
To solve above-mentioned technical problem, a kind of proxy server is embodiments provided.Fig. 1 shows The structural representation of proxy server according to an embodiment of the invention.As shown in figure 1, the agency service Device 100 can at least include cache module 110, input interface 120, data search module 130, the first envelope Die-filling piece 140 and output interface 150.
The function and each several part of each composition or device of the proxy server 100 of the embodiment of the present invention are introduced now Between annexation:
Cache module 110, is suitable to cache the process of Jing default data processing rules to reduce what data were taken up space Data;
Input interface 120, is suitable to receive the request of the access data from client;
Data search module 130, is coupled with cache module 110, input interface 120, is suitable to call slow Storing module 110, and according to the request, in searching cache module 110, whether there is corresponding Jing present counts According to the reply data for processing rule process;
First package module 140, is coupled with data search module 130, if being suitable in cache module 110 There is corresponding reply data, reply data is packaged to generate the first response message;
Output interface 150, is coupled with the first package module 140, is suitable to return to the first response message Client.
The embodiment of the present invention provides a kind of proxy server, and the proxy server includes cache module, is suitable to delay Deposit Jing default data processing rules to process to reduce the data taken up space by data.When the input of proxy server When interface is to request from the access data of client, the data search module of proxy server is called Cache module, according to the request, searches what corresponding Jing default data processing rules were processed from cache module Reply data, afterwards the first package module reply data is packaged to generate the first response message, by defeated First response message is returned to client by outgoing interface.In the embodiment of the present invention, proxy server is using caching Module is in advance to source server, the process of Jing default data processing rules reducing the resource taken up space by data Data are cached, and directly can provide reply data to client by the cache module proxy server, And without the need for the source server request data to distal end, the visit capacity of source server can be reduced, alleviate source service Device is accessed for pressure, while the speed of client access can be significantly improved.Also, proxy server Cache module caching is that Jing default data processing rules are processed to reduce the data taken up space by data, is passed through Data are compressed and are supplied to client, the consumption of client traffic can be saved, reduce client user Campus network.
Default data processing rule mentioned above can be denoising or save stream mode data processing rule Then etc., wherein, saving stream mode data processing rule includes different degrees of data compression pattern, such as slight pressure Contracting, moderate compression, severe compression, white-black pattern or without chart-pattern etc., the invention is not restricted to this.Here, Can be distinguished by different compression ratio (that is, the ratio of the size before the size after data compression and compression) Different degrees of data compression pattern, such as compression ratio be 10% when for mild compression, compression ratio be 20% when For moderate compression, compression ratio be 50% when for severe compression, the value of compression ratio is only enumerated herein certainly, It is not intended to limit the present invention.In addition, in the embodiment of the present invention data compression scheme design need compressed capability, Trade off between the different factors that the distortion factor, required computing resource and other needs consider.Some mechanism It is reversible, can thus recovers original data, this mechanism is referred to as lossless data compression;Other one A little mechanism allow a certain degree of data degradation, this mechanism to be referred to as damaging number to realize higher compression ratio According to compression.
When first package module 140 is packaged to reply data, response can be encapsulated by default packing rule Data, generate encapsulation of data, and then add the Http heads for identifying proxy server for encapsulation of data, with Generate the first response message.Here, offer can be parsed by identifying the Http heads of proxy server The proxy server of the data, services, can count certain proxy server according to analysis result and provide data Situation, and then the situation of the proxy server position network access is analyzed, so as to according to these information The position of proxy server or quantity can be adjusted, so that proxy server is provided to client More preferable data, services.
In addition, in embodiments of the present invention, expression can be added in the Http heads of the first response message The field of the length of the length and source reply data of reply data.Here source reply data refers to agency's clothes Business device 100 obtains from source server, and without default data processing rule process data, source answer number Reply data is obtained according to the process of Jing default data processing rules.After client receives the first response message, First response message is parsed, the length of the length and source reply data of reply data is obtained, so as to According to the length of the length and source reply data of reply data, determine that client receives the first response message institute The data traffic of saving.For example, the length difference of the length with reply data of source reply data is calculated, as Client receives the data traffic saved by the first response message.
In an embodiment of the present invention, as shown in Fig. 2 proxy server 100 can also be slow including pre-updated Storing module 160, the pre-updated cache module 160 are coupled with cache module 110.In data search module 130 find cache module 110 in when there is the reply data that corresponding Jing default data processing rules are processed, During pre-updated cache module 160 judges cache module 110, whether reply data reaches fixed time limit, if should According to fixed time limit is reached, then package request (that is, the requests of the access data of client) is UDP to answer (User Datagram Protocol, User Datagram Protocol) is asked, and then UDP requests are sent extremely Server is prefetched, by server modification UDP requests are prefetched, adds the Http heads of mandatory requirement source server Return behind portion.Pre-updated cache module 160 receive prefetch server return amended request, and according to Amended request, obtains source reply data from source server, and using the source reply data for obtaining, updating should Answer evidence, so as to ensure that the freshness of data in cache module 110.In addition, the finger that the present embodiment is referred to Periodically limit can be the time that cache module 110 stores the reply data, such as 1 day or 3 days etc., specifically may be used To configure fixed time limit according to actual conditions.
Further, pre-updated cache module 160 can be using stream mode data processing rule be saved, to what is obtained Source reply data is compressed process, and then the data after processing using compression, updates reply data.Here Data are compressed with process, client is subsequent supplied to, the consumption of client traffic can be saved, reduced The campus network of client user.
In another embodiment of the invention, as shown in Fig. 2 proxy server 100 can also include data Acquisition module 170, online processing module 180 and the second package module 190.
Data acquisition module 170, is coupled with data search module 130, if being suitable to data search module 130 find cache module 110 in there is no corresponding reply data, then according to request (that is, client Access data request), from source server obtain source reply data;
Online processing module 180, is coupled with data acquisition module 170, is suitable to be processed according to preset data Rule is processed to source reply data, obtains reply data;
Second package module 190, is coupled with online processing module 180, is suitably packaged reply data, raw Into the second response message;
Output interface 150, is coupled with the second package module 190, is further adapted for returning the second response message To client.
When providing for there is no corresponding reply data in cache module 110 in the present embodiment, agency's clothes How business device provides the scheme of reply data to client, i.e. data acquisition module 170 is serviced from source first Source reply data is obtained at device, then source reply data is processed using online processing module 180, is obtained To reply data, and then the encapsulation reply data of the second package module 190, generate the second response message, output Second response message is returned to client by interface 150.Default data processing rule described herein can be joined Introduction is seen above, here is omitted.
Data acquisition module 170 obtains source reply data from source server according to request, can pass through domain name Resolution server, the IP address of the corresponding source server of the domain name in search request, and then serviced according to source The IP address of device, obtains source reply data from source server.
Further, data acquisition module 170 can be asynchronous to service to source according to the IP address of source server The request of device transmission acquisition source reply data, and then receive the active reply data of carrying of source server return Source response message.Here asynchronous refers to allow CPU to lie over current request (that is, the visit of client Ask the request of data) response, process next request and (that is, send acquisition source answer number to source server According to request), when by poll or other modes obtain readjustment notify after, bring into operation.Multithreading will be different Step operation is run in being put into another thread, is obtained completion notice by poll or callback method, but is completed end Mouthful, by the scheduling of operating system adapter asynchronous operation, by hardware interrupts, callback method is triggered when completing, This mode need not take additional thread.
When online processing module 180 is processed to source reply data according to default data processing rule, obtain After reply data, reply data is cached by cache module 110.Further, online processing module 180 is gone back Line compression unit 181 can be included, be suitable to source reply data is carried out specifying the compression of data compression pattern Process, obtain reply data.The embodiment of the present invention is carried out to source reply data using line compression unit 181 Compression is processed, and is provided to client, can save the consumption of client traffic, reduces client user Campus network.Here, it is intended that data compression pattern, such as mild compression, moderate compression, severe compression, White-black pattern or without chart-pattern etc., the invention is not restricted to this.Here it is possible to by different compression ratios (i.e., The ratio of the size before the size after data compression and compression) distinguishing different degrees of data compression pattern, such as Compression ratio be 10% when for mild compression, compression ratio be 20% when for moderate compression, compression ratio be 50% when Compress for severe, the value of compression ratio is only enumerated herein certainly, is not intended to limit the present invention.
When line compression unit 181 is processed to source reply data, source reply data can be sent to carrying For the thread pool of line compression function, to carry out specifying data compression pattern to source reply data by thread pool Compression is processed, and obtains reply data, and then the reply data that receiving thread pond returns.
In another embodiment of the present invention, as shown in Fig. 2 proxy server 100 can also be included offline Processing module 200, is coupled with cache module 110, and being suitable to the data to source server carries out preset data The process for processing rule is taken up space with reducing data, after processing is complete, is cached to cache module 110.Further, processed offline module 200 can include offline compression unit 201, be suitable to source server Data carry out specifying the compression of data compression pattern to process, taken up space with reducing data.
In one more embodiment of the present invention, as shown in figure 3, proxy server 100 can also include field Modified module 310.
Field modified module 310, is coupled with data acquisition module 170, online processing module 180, is fitted In receive in data acquisition module 170 the active reply data of carrying that source server is returned source response message it Afterwards, the word of response contents type and response contents length is represented in changing the Http heads of the source response message Section, to be consistent with reply data;
Second package module 190, is coupled with field modified module 310, is further adapted for encapsulating amended source The Http heads of response message and reply data, generate the second response message.
In one more embodiment of the present invention, as shown in figure 3, proxy server 100 can also include field Add module 320, is coupled with the second package module 190, is suitable to the Http heads in the second response message The field of the length of middle addition expression source reply data.
After client receives the second response message, the second response message is parsed, answer number is obtained According to length and source reply data length, so as to the length according to reply data and source reply data Length, determines that client receives the data traffic saved by the second response message.For example, parsing second is responded The Http heads of message, Content-type represent the field of response contents type, Content-length tables Show the field of response contents length, and X-Original-Content-Length represents the length of source reply data The field of degree, and then according to the value and response contents of field Content-type for representing response contents type The value of field Content-length of length obtains the length of reply data, and according to source reply data The value of field X-Original-Content-Length of length obtain the length of source reply data.
Accordingly, the embodiment of the present invention additionally provides a kind of client for accessing data.Fig. 4 shows basis The structural representation of the client of the access data of one embodiment of the invention.As shown in figure 4, the access number According to client 400 can at least include sending module 410 and receiver module 420.
Sending module 410, is suitable to proxy server send the request for accessing data;
Receiver module 420, is coupled with sending module 410, and the Jing for being suitable to the return of Receiving Agent server is pre- If data processing rule process and packed reply data.
In the embodiment of the present invention, client receives Jing default data processing rules and processes and packed answer number According to saving the consumption of client traffic, reduce the campus network of client user.Also, client is straight Connect from proxy server and obtain reply data, and without the need for the source server request data to distal end, can reduce The visit capacity of the source server of distal end, alleviates source server and is accessed for pressure, while visitor can be significantly improved The speed that family end accesses.
In an embodiment of the present invention, as shown in figure 5, client 400 can also include parsing module 430, The parsing module 430 is coupled with receiver module 420, is suitable to obtain preset data process from proxy server Rule, parses reply data using default data processing rule.Default data processing rule described herein can To see above introduction, here is omitted.
In another embodiment of the invention, receiver module 420 is further adapted for answering for Receiving Agent server return The length of the length and source reply data of answer evidence.Here source reply data refers to proxy server 100 Obtain from source server, and without the data of default data processing rule process, reply data Jing in source presets Data processing rule process obtains reply data.As shown in figure 5, client 400 can also include determining mould Block 440, the determining module 440 are coupled with receiver module 420, parsing module 430, and being suitable to basis should The length of the length and source reply data of answer evidence, it is determined that receiving the data traffic saved by reply data.
Based on same inventive concept, the embodiment of the present invention additionally provides a kind of system for accessing data.Fig. 6 shows The structural representation of the system for accessing data according to an embodiment of the invention is gone out.As shown in fig. 6, should The system 600 for accessing data can at least include any of the above-described proxy server 100 and any of the above-described Individual client 400.
Sending module 410 in client 400 sends the request for accessing data, generation to proxy server 100 Input interface 120 in reason server 100 receives the request of the access data from client 400, and by Data search module 130 calls cache module 110, and according to the request, searches in cache module 110 With the presence or absence of the reply data of corresponding Jing default data processing rules process.If deposited in cache module 110 In corresponding reply data, then the first package module 140 is packaged to generate the first response to reply data First response message is returned to client 400 by message, output interface 150.Reception in client 400 The first response message that 420 Receiving Agent server of module 100 is returned, carries in first response message The process of Jing default data processing rules and packed reply data.
There is corresponding Jing preset datas in data search module 130 finds cache module 110 and process rule During the reply data for then processing, the pre-updated cache module 160 in proxy server 100 judges cache module In 110, whether reply data reaches fixed time limit, if reply data reaches fixed time limit, package request (that is, the requests of the access data of client) are UDP requests, and then UDP requests are sent to prefetching Server, is asked by server modification UDP is prefetched, after adding the Http heads of mandatory requirement source server Return.Pre-updated cache module 160 receives the amended request for prefetching server return, and according to modification Request afterwards, obtains source reply data from source server, using the source reply data for obtaining, updates answer number According to so as to ensure that the freshness of data in cache module 110.In addition, the specified phase that the present embodiment is referred to Limit can be the time that cache module 110 stores the reply data, such as 1 day or 3 days etc., specifically can be with root Fixed time limit is configured according to actual conditions.
When first package module 140 is packaged to reply data, response can be encapsulated by default packing rule Data, generate encapsulation of data, and then add the Http heads for identifying proxy server for encapsulation of data, with Generate the first response message.Here, offer can be parsed by identifying the Http heads of proxy server The proxy server of the data, services, can count certain proxy server according to analysis result and provide data Situation, and then the situation of the proxy server position network access is analyzed, so as to according to these information The position of proxy server or quantity can be adjusted, so that proxy server is provided to client More preferable data, services.
Further, the first package module 140 represents answer number in the Http heads addition of the first response message According to length and source reply data length field.Here source reply data refers to proxy server 100 from source server obtain, and without default data processing rule process data, source reply data Jing Default data processing rule process obtains reply data.After client 400 receives the first response message, First response message is parsed, the length of the length and source reply data of reply data is obtained, so as to According to the length of the length and source reply data of reply data, determine that client receives the first response message institute The data traffic of saving.For example, the length difference of the length with reply data of source reply data is calculated, as Client receives the data traffic saved by the first response message.
If additionally, there is no corresponding reply data in cache module 110, in proxy server 100 Data acquisition module 170 according to request (that is, the requests of the access data of client), from source server Place's acquisition source reply data, and the online processing module 180 in proxy server 100 according to preset data at Reason rule is processed to source reply data, obtains reply data, and then the encapsulation of the second package module 190 should Answer evidence, generates the second response message, and the second response message is returned to client 400 by output interface 150. The second response message that 420 Receiving Agent server of receiver module 100 in client 400 is returned.
Data acquisition module 170 can be according to the IP address of source server, and asynchronous transmission to source server is obtained The request of source reply data is taken, and then receives the source response of the active reply data of carrying that source server is returned and disappeared Breath.Here asynchronous refers to allow CPU to lie over current request (that is, the access data of client Request) response, process next request (that is, the request of acquisition source reply data is sent to source server), After readjustment notice is obtained by poll or other modes, bring into operation.Asynchronous operation is put into separately by multithreading Run in one thread, completion notice is obtained by poll or callback method, but completing port, by operation system The scheduling of system adapter asynchronous operation, by hardware interrupts, triggers callback method when completing, and this mode is not required to Additional thread to be taken.
Further, the field modified module 310 in proxy server 100 is received in data acquisition module 170 After the source response message of the active reply data of carrying that source server is returned, the source response message is changed The field of response contents type and response contents length is represented in Http heads, one to be kept with reply data Cause.Second package module 190 encapsulates the Http heads and reply data of amended source response message, Generate the second response message.Also, the field add module 320 in proxy server 100 is in the second response Add the field of the length of expression source reply data in the Http heads of message.When client 400 is received After second response message, the second response message is parsed, obtain length and the source response of reply data The length of data, so as to the length according to reply data and the length of source reply data, determines that client terminates Receive the data traffic saved by the second response message.For example, the length and reply data of source reply data are calculated Length difference, receive the data traffic saved of the second response message as client.
In addition, when online processing module 180 is processed to source reply data according to default data processing rule, After obtaining reply data, reply data is cached by cache module 110, to visit to clients providing data The service of asking.Further, online processing module 180 is additionally may included in wire compression unit 181, is suitable to source Reply data carries out specifying the compression of data compression pattern to process, and obtains reply data.Line compression unit 181 When processing to source reply data, source reply data can be sent to the thread for providing line compression function Pond, to carry out specifying the compression of data compression pattern to process source reply data by thread pool, obtains answer number According to, and then the reply data that receiving thread pond returns.
Processed offline module 200 in proxy server 100 is carried out at preset data to the data of source server The process of reason rule is taken up space with reducing data, after processing is complete, is cached to cache module 110.Further, processed offline module 200 can include offline compression unit 201, be suitable to source server Data carry out specifying the compression of data compression pattern to process, taken up space with reducing data.
Based on same inventive concept, the embodiment of the present invention additionally provides a kind of method for accessing data, is applied to Proxy server.The flow chart that Fig. 7 shows the method for accessing data according to an embodiment of the invention. As shown in fig. 7, the method at least comprises the following steps S702 to step S708.
Step S702, receives the request of the access data from client.
Step S704, calls cache module, and according to the request, it is right to whether there is in searching cache module The reply data that the Jing default data processing rules answered are processed.
Step S706, if there is corresponding reply data in cache module, is packaged to reply data with life Into the first response message.
First response message is returned to client by step S708.
The method for accessing data provided in an embodiment of the present invention is applied in proxy server side, proxy server bag Cache module is included, the cache module has cached the process of Jing default data processing rules and taken up space to reduce data Data.When receiving from the request of the access data of client, cache module is called, please according to this Ask, the reply data that corresponding Jing default data processing rules are processed is searched from cache module, is corresponded to afterwards Answer evidence is packaged to generate the first response message, and returns to client.In the embodiment of the present invention, generation Server by utilizing cache module is managed in advance to source server, the process of Jing default data processing rules to reduce number Cached according to the resource data for being taken up space, can be directly to client by the cache module proxy server End provides reply data, and without the need for the source server request data to distal end, can reduce the visit of source server The amount of asking, alleviates source server and is accessed for pressure, while the speed of client access can be significantly improved.And And, the cache module caching of proxy server is that Jing default data processing rules are processed to reduce shared by data The data in space, are supplied to client by being compressed to data, can save the consumption of client traffic, Reduce the campus network of client user.
The default data processing rule referred in above step S704 can be denoising or save stream mode Data processing rule etc., wherein, saving stream mode data processing rule includes different degrees of data compression pattern, Such as mild compression, moderate compression, severe compression, white-black pattern or without chart-pattern etc., the invention is not restricted to this. Here it is possible to by different compression ratio (that is, the ratio of the size before the size after data compression and compression) To distinguish different degrees of data compression pattern, be mild compression when such as compression ratio is 10%, compression ratio be When 20% for moderate compression, compression ratio be 50% when for severe compression, the value of compression ratio is only herein certainly Enumerate, be not intended to limit the present invention.In addition, the design of data compression scheme needs in the embodiment of the present invention Trade off between the different factors that compressed capability, the distortion factor, required computing resource and other needs consider. Some mechanism are reversible, can thus recover original data, and this mechanism is referred to as lossless data compression; Other mechanism allows a certain degree of data degradation, this mechanism to be referred to as to realize higher compression ratio Damage data compression.
In step S706 reply data is packaged to generate the first response message, the embodiment of the present invention There is provided a kind of optional scheme, i.e. reply data can be encapsulated by default packing rule, encapsulation number is generated According to, and then add the Http heads for identifying proxy server for encapsulation of data, to generate the first response message. Here, agency's clothes that the data, services are provided can be parsed by identifying the Http heads of proxy server Business device, can count the situation that certain proxy server provides data according to analysis result, and then analyze this The situation of proxy server position network access, so as to can be to proxy server according to these information Position or quantity are adjusted, so that proxy server provides more preferable data, services to client.
In an embodiment of the present invention, expression response can be added in the Http heads of the first response message The field of the length of the length and source reply data of data.Here source reply data refers to proxy server Obtain from source server, and without the data of default data processing rule process, reply data Jing in source presets Data processing rule process obtains reply data.After client receives the first response message, to the first sound Answer message to be parsed, obtain the length of the length and source reply data of reply data, so as to according to response The length of the length and source reply data of data, determines that client receives the number saved by the first response message According to flow.For example, the length difference of the length with reply data of source reply data is calculated, is terminated as client Receive the data traffic saved by the first response message.
In another embodiment of the invention, exist at corresponding Jing preset datas in cache module is found During the reply data of reason rule process, in can determining whether cache module, whether reply data reaches specified Time limit, if reply data reach fixed time limit, package request (that is, the accesss data of client ask Ask) ask for UDP, and then UDP requests are sent to server is prefetched, changed by server is prefetched UDP is asked, and is returned after adding the Http heads of mandatory requirement source server.Subsequently receive and prefetch server The amended request for returning, and according to amended request, source reply data, profit are obtained from source server With the source reply data for obtaining, reply data is updated, so as to ensure that the freshness of data in cache module. In addition, the fixed time limit that the present embodiment is referred to can be the time that cache module stores the reply data, such as 1 It or 3 days etc., specifically can configure fixed time limit according to actual conditions.
Further, it is possible to using stream mode data processing rule is saved, the source reply data to obtaining is compressed Process, and then the data after being processed using compression, update reply data.Here data are compressed with process, Client is subsequent supplied to, the consumption of client traffic can be saved, reduce the campus network of client user.
When there is corresponding reply data in being described above cache module, proxy server is provided to client The scheme of reply data.Below will for there is no corresponding reply data in cache module when, introduce agency How server provides the scheme of reply data to client.I.e., it is possible to according to request (that is, client Access the request of data), source reply data is obtained from source server, is subsequently advised according to preset data process Then source reply data is processed, reply data is obtained.And then encapsulation reply data, generate second and respond Second response message is returned to client by message.
Further, source reply data is obtained from source server according to request, domain name resolution service can be passed through Device, the IP address of the corresponding source server of the domain name in search request, and then according to the IP ground of source server Location, obtains source reply data from source server.Furthermore it is possible to according to the IP address of source server, it is asynchronous Send the request of acquisition source reply data to source server, so receive that carrying that source server returns is active should The source response message of answer evidence.Here asynchronous refers to allow CPU to lie over current request (that is, visitor The request of the access data at family end) response, process next request and (that is, send to source server and obtain The request of source reply data), after readjustment notice is obtained by poll or other modes, bring into operation.It is many Thread is put into asynchronous operation in another thread and runs, and obtains completion notice by poll or callback method, but It is completing port, by the scheduling of operating system adapter asynchronous operation, by hardware interrupts, triggers when completing Callback method, this mode need not take additional thread.
Further, process is carried out to source reply data according to default data processing rule and obtains reply data, can Processed with the compression for carrying out specifying data compression pattern to source reply data, obtain reply data.Here, refer to Fixed number according to compact model, such as mild compression, moderate compression, severe compression, white-black pattern or without chart-pattern etc., The invention is not restricted to this.Here it is possible to by different compression ratio (that is, the size after data compression and pressure The ratio of the size before contracting) distinguishing different degrees of data compression pattern, it is slight when such as compression ratio is 10% Compression, compression ratio be 20% when for moderate compression, compression ratio be 50% when for severe compression, certainly herein The value of compression ratio is only enumerated, and is not intended to limit the present invention.In embodiments of the present invention, to source answer number During according to being processed, source reply data can be sent to the thread pool for providing line compression function, with by line Cheng Chi carries out specifying the compression of data compression pattern to process source reply data, obtains reply data, Jin Erjie Receive the reply data that thread pool is returned.
Source reply data is being processed according to default data processing rule, after obtaining reply data, by Cache module caches reply data, so that proxy server is to clients providing data access service.
In another embodiment of the invention, in the source for receiving the active reply data of carrying that source server is returned After response message, during the Http heads of the source response message can be changed, response contents type and sound are represented The field of content-length is answered, to be consistent with reply data, with the amended source response message of post package Http heads and reply data, generate the second response message.Also, in the Http of the second response message Add the field of the length of expression source reply data in head.After client receives the second response message, Second response message is parsed, the length of the length and source reply data of reply data is obtained, so as to According to the length of the length and source reply data of reply data, determine that client receives the second response message institute The data traffic of saving.For example, the length difference of the length with reply data of source reply data is calculated, as Client receives the data traffic saved by the second response message.
Accordingly, the embodiment of the present invention additionally provides a kind of method for accessing data, is applied to client.Figure 8 flow charts for showing the method for accessing data in accordance with another embodiment of the present invention.As shown in figure 8, The method at least comprises the following steps S802 to step S804.
Step S802, sends the request for accessing data to proxy server.
Step S804, the Jing default data processing rules that Receiving Agent server is returned process and it is packed should Answer evidence.
In the embodiment of the present invention, client receives Jing default data processing rules and processes and packed answer number According to saving the consumption of client traffic, reduce the campus network of client user.Also, client is straight Connect from proxy server and obtain reply data, and without the need for the source server request data to distal end, can reduce The visit capacity of the source server of distal end, alleviates source server and is accessed for pressure, while visitor can be significantly improved The speed that family end accesses.
The Jing default data processing rules returned in step S804 Receiving Agent server are processed and packed After reply data, default data processing rule can be obtained from proxy server and be processed, using preset data Process rule process parsing reply data.Default data processing rule described herein may refer to be situated between above Continue, here is omitted.
In another embodiment of the invention, the length of the reply data that can be returned with Receiving Agent server And the length of source reply data.Here source reply data refers to that proxy server is obtained from source server Take, and without default data processing rule process data, at the reply data Jing default data processing rules of source Reason obtains reply data.Further, the length according to the length and source reply data of reply data, it is determined that connecing Receive the data traffic saved by reply data.
According to the combination of above-mentioned any one preferred embodiment or multiple preferred embodiments, embodiment of the present invention energy Following beneficial effect is reached enough:
The embodiment of the present invention provides a kind of proxy server, and the proxy server includes cache module, is suitable to delay Deposit Jing default data processing rules to process to reduce the data taken up space by data.When the input of proxy server When interface is to request from the access data of client, the data search module of proxy server is called Cache module, according to the request, searches what corresponding Jing default data processing rules were processed from cache module Reply data, afterwards the first package module reply data is packaged to generate the first response message, by defeated First response message is returned to client by outgoing interface.In the embodiment of the present invention, proxy server is using caching Module is in advance to source server, the process of Jing default data processing rules reducing the resource taken up space by data Data are cached, and directly can provide reply data to client by the cache module proxy server, And without the need for the source server request data to distal end, the visit capacity of source server can be reduced, alleviate source service Device is accessed for pressure, while the speed of client access can be significantly improved.Also, proxy server Cache module caching is that Jing default data processing rules are processed to reduce the data taken up space by data, is passed through Data are compressed and are supplied to client, the consumption of client traffic can be saved, reduce client user Campus network.
In specification mentioned herein, a large amount of details are illustrated.It is to be appreciated, however, that this Bright embodiment can be put into practice in the case where not having these details.In some instances, not in detail Known method, structure and technology are shown, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure helping understand one in each inventive aspect or It is multiple, above to, in the description of the exemplary embodiment of the present invention, each feature of the present invention is sometimes by one Rise and be grouped in single embodiment, figure or descriptions thereof.However, should not be by the method for the disclosure It is construed to reflect following intention:I.e. the present invention for required protection is required than the institute in each claim clearly The more features of feature of record.More precisely, as the following claims reflect, sending out Bright aspect is less than all features of single embodiment disclosed above.Therefore, it then follows specific embodiment Claims be thus expressly incorporated in the specific embodiment, wherein each claim conduct itself The separate embodiments of the present invention.
Those skilled in the art be appreciated that the module in the equipment in embodiment can be carried out it is adaptive Change to answering property and they are arranged in one or more different from embodiment equipment.Can be reality Apply module or unit or component in example and be combined into a module or unit or component, and in addition can be it Be divided into multiple submodule or subelement or sub-component.Except in such feature and/or process or unit Outside at least some excludes each other, (adjoint right will can be included to this specification using any combinations Ask, make a summary and accompanying drawing) disclosed in all features and so disclosed any method or equipment it is all Process or unit are combined.Unless expressly stated otherwise, this specification (include adjoint claim, Summary and accompanying drawing) disclosed in each feature can it is identical by offers, be equal to or similar purpose alternative features To replace.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include other Some included features rather than further feature in embodiment, but the combination meaning of the feature of different embodiments Taste and is within the scope of the present invention and is formed different embodiments.For example, in detail in the claims, Embodiment required for protection one of arbitrarily can in any combination mode using.
The all parts embodiment of the present invention can be realized with hardware, or with one or more processor The software module of upper operation is realized, or is realized with combinations thereof.It will be understood by those of skill in the art that Can be realized using microprocessor or digital signal processor (DSP) in practice according to of the invention real Apply some or all parts in client, proxy server and the system of the access data of example some or Person's repertoire.The present invention is also implemented as performing a part for method as described herein or complete The equipment or program of device (for example, computer program and computer program) in portion.Such realization The program of the present invention can be stored on a computer-readable medium, or can have one or more signal Form.Such signal can be downloaded from internet website and be obtained, or provide on carrier signal, Or provided with any other form.
It should be noted that above-described embodiment the present invention will be described rather than limits the invention, and And those skilled in the art can design replacement enforcement without departing from the scope of the appended claims Example.In the claims, any reference symbol between bracket should not be configured to claim Limit.Word "comprising" does not exclude the presence of element not listed in the claims or step.Positioned at element it Front word "a" or "an" does not exclude the presence of multiple such elements.The present invention can be by means of bag Include the hardware of some different elements and by means of properly programmed computer realizing.It is some listing In the unit claim of device, several in these devices can be come concrete by same hardware branch Embody.The use of word first, second, and third does not indicate that any order.Can be by these word solutions It is interpreted as title.
So far, although those skilled in the art will appreciate that detailed herein illustrate and describe the present invention's Multiple exemplary embodiments, but, without departing from the spirit and scope of the present invention, still can be according to this Disclosure of invention directly determines or derives many other variations or modifications for meeting the principle of the invention.Cause This, the scope of the present invention is understood that and regards as covering all these other variations or modifications.
The embodiment of the invention also discloses:A1, a kind of proxy server, including:
Cache module, is suitable to cache the process of Jing default data processing rules to reduce the number taken up space by data According to;
Input interface, is suitable to receive the request of the access data from client;
Data search module, is suitable to call the cache module, and according to the request, searches the caching The reply data processed with the presence or absence of default data processing rule described in corresponding Jing in module;
First package module, if there is the corresponding reply data in being suitable to the cache module, to described Reply data is packaged to generate the first response message;
Output interface, is suitable to for first response message to return to the client.
A2, the proxy server according to A1, wherein, first package module is further adapted for:
The reply data is encapsulated by default packing rule, encapsulation of data is generated;
Add the Http heads of the mark proxy server for the encapsulation of data, to generate described first Response message.
A3, the proxy server according to A1 or A2, wherein, also including pre-updated cache module, It is suitable to:
Judge whether reply data reaches fixed time limit described in the cache module;
If so, then encapsulate the request to ask for user datagram protocol UDP;
UDP requests are sent to server is prefetched, is asked by the server modification UDP that prefetches Ask, return after adding the Http heads of mandatory requirement source server;
Receive the amended described request for prefetching server return, and described asked according to amended Ask, source reply data is obtained from the source server;
Using the source reply data for obtaining, the reply data is updated.
A4, the proxy server according to any one of A1-A3, wherein, the preset data processes rule Then include saving stream mode data processing rule.
A5, the proxy server according to any one of A1-A4, wherein, at province's stream mode data Reason rule includes different degrees of data compression pattern.
A6, the proxy server according to any one of A1-A5, wherein, the different degrees of data Compact model includes at least one following:
Mild compression, moderate compression, severe compression, white-black pattern, without chart-pattern.
A7, the proxy server according to any one of A1-A6, wherein, the pre-updated cache module It is further adapted for:
Using province's stream mode data processing rule, the source reply data to obtaining is compressed place Reason;
Data after being processed using compression, update the reply data.
A8, the proxy server according to any one of A1-A7, wherein, also include:
Data acquisition module, if there is no the corresponding reply data, root in being suitable to the cache module According to the request, source reply data is obtained from source server;
Online processing module, be suitable to according to the default data processing rule to the source reply data at Reason, obtains the reply data;
Second package module, is suitably packaged the reply data, generates the second response message;
The output interface, is further adapted for for second response message returning to the client.
A9, the proxy server according to any one of A1-A8, wherein, the online processing module bag Line compression unit is included, is suitable to carry out specifying the compression of data compression pattern to process the source reply data, Obtain the reply data.
A10, the proxy server according to any one of A1-A9, wherein, the line compression unit is also It is suitable to:
The source reply data is sent to the thread pool for providing line compression function, with by the thread pool pair The source reply data carries out specifying the compression of data compression pattern to process, and obtains the reply data;
Receive the reply data that the thread pool is returned.
A11, the proxy server according to any one of A1-A10, wherein, the data acquisition module It is further adapted for:
By domain name resolution server, the IP address of the corresponding source server of domain name in the request is searched;
According to the IP address of the source server, the source reply data is obtained from the source server.
A12, the proxy server according to any one of A1-A11, wherein, the data acquisition module It is further adapted for:
According to the IP address of the source server, asynchronous transmission to the source server obtains the source response The request of data;
Receive the source response message for carrying the source reply data that the source server is returned.
A13, the proxy server according to any one of A1-A12, wherein, also include:
Field modified module, represents response contents class in being suitably modified to the Http heads of the source response message The field of type and response contents length, to be consistent with the reply data;
Second package module, be further adapted for encapsulating the Http heads of the amended source response message with And the reply data, generate second response message.
A14, the proxy server according to any one of A1-A13, wherein, also include:
Field add module, is suitable to the addition in the Http heads of second response message and represents the source The field of the length of reply data.
A15, the proxy server according to any one of A1-A14, wherein, the cache module is also fitted In:The online processing module according to the default data processing rule to the source reply data at Reason, after obtaining the reply data, caches the reply data.
B16, a kind of client of access data, including:
Sending module, is suitable to proxy server send the request for accessing data;
Receiver module, is suitable to receive the process of Jing default data processing rules and the quilt that the proxy server is returned The reply data of encapsulation.
B17, the client according to B16, wherein, also include:
Parsing module, is suitable to obtain the default data processing rule from the proxy server, using described Default data processing rule parses the reply data.
C18, a kind of system of access data, including:Proxy server described in any one of A1-A15 and Client described in any one of B16-B17.

Claims (10)

1. a kind of proxy server, including:
Cache module, is suitable to cache the process of Jing default data processing rules to reduce the number taken up space by data According to;
Input interface, is suitable to receive the request of the access data from client;
Data search module, is suitable to call the cache module, and according to the request, searches the caching The reply data processed with the presence or absence of default data processing rule described in corresponding Jing in module;
First package module, if there is the corresponding reply data in being suitable to the cache module, to described Reply data is packaged to generate the first response message;
Output interface, is suitable to for first response message to return to the client.
2. proxy server according to claim 1, wherein, first package module is further adapted for:
The reply data is encapsulated by default packing rule, encapsulation of data is generated;
Add the Http heads of the mark proxy server for the encapsulation of data, to generate described first Response message.
3. proxy server according to claim 1 and 2, wherein, also mould is cached including pre-updated Block, is suitable to:
Judge whether reply data reaches fixed time limit described in the cache module;
If so, then encapsulate the request to ask for user datagram protocol UDP;
UDP requests are sent to server is prefetched, is asked by the server modification UDP that prefetches Ask, return after adding the Http heads of mandatory requirement source server;
Receive the amended described request for prefetching server return, and described asked according to amended Ask, source reply data is obtained from the source server;
Using the source reply data for obtaining, the reply data is updated.
4. the proxy server according to any one of claim 1-3, wherein, the preset data is processed Rule includes saving stream mode data processing rule.
5. the proxy server according to any one of claim 1-4, wherein, province's stream mode data Processing rule includes different degrees of data compression pattern.
6. the proxy server according to any one of claim 1-5, wherein, the different degrees of number Include according to compact model at least one following:
Mild compression, moderate compression, severe compression, white-black pattern, without chart-pattern.
7. the proxy server according to any one of claim 1-6, wherein, the pre-updated caches mould Block is further adapted for:
Using province's stream mode data processing rule, the source reply data to obtaining is compressed place Reason;
Data after being processed using compression, update the reply data.
8. it is a kind of access data client, including:
Sending module, is suitable to proxy server send the request for accessing data;
Receiver module, is suitable to receive the process of Jing default data processing rules and the quilt that the proxy server is returned The reply data of encapsulation.
9. client according to claim 8, wherein, also include:
Parsing module, is suitable to obtain the default data processing rule from the proxy server, using described Default data processing rule parses the reply data.
10. it is a kind of access data system, including:Proxy server described in any one of claim 1-7 And the client described in any one of claim 8-9.
CN201510643034.7A 2015-09-30 2015-09-30 A kind of client for accessing data, proxy server and system Pending CN106559404A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510643034.7A CN106559404A (en) 2015-09-30 2015-09-30 A kind of client for accessing data, proxy server and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510643034.7A CN106559404A (en) 2015-09-30 2015-09-30 A kind of client for accessing data, proxy server and system

Publications (1)

Publication Number Publication Date
CN106559404A true CN106559404A (en) 2017-04-05

Family

ID=58417665

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510643034.7A Pending CN106559404A (en) 2015-09-30 2015-09-30 A kind of client for accessing data, proxy server and system

Country Status (1)

Country Link
CN (1) CN106559404A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110663050A (en) * 2017-06-06 2020-01-07 国际商业机器公司 Edge caching for cognitive applications
CN111488179A (en) * 2019-01-28 2020-08-04 上海哔哩哔哩科技有限公司 Rule system and construction method thereof, business system and application method thereof
CN113285992A (en) * 2021-05-14 2021-08-20 中国邮政储蓄银行股份有限公司 Registration center system and micro-service system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6262987B1 (en) * 1998-03-26 2001-07-17 Compaq Computer Corp System and method for reducing latencies while translating internet host name-address bindings
CN1109304C (en) * 1997-03-13 2003-05-21 摩托罗拉公司 System and method for delivery of information over narrow-band communications links
US20030182437A1 (en) * 2002-02-28 2003-09-25 Nec Corporation Proxy server and proxy control program
CN101446983A (en) * 2009-01-12 2009-06-03 腾讯科技(深圳)有限公司 Method, system and equipment for realizing web page acquisition by mobile terminal
CN103392179A (en) * 2011-05-12 2013-11-13 广州市动景计算机科技有限公司 Method and device for acquiring page resources, browser and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1109304C (en) * 1997-03-13 2003-05-21 摩托罗拉公司 System and method for delivery of information over narrow-band communications links
US6262987B1 (en) * 1998-03-26 2001-07-17 Compaq Computer Corp System and method for reducing latencies while translating internet host name-address bindings
US20030182437A1 (en) * 2002-02-28 2003-09-25 Nec Corporation Proxy server and proxy control program
CN101446983A (en) * 2009-01-12 2009-06-03 腾讯科技(深圳)有限公司 Method, system and equipment for realizing web page acquisition by mobile terminal
CN103392179A (en) * 2011-05-12 2013-11-13 广州市动景计算机科技有限公司 Method and device for acquiring page resources, browser and mobile terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110663050A (en) * 2017-06-06 2020-01-07 国际商业机器公司 Edge caching for cognitive applications
CN111488179A (en) * 2019-01-28 2020-08-04 上海哔哩哔哩科技有限公司 Rule system and construction method thereof, business system and application method thereof
CN113285992A (en) * 2021-05-14 2021-08-20 中国邮政储蓄银行股份有限公司 Registration center system and micro-service system

Similar Documents

Publication Publication Date Title
US20230156060A1 (en) System and Method for Streaming Content from Multiple Servers
US11032388B2 (en) Methods for prerendering and methods for managing and configuring prerendering operations
CN104468629B (en) A kind of method and apparatus of Batch sending message
CN103942225B (en) A kind of resource transfer method, client and the system of mixed type applications client
CN103150513B (en) The method of the implantation information in interception application program and device
CN103338249B (en) Caching method and device
US20070226229A1 (en) Method and system for class-based management of dynamic content in a networked environment
US10083423B2 (en) Real time electronic mail
CN107040584B (en) Method and device for downloading picture by client
CN106933871A (en) Short linking processing method, device and short linked server
CN108932277B (en) Webpage loading method, webpage loading system and server
CN104335524B (en) Public web for the processing of the client-side page may have access to data storage
CN108664613A (en) Data query method, apparatus, computer equipment and storage medium
CN109992406B (en) Picture request method, picture request response method and client
CN107181779A (en) Processing method, the device and system of access request
CN107613040A (en) A kind of method and apparatus of domain name system DNS server lookup
CN110535961A (en) Resource acquiring method, device, electronic equipment and storage medium
CN106559404A (en) A kind of client for accessing data, proxy server and system
CN110399231A (en) Based on cross-platform data processing method, device and computer equipment
CN107070988A (en) Message processing method and device
CN106559468A (en) A kind of method for accessing data
CN106446075A (en) Page request processing method and apparatus
CN106911735B (en) Data acquisition method and device
CN112565406A (en) Gray scale publishing method, gray scale publishing system and electronic equipment
CN110569467B (en) Offline access method and device for client application program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170405

RJ01 Rejection of invention patent application after publication