CN104426718B - Data decryptor server, cache server and redirection method for down loading - Google Patents
Data decryptor server, cache server and redirection method for down loading Download PDFInfo
- Publication number
- CN104426718B CN104426718B CN201310410580.7A CN201310410580A CN104426718B CN 104426718 B CN104426718 B CN 104426718B CN 201310410580 A CN201310410580 A CN 201310410580A CN 104426718 B CN104426718 B CN 104426718B
- Authority
- CN
- China
- Prior art keywords
- resource file
- server
- resource
- cache server
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention provides a kind of data decryptor server, a kind of cache server and a kind of redirection method for down loading, wherein, data decryptor server includes:Data decryptor module, for obtaining the resource file information of client request, and receives the store path of the resource file information from enquiry module and sends store path to redirection module;Enquiry module, for preserving resource file information according to predetermined way, and generates the store path of resource file information, and after the inquiry request from cache server is received, query result is fed back to cache server;Redirection module, for initiating redirection request to client, so that client sends download request according to store path to cache server.By technical scheme, when file is identical, and network address is different, cache server caching same file can be reduced, avoids the problem that cache file repeats to preserve in cache server, and be capable of the true network address of quick obtaining file.
Description
Technical field
The present invention relates to field of computer technology, in particular to a kind of data decryptor server, a kind of buffer service
Device and a kind of redirection method for down loading.
Background technology
With the increase of Internet user, the speed of online acquisition information slows down to have become restricts Internet development at present
An important factor for.Operator or enterprise save outlet bandwidth to improve online downloading experience, in operator or corporate intranet
Network deployment HTTP caching acceleration systems.
HTTP caching acceleration is divided into monitoring equipment and cache server.Traditional redirection downloading mode is monitored for monitoring equipment and used
Family HTTP download requests, have GET methods when listening in user's download request, and user's download request is reset using 302 methods
To cache server, re-direction of content asks download path for cache server address and user, and by user's download request
Path and user's download request URL(Uniform Resource Locator, network address)Full address exists to database.Work as caching
Server receives user's redirection request, and the download path of user's request is intercepted, downloads road by user in the database
Footpath inquires the URL of the true download request of user.This method can not be solved when file is identical, and download request URL is different, caching
Server repeats the problem of caching same file, and when data database storing is huge, can not quick obtaining real URL ask
Topic.
The content of the invention
In view of the technical problem occurred in correlation technique, the technical problems to be solved by the invention are, there is provided a kind of
Download technology is redirected, can be solved when file is identical, and download request URL is different, cache server repeats caching same file
The problem of.
In view of this, according to an aspect of the invention, there is provided a kind of data decryptor server, including:Data decryptor
Module, for obtaining the resource file information of client request, and receives the resource file information from enquiry module
Store path and the store path is sent to redirection module;Enquiry module, described in being preserved according to predetermined way
Resource file information, and the store path of the resource file information is generated, and receiving looking into from cache server
After asking request, query result is fed back into the cache server;The redirection module, for initiating weight to the client
Orientation request, so that the client sends download request according to the store path to the cache server.
The present invention preserves the resource file information requested with management client by the enquiry module of setting, is looking into
Ask in module and resource file information, and the depositing in enquiry module by resource file information are preserved by special preserving type
Storage path is sent to redirection module by data decryptor module, and redirection module initiates redirection request to client, in this way, slow
Server is deposited according to the store path of the resource file information of the client current request to inquire about enquiry module, enquiry module will
Query result feeds back to cache server, and cache server can be determined whether cache client request by the query result
Resource file, if having cached, is directly sent to client by cache file, so identical in file, the different situation of network address
Under, resource file need not be just reacquired, solves the problems, such as repetition cache resource file.
In the above-mentioned technical solutions, it is preferred that the resource file information includes network address, network address length, filename, file
Size;The enquiry module be used to judging the resource file network address whether with the network address in the resource file information that has recorded
It is identical, if differing, judge whether the resource file is recorded according to the filename of the resource file and file size
Cross, if the resource file was recorded, when preserving the current resource file information, in current resource text
The preservation of the information of duplicate marking and first resource file repeated with the current resource file is write in part information
Location, and resource file index is generated according to the preservation address of all resource file information.
Enquiry module when preserving resource file information, first determine whether client request resource file network address whether with
The network address of previously stored resource file is identical, if identical, need not preserve the resource file information, if differing, just preserves
The resource file information.And the resource file information when stored, is preserved in a special manner, need to judge the text of the resource file
Whether part name and file size are identical with the filename and file size of previously stored resource file, if identical, illustrate the money
Source file is identical with previously stored resource file, and preserve the resource file information when, write duplicate marking and with
Preservation address of first resource file that the resource file repeats in the enquiry module.Saving Current resource file
After information, according to preservation address generation resource file index of all resource file information preserved in enquiry module
Table.The effect of the resource file concordance list is and first resource text for quick search to corresponding resource file information
Preservation address of the part in the enquiry module is to find the network address of first resource file.
In the above-mentioned technical solutions, it is preferred that the enquiry module is receiving the inquiry from the cache server
After request, the current resource file information is navigated to from resource file index according to the store path, if
The duplicate marking is detected in the current resource file information, then according to the preservation address search to described first
The information of resource file, the cache server is fed back to by the web page address in the information of first resource file.
The effect of the store path is the network address for enabling enquiry module quickly to find respective resources file, in lookup
During, if navigating to respective resources fileinfo, concurrent existing duplicate marking, then first resource file that will be repeated with it
Network address be sent to cache server as the network address of current resource file, if cache resource file in cache server,
Then have network address and the corresponding record of resource file, cache server after the network address that enquiry module sends over is received,
Corresponding resource file can be found according to the network address, it is so identical in file, when network address is different, cache server would not be made
Again identical resource file is obtained according to new network address, and as a result of resource file index and special resource text
Part information preserving type, can quickly find the true network address of resource file, improve the acquisition efficiency of resource file.
In the above-mentioned technical solutions, it is preferred that the enquiry module does not detect in the current resource file information
During to the duplicate marking, the network address in the current resource file information is fed back into the cache server.
When enquiry module navigates to the information of respective resources file, if not finding duplicate marking, illustrate resource text
The true address of the resource file, without being buffered, at this time, is sent to cache server, caching clothes by part in cache server
Business device is according to the true Web site query to download Resource Server address and obtains the resource file of client request and is supplied to visitor
Family end, therefore, only when document entity is different, cache server just goes to obtain corresponding resource file, reduces buffer service
Device carrying cost, further increases the performance of cache server.
According to another aspect of the invention, a kind of cache server is additionally provided, including:Communication unit, for according to next
Sent from the store path in the download request of client to the data decryptor server as described in any of the above-described technical solution
Inquiry request, and receive the query result from the data decryptor server;Judging unit, for being supervised according to the data
The query result of server is listened to determine whether the resource file of the client request has been buffered in the cache server, if
It has been buffered in the cache server, the resource file is back to the client.
In the above-mentioned technical solutions, it is preferred that cache server can also include:Acquiring unit, in the resource file
It is uncached in the cache server when, according to the data decryptor server return the resource file download resource
The address of server, obtains the resource file, reverse proxy provides for the client from the download Resource Server
The resource file.
Query result is actually the true network address of resource file, if cache resource file in cache server,
Corresponding resource file can be found by the true network address, it is true by this if not delaying the resource file in cache server
Real network address directly finds corresponding download server, corresponding resource file is obtained from the download server, and this is provided
Source file is supplied to client.
According to another aspect of the present invention, a kind of redirection method for down loading is additionally provided, including:Data decryptor server obtains
Take the resource file information of client request;The resource file information is preserved according to predetermined way, and generates the resource text
The store path of part information, redirection request is sent according to the store path to the client;Taken in the data decryptor
When business device receives the inquiry request from cache server, the resource of the client request is judged according to the store path
Whether file has been buffered in the cache server, and query result is fed back to the cache server.
The present invention is believed by the data decryptor server of setting to preserve with the requested resource file of management client
Breath, resource file information is preserved by special preserving type, and according to resource file information in data decryptor server
Store path initiate redirection request to client, in this way, cache server is according to the resource of client current request text
The store path of part information inquires about data decryptor server, and query result feeds back to buffer service by data decryptor server
Device, cache server can be determined whether the resource file that cache client is asked by the query result, if having cached, directly
Connect and cache file is sent to client, it is so identical in file, in the case of network address difference, it need not just reacquire resource text
Part, solves the problems, such as repetition cache resource file.
In the above-mentioned technical solutions, it is preferred that described if the resource file is uncached in the cache server
Data decryptor server returns to the address of the download Resource Server of the resource file to the cache server, makes described slow
Deposit server and obtain the resource file from the download Resource Server, reverse proxy provides the money for the client
Source file.
Query result is actually the true network address of resource file, if cache resource file in cache server,
Corresponding resource file can be found by the true network address, it is true by this if not delaying the resource file in cache server
Real network address directly finds corresponding download server, corresponding resource file is obtained from the download server, and this is provided
Source file is supplied to client.
In the above-mentioned technical solutions, it is preferred that the resource file information includes network address, network address length, filename, file
Size;The described the step of resource file information is stored in enquiry module according to predetermined way, specifically includes:Described in judgement
Whether the network address of resource file is identical with the network address in the resource file information recorded, if differing, according to the resource
The filename and file size of file judge whether the resource file was recorded;If the resource file was recorded,
When preserving the current resource file information, write in the current resource file information duplicate marking and with it is current
The resource file repeat first resource file information preservation address;According to the preservation of all resource file information
Address generation resource file index.
Enquiry module when preserving resource file information, first determine whether client request resource file network address whether with
The network address of previously stored resource file is identical, if identical, need not preserve the resource file information, if differing, just preserves
The resource file information.And the resource file information when stored, is preserved in a special manner, need to judge the text of the resource file
Whether part name and file size are identical with the filename and file size of previously stored resource file, if identical, illustrate the money
Source file is identical with previously stored resource file, and preserve the resource file information when, write duplicate marking and with
Preservation address of first resource file that the resource file repeats in the enquiry module.Saving Current resource file
After information, according to preservation address generation resource file index of all resource file information preserved in enquiry module
Table.The effect of the resource file concordance list is and first resource text for quick search to corresponding resource file information
Preservation address of the part in the enquiry module is to find the network address of first resource file.
In the above-mentioned technical solutions, it is preferred that further comprise:The inquiry is received in the data decryptor server
After request, the current resource file information is navigated to from resource file index according to the store path;If
The duplicate marking is detected in the current resource file information, then according to the preservation address search to described first
The information of resource file, the cache server is fed back to by the web page address in the information of first resource file, with
The cache server is found corresponding resource file according to the web page address and send out the corresponding resource file
Send to the client.
The effect of the store path is the network address for enabling data decryptor server quickly to find respective resources file,
During lookup, if navigating to respective resources fileinfo, concurrent existing duplicate marking, then first money that will be repeated with it
The network address of source file is sent to cache server as the network address of current resource file, if cache resources in cache server
File, then have a network address and the corresponding record of resource file, and cache server is sended over receiving data decryptor server
Network address after, corresponding resource file can be found according to the network address, it is so identical in file, would not when network address is different
Cache server is obtained identical resource file according to new network address again, and as a result of resource file index and
Special resource file information preserving type, can quickly find the true network address of resource file, improve obtaining for resource file
Take efficiency.
In the above-mentioned technical solutions, it is preferred that the repetition is not detected by the current resource file information and is marked
During knowledge, the network address in the current resource file information is fed back into the cache server, so that the cache server
The download Resource Server address of the resource file is found according to the network address, to obtain the resource file.
In information of the data decryptor server selection to respective resources file, if not finding duplicate marking, illustrate this
The true address of the resource file, without being buffered, at this time, is sent to cache server by resource file in cache server,
Cache server is carried to downloading Resource Server address and obtain the resource file of client request according to the true Web site query
Client is supplied, therefore, only cache server just goes to obtain corresponding resource file when document entity is different, reduces slow
Server storage cost is deposited, further increases the performance of cache server.
According to another aspect of the invention, a kind of redirection method for down loading is additionally provided, including:Client is receiving
From the redirection request of data decryptor server when, to cache server send download request;Received in the cache server
To after the download request, the store path based on resource file in the data decryptor server takes to the data decryptor
Business device sends inquiry request, to determine whether the resource file of the client request has been buffered in the cache server;
If it is determined that being buffered in the cache server, then the resource file is back to the visitor from the cache server
Family end.
In the above-mentioned technical solutions, it is preferred that if it is determined that it is uncached in the cache server, supervised according to the data
The address of the download Resource Server of the resource file of server return is listened, institute is obtained from the download Resource Server
Resource file is stated, reverse proxy provides the resource file for the client.
The true Web site query for the resource file that cache server is returned according to data decryptor server takes to resource is downloaded
Business device address simultaneously obtains the resource file of client request and is supplied to client, therefore, is only cached when document entity is different
Server just goes to obtain corresponding resource file, reduces cache server carrying cost, further increases cache server
Performance.
Brief description of the drawings
Figure 1A shows the block diagram of data decryptor server according to an embodiment of the invention;
Figure 1B shows the block diagram of cache server according to an embodiment of the invention;
Fig. 2 shows the Organization Chart of redirection download system according to an embodiment of the invention;
Fig. 3 shows the Organization Chart of redirection download system according to still another embodiment of the invention;
Fig. 4 shows the data interaction between enquiry module according to the present invention, data decryptor module and cache server
Schematic diagram;
Fig. 5 shows the schematic diagram of resource file index according to an embodiment of the invention;
Fig. 6 shows resource file information storage configuration schematic diagram according to an embodiment of the invention;
Fig. 7 shows that resource file according to an embodiment of the invention redirects the processing procedure schematic diagram downloaded;
Fig. 8 shows the flow chart of redirection method for down loading according to an embodiment of the invention;
Fig. 9 shows the flow chart of redirection method for down loading according to another embodiment of the present invention.
Embodiment
It is to better understand the objects, features and advantages of the present invention, below in conjunction with the accompanying drawings and specific real
Mode is applied the present invention is further described in detail.It should be noted that in the case where there is no conflict, the implementation of the application
Feature in example and embodiment can be mutually combined.
Many details are elaborated in the following description to facilitate a thorough understanding of the present invention, still, the present invention may be used also
To be implemented using other different from other modes described here, therefore, the present invention is not limited to following public specific real
Apply the limitation of example.
Figure 1A shows the block diagram of data decryptor server according to an embodiment of the invention.
As shown in Figure 1A, data decryptor server 100 according to an embodiment of the invention includes:Data decryptor module 102,
For obtaining the resource file information of client request, and receive the storage of the resource file information from enquiry module 104
Path simultaneously sends store path to redirection module 106;Enquiry module 104, for preserving resource file according to predetermined way
Information, and the store path of resource file information is generated, and after the inquiry request from cache server 200 is received,
Query result is fed back into cache server 200;Redirection module 106, for initiating redirection request to client, so that objective
Family end sends download request according to store path to cache server 200.
The present invention preserves the resource file information requested with management client by the enquiry module 104 of setting,
Resource file information is preserved by special preserving type in enquiry module 104, and by resource file information in inquiry mould
Store path in block 104 is sent to redirection module 106 by data decryptor module 102, and redirection module 106 is sent out to client
Rise redirection request, in this way, cache server 200 according to the store path of the resource file information of the client current request come
Enquiry module 104 is inquired about, query result is fed back to cache server 200 by enquiry module 104, and cache server 200 passes through this
Query result can be determined whether the resource file of cache client request, if having cached, directly be sent to cache file
Client, it is so identical in file, in the case of network address difference, resource file need not be just reacquired, solves repetition caching
The problem of resource file.
In the above-mentioned technical solutions, it is preferred that it is big that resource file information includes network address, network address length, filename, file
It is small;Enquiry module 104 is used to judge whether the network address of resource file is identical with the network address in the resource file information recorded, if
Differ, then judge whether resource file was recorded according to the filename of resource file and file size, if resource file quilt
Recorded, then when preserving current resource file information, duplicate marking is write in current resource file information and with working as
The preservation address of the information for first resource file that preceding resource file repeats, and the guarantor according to all resource file information
Deposit address generation resource file index.
When preserving resource file information, first determine whether the network address of the resource file of client request is enquiry module 104
It is no identical with the network address of previously stored resource file, if identical, the resource file information need not be preserved, if differing,
Preserve the resource file information.And the resource file information when stored, is preserved in a special manner, need to judge the resource file
Filename and file size it is whether identical with the filename and file size of previously stored resource file, if identical, explanation
The resource file is identical with previously stored resource file, and preserve the resource file information when, write-in duplicate marking with
And preservation address of first resource file repeated with the resource file in the enquiry module 104.Saving current money
After the information of source file, money is generated according to preservation address of all resource file information preserved in enquiry module 104
Source file concordance list.The effect of the resource file concordance list be in order to which quick search is to corresponding resource file information, and this
Preservation address of one resource file in the enquiry module 104 is to find the network address of first resource file.
In the above-mentioned technical solutions, it is preferred that enquiry module 104 after inquiry request is received, according to store path from
Current resource file information is navigated in resource file index, if detecting repetition mark in current resource file information
Know, then according to information of the address search to first resource file is preserved, by the webpage in the information of first resource file
Location feeds back to cache server 200;Cache server 200 finds corresponding resource file according to web page address and will be corresponding
Resource file is sent to client.
The effect of the store path is the network address for enabling enquiry module 104 quickly to find respective resources file, is being looked into
During looking for, if navigating to respective resources fileinfo, concurrent existing duplicate marking, then first resource that will be repeated with it
The network address of file is sent to cache server 108 as the network address of current resource file, if having been cached in cache server 108
Resource file, then have a network address and the corresponding record of resource file, and cache server 108 is sent receiving enquiry module 104
After the network address to come over, corresponding resource file can be found according to the network address, it is so identical in file, when network address is different, just
Cache server 108 will not be made to obtain identical resource file according to new network address again, and as a result of resource text
Part indexes and special resource file information preserving type, can quickly find the true network address of resource file, improve resource
The acquisition efficiency of file.
In the above-mentioned technical solutions, it is preferred that enquiry module 104 is not detected by repetition in current resource file information
During mark, the network address in current resource file information is fed back into cache server 108, cache server 108 is according to network address
The download Resource Server address of resource file is found, to obtain resource file.
When enquiry module 104 navigates to the information of respective resources file, if not finding duplicate marking, illustrate the resource
The true address of the resource file, without being buffered, at this time, is sent to cache server by file in cache server 108
108, cache server 108 is according to the true Web site query to download Resource Server address and obtains the resource of client request
File is supplied to client, and therefore, cache server 108 just goes to obtain corresponding resource text only when document entity is different
Part, reduces 108 carrying cost of cache server, further increases the performance of cache server 108.
Figure 1B shows the block diagram of cache server according to an embodiment of the invention.
As shown in Figure 1B, cache server 200 according to an embodiment of the invention, including:Communication unit 108, for root
Inquiry request is sent to data decryptor server 100 as shown in Figure 1 according to the store path in the download request of client,
And receive the query result from data decryptor server;Judging unit 110, for the inquiry according to data decryptor server
As a result determine whether the resource file of client request has been buffered in cache server, if being buffered in cache server,
Resource file is back to client.
In the above-mentioned technical solutions, it is preferred that cache server can also include:Acquiring unit 112, in resource file not
When being buffered in cache server, the address of the download Resource Server of the resource file returned according to data decryptor server,
Resource file is obtained from downloading in Resource Server, reverse proxy provides the resource file for client.
Query result is actually the true network address of resource file, if cache resource file in cache server,
Corresponding resource file can be found by the true network address, it is true by this if not delaying the resource file in cache server
Real network address directly finds corresponding download server, corresponding resource file is obtained from the download server, and this is provided
Source file is supplied to client.
Illustrate the Organization Chart for redirecting download system according to the present invention with reference next to Fig. 2 and Fig. 3.
As shown in Figure 2 and shown in Fig. 3, data decryptor server 202 includes data decryptor module 102,104 and of enquiry module
Redirection module 106.
As shown in Fig. 2, Port Mirroring or passive is passed through by the data decryptor module 102 during data decryptor server is 202
The user that the mode of light splitting or the mode of concatenation obtain at interchanger asks downloading data.User's download request data are analyzed, are obtained
Take and record fileinfo and URL that user is directed to the request of a certain file download, and the text that outer net Resource Server 204 returns
Part information.The fileinfo of record and URL are delivered to redirection module 106.
Redirection module 106 receives the files such as the filename of the resource file of the record of data decryptor module 102, file size
Information and corresponding url data, the data of acquisition are stored to enquiry module 104, and from enquiry module 104 and are obtained specifically
The redirected path of form, assembling redirect data format(Generate store path of the resource file in enquiry module 104), give
Cache server 200 in Resource Server 204 sends 302 and redirects data.
After cache server 108 receives redirection data, store path is sent to enquiry module 104, to obtain use
Family needs to download the URL addresses of resource file.
Enquiry module 104 provides the caching of a quick search for cache server, which stores number in the form of a table
According to monitor module monitor user's request address, and return to data decryptor module 102 redirect cache server address and
The store path of resource file, and the store path that cache server sends over is split, search index is obtained, is passed through
Search index provides the address of the resource file of user's request for cache server.
As shown in figure 4, data decryptor module 102 is by the information of the resource file of acquisition(Filename, URL, file size,
File type(Multimedia/non-multimedia))Send to enquiry module 104 and preserved, enquiry module 104 will according to certain format
For resource file information cache into memory file, the preserving type of resource file information participates in Figures 5 and 6.Enquiry module 104 preserves
Store path of the resource file information in enquiry module 104 is returned to data decryptor module 102 after resource file information, this is deposited
Storage path form be:/ type(Multimedia/non-multimedia)/ suffix name/head letter sequence(The first letter of filename
ASCII character value)Sequence number in/some letter(Sequence number of the Current resource fileinfo in resource file information list)/
Filename.
Data decryptor module 102 sends the store path to redirection module, is initiated from redirection module to client
The store path is sent to enquiry module 104 and initiates inquiry request, enquiry module 104 by redirection request, cache server 108
The store path is analyzed, finds out the URL of the resource file of client request, and the URL is fed back into cache server 108.
Cache server 108 provides reverse proxy service to the user by actual URL.
Enquiry module 104 is the quick search function of realizing big data quantity, introduces two-stage memory file table.File table one
(As shown in Figure 5)Resource file information is asked to store concordance list for user.File table two(As shown in Figure 6)Storage is that user please
The real information asked(Resource file information).When data decryptor module is by user's demand file relevant information(Resource file information)
When being delivered to enquiry module, enquiry module is by file and list mode storage information.TOC level is divided into:/ type/suffix
The head letter ASCII character value of name/filename/.After the fileinfo of data decryptor module transfer is got, by being asked to user
The processing for the filename asked, fileinfo is stored in the file table two for the memory file folder specified, will be in file table two
The initial address of storage file information, stores in file table one.Wherein, before resource file information is preserved, enquiry module
It need to judge whether URL in the resource file information and the URL in the resource file information preserved are identical, if identical,
Current resource file information need not be preserved, if differing, continues to judge the filename and file of the resource file information
Whether size and the filename in the resource file information preserved and file size are identical, if identical, have been protected before illustrating
Identical resource file was deposited, duplicate marking is write in resource file information in this prior, as shown in fig. 6, the class in table two
The value of type is if zero, and it is to be saved for the first time to illustrate the resource file, and if 1, it is duplicate file to illustrate the resource file.Number
Represent the number for the resource file that this resource file record repeats below, if the resource file of serial number 1,3,5 is identical
Resource file but URL differ, and the resource file of serial number 1 is first resource file, then in the resource of serial number 1
A several value in file record is 2, and the resource file of serial number 3 and serial number 5 is duplicate file, then in the two moneys
The preservation that the value of the address of first resource file records for the resource file of sequence number 1 in repetition record in source file record
Location.
Enquiry module preserves resource file information in this way, it may be determined that the resource file letter of client current request
Whether breath caches in cache server.After enquiry module preserves resource file information with this specific format, by this
The store path of resource file information feeds back to data decryptor module, and carries out data redirection, caching by redirection module
The store path is sent to enquiry module and is inquired about after the download request of client is received by server, inquires about mould
Block splits store path, by resource file information index fast positioning to corresponding resource file information record, if the resource
Type in fileinfo record is duplicate file, then the preservation address of its corresponding first resource file is obtained, according to
The preservation address lookup obtains its corresponding URL, by this to first resource file record from first resource file record
URL feeds back to cache server, and cache server searches its corresponding resource file according to the URL, which is sent
To client.If the type in the resource file information record is first file, then its corresponding URL is directly acquired, will
The URL sends to cache server, cache server and the resource file of client request is downloaded to according to the URL, by the resource
File feeds back to client, passes through above-mentioned processing procedure, it is possible to and prevent cache server from repeating to cache identical resource file,
And by the special preserving type of enquiry module can quick obtaining to the real URL of resource file, prevent in database
Store data it is huge, can not quick obtaining real URL the problem of.
On the explanation of the head letter ASCII character value of filename, when the entitled Chinese name of file, the initial character of filename
For %, second character ASCII character value+100 of filename is taken at this time as the head letter ASCII character value in store path.
Due to there is power down loss in the memory file table in enquiry module, in whole enquiry module(In inquiry
Between part)In, can timing(It is such as per minute)Memory file table is stored in system disk;When system power failure reloads,
The preferred memory file table by disk imports memory, keeps the continuity of storage content.
Further illustrate that resource file redirects the processing procedure downloaded with reference to Fig. 7.
Resource file redirects the processing procedure downloaded and may include steps of:
1) user a asks to download resource file X to wide area network server.
2) data decryptor module monitoring users are asked, and obtain the fileinfos such as filename, the file size of resource file X.
3) fileinfo of resource file X is stored to quick search middleware by SDK API(That is enquiry module)In,
And return to storage virtual address(That is store path).
4) virtual address is delivered to redirection module.
5) redirection module simulates remote resource server B and initiates 302 redirection requests to user, and redirect address is slow
Resource Server C is deposited, redirected path is virtual address.
6) user a closes the connection with Resource Server B, is downloaded to cache resources server C request resource files X.
7) cache resources server C inquires about the virtual address that user asks to quick search middleware, obtains resource text
The true download path of part X, i.e. Resource Server B addresses.
8) contents of the Resource Server C to Resource Server B request resource files X.
9) Resource Server C provides the reverse proxy download of resource file X for user a.
It is to be understood that when deployment redirects download system according to the present invention, can user and Resource Server cluster it
Between dispose data decryptor server, monitored by way of Port Mirroring or passive light splitting between all users and Resource Server
Data communication.After cache server is disposed, quick search client modules can be disposed on every cache server(Inquiry
The client of module), and quick search server end and client modules are disposed on data decryptor server.Supervised in data
Listen and redirection module is disposed on server.
The present invention is solved in HTTP caching acceleration systems, and when user asks the file downloaded identical, but file URL is different
When, cache server repeat caching same file the problem of.And with the increasing of HTTP caching acceleration system cache file numbers
Add, the redirection relation of database purchase becomes more, obtain real URL time it is excessively slow the problem of.
Fig. 8 shows the flow chart of redirection method for down loading according to an embodiment of the invention.
As shown in figure 8, redirection method for down loading according to an embodiment of the invention may comprise steps of:Step 802,
Data decryptor server obtains the resource file information of client request;Step 804, resource file letter is preserved according to predetermined way
Breath, and the store path of resource file information is generated, redirection request is sent to client according to store path;Step 806, exist
When data decryptor server receives the inquiry request from cache server, the money of client request is judged according to store path
Whether source file has been buffered in cache server, and query result is fed back to cache server.
The present invention is believed by the data decryptor server of setting to preserve with the requested resource file of management client
Breath, resource file information is preserved by special preserving type, and according to resource file information in data decryptor server
Store path initiate redirection request to client, in this way, cache server is according to the resource of client current request text
The store path of part information inquires about data decryptor server, and query result feeds back to buffer service by data decryptor server
Device, cache server can be determined whether the resource file that cache client is asked by the query result, if having cached, directly
Connect and cache file is sent to client, it is so identical in file, in the case of network address difference, it need not just reacquire resource text
Part, solves the problems, such as repetition cache resource file.
In the above-mentioned technical solutions, it is preferred that if resource file is uncached in cache server, data decryptor service
Device returns to the address of the download Resource Server of resource file to cache server, makes cache server from download Resource Server
Middle acquisition resource file, reverse proxy provide resource file for client.
Query result is actually the true network address of resource file, if cache resource file in cache server,
Corresponding resource file can be found by the true network address, it is true by this if not delaying the resource file in cache server
Real network address directly finds corresponding download server, corresponding resource file is obtained from the download server, and this is provided
Source file is supplied to client.
In the above-mentioned technical solutions, it is preferred that it is big that resource file information includes network address, network address length, filename, file
It is small;The described the step of resource file information is stored in enquiry module according to predetermined way, specifically includes:Judge the money
Whether the network address of source file is identical with the network address in the resource file information recorded, if differing, according to resource text
The filename and file size of part judge whether the resource file was recorded;If the resource file was recorded,
When preserving the current resource file information, write in the current resource file information duplicate marking and with it is current
The preservation address of the information for first resource file that the resource file repeats;According to the preservation of all resource file information
Location generation resource file index.
Enquiry module when preserving resource file information, first determine whether client request resource file network address whether with
The network address of previously stored resource file is identical, if identical, need not preserve the resource file information, if differing, just preserves
The resource file information.And the resource file information when stored, is preserved in a special manner, need to judge the text of the resource file
Whether part name and file size are identical with the filename and file size of previously stored resource file, if identical, illustrate the money
Source file is identical with previously stored resource file, and preserve the resource file information when, write duplicate marking and with
Preservation address of first resource file that the resource file repeats in the enquiry module.Saving Current resource file
After information, according to preservation address generation resource file index of all resource file information preserved in enquiry module
Table.The effect of the resource file concordance list is and first resource text for quick search to corresponding resource file information
Preservation address of the part in the enquiry module is to find the network address of first resource file.
In the above-mentioned technical solutions, it is preferred that further comprise:The inquiry request is received in data decryptor server
Afterwards, the current resource file information is navigated to from resource file index according to the store path;If current
The resource file information in detect the duplicate marking, then according to the preservation address search to first resource
The information of file, the cache server is fed back to by the web page address in the information of first resource file;It is described slow
Server is deposited to find corresponding resource file according to the web page address and send the corresponding resource file to described
Client.
The effect of the store path is the network address for enabling data decryptor server quickly to find respective resources file,
During lookup, if navigating to respective resources fileinfo, concurrent existing duplicate marking, then first money that will be repeated with it
The network address of source file is sent to cache server as the network address of current resource file, if cache resources in cache server
File, then have a network address and the corresponding record of resource file, and cache server is sended over receiving data decryptor server
Network address after, corresponding resource file can be found according to the network address, it is so identical in file, would not when network address is different
Cache server is obtained identical resource file according to new network address again, and as a result of resource file index and
Special resource file information preserving type, can quickly find the true network address of resource file, improve obtaining for resource file
Take efficiency.
In the above-mentioned technical solutions, it is preferred that the repetition is not detected by the current resource file information and is marked
During knowledge, the network address in the current resource file information is fed back into the cache server, the cache server according to
The network address finds the download Resource Server address of the resource file, to obtain the resource file.
In information of the data decryptor server selection to respective resources file, if not finding duplicate marking, illustrate this
The true address of the resource file, without being buffered, at this time, is sent to cache server by resource file in cache server,
Cache server is carried to downloading Resource Server address and obtain the resource file of client request according to the true Web site query
Client is supplied, therefore, only cache server just goes to obtain corresponding resource file when document entity is different, reduces slow
Server storage cost is deposited, further increases the performance of cache server.
As shown in figure 9, redirection method for down loading according to another embodiment of the present invention, may comprise steps of:Step
Rapid 902, client sends to download to cache server and asks when receiving the redirection request from data decryptor server
Ask;Step 904, after cache server receives download request, the storage based on resource file in data decryptor server
Path sends inquiry request to data decryptor server, to determine whether the resource file of client request has been buffered in caching clothes
It is engaged in device;Step 906, however, it is determined that be buffered in cache server, then resource file be back to visitor from cache server
Family end.
In the above-mentioned technical solutions, it is preferred that if it is determined that it is uncached in cache server, taken according to the data decryptor
The address of the download Resource Server for the resource file that business device returns, the money is obtained from the download Resource Server
Source file, reverse proxy provide the resource file for the client.
The true Web site query for the resource file that cache server is returned according to data decryptor server takes to resource is downloaded
Business device address simultaneously obtains the resource file of client request and is supplied to client, therefore, is only cached when document entity is different
Server just goes to obtain corresponding resource file, reduces cache server carrying cost, further increases cache server
Performance.
Can be that HTTP caching systems solve cache file in caching system by disposing the redirection download system of the present invention
The problem of repeating to preserve, so that the carrying cost of server is reduced, and the number of cache resources server, with minimum service
Device number provides maximum download service, reduces operation cost.Meanwhile outlet request is also reduced, lift outlet bandwidth utilization rate.
Secondly, the possibility of distributed deployment is provided for HTTP caching systems, will not be because of due to the increase cached to user content, and make
The problem of into cache server low-response, and then HTTP caching system high scalability is lifted, improve user experience.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the invention, for the skill of this area
For art personnel, the invention may be variously modified and varied.Within the spirit and principles of the invention, that is made any repaiies
Change, equivalent substitution, improvement etc., should all be included in the protection scope of the present invention.
Claims (10)
- A kind of 1. data decryptor server, it is characterised in that including:Data decryptor module, for obtaining the resource file information of client request, and receives from described in enquiry module The store path of resource file information simultaneously sends the store path to redirection module;Enquiry module, for preserving the resource file information according to predetermined way, and generates depositing for the resource file information Path is stored up, and after the inquiry request from cache server is received, query result is fed back into the cache server;The redirection module, for initiating redirection request to the client, so that the client is according to the storage Path sends download request to the cache server;The resource file information includes network address, network address length, filename, file size;The enquiry module be used to judging the resource file network address whether with the network address in the resource file information that has recorded It is identical, if differing, judge whether the resource file is recorded according to the filename of the resource file and file size Cross, if the resource file was recorded, when preserving the current resource file information, in current resource text The preservation of the information of duplicate marking and first resource file repeated with the current resource file is write in part information Location, and resource file index is generated according to the preservation address of all resource file information.
- 2. data decryptor server according to claim 1, it is characterised in that the enquiry module comes from institute receiving After the inquiry request for stating cache server, according to the store path from the resource file index in navigate to it is current described in Resource file information, if detecting the duplicate marking in the current resource file information, preserves ground according to described Location finds the information of first resource file, and the web page address in the information of first resource file is fed back to The cache server, so that the cache server finds out corresponding resource file according to the web page address.
- 3. data decryptor server according to claim 2, it is characterised in that the enquiry module is in the current money When being not detected by the duplicate marking in source file information, the network address in the current resource file information is fed back to described Cache server.
- A kind of 4. cache server, it is characterised in that including:Communication unit, for according to the store path in the download request from client to such as any one of claims 1 to 3 The data decryptor server sends inquiry request, and receives the query result from the data decryptor server;Judging unit, for determining the resource file of the client request according to the query result of the data decryptor server Whether it has been buffered in the cache server, if being buffered in the cache server, the resource file has been back to The client.
- 5. cache server according to claim 4, it is characterised in that further include:Acquiring unit, the resource file it is uncached in the cache server when, according to the data decryptor server The address of the download Resource Server of the resource file returned, obtains the resource text from the download Resource Server Part, reverse proxy provide the resource file for the client.
- 6. one kind redirects method for down loading, it is characterised in that including:Data decryptor server obtains the resource file information of client request;The resource file information is preserved according to predetermined way, and generates the store path of the resource file information, according to institute State store path and send redirection request to the client;When the data decryptor server receives the inquiry request from cache server, judged according to the store path Whether the resource file of the client request has been buffered in the cache server, and query result is fed back to the caching Server;The resource file information includes network address, network address length, filename, file size;Described the step of preserving the resource file information according to predetermined way, specifically includes:Judge the network address of the resource file It is whether identical with the network address in the resource file information recorded, if differing, according to the filename of the resource file and File size judges whether the resource file was recorded;If the resource file was recorded, when preserving the current resource file information, in the current resource The preservation of the information of duplicate marking and first resource file repeated with the current resource file is write in fileinfo Address;Resource file index is generated according to the preservation address of all resource file information.
- 7. redirection method for down loading according to claim 6, it is characterised in that further comprise:In the data decryptor After server receives the inquiry request, current institute is navigated to from resource file index according to the store path State resource file information;If detecting the duplicate marking in the current resource file information, according to the preservation address search to institute The information of first resource file is stated, the web page address in the information of first resource file is fed back to the caching takes It is engaged in device, so that the cache server finds corresponding resource file and by the corresponding resource according to the web page address File is sent to the client.
- 8. redirection method for down loading according to claim 7, it is characterised in that in the current resource file information When being not detected by the duplicate marking, the network address in the current resource file information is fed back into the cache server.
- 9. one kind redirects method for down loading, it is characterised in that including:Client sends download request when receiving the redirection request from data decryptor server, to cache server;After the cache server receives the download request, based on resource file in the data decryptor server Store path sends inquiry request to the data decryptor server, whether to determine the resource file of the client request It is buffered in the cache server;If it is determined that being buffered in the cache server, then the resource file is back to institute from the cache server State client;Wherein, the cache server includes:Communication unit, for according to the store path in the download request from client to such as any one of claims 1 to 3 The data decryptor server sends inquiry request, and receives the query result from the data decryptor server;Judging unit, for determining the resource file of the client request according to the query result of the data decryptor server Whether it has been buffered in the cache server, if being buffered in the cache server, the resource file has been back to The client.
- 10. redirection method for down loading according to claim 9, it is characterised in that if it is determined that uncached in the caching clothes It is engaged in device, the address of the download Resource Server of the resource file returned according to the data decryptor server, from described Download in Resource Server and obtain the resource file, reverse proxy provides the resource file for the client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310410580.7A CN104426718B (en) | 2013-09-10 | 2013-09-10 | Data decryptor server, cache server and redirection method for down loading |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310410580.7A CN104426718B (en) | 2013-09-10 | 2013-09-10 | Data decryptor server, cache server and redirection method for down loading |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104426718A CN104426718A (en) | 2015-03-18 |
CN104426718B true CN104426718B (en) | 2018-04-13 |
Family
ID=52974730
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310410580.7A Expired - Fee Related CN104426718B (en) | 2013-09-10 | 2013-09-10 | Data decryptor server, cache server and redirection method for down loading |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104426718B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104936043A (en) * | 2015-07-08 | 2015-09-23 | 蓝汛网络科技(北京)有限公司 | Video resource recognition method and device |
CN107196986B (en) * | 2016-03-15 | 2021-04-27 | 中国移动通信集团江苏有限公司 | Redirection method and device |
CN105791328A (en) * | 2016-05-25 | 2016-07-20 | 江苏省基础地理信息中心 | Calling method and device and sharing method and device for three-dimensional information |
CN106528594A (en) * | 2016-09-20 | 2017-03-22 | 海信集团有限公司 | Downloaded file querying method and device |
CN109040153B (en) * | 2017-06-08 | 2022-06-28 | 中兴通讯股份有限公司 | Caching method for caching content, related device and computer-readable storage medium |
CN109089175B (en) * | 2017-06-14 | 2022-04-22 | 中兴通讯股份有限公司 | Video cache acceleration method and device |
CN108600378B (en) * | 2018-04-28 | 2021-05-28 | 武汉斗鱼网络科技有限公司 | File downloading method, device, terminal and storage medium |
CN110134896B (en) * | 2019-05-17 | 2023-05-09 | 山东渤聚通云计算有限公司 | Monitoring process and intelligent caching method of proxy server |
CN113382286A (en) * | 2021-06-07 | 2021-09-10 | 中山亿联智能科技有限公司 | Method for automatically processing file downloading notification based on IPTV |
CN114896219B (en) * | 2022-07-15 | 2022-09-20 | 深圳市沃特沃德信息有限公司 | Method and device for storing resource data, computer equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101465785A (en) * | 2008-05-28 | 2009-06-24 | 北京东方网信科技有限公司 | P2P flux caching system based on active guide and redirection |
CN101719936A (en) * | 2009-12-09 | 2010-06-02 | 成都市华为赛门铁克科技有限公司 | Method, device and cache system for providing file downloading service |
CN102333123A (en) * | 2011-10-08 | 2012-01-25 | 北京星网锐捷网络技术有限公司 | File storage method and device, searching method and device and network device |
CN102523299A (en) * | 2011-12-22 | 2012-06-27 | 北京邮电大学 | Cache method for content identification based on message digests |
CN103139252A (en) * | 2011-11-30 | 2013-06-05 | 北京网康科技有限公司 | Achieving method of network proxy cache acceleration and device thereof |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8218561B2 (en) * | 2009-04-27 | 2012-07-10 | Cisco Technology, Inc. | Flow redirection employing state information |
-
2013
- 2013-09-10 CN CN201310410580.7A patent/CN104426718B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101465785A (en) * | 2008-05-28 | 2009-06-24 | 北京东方网信科技有限公司 | P2P flux caching system based on active guide and redirection |
CN101719936A (en) * | 2009-12-09 | 2010-06-02 | 成都市华为赛门铁克科技有限公司 | Method, device and cache system for providing file downloading service |
CN102333123A (en) * | 2011-10-08 | 2012-01-25 | 北京星网锐捷网络技术有限公司 | File storage method and device, searching method and device and network device |
CN103139252A (en) * | 2011-11-30 | 2013-06-05 | 北京网康科技有限公司 | Achieving method of network proxy cache acceleration and device thereof |
CN102523299A (en) * | 2011-12-22 | 2012-06-27 | 北京邮电大学 | Cache method for content identification based on message digests |
Also Published As
Publication number | Publication date |
---|---|
CN104426718A (en) | 2015-03-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104426718B (en) | Data decryptor server, cache server and redirection method for down loading | |
US10491702B2 (en) | Proxy-based cache content distribution and affinity | |
CN101409706B (en) | Method, system and relevant equipment for distributing data of edge network | |
CN105763628B (en) | Data access request processing method and processing device, edge node server and cluster | |
KR101383905B1 (en) | method and apparatus for processing server load balancing with the result of hash function | |
CN103685590B (en) | Obtain the method and system of IP address | |
US20140089460A1 (en) | Unobtrusive methods and systems for collecting information transmitted over a network | |
US7877457B2 (en) | Peer to peer gateway | |
US10735528B1 (en) | Geographic relocation of content source in a content delivery network | |
US6654795B1 (en) | System and method for distribution of network file accesses over network storage devices | |
WO2008103530A1 (en) | Prallel retrieval system | |
US9407716B1 (en) | Identifying content files in a cache using a response-based cache index | |
US20140359066A1 (en) | System, method and device for offline downloading resource and computer storage medium | |
US20030046357A1 (en) | Intelligent content placement in a distributed computing network | |
CN104714965A (en) | Static resource weight removing method, and static resource management method and device | |
US20140143339A1 (en) | Method, apparatus, and system for resource sharing | |
US11232166B2 (en) | Networked page access and addressing based on partial categorization indexing | |
CN103369002B (en) | A kind of method and system of resource downloading | |
CN103416027B (en) | The system of the method, buffer and cache optimization of cache optimization | |
CN103957252B (en) | The journal obtaining method and its system of cloud stocking system | |
CN107682281A (en) | A kind of application management method of SDN switch and SDN switch | |
US6990481B1 (en) | System and method for content management over network storage devices | |
CN105025042B (en) | A kind of method and system of determining data information, proxy server | |
CN101668029B (en) | Network equipment and network communication method | |
CN113992664B (en) | Cluster communication method, related device and storage medium |
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 | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 100088 Beijing City, Haidian District Institute of Road No. 15, North Building B block 5 layer Patentee after: FOUNDER BROADBAND NETWORK SERVICE Co.,Ltd. Address before: 100088 Beijing City, Haidian District Institute of Road No. 15, North Building B block 5 layer Patentee before: FOUNDER BROADBAND NETWORK SERVICE Co.,Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180413 Termination date: 20210910 |