CN106411978A - Resource caching method and apparatus - Google Patents

Resource caching method and apparatus Download PDF

Info

Publication number
CN106411978A
CN106411978A CN201510464724.6A CN201510464724A CN106411978A CN 106411978 A CN106411978 A CN 106411978A CN 201510464724 A CN201510464724 A CN 201510464724A CN 106411978 A CN106411978 A CN 106411978A
Authority
CN
China
Prior art keywords
described
resource
server
terminal device
mark
Prior art date
Application number
CN201510464724.6A
Other languages
Chinese (zh)
Other versions
CN106411978B (en
Inventor
黄凌云
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201510464724.6A priority Critical patent/CN106411978B/en
Publication of CN106411978A publication Critical patent/CN106411978A/en
Application granted granted Critical
Publication of CN106411978B publication Critical patent/CN106411978B/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network-specific arrangements or communication protocols supporting networked applications
    • H04L67/28Network-specific arrangements or communication protocols supporting networked applications for the provision of proxy services, e.g. intermediate processing or storage in the network
    • H04L67/2842Network-specific arrangements or communication protocols supporting networked applications for the provision of proxy services, e.g. intermediate processing or storage in the network for storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L29/00Arrangements, apparatus, circuits or systems, not covered by a single one of groups H04L1/00 - H04L27/00
    • H04L29/02Communication control; Communication processing
    • H04L29/06Communication control; Communication processing characterised by a protocol
    • H04L29/08Transmission control procedure, e.g. data link level control procedure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements or network protocols for addressing or naming
    • H04L61/15Directories; Name-to-address mapping
    • H04L61/1505Directories; Name-to-address mapping involving standard directories or standard directory access protocols
    • H04L61/1511Directories; Name-to-address mapping involving standard directories or standard directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network-specific arrangements or communication protocols supporting networked applications
    • H04L67/02Network-specific arrangements or communication protocols supporting networked applications involving the use of web-based technology, e.g. hyper text transfer protocol [HTTP]

Abstract

The embodiment of the invention provides a resource caching method comprising: determining that a resource satisfies a first caching condition after an Internet caching device receives the resource returned from a resource server to a terminal device; sending an analysis request to an analysis server, wherein the analysis request carries a domain name in the URL of the resource; receiving a server identifier obtained by the analysis server analyzing the domain name in the URL of the resource; and caching the resource when the analyzed server identifier is the resource server identifier, wherein the caching of the resource comprises caching the resource in the Internet caching device to provide the resource for the terminal device get access to the resource. The resource caching method may prevent the Internet caching device from caching malicious resources so as to prevent the Internet caching device from providing malicious resources as source server resources for other terminal device users.

Description

A kind of resource caching method and device

Technical field

The present invention relates to the communications field, more particularly, to a kind of resource caching method and device.

Background technology

Flourishing with internet, network traffics rapid growth, bring to Virtual network operator Huge challenge.Network infrastructure dilatation is invested huge it is difficult to mate the increasing of customer flow Long speed.It is the effective means solving this problem that internet caches (Web Cache) system One of.Existing network flow is most of to be derived from HTTP (Hyper Text Transfer Protocol, HTTP), mainly include video, file download, web page browsing etc., due to HTTP is the pattern based on client/server (Client/Server, C/S), and user accesses It is required for source server during resource and obtains same data, the number accessing same resource is more, The repeated data flow producing is bigger.

Web Cache based on storage tape swapping width, flow localized thinking, by hot resource It is cached to local, directly provide service from local for terminal user, substantially reduce the number The flow of level network, saves the investment of Virtual network operator, such as Network infrastructure construction and net Between close the account, also reduce simultaneously response terminal device access time delay, improve user Experience.

Transparent caching is a kind of implementation of Web Cache, and transparent caching technology refers to Bright caching is interacted with terminal device using Web server address, using terminal device address with Web server interaction is so that terminal device and Web server are to caching system unaware. Generally, transparent caching sets up transmission control protocol (Transmission according to terminal device Control Protocol, TCP) targeted internet agreement in the request message that connects (Internet Protocol, IP) address determines source server IP address, if this message quilt Terminal device malice is forged or is pointed to malicious websites, then may lead to Web Cache by malice Hold and be cached to locally, and be supplied to other terminal user as source server content, for example, Terminal device, please by accessing after transparent caching is established and is connected with the TCP of malicious websites Ask and be forged into Get http://www.baidu.com/20150619qq_setup.exe passes through transparent slow Deposit and be sent to this malicious websites, this malicious websites returns trojan horse to this eventually by transparent caching End equipment, if transparent caching judges http:The resource of //www.baidu.com/20150619qq_setup.exe instruction is hot resource, The trojan horse that then this malicious websites can be returned is buffered in locally, when other-end user obtains Real http:During the resource of //www.baidu.com/20150619qq_setup.exe instruction, This trojan horse can be returned to other-end equipment by transparent caching.

Content of the invention

Embodiments of the invention provide a kind of resource caching method and device, are prevented from internet Buffer unit buffer malice resource, thus prevent it from putting forward malice resource as source server resource Supply other-end equipment user.

A kind of first aspect, there is provided resource caching method, methods described includes:Internet delays Cryopreservation device, after receiving Resource Server and return to the resource of terminal device, determines described resource Meet the first caching condition;Described internet buffer storage sends analysis request to resolution server, The domain name in the uniform resource position mark URL of described resource is carried in described analysis request;Institute State internet buffer storage and receive described resolution server according to the domain in the URL of described resource Name carries out parsing the mark of the server obtaining;Being designated of the server obtaining when described parsing During the mark of described Resource Server, resource described in described internet buffer unit buffer, described Cache described resource and include by described caching resource in described internet buffer storage, to provide To the terminal device accessing described resource.

In conjunction with the implementation of first aspect, in the first possible implementation in first aspect, Described receive the resource that Resource Server returns to terminal device before, methods described is also wrapped Include:Described internet buffer storage receives foundation and the described resource clothes that described terminal device sends Business device connection connection request, carry in described connection request described terminal device mark and The mark of described Resource Server;Described internet buffer storage sets up described terminal device and institute State the connection of Resource Server;Described internet buffer storage receives what described terminal device sent Access request to described resource, carries in described access request in the URL of described resource Domain name;Described internet buffer storage is according to the described terminal device of described foundation and described resource The connection of server, sends described access request to described Resource Server;Described internet delays Cryopreservation device receives the described resource that described Resource Server returns.

In conjunction with the first possible implementation of first aspect, first aspect, can in second In the mode enabling, the mark of the server obtaining when described parsing is not described resource service During the mark of device, described internet buffer storage does not cache described resource.

In conjunction with first aspect, first aspect the first to the possible implementation of second, In the third mode in the cards, described internet buffer storage set up described terminal device with The connection of described Resource Server includes:Described internet buffer storage passes through described terminal device Mark set up the connection of described terminal device and described Resource Server, described terminal device Mark includes the internet protocol address of described terminal device.

In conjunction with first aspect, first aspect the first to the third possible implementation, In 4th kind of mode in the cards, described internet buffer storage also sends described resource to institute State terminal device, described internet buffer storage sends institute by the mark of described Resource Server State resource to described terminal device, the mark of described Resource Server includes described Resource Server IP address.

In conjunction with first aspect, first aspect the first to the 4th kind of possible implementation, In 5th kind of mode in the cards, described connection request includes transmission control protocol TCP even Connect request, the described access request to described resource includes HTTP request, Described resolution server includes domain name system DNS server.

In conjunction with first aspect, first aspect the first to the 5th kind of possible implementation, In 6th kind of mode in the cards, described determine that described resource meets the first caching condition and includes Determine that described resource meets resource and accesses hot statistics condition, described resource accesses hot statistics bag Include the statistics to the frequency accessing same resource in certain time.

Second aspect, provides a kind of caching resource device, including processing module, sending module, Receiver module and cache module:Described processing module, for receiving money in described receiver module After source server returns to the resource of terminal device, determine that described resource meets the first caching condition; Described sending module, for sending analysis request to resolution server, takes in described analysis request Domain name in uniform resource position mark URL with described resource;Described receiver module, is used for Receive described resolution server and carry out parsing according to the domain name in the URL of described resource and obtain The mark of server;Described cache module, the mark of the server for obtaining when described parsing For described Resource Server mark when, cache described resource, the described resource of described caching includes By described caching resource in described cache module, set with being supplied to the terminal accessing described resource Standby.

In conjunction with the implementation of second aspect, in the first possible implementation in second aspect, Described receiver module is additionally operable to receive, described, the money that Resource Server returns to terminal device Before source, receive the company that the foundation of described terminal device transmission is connected with described Resource Server Connect request, in described connection request, carry the mark of described terminal device and described Resource Server Mark;Described processing module is additionally operable to set up described terminal device and described Resource Server Connect;Described receiver module is additionally operable to receive the visit to described resource that described terminal device sends Ask request, in described access request, carry the domain name in the URL of described resource;Described transmission Module is additionally operable to the connection of the described terminal device according to described foundation and described Resource Server, Send described access request to described Resource Server;It is described that described receiver module is additionally operable to reception The described resource that Resource Server returns.

In conjunction with the first possible implementation of second aspect, second aspect, can in second In the mode enabling, described cache module is additionally operable to the mark of server obtaining when described parsing When knowledge is not the mark of described Resource Server, do not cache described resource.

In conjunction with second aspect, second aspect the first to the possible implementation of second, In the third mode in the cards, described processing module be additionally operable to set up described terminal device with The connection of described Resource Server includes:Described processing module is additionally operable to by described terminal device Mark set up the connection of described terminal device and described Resource Server, described terminal device Mark includes the internet protocol address of described terminal device.

In conjunction with second aspect, second aspect the first to the third possible implementation, In 4th kind of mode in the cards, described sending module is additionally operable to send described resource to described Terminal device, described sending module by the mark of described Resource Server send described resource to Described terminal device, the mark of described Resource Server includes the IP ground of described Resource Server Location.

In conjunction with second aspect, second aspect the first to the 4th kind of possible implementation, In 5th kind of mode in the cards, described connection request includes transmission control protocol TCP even Connect request, the described access request to described resource includes HTTP request, Described resolution server includes domain name system DNS server.

In conjunction with second aspect, second aspect the first to the 5th kind of possible implementation, In 6th kind of mode in the cards, described determine that described resource meets the first caching condition and includes Determine that described resource meets resource and accesses hot statistics condition, described resource accesses hot statistics bag Include the statistics to the frequency accessing same resource in certain time.

The technical scheme providing according to embodiments of the present invention, by returning receiving Resource Server After the resource of terminal device, determine that described resource meets the first caching condition, send parsing Ask resolution server, in described analysis request, carry the domain name of described resource, receive described Resolution server carries out parsing the mark of the server obtaining according to the domain name of described resource, works as institute State parsing obtain server be designated described Resource Server mark when, cache described money Source, the described resource of described caching includes by described caching resource in described internet buffer storage, To be supplied to the terminal device accessing described resource, it is prevented from internet buffer unit buffer and dislikes Meaning resource is such that it is able to prevent it that malice resource is supplied to other eventually as source server resource End subscriber.

Brief description

In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below The accompanying drawing of required use in embodiment or description of the prior art will be briefly described, show and Easily insight, drawings in the following description are only some embodiments of the present invention, for this area For those of ordinary skill, on the premise of not paying creative work, can also be according to these Accompanying drawing obtains other accompanying drawings.

Fig. 1 is the schematic diagram of the network architecture of embodiment of the present invention application;

Fig. 2 is the exemplary flow chart of the resource caching method according to one embodiment of the invention;

Fig. 3 is the exemplary signaling diagram of the resource caching method according to one embodiment of the invention;

Fig. 4 is the exemplary signaling diagram of the resource caching method according to another embodiment of the present invention;

Fig. 5 is that the hardware configuration of the universal computer architecture according to one embodiment of the invention is illustrated Figure;

Fig. 6 is the structural representation of the caching resource device according to one embodiment of the invention.

Specific embodiment

Below describe in, in order to illustrate rather than in order to limit it is proposed that such as particular system knot The detail of structure, interface, technology etc, thoroughly to understand the present invention.However, ability The technical staff in domain is it should be clear that can also in the other embodiments do not have these details Realize the present invention.In other situations, omit to well-known device, circuit and method Detailed description, in order to avoid unnecessary details hinders description of the invention.

Fig. 1 is the network architecture schematic diagram of the resource caching method according to one embodiment of the invention.

Internet buffer storage 102, be deployed in terminal device 101 and Resource Server 104 it Between, the resource access request that terminal device 101 is sent is monitored, and can preserve local The copy of the response that Resource Server 104 returns, the response that Resource Server 104 returns is permissible For be such as, but not limited to HTML (Hyper Text Markup Language, HTML) webpage, picture, video, at least one in file download.It is successfully received terminal During the request of access same asset of equipment 101 or the transmission of other-end equipment, internet caches Device 102 use is saved in local response replica and returns to user, thus need not be again to money Source server 104 is asked.

Resolution server 103, can be such as but not limited to domain name system (Domain Name System, DNS) server is as domain name and IP address mutually mapping on internet One distributed data base, by host name, finally gives the corresponding IP address of this host name Process be called domain name mapping, or hostname resolution.Comment in the request including internet standard In view document (Request For Comments, RFC), RFC 2181, RFC 2136, RFC 2308 document is illustrated to DNS.

In the network architecture according to the resource caching method of one embodiment of the invention, terminal device 101 send resource access request to internet buffer storage 102, internet buffer storage 102 Forward this resource access request to corresponding Resource Server 104, Resource Server 104 returns The resource that terminal device 101 request accesses is to internet buffer storage 102, internet caching dress Put this resource of 102 forwardings to terminal device 101.Internet buffer storage 102 judges whether to need Cache this resource, when determination needs to cache this resource, request analysis server 103 is to this Domain name in the URL (Uniform Resource Locator, URL) of resource Parsed, obtained server identification, if parsing the server identification obtaining and resource service The mark of device 104 is identical, then cache this resource, otherwise, does not cache this resource.

In a kind of implementation of the embodiment of the present invention, internet buffer storage is independent reality Body device, it is also possible to be arranged in other devices as functional entity, can also have other titles.

Fig. 2 is the exemplary flow chart of the resource caching method 200 according to one embodiment of the invention. During implementing, resource caching method 200 can be delayed by such as but not limited to internet Executing, this internet buffer storage can be such as but not limited to transparent caching to cryopreservation device.Money Source server is a kind of implementation of Web server.

S202, internet buffer storage returns to the money of terminal device receiving Resource Server Behind source, determine that described resource meets the first caching condition.

In a kind of implementation of the embodiment of the present invention, described determine that described resource meets first Caching condition includes determining that described resource meets resource and accesses hot statistics condition, described resource is visited Ask that hot statistics include the statistics in certain time to the frequency accessing same resource.

In a kind of implementation of the embodiment of the present invention, return in the described Resource Server that receives Before the resource of terminal device:

Described internet buffer storage receives foundation and the described resource that described terminal device sends The connection request of the connection of server, carries the mark of described terminal device in described connection request Mark with described Resource Server;

Described internet buffer storage sets up the company of described terminal device and described Resource Server Connect;

Described internet buffer storage receives the visit to described resource that described terminal device sends Ask request, in described access request, carry the domain name in the URL of described resource;

Described internet buffer storage is according to the described terminal device of described foundation and described resource The connection of server, sends described access request to described Resource Server;

Described internet buffer storage receives the described resource that described Resource Server returns.

In a kind of implementation of the embodiment of the present invention, above-mentioned connection request can for for example but Being not limited to transmission control protocol (Transmission Control Protocol, TCP) connection please Ask, the access request to resource can be such as but not limited to HTTP request.

In a kind of implementation of the embodiment of the present invention, this internet buffer storage is by this eventually The mark of end equipment sets up the connection of this terminal device and this Resource Server, and this internet caches Device sends this access request to this Resource Server by the mark of this terminal device, wherein should The mark of terminal device includes the IP address of this terminal device.

In a kind of implementation of the embodiment of the present invention, this internet buffer storage passes through this money The mark of source server sends the resource of this Resource Server return to this terminal device, this resource The mark of server includes the IP address of this Resource Server.

Specifically, the resource that Resource Server returns can be such as but not limited to HTML net At least one in page, picture, video, file download.

S204, described internet buffer storage sends analysis request to resolution server, described solution The domain name in the URL of described resource is carried in analysis request.

S206, described internet buffer storage receives described resolution server according to described resource Domain name in URL carries out parsing the mark of the server obtaining.

In S204 and S206, in a kind of implementation of the embodiment of the present invention, this parsing Server includes dns server.This analysis request is used for asking the parsing of this dns server to be somebody's turn to do Domain name in the URL of resource.Parse the IP address that the result obtaining indicates server.

S208, when the mark being designated described Resource Server of the server that described parsing obtains When, resource described in described internet buffer unit buffer, the described resource of described caching is included institute State caching resource in described internet buffer storage, to be supplied to the terminal accessing described resource Equipment.

Wherein, described being supplied to accesses the terminal device of described resource and includes being supplied to this money of access The other-end equipment in source, also includes being supplied to this terminal device accessing this resource again.

In a kind of implementation of the embodiment of the present invention, when the mark of the server that parsing obtains Be not this Resource Server mark when, this internet buffer storage does not cache this resource.

In a kind of implementation of the embodiment of the present invention, when the mark of the server that parsing obtains For this Resource Server IP address when, this internet buffer storage by this caching resource this Ground.When the IP address that the mark of the server that parsing obtains is not this Resource Server, should Internet buffer storage not by this caching resource local.

In a kind of implementation of the embodiment of the present invention, when at least meeting following two condition, Internet buffer storage is by caching resource local:

When the 1st, meeting resource access hot statistics condition;

2nd, meet when the server identification that parsing obtains identifies for Resource Server.

Additionally, internet buffer storage is receiving Resource Server and is returning to the money of terminal device Behind source, can also determine the need for caching this money according to the size of resource, type further Source.

The technical scheme providing according to embodiments of the present invention, by returning receiving Resource Server After the resource of terminal device, after determining that described resource meets the first caching condition, send solution Resolution server is arrived in analysis request, carries the domain name of described resource in described analysis request, receives institute State resolution server to carry out parsing the mark of the server obtaining according to the domain name of described resource, when The server that described parsing obtains be designated described Resource Server mark when, caching is described Resource, the described resource of described caching is included described caching resource in described internet buffer storage In, to be supplied to the terminal device accessing described resource, it is prevented from internet buffer storage and delays Deposit malice resource such that it is able to prevent it that as source server resource, malice resource is supplied to it He is terminal use.

Fig. 3 is the exemplary signaling diagram of the resource caching method according to one embodiment of the invention.? During implementing, resource caching method 300 can be cached by such as but not limited to internet Device executes.In the present embodiment, internet buffer storage can be such as but not limited to transparent Caching, resolution server can be such as but not limited to dns server.Resource Server is A kind of implementation of Web server.

S301, terminal device sends the TCP connection request setting up Resource Server to transparent Caching, wherein carries the IP address of this terminal device and the IP address of this Resource Server.

S302, the IP address of transparent caching using terminal equipment sets up Resource Server TCP connects.

S303, transparent caching receive terminal device be sent to Resource Server HTTP access please Ask.

S304, this HTTP access request is sent out by the IP address of transparent caching using terminal equipment Deliver to Resource Server.

S305, Resource Server returns the resource of premises equipment requests access to transparent caching.

S306, Resource Server is returned by transparent caching using the IP address of Resource Server Resource returns to terminal device.

S307, transparent caching accesses hot statistics determination according to resource to be needed to cache this resource.

S308, in the URL to the resource in access request for the transparent caching request analysis server Domain name carry out domain name mapping.Transparent caching sends dns resolution request to dns server, Wherein carry the domain name in the URL of this resource, request dns server parses in this URL Domain name.

S309, dns server carries out dns resolution to the domain name in the URL of this resource, Obtain indicating the analysis result of server ip address.

S310, dns server sends this analysis result to transparent caching.

S311, transparent caching carries out server ip address verification.Transparent caching judges server IP address be whether this Resource Server IP address, if it is, by this caching resource Local, otherwise, do not cache this resource.

The technical scheme providing according to embodiments of the present invention, by returning receiving Resource Server After the resource of terminal device, after determining that described resource meets the first caching condition, retransmit Analysis request, to resolution server, carries the domain name of described resource in described analysis request, receive Described resolution server carries out parsing the mark of the server obtaining according to the domain name of described resource, When the server that described parsing obtains be designated described Resource Server mark when, cache institute State resource, the described resource of described caching includes for described caching resource caching dress in described internet In putting, to be supplied to the terminal device accessing described resource, it is prevented from internet buffer storage Caching malice resource is such that it is able to prevent it to be supplied to malice resource as source server resource Other-end user.

Fig. 4 is the exemplary signaling diagram of the resource caching method according to another embodiment of the present invention. During implementing, resource caching method 400 can be delayed by such as but not limited to internet Cryopreservation device executes.In the present embodiment, internet buffer storage can be such as but not limited to Bright caching, resolution server can be such as but not limited to dns server.Resource Server It is a kind of implementation of Web server.

S401, terminal device send set up to first resource server TCP connection request to Transparent caching, wherein carries the IP address of this terminal device and the IP of this first resource server Address.

S402, the IP address of transparent caching using terminal equipment sets up first resource server TCP connect.

S403, transparent caching receives the HTTP that terminal device is sent to first resource server Access request.

S404, the access request that transparent caching receives for each, all request analysis server Domain name mapping is carried out to the domain name in the URL of the resource in access request.Transparent caching to Dns server sends dns resolution request, and wherein carrying this HTTP access request will visit Domain name in the URL of the resource asked, request dns server parses the domain name in this URL.

S405, dns server carries out dns resolution to the domain name in the URL of this resource, Obtain indicating the analysis result of server ip address.

S406, dns server sends this analysis result to transparent caching.

S407, transparent caching carries out server ip address verification.Transparent caching determines parsing knot Whether the IP address of the server of fruit instruction is the IP address of this first resource server, works as clothes When the IP address of business device is the IP address of first resource server, execute S408 to S410; When the IP address that the IP address of server is Secondary resource server, execute S411 to S413.

S408, this HTTP access request is sent out by the IP address of transparent caching using terminal equipment Deliver to first resource server.

S409, first resource server returns the resource of premises equipment requests access to transparent caching.

S410, first resource is serviced by transparent caching using the IP address of first resource server The resource that device returns returns to terminal device.

S411, the TCP that transparent caching is disconnected to first resource server connects.

S412, the IP address of transparent caching using terminal equipment sets up Secondary resource server TCP connect.

S413, this HTTP access request is sent out by the IP address of transparent caching using terminal equipment Deliver to Secondary resource server.

Hereafter, Secondary resource is serviced by transparent caching using the IP address of first resource server The resource that device returns returns to terminal device.

In a kind of implementation of the embodiment of the present invention, resource is being returned to end by transparent caching After end equipment, it is determined whether need to cache this resource, if it is desired, by this caching resource at this Ground;Otherwise, do not cache.

In another kind of implementation of the embodiment of the present invention, resource is being returned to by transparent caching Before terminal device, it is determined whether need to cache this resource, if it is desired, by this caching resource Local;Otherwise, do not cache.

According to technical scheme provided in an embodiment of the present invention, by sending Resource Server return Resource to before terminal device, send analysis request to resolution server, in this analysis request Carry the domain name in the URL of this resource, receive this resolution server return according to this resource URL in domain name carry out parsing the mark of the server obtaining, when the clothes that obtain of parsing Business device be designated first resource server mark when, cache this resource, when parsing obtains Server be designated Secondary resource server mark when, disconnect with first resource server Connect, set up the connection with Secondary resource server, send the money that Secondary resource server returns Source, to terminal device, is prevented from internet buffer unit buffer malice resource such that it is able to prevent Stop it and malice resource is supplied to other-end user as source server resource.

It should be noted that Fig. 2 embodiment of the present invention, Fig. 3 embodiment, Fig. 4 embodiment institute Although the technical scheme providing can prevent internet buffer unit buffer malice resource, thus It is prevented from it and malice resource is supplied to other-end user as source server resource, but The technical scheme that Fig. 4 embodiment is provided when analysis result is not first resource server, mutually Network caching device needs to re-establish the connection with Secondary resource server, and this process is big Increased greatly the stand-by period of terminal user.It is additionally, since what Fig. 4 embodiment was provided In technical scheme, internet buffer storage will be asked for each resource access request receiving Ask resolution server to carry out domain name mapping, and carry out server identification verification, therefore increase and understand The processing load of analysis server and response delay.

The technical scheme that Fig. 2 embodiment of the present invention and Fig. 3 embodiment are provided, with respect to Fig. 4 For the technical scheme that embodiment is provided, decrease resolution server and carry out the secondary of domain name mapping The number of times of number server mark verification, reduces the overhead of internet buffer storage, keeps away Having exempted from analysis result is not the process re-establishing connection after target resource server, thus avoiding The response delay to premises equipment requests that thus introduces.

In addition, for Fig. 2 embodiment, in a kind of implementation of the embodiment of the present invention, S202 In, internet buffer storage after receiving Resource Server and return to the resource of terminal device, Send this resource to this terminal device, afterwards, after determining that described resource meets the first caching condition, Execute S204 to S208 again.This implementation can reduce to terminal device to greatest extent The response delay of request, reduces the stand-by period of terminal user to greatest extent.

For Fig. 2 embodiment, in another kind of implementation of the embodiment of the present invention, internet Buffer storage can retransmit this resource to this terminal device after having executed S202 to S208. Although this implementation is for a kind of upper implementation, the sound to premises equipment requests Time delay is answered to increase, but for the technical scheme that Fig. 4 embodiment is provided, due to it Domain name mapping is carried out to the resource meeting the first caching condition, and equally avoids analysis result It is not the process re-establishing connection after target resource server, implement accordingly, with respect to Fig. 4 The technical scheme that there is provided of example, it also reduces resolution server carry out domain name mapping number of times and The number of times of server identification verification, reduces the overhead of internet buffer storage, simultaneously Reduce the response delay to premises equipment requests.

Fig. 5 is that the hardware configuration of the universal computer architecture 500 according to one embodiment of the invention shows It is intended to.As shown in figure 5, universal computer architecture 500 include processor 502, memory 504, Communication interface 506 and bus 508.Wherein, processor 502, memory 504 and communication connect Mouth 506 realizes communication connection each other by bus 508.

Processor 502 can using general central processing unit (Central Processing Unit, CPU), microprocessor, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuit, for executing relative program, with Realize the technical scheme that the embodiment of the present invention is provided.

Memory 504 can be read-only storage (Read Only Memory, ROM), Static storage device, dynamic memory or random access memory (Random Access Memory, RAM).Memory 504 can be with storage program area 5041 and other application journey Sequence 5042.Technical scheme provided in an embodiment of the present invention is being realized by software or firmware When, the program code for realizing technical scheme provided in an embodiment of the present invention is saved in memory In 504, and to be executed by processor 502.

Communication interface 506, using the R-T unit of such as but not limited to transceiver one class, to be realized Connect the communication and other equipment or communication network between.

Bus 508 may include a path, in all parts (such as processor 502, memory 504th, defeated and communication interface 506) between transmit information.

As shown in fig. 6, when data processing equipment includes above-mentioned universal computer architecture 500, This universal computer architecture 500 further includes the processing module 602 for caching resource, sends out Send module 604, receiver module 606 and cache module 608.These modules can use hardware Realize, software is realized, or software combined with hardware is realized.As the module of software, it is stored in logical With in the memory 504 of computer configuation 500, can together as an independent program, Or respectively as independent program.As a kind of optional embodiment, these software modules Can distinguish, or the part together as application program 5042, or as operating system 5041 part.

Processing module 602, returns to end for receiving Resource Server in described receiver module After the resource of end equipment, determine that described resource meets the first caching condition.

Sending module 604, for sending analysis request to resolution server, described analysis request In carry domain name in the URL of described resource.

Receiver module 606, for receiving the URL according to described resource for the described resolution server In domain name carry out parsing the mark of the server obtaining.

Cache module 608, is designated described resource for the server that obtains when described parsing During the mark of server, cache described resource, the described resource of described caching is included described resource It is buffered in described cache module, to be supplied to the terminal device accessing described resource.

Wherein, Resource Server is a kind of implementation of Web server.

In a kind of implementation of the embodiment of the present invention, described receiver module 606 is additionally operable to Described receive the resource that Resource Server returns to terminal device before, receive described terminal set The connection request that the foundation that preparation is sent is connected with described Resource Server, in described connection request Carry the mark of described terminal device and the mark of described Resource Server;

Described processing module 602 is additionally operable to set up described terminal device and described Resource Server Connection;

Described receiver module 606 is additionally operable to receive that described terminal device sends to described resource Access request, carry the domain name in the URL of described resource in described access request;

Described sending module 604 be additionally operable to described terminal device according to described foundation with described The connection of Resource Server, sends described access request to described Resource Server;

Described receiver module 606 is additionally operable to receive the described resource that described Resource Server returns.

In a kind of implementation of the embodiment of the present invention, described cache module 608 is additionally operable to work as When the mark of the server that described parsing obtains is not the mark of described Resource Server, do not cache Described resource.

In a kind of implementation of the embodiment of the present invention, described processing module 602 is additionally operable to build Found described terminal device to include with the connection of described Resource Server:Described processing module 602 is also For described terminal device and described Resource Server are set up by the mark of described terminal device Connection, the mark of described terminal device includes the Internet protocol IP ground of described terminal device Location.

In a kind of implementation of the embodiment of the present invention, described sending module 604 is additionally operable to send out Send described resource to described terminal device, described sending module 604 passes through described Resource Server Mark send described resource to described terminal device, the mark of described Resource Server includes institute State the IP address of Resource Server.

The technical scheme providing according to embodiments of the present invention, by returning receiving Resource Server After the resource of terminal device, determine that described resource meets the first caching condition, send parsing Ask resolution server, in described analysis request, carry the domain name in the URL of described resource, Receive described resolution server and carry out parsing according to the domain name in the URL of described resource and obtain The mark of server, the server that obtains when described parsing be designated described Resource Server During mark, cache described resource, the described resource of described caching is included described caching resource in institute State in internet buffer storage, to be supplied to the terminal device accessing described resource, be prevented from Internet buffer unit buffer malice resource takes such that it is able to prevent it from malice resource is regarded source Business device resource is supplied to other-end user.

Although it should be noted that the universal computer architecture 500 shown in Fig. 5 illustrate only processor 502nd, memory 504, communication interface 506 and bus 508, but during implementing, It should be apparent to a person skilled in the art that above-mentioned caching resource device also comprises to realize normally running Other devices necessary.Meanwhile, according to specific needs, those skilled in the art should be bright In vain, above-mentioned caching resource device also can comprise to realize the hardware device of other additional functions.Additionally, It should be apparent to a person skilled in the art that above-mentioned caching resource device also can only comprise to realize this Device necessary to inventive embodiments, without comprising the whole devices shown in Fig. 5.

In addition, each functional unit in each embodiment of the present invention can be integrated in a process In unit or unit is individually physically present it is also possible to two or more are single Unit is integrated in a unit.Above-mentioned integrated unit both can with the form of hardware realize, Can also be realized in the form of SFU software functional unit.

If described integrated unit is realized and as independent using in the form of SFU software functional unit When production marketing or use, can be stored in a computer read/write memory medium.It is based on Such understanding, technical scheme substantially contributes to prior art in other words The all or part of part or this technical scheme can be embodied in the form of software product, This computer software product is stored in a storage medium, including some instructions with so that one Platform computer equipment (can be personal computer, server, or network equipment etc.) or place Reason device (processor) executes all or part of step of each embodiment methods described of the present invention. And aforesaid storage medium includes:USB flash disk, portable hard drive, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.

The above, the only specific embodiment of the present invention, but protection scope of the present invention is simultaneously Be not limited to this, any those familiar with the art the invention discloses technology model In enclosing, change or replacement can be readily occurred in, all should be included within the scope of the present invention. Therefore, protection scope of the present invention should be defined by described scope of the claims.

Claims (14)

1. a kind of resource caching method is it is characterised in that comprise the following steps:
Internet buffer storage after receiving Resource Server and return to the resource of terminal device, Determine that described resource meets the first caching condition;
Described internet buffer storage sends analysis request to resolution server, described analysis request In carry domain name in the uniform resource position mark URL of described resource;
Described internet buffer storage receives in the URL according to described resource for the described resolution server Domain name carry out parsing the mark of the server obtaining;
When the server that described parsing obtains be designated described Resource Server mark when, institute State resource described in internet buffer unit buffer, the described resource of described caching is included described resource It is buffered in described internet buffer storage, to be supplied to the terminal device accessing described resource.
2. the method for claim 1 is it is characterised in that receive resource clothes described Before business device returns to the resource of terminal device, methods described also includes:
Described internet buffer storage receives foundation and the described resource clothes that described terminal device sends Business device connection connection request, carry in described connection request described terminal device mark and The mark of described Resource Server;
Described internet buffer storage sets up the connection of described terminal device and described Resource Server;
Described internet buffer storage receives the access to described resource that described terminal device sends Request, carries the domain name in the URL of described resource in described access request;
Described internet buffer storage is taken with described resource according to the described terminal device of described foundation The connection of business device, sends described access request to described Resource Server;
Described internet buffer storage receives the described resource that described Resource Server returns.
3. method as claimed in claim 1 or 2 is it is characterised in that when described parsing obtains Server mark be not described Resource Server mark when, described internet buffer storage Do not cache described resource.
4. method as claimed in claim 2 or claim 3 it is characterised in that
Described internet buffer storage sets up the connection of described terminal device and described Resource Server Including:Described internet buffer storage is set up described terminal by the mark of described terminal device and is set The standby connection with described Resource Server, the mark of described terminal device includes described terminal device Internet protocol address.
5. the method as described in Claims 1-4 any one it is characterised in that described mutually Network caching device also sends described resource to described terminal device, described internet buffer storage Described resource is sent to described terminal device, described resource by the mark of described Resource Server The mark of server includes the IP address of described Resource Server.
6. the method as described in claim 2 to 5 any one is it is characterised in that described connect Connect request and include TCP connection request, the described access request to described resource Including HTTP request, described resolution server includes domain name system DNS Server.
7. the method as described in claim 1 to 6 any one it is characterised in that described really Fixed described resource meets the first caching condition and includes determining that described resource meets resource and accesses temperature system Meter condition, described resource accesses hot statistics and includes in certain time to the frequency accessing same resource Secondary statistics.
8. a kind of caching resource device it is characterised in that include processing module, sending module, Receiver module and cache module:
Described processing module, returns to end for receiving Resource Server in described receiver module After the resource of end equipment, determine that described resource meets the first caching condition;
Described sending module, for sending analysis request to resolution server, described analysis request In carry domain name in the uniform resource position mark URL of described resource;
Described receiver module, for receiving in the URL according to described resource for the described resolution server Domain name carry out parsing the mark of the server obtaining;
Described cache module, is designated described resource for the server that obtains when described parsing During the mark of server, cache described resource, the described resource of described caching is included described resource It is buffered in described cache module, to be supplied to the terminal device accessing described resource.
9. device as claimed in claim 8 is it is characterised in that described receiver module is additionally operable to Described receive the resource that Resource Server returns to terminal device before, receive described terminal The connection request that the foundation that equipment sends is connected with described Resource Server, described connection request In carry described terminal device mark and described Resource Server mark;
Described processing module is additionally operable to set up the connection of described terminal device and described Resource Server;
Described receiver module is additionally operable to receive the access to described resource that described terminal device sends Request, carries the domain name in the URL of described resource in described access request;
Described sending module is additionally operable to described terminal device and described resource clothes according to described foundation The connection of business device, sends described access request to described Resource Server;
Described receiver module is additionally operable to receive the described resource that described Resource Server returns.
10. device as claimed in claim 8 or 9 is it is characterised in that described cache module It is additionally operable to when the mark that the mark of the server that described parsing obtains is not described Resource Server, Do not cache described resource.
11. devices as described in claim 9 or 10 it is characterised in that
Described processing module is additionally operable to set up the connection of described terminal device and described Resource Server Including:Described processing module is additionally operable to be set up described terminal by the mark of described terminal device and sets The standby connection with described Resource Server, the mark of described terminal device includes described terminal device Internet protocol address.
12. devices as described in claim 8 to 11 any one are it is characterised in that described Sending module is additionally operable to send described resource to described terminal device, and described sending module passes through institute The mark stating Resource Server sends described resource to described terminal device, described Resource Server Mark include the IP address of described Resource Server.
13. devices as described in claim 9 to 12 any one are it is characterised in that described Connection request includes TCP connection request, and the described access to described resource please Ask including HTTP request, described resolution server includes domain name system DNS Server.
14. devices as described in claim 8 to 13 any one are it is characterised in that described Determine that described resource meets the first caching condition and includes determining that described resource meets resource and accesses temperature Statistical condition, described resource accesses hot statistics and includes in certain time to the same resource of access The statistics of the frequency.
CN201510464724.6A 2015-07-31 2015-07-31 Resource caching method and device CN106411978B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510464724.6A CN106411978B (en) 2015-07-31 2015-07-31 Resource caching method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510464724.6A CN106411978B (en) 2015-07-31 2015-07-31 Resource caching method and device
PCT/CN2016/077876 WO2017020597A1 (en) 2015-07-31 2016-03-30 Resource cache method and apparatus

Publications (2)

Publication Number Publication Date
CN106411978A true CN106411978A (en) 2017-02-15
CN106411978B CN106411978B (en) 2020-01-21

Family

ID=57942383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510464724.6A CN106411978B (en) 2015-07-31 2015-07-31 Resource caching method and device

Country Status (2)

Country Link
CN (1) CN106411978B (en)
WO (1) WO2017020597A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668046A (en) * 2009-10-13 2010-03-10 成都市华为赛门铁克科技有限公司 Resource caching method, resource obtaining method, device and system thereof
CN102843437A (en) * 2012-09-17 2012-12-26 北京星网锐捷网络技术有限公司 Conversion method and device for webpage application and network device
CN103412827A (en) * 2013-08-05 2013-11-27 广州唯品会信息科技有限公司 Picture caching method and picture caching system
CN103825919A (en) * 2012-11-16 2014-05-28 中国移动通信集团北京有限公司 Method, device and system for data resource caching
CN104079534A (en) * 2013-03-27 2014-10-01 中国移动通信集团北京有限公司 Method and system of implementing HTTP (Hyper Text Transport Protocol) cache

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102170479B (en) * 2011-05-21 2013-12-18 华为数字技术(成都)有限公司 Updating method of Web buffer and updating device of Web buffer
KR20130064906A (en) * 2011-12-09 2013-06-19 삼성전자주식회사 Method and apparatus for load balancing in communication system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668046A (en) * 2009-10-13 2010-03-10 成都市华为赛门铁克科技有限公司 Resource caching method, resource obtaining method, device and system thereof
CN101668046B (en) * 2009-10-13 2012-12-19 成都市华为赛门铁克科技有限公司 Resource caching method, device and system thereof
CN102843437A (en) * 2012-09-17 2012-12-26 北京星网锐捷网络技术有限公司 Conversion method and device for webpage application and network device
CN103825919A (en) * 2012-11-16 2014-05-28 中国移动通信集团北京有限公司 Method, device and system for data resource caching
CN104079534A (en) * 2013-03-27 2014-10-01 中国移动通信集团北京有限公司 Method and system of implementing HTTP (Hyper Text Transport Protocol) cache
CN103412827A (en) * 2013-08-05 2013-11-27 广州唯品会信息科技有限公司 Picture caching method and picture caching system

Also Published As

Publication number Publication date
WO2017020597A1 (en) 2017-02-09
CN106411978B (en) 2020-01-21

Similar Documents

Publication Publication Date Title
Wang et al. How Speedy is {SPDY}?
US9565265B2 (en) Method and apparatus for automatically optimizing the loading of images in a cloud-based proxy service
US20190146963A1 (en) Storing State in a Dynamic Content Routing Network
CN104137511B (en) Method, equipment and client device for the dynamic select of security protocol
CN102597980B (en) There is the cache server of easily extensible programming framework
CN101853265B (en) System and method for refreshing cached data based on content update frequency
CN105610870B (en) More account login methods and device
US6775743B2 (en) Content caching with special handling of multiple identical requests for content
CN103329113B (en) Configuration is accelerated and custom object and relevant method for proxy server and the Dynamic Website of hierarchical cache
CN103873486B (en) For the system and method for load balancing real time streaming protocol
CN102710748B (en) Data capture method, system and equipment
TWI230885B (en) Computer network system, computer system, method for communication between computer systems, method for measuring computer system performance, and storage medium
US8069406B2 (en) Method and system for improving user experience while browsing
US20120101907A1 (en) Securing Expandable Display Advertisements in a Display Advertising Environment
US9934065B1 (en) Servicing I/O requests in an I/O adapter device
US20120210011A1 (en) Apparatus and methods for access solutions to wireless and wired networks
US20130246504A1 (en) Method for subscribing to notification, apparatus and system
US10430487B2 (en) System and method to share content utilizing universal link format
CN104333567B (en) It is the web cachings serviced using safety
CN100562873C (en) Obtain the system and method for web page element in the webpage
CN104798071A (en) Improving web sites performance using edge servers in fog computing architecture
CN103781055A (en) Data downloading method and associated device
US20150207660A1 (en) Client-side url redirection
RU2631769C2 (en) Method and device for determining objective of information processing
EP2435979A2 (en) Matching content providers and interested content users

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant