CN108234639A - A kind of data access method and device based on content distributing network CDN - Google Patents

A kind of data access method and device based on content distributing network CDN Download PDF

Info

Publication number
CN108234639A
CN108234639A CN201711485184.5A CN201711485184A CN108234639A CN 108234639 A CN108234639 A CN 108234639A CN 201711485184 A CN201711485184 A CN 201711485184A CN 108234639 A CN108234639 A CN 108234639A
Authority
CN
China
Prior art keywords
data
identification information
resource identification
stored
access request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711485184.5A
Other languages
Chinese (zh)
Inventor
杨磊
马长征
黄莹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201711485184.5A priority Critical patent/CN108234639A/en
Publication of CN108234639A publication Critical patent/CN108234639A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Landscapes

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

Abstract

An embodiment of the present invention provides a kind of data access methods and device based on content distributing network CDN, have multiple nodes in content distributing network CDN, the method includes:Access request is received in present node;Resource identification information is extracted from the access request;Judge whether the corresponding data of the resource identification information being stored in the access request;When having stored the data, the data are returned.Data are cached by resource identification information, are positioned, it can be in the case of more URL, identify that identical data are cached, reduce amount of storage in the case, it reduces data and inquires quantity in inquiry, the hit rate of data is improved, so as to reduce back the frequency of source operation, reduces the access pressure of source website.

Description

A kind of data access method and device based on content distributing network CDN
Technical field
The present invention relates to the technical field of computer disposal, more particularly to a kind of number based on content distributing network CDN According to access method and a kind of data access device based on content distributing network CDN.
Background technology
Data are carried out commonly using CDN (Content Delivery Network, content distributing network) in website Transmission, CDN are by one layer of new network structure of increase in existing network, are deployed with multiple nodes, for data cached, User is allow to transfer data on node nearby or the data needed for being obtained from node nearby, corresponding clothes are provided Business.
At present, be normally based in CDN URL (Uniform Resource Locator, uniform resource locator) into The caching of row data, i.e., the data buffer storage under same URL is primary, and it is larger to cause data storage capacity, and data is caused to inquire When inquiry quantity it is more, the hit rate of data is relatively low, carried out back in miss source operation, i.e., from source website obtain data progress Caching so as to increase back the frequency of source operation, increases the access pressure of source website.
Invention content
In view of the above problems, it is proposed that the present invention overcomes the above problem in order to provide one kind or solves at least partly A kind of data access method based on content distributing network CDN and corresponding one kind for stating problem are based on content distributing network CDN Data access device.
One side according to the present invention provides a kind of data access method based on content distributing network CDN, inside There are multiple nodes in content distributing network CDN, the method includes:
Access request is received in present node;
Resource identification information is extracted from the access request;
Judge whether the corresponding data of the resource identification information being stored in the access request;
When having stored the data, the data are returned.
Optionally, it further includes:
When not storing the data, the data are obtained;
Return to the data.
Optionally, the corresponding data of resource identification information for judging whether to be stored in the access request, including:
Preset information table memory is inquired, the resource identification that being recorded in the information table memory there are stored data is believed Breath;
By the resource identification information progress in the resource identification information in the access request and the information table memory Match;
When successful match, determine to be stored with the data;
When it fails to match, determine not being stored with the data.
Optionally, the resource identification information includes server info Host and uniform resource identifier URI;
Resource identification information in the resource identification information by the access request and the information table memory into Row matching, including:
Sub-step S121 judges the server info Host in the access request and the service in the information table memory Whether device information Host is identical;If so, sub-step S122 is performed, if it is not, then performing sub-step S124;
Sub-step S122 is judged in uniform resource identifier URI and the information table memory in the access request Whether uniform resource identifier URI is identical;If so, sub-step S123 is performed, if it is not, then performing sub-step S124;
Sub-step S123, determines successful match;
Sub-step S124 determines that it fails to match.
Optionally, it further includes:
Cache the data;
The mapping relations between the resource identification information and the data are established in preset information table memory.
Optionally, it is described that reflecting between the resource identification information and the data is established in preset information table memory Relationship is penetrated, including:
Using server info Host and uniform resource identifier URI as key, the data as value, in preset storage Key-value pair is established in information table.
Optionally, the resource identification information includes Data Identification,
It is described to judge whether to be stored with the corresponding data of resource identification information in the access request, including:
Preset information table memory is inquired, the Data Identification for there are stored data is recorded in the information table memory;
Resource identification information in the access request is matched with the Data Identification in the information table memory;
When successful match, determine to be stored with the data;
When it fails to match, determine not being stored with the data.
Optionally, the resource identification information further includes server info Host and uniform resource identifier URI, described to deposit Also record has the corresponding server info Host of stored data and uniform resource identifier URI, the side in storage information table Method further includes:
When determining to have stored the data, server info Host and unified resource in the resource identification information are judged Identifiers, URIs server info Host and uniform resource identifier URI corresponding with data described in the information table memory be It is no consistent;
If it is not, the mapping then established in the information table memory between the resource identification information and the data is closed System.
According to another aspect of the present invention, a kind of data access device based on content distributing network CDN is provided, inside There are multiple nodes, described device includes in content distributing network CDN:
Access request receiving module, for receiving access request in present node;
Resource identification information extraction module, for extracting resource identification information from the access request;
Judgment module is stored, for judging whether the corresponding number of the resource identification information being stored in the access request According to;
First data return to module, for when having stored the data, returning to the data.
Optionally, it further includes:
Data acquisition module, for when not storing the data, obtaining the data;
Second data return to module, for returning to the data.
Optionally, the storage judgment module includes:
First information table memory inquires submodule, for inquiring preset information table memory, remembers in the information table memory Record has the resource identification information of stored data;
Resource identification information matched sub-block, for the resource identification information in the access request and the storage to be believed Resource identification information in breath table is matched;
First has stored determination sub-module, for when successful match, determining to be stored with the data;
First does not store determination sub-module, for when it fails to match, determining not being stored with the data.
Optionally, the resource identification information includes server info Host and uniform resource identifier URI;
The resource identification information matched sub-block includes:
Host judging units, for judging in the server info Host in the access request and the information table memory Server info Host it is whether identical;If so, URI judging units are called, if it is not, then it fails to match determination unit;
URI judging units, for judging the uniform resource identifier URI in the access request and the information table memory In uniform resource identifier URI it is whether identical;If so, calling successful match determination unit, if it is not, then calling, it fails to match Determination unit;
Successful match determination unit, for determining successful match;
Determination unit that it fails to match, for determining that it fails to match.
Optionally, it further includes:
Data cache module, for caching the data;
First mapping relations establish module, for establishing the resource identification information and institute in preset information table memory State the mapping relations between data.
Optionally, first mapping relations are established module and are included:
Key-value pair setting up submodule, for using server info Host and uniform resource identifier URI as key, the number According to as value, key-value pair is established in preset information table memory.
Optionally, the resource identification information includes Data Identification,
The storage judgment module includes:
Second information table memory inquires submodule, for inquiring preset information table memory, remembers in the information table memory Record has the Data Identification of stored data;
Data Identification matched sub-block, for by the resource identification information in the access request and the information table memory In Data Identification matched;
Second has stored determination sub-module, for when successful match, determining to be stored with the data;
Second does not store determination sub-module, for when it fails to match, determining not being stored with the data.
Optionally, the resource identification information further includes server info Host and uniform resource identifier URI, described to deposit Also record has the corresponding server info Host of stored data and uniform resource identifier URI, the dress in storage information table It puts and further includes:
Information matches module, for when determining to have stored the data, judging server in the resource identification information Information Host server info Hosts corresponding with data described in the information table memory with uniform resource identifier URI and system Whether one resource identifiers, URIs are consistent;If it is not, the second mapping relations is then called to establish module;
Second mapping relations establish module, for established in the information table memory resource identification information with it is described Mapping relations between data.
In content distributing network CDN there are multiple nodes in embodiments of the present invention, receive and access in present node Request, resource identification information is extracted from access request, judges whether the resource identification information being stored in the access request Corresponding data, when having stored data, return to the data, and data are cached by resource identification information, are positioned, can In the case of more URL, to identify that identical data are cached, reduce amount of storage in the case, reduce data Quantity is inquired in inquiry, improves the hit rate of data, so as to reduce back the frequency of source operation, reduces the visit of source website Ask pressure.
Above description is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, below the special specific embodiment for lifting the present invention.
Description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this field Technical staff will become clear.Attached drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of data access method based on content distributing network CDN according to an embodiment of the invention The step schematic flow diagram of embodiment;
Fig. 2 shows a kind of structure diagrams of content distributing network CDN according to an embodiment of the invention;
Fig. 3 shows another data access side based on content distributing network CDN according to an embodiment of the invention The step schematic flow diagram of method embodiment;And
Fig. 4 shows a kind of data access device based on content distributing network CDN according to an embodiment of the invention The structural schematic block diagram of embodiment.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
With reference to Fig. 1, a kind of data access based on content distributing network CDN according to an embodiment of the invention is shown The step schematic flow diagram of embodiment of the method, specifically may include steps of:
Step 101, access request is received in present node.
In content distributing network CDN, usually with it is multiple be used for transmission, data cached (such as live TV stream, data cached Deng) node, after some node receives client, the data of source website (such as live TV stream, data cached), can push away It send to other nodes, when user accesses data (such as live TV stream, data cached), by scheduling by the request road of user By being either directed to from user access network recently or on the node of access best results, data are provided to the user by the node (such as live TV stream, data cached);Relative to direct access originator website, this mode shorten user and data (such as live TV stream, It is data cached etc.) between network distance, so as to achieve the effect that acceleration.
It should be noted that in different content distributing network CDN, topological structure may be different.
In one embodiment, multiple nodes of content distributing network CDN include Centroid, father's node layer, edge Node.
In some cases, Centroid is the super aggregation node of resource, can be communicated with source website, has been converged big The resource of amount source website, these resources generally change less resource, for example, video, picture etc..
In some cases, Centroid only save file information, such as URL (Uniform Resource Locator, system One Resource Locator), size etc., not direct cache file, other nodes in content distributing network CDN are from the Centroid The middle fileinfo for obtaining file to be cached after this document has been cached, reports to Centroid, and Centroid counts The file of other nodal caches.
It should be noted that can dispose Centroid in certain content distributing network CDN, i.e., the contents of the section is distributed The three-decker of node-father's node layer-fringe node centered on network C DN, can not portion in certain content distributing network CDN Affix one's name to Centroid, i.e. two-layer structures of the contents of the section distribution network CDN for father's node layer-fringe node, the embodiment of the present invention This is not limited.
Father's node layer is the secondary aggregation node of resource, on the one hand, due to inside content distributing network CDN, each node it Between generally communicated using the proprietary communications cable such as bidirectional optical fiber, the communication quality between Centroid and father's node layer has Higher guarantee, can be with Centroid when the less resource of acquisition variation, external source website communication quality are poor It communicates, resource is obtained from Centroid, on the other hand, feelings (are such as paid) obtaining new resource, carrying out data manipulation It under condition, can communicate with source website, resource is obtained from source website.
Furthermore it can be in communication with each other between father's node layer, so as to form the transmission road between father's node layer and fringe node Diameter, i.e., the path that the node for the intermediate conveyor that a node to another node is passed through and the communications cable are formed.
Specifically, choose transmission path mode can there are many, following at least one can be selected according to actual demand Kind mode:
1st, the transmission path that transmission performance meets the requirement of setting is chosen.
Transmission performance refer to transmit flow data transmission path transmittability, can according between node distance, transmission The transmission performance of the determining transmission path such as speed, data loss rate, clogged conditions, by regularly updating the biography between each two node Defeated performance, according to the transmission performance of each transmission path between node, selection wherein transmission performance meets the requirements or transmission performance Best transmission path.
2nd, the minimum transmission path of the number of nodes passed through is chosen.
The minimum transmission path of number of nodes is chosen in a plurality of transmission path, in this manner it is possible to occupy minimum transmission Resource completes transmission of the data from a node to another node.
3rd, the transmission path not selected whithin a period of time is chosen.
If there is flow data in history from a node-node transmission to another node, then, when there is the new data will be from this It is transmitted between two, one is chosen in each transmission path that can not select whithin a period of time, to avoid always Choosing same transmission paths causes the node load in the transmission path overweight.
Certainly, the selection mode of above-mentioned transmission path is intended only as example, can basis when implementing the embodiment of the present invention Actual conditions set the selection mode of other transmission paths, and the embodiment of the present invention does not limit this.In addition, in addition to above-mentioned biography Outside the selection mode in defeated path, those skilled in the art can also use the selection side of other transmission paths according to actual needs Formula, the embodiment of the present invention also do not limit this.
In addition, father's node layer is generally deployed with the computer room of multiple operators, it is proprietary by two-wire light etc. between computer room The communications cable is attached, and fringe node is typically deployed in the network of some operator, with father's layer section between operator The computer room of point can communicate with fringe node.
Between fringe node there is the ability being in communication with each other, still, under normal circumstances, will not directly communicate.
Fringe node can access client, for example, mobile phone, tablet computer, TV etc., for being led to client Letter such as obtains the live TV stream of its acquisition, alternatively, live TV stream is pushed to the client.
For those skilled in the art is made to more fully understand the embodiment of the present invention, illustrate this hair below by way of specific example Content distributing network CDN in bright embodiment.
As shown in Fig. 2, father's node layer is A1, A2, A3, A4, it can be disposed according to geographical location, for example, A1 is disposed Beijing, A2 are deployed in Shanghai, A3 is deployed in Guangzhou, A4 is deployed in Zhengzhou, and A1 can communicate with A2, A2 can with A3 into Row communication, A3 can communicate with A4, and A4 can communicate with A1, and the communication cycle between father's node layer can form Cricoid father's layer structure.
In addition, each father's node layer can connect one or more fringe nodes, fringe node can also be according to geographical position Put, the factors such as operator are disposed, do not communicate directly generally, but pass through during father's node layer carries out between fringe node Turn, father's node layer A1 connection fringe node A11, A12, father's node layer A2 connection edge node A21, A22, father's node layer A3 connection edge Node A31, A32, A33, father's node layer A4 connection edge nodes A41, A42, A43.
Fringe node accesses client, if fringe node A32 accesses customer end B 1, for receiving the data of client (such as Live TV stream), alternatively, data (such as live TV stream) are sent to the client.
In embodiments of the present invention, present node can receive access request, that is, access the request of some data.
In the above distribution network CDN, if present node is fringe node, the access that can receive client please It asks, if present node is father's node layer, the access request of fringe node can be received.
Step 102, resource identification information is extracted from the access request.
In practical applications, for multiple URL, it is understood that there may be identical resource, such as video, audio, picture.
For example, in the case where browser is concurrent, accessing and there is limitation, a URL is typically only capable to receive 2-5 access, Browser is caused to block, so, there are more URL.
In another example in the case where operator kidnaps, using there are dual domain name, first URL is used extremely, that is, calls second A URL.
In another example having hung illegal contents under a URL, then shielded from rhizosphere name, so having more URL.
Different URL, but resource is identical, if cached according to URL, it will cause to cache more parts of identical moneys Source.
And in embodiments of the present invention, resource can be cached based on resource identification information.
So-called resource identification information can refer to the information being identified to resource, for example, Host (server info), URI (uniform resource identifier (Uniform Resource Identifier) etc..
For access request, then resource identification information can be extracted from its header heaer.
For example, include following information in an access request:
GET http://download.123.de:80/somedata.exe
Host:download.microtool.de
Accept:*/*
Pragma:no-cache
Cache-Control:no-cache
Referer:http://download.microtool.de/
User-Agent:Mozilla/4.04[en](Win95;I;Nav)
Range:Bytes=554554-
Wherein, upper example the first row represents that HTTP clients (may be browser, download program) are referred to by GET methods Determine the file under URL.
Host header fields specify the Intenet hosts and port numbers of request resource, represent the original server or net of request URL The position of pass.
Referer header fields allow client to specify the source resource address of request URI, this can allow server generation to retract Chained list can be used to log in, optimize cache etc..Also allow connection abolish or wrong since the purpose of maintenance is tracked.If The URI of request cannot be sent without the URI addresses of oneself, Referer.If what is specified is part URI addresses, this address It should be a relative address.
Step 103, judge whether the data of the resource identification information being stored in access request mapping.
In the concrete realization, resource identification information is extracted from access request, then can local search formerly whether It is cached with the corresponding data of the resource identification information.
In one embodiment of the invention, step 103 can include following sub-step:
Sub-step S11 inquires preset information table memory.
Using the embodiment of the present invention, its resource identification information, write-in storage letter can be recorded in advance for the data of caching It ceases in table, therefore, record has the resource identification information of stored data in information table memory.
Sub-step S12, by the resource identification in the resource identification information in the access request and the information table memory Information is matched.
In the concrete realization, resource identification information in access request and storage can be believed by modes such as regular expressions Resource identification information in breath table is matched.
In one embodiment of the invention, resource identification information includes server info Host and uniform resource identifier URI, then sub-step S12 can further include following sub-step:
Sub-step S121 judges the server info Host in the access request and the service in the information table memory Whether device information Host is identical;If so, sub-step S122 is performed, if it is not, then performing sub-step S124.
Sub-step S122 is judged in uniform resource identifier URI and the information table memory in the access request Whether uniform resource identifier URI is identical;If so, sub-step S123 is performed, if it is not, then performing sub-step S124.
Sub-step S123, determines successful match;
Sub-step S124 determines that it fails to match.
It in embodiments of the present invention, can be true if server info Host and uniform resource identifier URI all sames Determine resource identification information and the resource identification information successful match in information table memory in access request;If server info Host with uniform resource identifier URI is any differs, then can determine resource identification information and storage information in access request It fails to match for resource identification information in table.
Sub-step S13 when successful match, determines to be stored with the data.
Sub-step S14 when it fails to match, determines not being stored with the data.
If resource identification information and the resource identification information successful match in information table memory in access request, then it represents that The data that formerly cache resources identification information identifies.
If it fails to match with the resource identification information in information table memory for resource identification information in access request, then it represents that The formerly data of uncached resource identification information mark.
Step 104, when having stored the data, the data are returned.
If the data needed for present node cache access request, can respond the access request, return The data.
In the above distribution network CDN, if present node is fringe node, data can be returned to client, If present node is father's node layer, can be by data returned edge node.
In content distributing network CDN there are multiple nodes in embodiments of the present invention, receive and access in present node Request, resource identification information is extracted from access request, judges whether the resource identification information being stored in the access request Corresponding data, when having stored data, return to the data, and data are cached by resource identification information, are positioned, can In the case of more URL, to identify that identical data are cached, reduce amount of storage in the case, reduce data Quantity is inquired in inquiry, improves the hit rate of data, so as to reduce back the frequency of source operation, reduces the visit of source website Ask pressure.
With reference to Fig. 3, a kind of data access based on content distributing network CDN according to an embodiment of the invention is shown The step schematic flow diagram of embodiment of the method, specifically may include steps of:
Step 301, access request is received in present node.
Step 302, resource identification information is extracted from the access request.
Step 303, judge whether the data of the resource identification information being stored in access request mapping.
In another embodiment of the present invention, step 103 can include following sub-step:
Sub-step S21 inquires preset information table memory.
Using the embodiment of the present invention, it can record its resource identification in advance for the data of caching, information table memory be written In, record has the Data Identification of stored data in information table memory.
Sub-step S22, by the Data Identification in the resource identification information in the access request and the information table memory It is matched.
Sub-step S23 when successful match, determines to be stored with the data.
Sub-step S24 when it fails to match, determines not being stored with the data.
In the concrete realization, resource identification information in access request and storage can be believed by modes such as regular expressions Resource identification in breath table is matched.
If resource identification information and the resource identification successful match in information table memory in access request, then it represents that formerly The data of cache resources identification information mark.
If it fails to match with the resource identification in information table memory for resource identification information in access request, then it represents that formerly The data of uncached resource identification information mark.
In embodiments of the present invention, resource identification information can also include server info Host and uniform resource identifier URI, also record has the corresponding server info Host of stored data and uniform resource identifier in the information table memory URI。
Therefore, in embodiments of the present invention, when determining to have stored the data, judge that server is believed in resource identification information Cease Host server info Hosts corresponding with data in information table memory with uniform resource identifier URI and uniform resource identifier Whether consistent accord with URI;If it is not, the mapping relations between resource identification information and data are then established in information table memory.
Step 304, when not storing the data, the data are obtained.
If the data needed for the uncached access request of present node, source operation can be carried out back, i.e., is obtained from source website Take the data needed for access request.
In the above distribution network CDN, if present node is fringe node, sends to access to father's node layer and ask It asks, receives father's node layer and be directed to the data that access request is sent.
If present node is father's node layer, access request is sent to source website, source website is received and is sent out for access request The data sent.
For father's node layer, it can be determined that whether cached the data;If so, the data block is sent to edge Otherwise node, by the URL of the data, the data is obtained, and be sent to fringe node from source website.
Step 305, the data are returned.
After returning source operation acquisition data, which can be responded, return to the data.
Step 306, the data are cached.
Step 307, the mapping between the resource identification information and the data is established in preset information table memory Relationship.
For present node, after the data are obtained, it can be cached, also, the data Resource identification information as key (key), using the data as value (value), be written information table memory in, establish key-value pair form Mapping relations.
It in the concrete realization, can if resource identification information includes server info Host and uniform resource identifier URI , as key, data as value, to be built in preset information table memory using server info Host and uniform resource identifier URI Vertical key-value pair.
For embodiment of the method, in order to be briefly described, therefore it is all expressed as to a series of combination of actions, but this field Technical staff should know that the embodiment of the present invention is not limited by described sequence of movement, because implementing according to the present invention Example, certain steps may be used other sequences or are carried out at the same time.Secondly, those skilled in the art should also know, specification Described in embodiment belong to preferred embodiment, necessary to the involved action not necessarily embodiment of the present invention.
With reference to Fig. 4, a kind of data access based on content distributing network CDN according to an embodiment of the invention is shown The structural schematic block diagram of device embodiment, has multiple nodes in content distributing network CDN, and described device can specifically include Following module:
Access request receiving module 401, for receiving access request in present node;
Resource identification information extraction module 402, for extracting resource identification information from the access request;
Judgment module 403 is stored, for judging whether that the resource identification information being stored in the access request is corresponding Data;
First data return to module 404, for when having stored the data, returning to the data.
In one embodiment of the invention, it further includes:
Data acquisition module, for when not storing the data, obtaining the data;
Second data return to module, for returning to the data.
In one embodiment of the invention, the storage judgment module 403 includes:
First information table memory inquires submodule, for inquiring preset information table memory, remembers in the information table memory Record has the resource identification information of stored data;
Resource identification information matched sub-block, for the resource identification information in the access request and the storage to be believed Resource identification information in breath table is matched;
First has stored determination sub-module, for when successful match, determining to be stored with the data;
First does not store determination sub-module, for when it fails to match, determining not being stored with the data.
In one embodiment of the invention, the resource identification information includes server info Host and unified resource mark Know symbol URI;
The resource identification information matched sub-block includes:
Host judging units, for judging in the server info Host in the access request and the information table memory Server info Host it is whether identical;If so, URI judging units are called, if it is not, then it fails to match determination unit;
URI judging units, for judging the uniform resource identifier URI in the access request and the information table memory In uniform resource identifier URI it is whether identical;If so, calling successful match determination unit, if it is not, then calling, it fails to match Determination unit;
Successful match determination unit, for determining successful match;
Determination unit that it fails to match, for determining that it fails to match.
In one embodiment of the invention, it further includes:
Data cache module, for caching the data;
First mapping relations establish module, for establishing the resource identification information and institute in preset information table memory State the mapping relations between data.
In one embodiment of the invention, first mapping relations are established module and are included:
Key-value pair setting up submodule, for using server info Host and uniform resource identifier URI as key, the number According to as value, key-value pair is established in preset information table memory.
In one embodiment of the invention, the resource identification information includes Data Identification,
The storage judgment module 403 includes:
Second information table memory inquires submodule, for inquiring preset information table memory, remembers in the information table memory Record has the Data Identification of stored data;
Data Identification matched sub-block, for by the resource identification information in the access request and the information table memory In Data Identification matched;
Second has stored determination sub-module, for when successful match, determining to be stored with the data;
Second does not store determination sub-module, for when it fails to match, determining not being stored with the data.
In one embodiment of the invention, the resource identification information further includes server info Host and unified resource Identifiers, URIs, also record has the corresponding server info Host of stored data and unified resource in the information table memory Identifiers, URIs, described device further include:
Information matches module, for when determining to have stored the data, judging server in the resource identification information Information Host server info Hosts corresponding with data described in the information table memory with uniform resource identifier URI and system Whether one resource identifiers, URIs are consistent;If it is not, the second mapping relations is then called to establish module;
Second mapping relations establish module, for established in the information table memory resource identification information with it is described Mapping relations between data.
For device embodiment, since it is basicly similar to embodiment of the method, so description is fairly simple, it is related Part illustrates referring to the part of embodiment of the method.
Algorithm and display be not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein. Various general-purpose systems can also be used together with teaching based on this.As described above, required by constructing this kind of system Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that it can utilize various Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair Bright preferred forms.
In the specification provided in this place, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention Example can be put into practice without these specific details.In some instances, well known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of each inventive aspect, Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor Shield the present invention claims the more features of feature than being expressly recited in each claim.More precisely, as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim is in itself Separate embodiments all as the present invention.
Those skilled in the art, which are appreciated that, to carry out adaptively the module in the equipment in embodiment Change and they are arranged in one or more equipment different from the embodiment.It can be the module or list in embodiment Member or component be combined into a module or unit or component and can be divided into addition multiple submodule or subelement or Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it may be used any Combination is disclosed to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so to appoint Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification is (including adjoint power Profit requirement, abstract and attached drawing) disclosed in each feature can be by providing the alternative features of identical, equivalent or similar purpose come generation It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments In included certain features rather than other feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment claimed is appointed One of meaning mode can use in any combination.
The all parts embodiment of the present invention can be with hardware realization or to be run on one or more processor Software module realize or realized with combination thereof.It will be understood by those of skill in the art that it can use in practice Microprocessor or digital signal processor (DSP) are according to embodiments of the present invention based on content distributing network CDN's to realize The some or all functions of some or all components in data access equipment.The present invention is also implemented as performing The some or all equipment or program of device of method as described herein are (for example, computer program and computer journey Sequence product).It is such realize the present invention program can may be stored on the computer-readable medium either can have there are one or The form of multiple signals.Such signal can be downloaded from internet website obtain either providing on carrier signal or It is provided in the form of any other.
It should be noted that the present invention will be described rather than limits the invention, and ability for above-described embodiment Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference mark between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real It is existing.If in the unit claim for listing equipment for drying, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any sequence.These words can be explained and run after fame Claim.
The embodiment of the invention discloses A1, a kind of data access method based on content distributing network CDN, in content distribution There are multiple nodes in network C DN, the method includes:
Access request is received in present node;
Resource identification information is extracted from the access request;
Judge whether the corresponding data of the resource identification information being stored in the access request;
When having stored the data, the data are returned.
A2, the method as described in A1, further include:
When not storing the data, the data are obtained;
Return to the data.
A3, the method as described in A1 or A2, the resource identification information for judging whether to be stored in the access request Corresponding data, including:
Preset information table memory is inquired, the resource identification that being recorded in the information table memory there are stored data is believed Breath;
By the resource identification information progress in the resource identification information in the access request and the information table memory Match;
When successful match, determine to be stored with the data;
When it fails to match, determine not being stored with the data.
A4, the method as described in A3, the resource identification information include server info Host and uniform resource identifier URI;
Resource identification information in the resource identification information by the access request and the information table memory into Row matching, including:
Sub-step S121 judges the server info Host in the access request and the service in the information table memory Whether device information Host is identical;If so, sub-step S122 is performed, if it is not, then performing sub-step S124;
Sub-step S122 is judged in uniform resource identifier URI and the information table memory in the access request Whether uniform resource identifier URI is identical;If so, sub-step S123 is performed, if it is not, then performing sub-step S124;
Sub-step S123, determines successful match;
Sub-step S124 determines that it fails to match.
A5, the method as described in A2 or A4, further include:
Cache the data;
The mapping relations between the resource identification information and the data are established in preset information table memory.
A6, the method as described in A5, it is described established in preset information table memory the resource identification information with it is described Mapping relations between data, including:
Using server info Host and uniform resource identifier URI as key, the data as value, in preset storage Key-value pair is established in information table.
A7, the method as described in A2, the resource identification information include Data Identification,
It is described to judge whether to be stored with the corresponding data of resource identification information in the access request, including:
Preset information table memory is inquired, the Data Identification for there are stored data is recorded in the information table memory;
Resource identification information in the access request is matched with the Data Identification in the information table memory;
When successful match, determine to be stored with the data;
When it fails to match, determine not being stored with the data.
A8, the method as described in A7, the resource identification information further include server info Host and uniform resource identifier URI is accorded with, also record has the corresponding server info Host of stored data and uniform resource identifier in the information table memory URI is accorded with, the method further includes:
When determining to have stored the data, server info Host and unified resource in the resource identification information are judged Identifiers, URIs server info Host and uniform resource identifier URI corresponding with data described in the information table memory be It is no consistent;
If it is not, the mapping then established in the information table memory between the resource identification information and the data is closed System.
The embodiment of the invention also discloses B9, a kind of data access device based on content distributing network CDN, in content point There are multiple nodes, described device includes in hairnet network CDN:
Access request receiving module, for receiving access request in present node;
Resource identification information extraction module, for extracting resource identification information from the access request;
Judgment module is stored, for judging whether the corresponding number of the resource identification information being stored in the access request According to;
First data return to module, for when having stored the data, returning to the data.
B10, the device as described in B9, further include:
Data acquisition module, for when not storing the data, obtaining the data;
Second data return to module, for returning to the data.
B11, the device as described in B9 or B10, the storage judgment module include:
First information table memory inquires submodule, for inquiring preset information table memory, remembers in the information table memory Record has the resource identification information of stored data;
Resource identification information matched sub-block, for the resource identification information in the access request and the storage to be believed Resource identification information in breath table is matched;
First has stored determination sub-module, for when successful match, determining to be stored with the data;
First does not store determination sub-module, for when it fails to match, determining not being stored with the data.
B12, the device as described in B11, the resource identification information include server info Host and uniform resource identifier Accord with URI;
The resource identification information matched sub-block includes:
Host judging units, for judging in the server info Host in the access request and the information table memory Server info Host it is whether identical;If so, URI judging units are called, if it is not, then it fails to match determination unit;
URI judging units, for judging the uniform resource identifier URI in the access request and the information table memory In uniform resource identifier URI it is whether identical;If so, calling successful match determination unit, if it is not, then calling, it fails to match Determination unit;
Successful match determination unit, for determining successful match;
Determination unit that it fails to match, for determining that it fails to match.
B13, the device as described in B10 or B12, further include:
Data cache module, for caching the data;
First mapping relations establish module, for establishing the resource identification information and institute in preset information table memory State the mapping relations between data.
B14, the device as described in B13, first mapping relations are established module and are included:
Key-value pair setting up submodule, for using server info Host and uniform resource identifier URI as key, the number According to as value, key-value pair is established in preset information table memory.
B15, the device as described in B10, the resource identification information include Data Identification,
The storage judgment module includes:
Second information table memory inquires submodule, for inquiring preset information table memory, remembers in the information table memory Record has the Data Identification of stored data;
Data Identification matched sub-block, for by the resource identification information in the access request and the information table memory In Data Identification matched;
Second has stored determination sub-module, for when successful match, determining to be stored with the data;
Second does not store determination sub-module, for when it fails to match, determining not being stored with the data.
B16, the device as described in B15, the resource identification information further include server info Host and unified resource mark Know symbol URI, also record has the corresponding server info Host of stored data and unified resource mark in the information table memory Know symbol URI, described device further includes:
Information matches module, for when determining to have stored the data, judging server in the resource identification information Information Host server info Hosts corresponding with data described in the information table memory with uniform resource identifier URI and system Whether one resource identifiers, URIs are consistent;If it is not, the second mapping relations is then called to establish module;
Second mapping relations establish module, for established in the information table memory resource identification information with it is described Mapping relations between data.

Claims (10)

1. a kind of data access method based on content distributing network CDN has multiple nodes in content distributing network CDN, The method includes:
Access request is received in present node;
Resource identification information is extracted from the access request;
Judge whether the corresponding data of the resource identification information being stored in the access request;
When having stored the data, the data are returned.
2. the method as described in claim 1, which is characterized in that further include:
When not storing the data, the data are obtained;
Return to the data.
3. method as claimed in claim 1 or 2, which is characterized in that described to judge whether to be stored in the access request The corresponding data of resource identification information, including:
Preset information table memory is inquired, the resource identification information for there are stored data is recorded in the information table memory;
Resource identification information in the access request is matched with the resource identification information in the information table memory;
When successful match, determine to be stored with the data;
When it fails to match, determine not being stored with the data.
4. method as claimed in claim 3, which is characterized in that the resource identification information includes server info Host and system One resource identifiers, URIs;
The resource identification information by the access request and the resource identification information progress in the information table memory Match, including:
Sub-step S121 judges that the server info Host in the access request believes with the server in the information table memory Whether identical cease Host;If so, sub-step S122 is performed, if it is not, then performing sub-step S124;
Sub-step S122 judges the uniform resource identifier URI in the access request and the unification in the information table memory Whether resource identifiers, URIs are identical;If so, sub-step S123 is performed, if it is not, then performing sub-step S124;
Sub-step S123, determines successful match;
Sub-step S124 determines that it fails to match.
5. the method as described in claim 2 or 4, which is characterized in that further include:
Cache the data;
The mapping relations between the resource identification information and the data are established in preset information table memory.
6. method as claimed in claim 5, which is characterized in that described that the resource mark is established in preset information table memory Know the mapping relations between information and the data, including:
Using server info Host and uniform resource identifier URI as key, the data as value, in preset storage information Key-value pair is established in table.
7. method as claimed in claim 2, which is characterized in that the resource identification information includes Data Identification,
It is described to judge whether to be stored with the corresponding data of resource identification information in the access request, including:
Preset information table memory is inquired, the Data Identification for there are stored data is recorded in the information table memory;
Resource identification information in the access request is matched with the Data Identification in the information table memory;
When successful match, determine to be stored with the data;
When it fails to match, determine not being stored with the data.
8. the method for claim 7, which is characterized in that the resource identification information further include server info Host with Uniform resource identifier URI, in the information table memory also record have the corresponding server info Host of stored data with Uniform resource identifier URI, the method further include:
When determining to have stored the data, server info Host and uniform resource identifier in the resource identification information are judged Accord with URI server info Host corresponding with data described in the information table memory and uniform resource identifier URI whether one It causes;
If it is not, the mapping relations between the resource identification information and the data are then established in the information table memory.
9. a kind of data access device based on content distributing network CDN has multiple nodes in content distributing network CDN, Described device includes:
Access request receiving module, for receiving access request in present node;
Resource identification information extraction module, for extracting resource identification information from the access request;
Judgment module is stored, for judging whether the corresponding data of the resource identification information being stored in the access request;
First data return to module, for when having stored the data, returning to the data.
10. device as claimed in claim 9, which is characterized in that further include:
Data acquisition module, for when not storing the data, obtaining the data;
Second data return to module, for returning to the data.
CN201711485184.5A 2017-12-29 2017-12-29 A kind of data access method and device based on content distributing network CDN Pending CN108234639A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711485184.5A CN108234639A (en) 2017-12-29 2017-12-29 A kind of data access method and device based on content distributing network CDN

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711485184.5A CN108234639A (en) 2017-12-29 2017-12-29 A kind of data access method and device based on content distributing network CDN

Publications (1)

Publication Number Publication Date
CN108234639A true CN108234639A (en) 2018-06-29

Family

ID=62647369

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711485184.5A Pending CN108234639A (en) 2017-12-29 2017-12-29 A kind of data access method and device based on content distributing network CDN

Country Status (1)

Country Link
CN (1) CN108234639A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063142A (en) * 2018-08-06 2018-12-21 网宿科技股份有限公司 Web page resources method for pushing and server
CN109639801A (en) * 2018-12-17 2019-04-16 深圳市网心科技有限公司 Back end distribution and data capture method and system
CN109672756A (en) * 2019-02-14 2019-04-23 网宿科技股份有限公司 A kind of data transmission method and relevant apparatus, server and storage medium
CN110209949A (en) * 2019-06-11 2019-09-06 湖南快乐阳光互动娱乐传媒有限公司 Resource supplying method and device
CN110830564A (en) * 2019-10-30 2020-02-21 北京金山云网络技术有限公司 CDN scheduling method, device, system and computer readable storage medium
CN111726387A (en) * 2019-03-22 2020-09-29 华为技术有限公司 Resource acquisition method and device
CN112822289A (en) * 2021-01-29 2021-05-18 深圳市大头兄弟科技有限公司 Data uploading and reading method, system, equipment and storage medium
CN113296924A (en) * 2020-04-28 2021-08-24 阿里巴巴集团控股有限公司 Content distribution method, device, system and storage medium
CN113327063A (en) * 2021-06-25 2021-08-31 北京奇艺世纪科技有限公司 Resource detection method and device, electronic equipment and computer readable storage medium
CN113590658A (en) * 2021-07-06 2021-11-02 广州汇思信息科技股份有限公司 Cache data processing method and device, computer equipment and storage medium
CN114466018A (en) * 2022-03-22 2022-05-10 北京有竹居网络技术有限公司 Scheduling method and device for content distribution network, storage medium and electronic equipment
CN116208668A (en) * 2023-05-05 2023-06-02 北京零壹视界科技有限公司 Data caching method, device, equipment and medium based on content distribution network

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102077189A (en) * 2008-06-30 2011-05-25 亚马逊技术有限公司 Request routing using network computing components
CN102282825A (en) * 2010-12-14 2011-12-14 华为技术有限公司 Method and device for streaming media to request address mapping and cache nodes in content delivery network
CN104580177A (en) * 2014-12-26 2015-04-29 广州酷狗计算机科技有限公司 Resource supplying method, device and system
EP2708013B1 (en) * 2011-05-12 2015-07-22 Telefonica S.A. A method for DNS resolution of content requests in a CDN service
CN105589919A (en) * 2015-09-18 2016-05-18 广州市动景计算机科技有限公司 Method and device for processing webpage resource
CN106412636A (en) * 2015-07-29 2017-02-15 中兴通讯股份有限公司 Playing control method and device
CN107015978A (en) * 2016-01-27 2017-08-04 广州市动景计算机科技有限公司 A kind of web page resources processing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102077189A (en) * 2008-06-30 2011-05-25 亚马逊技术有限公司 Request routing using network computing components
CN102282825A (en) * 2010-12-14 2011-12-14 华为技术有限公司 Method and device for streaming media to request address mapping and cache nodes in content delivery network
EP2708013B1 (en) * 2011-05-12 2015-07-22 Telefonica S.A. A method for DNS resolution of content requests in a CDN service
CN104580177A (en) * 2014-12-26 2015-04-29 广州酷狗计算机科技有限公司 Resource supplying method, device and system
CN106412636A (en) * 2015-07-29 2017-02-15 中兴通讯股份有限公司 Playing control method and device
CN105589919A (en) * 2015-09-18 2016-05-18 广州市动景计算机科技有限公司 Method and device for processing webpage resource
CN107015978A (en) * 2016-01-27 2017-08-04 广州市动景计算机科技有限公司 A kind of web page resources processing method and device

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063142A (en) * 2018-08-06 2018-12-21 网宿科技股份有限公司 Web page resources method for pushing and server
CN109639801A (en) * 2018-12-17 2019-04-16 深圳市网心科技有限公司 Back end distribution and data capture method and system
CN109672756A (en) * 2019-02-14 2019-04-23 网宿科技股份有限公司 A kind of data transmission method and relevant apparatus, server and storage medium
CN111726387A (en) * 2019-03-22 2020-09-29 华为技术有限公司 Resource acquisition method and device
CN110209949A (en) * 2019-06-11 2019-09-06 湖南快乐阳光互动娱乐传媒有限公司 Resource supplying method and device
CN110830564A (en) * 2019-10-30 2020-02-21 北京金山云网络技术有限公司 CDN scheduling method, device, system and computer readable storage medium
CN113296924B (en) * 2020-04-28 2022-07-22 阿里巴巴集团控股有限公司 Content distribution method, device, system and storage medium
CN113296924A (en) * 2020-04-28 2021-08-24 阿里巴巴集团控股有限公司 Content distribution method, device, system and storage medium
CN112822289A (en) * 2021-01-29 2021-05-18 深圳市大头兄弟科技有限公司 Data uploading and reading method, system, equipment and storage medium
CN113327063A (en) * 2021-06-25 2021-08-31 北京奇艺世纪科技有限公司 Resource detection method and device, electronic equipment and computer readable storage medium
CN113327063B (en) * 2021-06-25 2023-08-18 北京奇艺世纪科技有限公司 Resource detection method, device, electronic equipment and computer readable storage medium
CN113590658A (en) * 2021-07-06 2021-11-02 广州汇思信息科技股份有限公司 Cache data processing method and device, computer equipment and storage medium
CN114466018A (en) * 2022-03-22 2022-05-10 北京有竹居网络技术有限公司 Scheduling method and device for content distribution network, storage medium and electronic equipment
CN116208668A (en) * 2023-05-05 2023-06-02 北京零壹视界科技有限公司 Data caching method, device, equipment and medium based on content distribution network

Similar Documents

Publication Publication Date Title
CN108234639A (en) A kind of data access method and device based on content distributing network CDN
CN107801086B (en) The dispatching method and system of more cache servers
CN104917851B (en) Information processing method and dns caching server
US9386117B2 (en) Server side data cache system
CN103329113B (en) Configuration is accelerated and custom object and relevant method for proxy server and the Dynamic Website of hierarchical cache
KR102072203B1 (en) A node and a method for generating shortened name increasing adaptability of hierarchical name in a content centric network
CN103036967B (en) A kind of download management equipment, method and data downloading system
CN103036969B (en) For providing the management equipment and method of file download address
CN101350030B (en) Method and apparatus for caching data
CN104378452B (en) A kind of method, apparatus and system for domain name mapping
CN106294352B (en) A kind of document handling method, device and file system
CN103685590B (en) Obtain the method and system of IP address
CN108173952A (en) A kind of data access method and device of content distributing network CDN
CN108234207A (en) A kind of Fault Locating Method and device based on content distributing network CDN
CN109491758A (en) Docker mirror image distribution method, system, data gateway and computer readable storage medium
CN104836822B (en) Obtain downloading data method and device, the method and system of downloading data
CN102164160A (en) Method, device and system for supporting large quantity of concurrent downloading
CN108234632A (en) A kind of data distributing method and device of content distributing network CDN
CN108234638A (en) A kind of data processing method and device based on content distributing network CDN
CN107835437A (en) Dispatching method and device based on more caching servers
CN106131113A (en) A kind of resource downloading method, device, system and Resource Server
CN109947724A (en) The method and apparatus of distributed lock service
CN106101055A (en) The data access method of a kind of multiple database and system thereof and proxy server
CN104935653A (en) Bypass cache method for visiting hot spot resource and device
CN106790601A (en) The reading device of address of service, system and method

Legal Events

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

Application publication date: 20180629