CN103905332B - A kind of method and apparatus for determining cache policy - Google Patents

A kind of method and apparatus for determining cache policy Download PDF

Info

Publication number
CN103905332B
CN103905332B CN201210590587.7A CN201210590587A CN103905332B CN 103905332 B CN103905332 B CN 103905332B CN 201210590587 A CN201210590587 A CN 201210590587A CN 103905332 B CN103905332 B CN 103905332B
Authority
CN
China
Prior art keywords
data
router
hash
popularity
value
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.)
Active
Application number
CN201210590587.7A
Other languages
Chinese (zh)
Other versions
CN103905332A (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201210590587.7A priority Critical patent/CN103905332B/en
Priority to PCT/CN2013/091185 priority patent/WO2014101894A1/en
Publication of CN103905332A publication Critical patent/CN103905332A/en
Application granted granted Critical
Publication of CN103905332B publication Critical patent/CN103905332B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the invention discloses a kind of method and apparatus for determining cache policy, by counting the requested information of the first data that node receiving router is reported in methods described, the first popularity rating calculation according to hash function, the metadata of the first data and the first data stores the ident value of the router of first data;By adjudicate router from user equipment receive for ask the first data message, the Router Distinguisher for storing first data is calculated according to hash function;The user equipment with the metadata of the first data be function input value, Hash operation is carried out using hash function, obtain the first cryptographic Hash, so that popularity grade request content high caches many parts, the low few part of request content caching of popular grade, avoid in the prior art all caching all the elements or only caching the content of latest requests, so as to realize that coordinated regions intradomain router cooperates caching, improve the efficiency of router cache.

Description

A kind of method and apparatus for determining cache policy
Technical field
The invention belongs to network technique field, more particularly to a kind of method and apparatus for determining cache policy.
Background technology
With the continuous progress of network size and technology, on the one hand, picture, web page, office documents and multimedia sound The main application of the acquisition as internet of video etc., network traffics are also sharply increased therewith, on the other hand, the performance of router Strengthened, in addition to basic forwarding capability, be also equipped with certain calculating and caching capabilities.Because router is relative to original Content Service Provider can be asked with quick response user closer to user side, therefore the caching capabilities of utilization router to content Ask, and reduce the consumption of the network bandwidth.
In current most technical scheme, in the absence of cooperation between router cache.Carried to original contents positioned at user The popularity of the content that each router on donor path is received alone according to it come decide whether to cache the content, and cut The situation of user's request hit local router caching is obtained to user's returned content or the request is forwarded.Using which, use Family is only capable of using the caching on path, it is impossible to find other cachings in network.Simultaneously as the caching of individual router is limited , the mode without cooperation causes that all the elements burst of the individual router to receiving will judge whether to need caching, its dynamic Property is higher, and local cache hit rate is relatively low.Finally, due to each router individually decides whether caching, it is very high for popularity Content fragment for there is substantial amounts of redundancy caching so that the Buffer Utilization of whole network declines.
Solving the problems, such as in collaboration region that cache routing device cooperates cache contents in the prior art can mainly divide It is centralized and distributed two class.Centralized solution is the demand according to content provider, is referred to using a centralized device The content that fixed each router cache should be cached.It is not intended that this is local in local popularity, its all of request will lead to Cross the position that centralized device searches caching, load excessive.Typical distributed schemes are to determine that each delays by hash function Depositing router needs the scope of content of responsible caching.At most caching is a in collaboration region for each content, and popularity is high Content can cause responsible cache routing device load excessive.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of method for determining cache policy, between solution router cache not In the presence of what the network-caching utilization rate caused by cooperation was low, router has substantial amounts of redundancy caching and router load is excessive etc. Problem.
In a first aspect, a kind of method of router cache cooperation, methods described includes:
The requested information of data of expression first that statistics node is reported respectively according to m router in receiving area, m ≥1;
Metadata with first data is function input value, and Hash operation is carried out using hash function, obtains first Cryptographic Hash;
Mould n computings are carried out to first cryptographic Hash, is obtained for caching the part or all of number in first data According to the first router mark, the n is the sum of the Intra-Domain Router, m≤n.
With reference in a first aspect, in the first possible implementation of first aspect, first when the first data is popular When the absolute value for spending grade is more than or equal to 2, methods described also includes:
Function input value is designated with the first router, Hash operation is carried out using the hash function, obtained Second cryptographic Hash;
Mould n computings are carried out to second cryptographic Hash, is obtained for caching the part or all of number in first data According to the second router ident value.
With reference in a first aspect, in second possible implementation of first aspect, the m router is reported respectively The requested information of data of expression first be first data that the m router is reported respectively popularity, it is described Method also includes:
The popularity of first data reported respectively according to the m router, determines the total of first data Popularity;
Total popularity inquiry grade corresponding relation according to first data, determines total popularity of first data The first popularity grade;
When the absolute value of the first popularity grade is more than or equal to j, and j is positive integer, and during j >=2, methods described is also Including:
Function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Cryptographic Hash;
Mould n computings are carried out to the i+1 cryptographic Hash, is obtained for caching the part or all of number in first data According to i+1 router ident value, wherein 1≤i≤j-1, i are integer;
Determine the corresponding i+1 road for caching the part or all of data in first data of each value of i By the ident value of device.
With reference to second possible implementation of first aspect, in the third possible implementation of first aspect, The grade corresponding relation includes the corresponding relation of total popularity and the popularity grade, or, grade correspondence is closed System includes the corresponding relation of popularity value region and the popularity grade, and total popularity in the popularity value Within region.
Can with reference to the first possible implementation or second of first aspect of first aspect or first aspect The implementation of energy or the third possible implementation of first aspect, in the 4th kind of possible realization side of first aspect In formula, the hash function includes:MD5, SHA1, BKDRHash or FNVIA
A kind of second aspect, method of determination cache policy, methods described includes:
Judgement router receives the message for asking the first data from user equipment;
Metadata with first data is function input value, and Hash operation is carried out using hash function, obtains first Cryptographic Hash;
Mould n computings are carried out to first cryptographic Hash, is obtained for caching the part or all of number in first data According to the first router mark, the n is the sum of the Intra-Domain Router, m≤n.
With reference to second aspect, in the first possible implementation of second aspect, methods described also includes:
Receive the first popularity grade of first data that statistics node sends;
When the absolute value of the first popularity grade is more than or equal to j, and j is positive integer, and during j >=2, methods described is also Including:
Function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Cryptographic Hash;
Mould n computings are carried out to the i+1 cryptographic Hash, is obtained for caching the part or all of number in first data According to i+1 router ident value, wherein 1≤i≤j-1, i are integer;
Determine the corresponding i+1 road for caching the part or all of data in first data of each value of i By the ident value of device.
With reference to the first possible implementation of second aspect or second aspect, second in second aspect may Implementation in, the hash function includes:MD5, SHA1, BKDRHash or FNVIA.
A kind of third aspect, method of determination cache policy, methods described includes:
User equipment is function input value with the metadata of the first data, and Hash operation is carried out using hash function, is obtained First cryptographic Hash;
Mould n computings are carried out to first cryptographic Hash, is obtained for caching the part or all of number in first data According to the first router mark, the n is the sum of the Intra-Domain Router, m≤n.
With reference to the third aspect, in the first possible implementation of the third aspect, methods described also includes:
The user equipment obtains the maximum popularity grade of first data;
When the absolute value of the maximum popularity grade is more than or equal to j, and j is positive integer, and during j >=2, methods described is also Including:
Function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Cryptographic Hash;
Mould n computings are carried out to the i+1 cryptographic Hash, is obtained for caching the part or all of number in first data According to i+1 router ident value, wherein 1≤i≤j-1, i are integer;
Determine the corresponding i+1 road for caching the part or all of data in first data of each value of i By the ident value of device.
With reference to the first possible implementation of the third aspect or the third aspect, second in the third aspect may Implementation in, the hash function includes:MD5, SHA1, BKDRHash or FNVIA.
A kind of fourth aspect, equipment of determination cache policy, the equipment of the determination cache policy includes:
First receiving unit, for counting the expression first that node is reported respectively according to m router in receiving area The requested information of data, m >=1;
First arithmetic element, for being function input value with the metadata of first data, is carried out using hash function Hash operation, obtains the first cryptographic Hash;
First Modulo Operation Unit, for carrying out mould n computings to first cryptographic Hash, obtains for caching first number The mark of the first router of the part or all of data in, the n is the sum of the Intra-Domain Router, m≤n.
With reference to fourth aspect, in the first possible implementation of fourth aspect, described determination cache policy Equipment also includes:
Second arithmetic element, when the absolute value for the first popularity grade when the first data is more than or equal to 2, with institute That states the first router is designated function input value, and Hash operation is carried out using the hash function, obtains the second cryptographic Hash;
Second Modulo Operation Unit, for carrying out mould n computings to second cryptographic Hash, obtains for caching first number The ident value of the second router of the part or all of data in.
With reference to fourth aspect, in second possible implementation of fourth aspect, the m router is reported respectively The requested information of data of expression first be first data that the m router is reported respectively popularity, it is described Determining the equipment of cache policy also includes:
First determining unit, the popularity of first data for being reported respectively according to the m router, it is determined that Total popularity of first data;
Second determining unit, for inquiring about grade corresponding relation according to total popularity of first data, it is determined that described First popularity grade of total popularity of the first data;
The equipment for determining cache policy also includes:
3rd arithmetic element, for being more than or equal to j when the absolute value of the first popularity grade, and j is positive integer, During j >=2, function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Kazakhstan Uncommon value;
3rd Modulo Operation Unit, mould n computings are carried out for pair of i+1 cryptographic Hash, are obtained for caching described The ident value of the i+1 router of the part or all of data in one data, wherein 1≤i≤j-1, i are integer;
3rd determining unit, each value for determining i it is corresponding for cache the part in first data or The ident value of the i+1 router of total data.
With reference to second possible implementation of fourth aspect, in the third possible implementation of fourth aspect In, the grade corresponding relation includes the corresponding relation of total popularity and the popularity grade, or, grade correspondence Relation includes the corresponding relation of popularity value region and the popularity grade, and total popularity takes in the popularity Within value region.
Can with reference to the first possible implementation or second of fourth aspect of fourth aspect or fourth aspect The implementation of energy or the third possible implementation of fourth aspect, the hash function include:MD5、SHA1、 BKDRHash or FNVIA
A kind of 5th aspect, equipment for determining cache policy, the equipment of the determination cache policy includes:
Second receiving unit, for adjudicate router from user equipment receive for ask the first data message;
4th arithmetic element, for being function input value with the metadata of first data, is carried out using hash function Hash operation, obtains the first cryptographic Hash;
4th Modulo Operation Unit, for carrying out mould n computings to first cryptographic Hash, obtains for caching first number The mark of the first router of the part or all of data in, the n is the sum of the Intra-Domain Router, m≤n.
It is described to determine setting for cache policy in the first possible implementation of the 5th aspect with reference to the 5th aspect It is standby also to include:
3rd receiving unit, the first popularity grade for receiving first data that statistics node sends;
The equipment for determining cache policy also includes:
5th arithmetic element, for being more than or equal to j when the absolute value of the first popularity grade, and j is positive integer, During j >=2, function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Kazakhstan Uncommon value;
5th Modulo Operation Unit, for carrying out mould n computings to the i+1 cryptographic Hash, obtains for caching described first The ident value of the i+1 router of the part or all of data in data, wherein 1≤i≤j-1, i are integer;
4th determining unit, each value for determining i it is corresponding for cache the part in first data or The ident value of the i+1 router of total data.
With reference to the 5th aspect or the first possible implementation of the 5th aspect, the hash function includes:MD5、 SHA1, BKDRHash or FNVIA.
A kind of 6th aspect, equipment for determining cache policy, the equipment of the determination cache policy includes:
6th arithmetic element, with the metadata of the first data is function input value for user equipment, uses hash function Hash operation is carried out, the first cryptographic Hash is obtained;
6th Modulo Operation Unit, for carrying out mould n computings to first cryptographic Hash, obtains for caching first number The mark of the first router of the part or all of data in, the n is the sum of the Intra-Domain Router, m≤n.
It is described to determine setting for cache policy in the first possible implementation of the 6th aspect with reference to the 6th aspect It is standby also to include:
Acquiring unit, the maximum popularity grade of first data is obtained for the user equipment;
The equipment for determining cache policy also includes:
7th arithmetic element, for being more than or equal to j when the absolute value of the maximum popularity grade, and j is positive integer, During j >=2, function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Kazakhstan Uncommon value;
7th modular arithmetic subelement, for carrying out mould n computings to the i+1 cryptographic Hash, obtains for caching described The ident value of the i+1 router of the part or all of data in one data, wherein 1≤i≤j-1, i are integer;
5th determining unit, each value for determining i it is corresponding for cache the part in first data or The ident value of the i+1 router of total data.
With reference to the 6th aspect or the first possible implementation of the 6th aspect, second at the 6th aspect may Implementation in, the hash function includes:MD5, SHA1, BKDRHash or FNVIA.
Compared with prior art, the embodiment of the present invention provides a kind of method for determining cache policy, passes through in methods described The statistics requested information of the first data that reports of node receiving router, according to hash function, the metadata of the first data and First popularity rating calculation of the first data stores the ident value of the router of first data;By adjudicate router from User equipment receives the message for asking the first data, and the router for storing first data is calculated according to hash function Mark;The user equipment is function input value with the metadata of the first data, and Hash operation is carried out using hash function, is obtained First cryptographic Hash so that popularity grade request content high caches many parts, and the low few part of request content caching of popular grade is kept away Exempt from the prior art all to cache all the elements or only cache the content of latest requests, so as to realize coordinated regions intradomain router Caching is cooperated, the efficiency of router cache is improved.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below by to be used needed for embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for ability For the those of ordinary skill of domain, without having to pay creative labor, can also obtain other according to these accompanying drawings Accompanying drawing.
Fig. 1 is a kind of method flow diagram of determination cache policy that the embodiment of the present invention one is provided;
Fig. 2 is a kind of method flow diagram of determination cache policy that the embodiment of the present invention two is provided;
Fig. 3 is a kind of method flow diagram of determination cache policy that the embodiment of the present invention three is provided;
Fig. 4 is a kind of method schematic diagram of router cache cooperation that the embodiment of the present invention four is provided;
Fig. 5 is a kind of method flow diagram of statistics nodal cache cooperation that the embodiment of the present invention four is provided;
Fig. 6 is a kind of method flow diagram of router cache cooperation that the embodiment of the present invention four is provided;
Fig. 7 is a kind of method flow diagram of statistics nodal cache cooperation that the embodiment of the present invention four is provided;
Fig. 8 is a kind of equipment structure chart of determination cache policy that the embodiment of the present invention five is provided;
Fig. 9 is a kind of equipment structure chart of determination cache policy that the embodiment of the present invention five is provided;
Figure 10 is a kind of equipment structure chart of determination cache policy that the embodiment of the present invention five is provided;
Figure 11 is a kind of equipment structure chart of determination cache policy that the embodiment of the present invention six is provided;
Figure 12 is a kind of equipment structure chart of determination cache policy that the embodiment of the present invention six is provided;
Figure 13 is a kind of equipment structure chart of determination cache policy that the embodiment of the present invention seven is provided;
Figure 14 is a kind of equipment structure chart of determination cache policy that the embodiment of the present invention seven is provided;
Figure 15 is a kind of structure drawing of device of statistics node that the embodiment of the present invention eight is provided;
Figure 16 is a kind of structure drawing of device of router that the embodiment of the present invention nine is provided;
Figure 17 is a kind of structure drawing of device of user equipment that the embodiment of the present invention ten is provided.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the invention, it is all in essence of the invention Any modification, equivalent and improvement made within god and principle etc., should be included within the scope of the present invention.
Embodiment one
With reference to Fig. 1, Fig. 1 is a kind of method flow diagram of determination cache policy that the embodiment of the present invention one is provided.Such as Fig. 1 institutes Show, methods described comprises the following steps:
Step 101, the data of expression first that statistics node is reported respectively according to m router in receiving area are requested Information, m >=1;
Step 102, the metadata with first data is function input value, and Hash operation is carried out using hash function, Obtain the first cryptographic Hash;
Wherein, the hash function includes:MD5, SHA1, BKDRHash or FNVIA.The metadata is the first data Name, is carried in the requested information of the first data.
Specifically, assuming that hash function is Hash, then Hash(The metadata of the first data)=the first cryptographic Hash.
Step 103, mould n computings are carried out to first cryptographic Hash, are obtained for caching the part in first data Or the mark of the first router of total data, the n is the sum of the Intra-Domain Router, m≤n.
Specifically, the first cryptographic Hash moden=the first router is identified.
As a kind of optional embodiment, when the absolute value of the first popularity grade of the first data is more than or equal to 2, Methods described also includes:
Function input value is designated with the first router, Hash operation is carried out using the hash function, obtained Second cryptographic Hash;
Mould n computings are carried out to second cryptographic Hash, is obtained for caching the part or all of number in first data According to the second router ident value.
Specifically, when calculating for second, Hash(The mark of the first router)=the second cryptographic Hash, the second cryptographic Hash moden =the second router is identified.
Specifically, the popular grade i=2 of request content C1, it is assumed that Hash(C1)ModeN=routers 1, Hash(1)modeN =router 2, then calculate router 1 and router 2 is responsible for caching C1.
As an alternative embodiment, the requested letter of data of expression first that the m router is reported respectively The popularity of first data reported respectively for the m router is ceased, methods described also includes:
The popularity of first data reported respectively according to the m router, determines the total of first data Popularity;
Total popularity inquiry grade corresponding relation according to first data, determines total popularity of first data The first popularity grade;
When the absolute value of the first popularity grade is more than or equal to j, and j is positive integer, and during j >=2, methods described is also Including:
Function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Cryptographic Hash;
Mould n computings are carried out to the i+1 cryptographic Hash, is obtained for caching the part or all of number in first data According to i+1 router ident value, wherein 1≤i≤j-1, i are integer;
Determine the corresponding i+1 road for caching the part or all of data in first data of each value of i By the ident value of device.
Wherein, the grade corresponding relation includes the corresponding relation of total popularity and the popularity grade, or, institute Corresponding relation of the grade corresponding relation including popularity value region and the popularity grade is stated, and total popularity is in institute State within popularity value region.
Specifically, the threshold values for assuming first order prevalence grade i=1 is every measurement period receives 100 requests, i.e. i=1 correspondences Popularity x scope be 0-100;The threshold values of the popular grade i=2 in the second level is that every measurement period receives 150 requests, i.e. i=2 The scope of corresponding popularity x is 100-150.
Specifically, assuming the request content according to popularity size sequence preceding 30%, popular grade is set to 1;Before being ordered as 30% to 50% request content, popular grade is set to 2.
Specifically, during third time computing, Hash(The mark of the second router)=the three cryptographic Hash, the 3rd cryptographic Hash moden =third router is identified;During the 4th computing, Hash(The mark of third router)=the four cryptographic Hash, the 4th cryptographic Hash The Router Distinguishers of moden=the 4th, the rest may be inferred, during jth time computing, Hash(The mark of the router of jth -1)=jth cryptographic Hash, Jth cryptographic Hash moden=jth Router Distinguishers.
The embodiment of the present invention provides a kind of method for determining cache policy, and route is received by counting node in methods described The requested information of the first data that device is reported, according to the first-class of hash function, the metadata of the first data and the first data Row degree rating calculation stores the ident value of the router of first data;It is used for by adjudicating router and being received from user equipment The message of the first data is asked, the Router Distinguisher for storing first data is calculated according to hash function;The user sets Standby is function input value with the metadata of the first data, and Hash operation is carried out using hash function, obtains the first cryptographic Hash so that Popularity grade request content high caches many parts, low few part of request content caching of popular grade, it is to avoid right in the prior art All the elements are all cached or only cache the content of latest requests, so as to realize that coordinated regions intradomain router cooperates caching, Improve the efficiency of router cache.
Embodiment two
With reference to Fig. 2, Fig. 2 is a kind of method flow diagram of determination cache policy that the embodiment of the present invention two is provided.Such as Fig. 2 institutes Show, methods described comprises the following steps:
Step 201, judgement router receives the message for asking the first data from user equipment;
Step 202, the metadata with first data is function input value, and Hash operation is carried out using hash function, Obtain the first cryptographic Hash;
Wherein, the hash function includes:MD5, SHA1, BKDRHash or FNVIA.The metadata is the first data Name, is carried in the requested information of the first data.
Specifically, assuming that hash function is Hash, then Hash(The metadata of the first data)=the first cryptographic Hash.
Step 203, mould n computings are carried out to first cryptographic Hash, are obtained for caching the part in first data Or the mark of the first router of total data, the n is the sum of the Intra-Domain Router, m≤n.
Specifically, the first cryptographic Hash moden=the first router is identified.
Used as a kind of optional embodiment, methods described also includes:
Receive the first popularity grade of first data that statistics node sends;
When the absolute value of the first popularity grade is more than or equal to j, and j is positive integer, and during j >=2, methods described is also Including:
Function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Cryptographic Hash;
Mould n computings are carried out to the i+1 cryptographic Hash, is obtained for caching the part or all of number in first data According to i+1 router ident value, wherein 1≤i≤j-1, i are integer;
Determine the corresponding i+1 road for caching the part or all of data in first data of each value of i By the ident value of device.
Specifically, when calculating for second, Hash(The mark of the first router)=the second cryptographic Hash, the second cryptographic Hash moden =the second router is identified.
Specifically, during third time computing, Hash(The mark of the second router)=the three cryptographic Hash, the 3rd cryptographic Hash moden =third router is identified;During the 4th computing, Hash(The mark of third router)=the four cryptographic Hash, the 4th cryptographic Hash The Router Distinguishers of moden=the 4th, the rest may be inferred, during jth time computing, Hash(The mark of the router of jth -1)=jth cryptographic Hash, Jth cryptographic Hash moden=jth Router Distinguishers.
The embodiment of the present invention provides a kind of method for determining cache policy, and route is received by counting node in methods described The requested information of the first data that device is reported, according to the first-class of hash function, the metadata of the first data and the first data Row degree rating calculation stores the ident value of the router of first data;It is used for by adjudicating router and being received from user equipment The message of the first data is asked, the Router Distinguisher for storing first data is calculated according to hash function;The user sets Standby is function input value with the metadata of the first data, and Hash operation is carried out using hash function, obtains the first cryptographic Hash so that Popularity grade request content high caches many parts, low few part of request content caching of popular grade, it is to avoid right in the prior art All the elements are all cached or only cache the content of latest requests, so as to realize that coordinated regions intradomain router cooperates caching, Improve the efficiency of router cache.
Embodiment three
With reference to Fig. 3, Fig. 3 is a kind of method flow diagram of determination cache policy that the embodiment of the present invention three is provided.The side Method is comprised the following steps:
Step 301, user equipment is function input value with the metadata of the first data, and Hash fortune is carried out using hash function Calculate, obtain the first cryptographic Hash;
Wherein, the hash function includes:MD5, SHA1, BKDRHash or FNVIA.
Specifically, Hash(The metadata of the first data)=the first cryptographic Hash.
Step 302, mould n computings are carried out to first cryptographic Hash, are obtained for caching the part in first data Or the mark of the first router of total data, the n is the sum of the Intra-Domain Router, m≤n.
Specifically, the first cryptographic Hash moden=the first router is identified.
Used as a kind of optional embodiment, methods described also includes:
The user equipment obtains the maximum popularity grade of first data;
When the absolute value of the maximum popularity grade is more than or equal to j, and j is positive integer, and during j >=2, methods described is also Including:
Function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Cryptographic Hash;
Mould n computings are carried out to the i+1 cryptographic Hash, is obtained for caching the part or all of number in first data According to i+1 router ident value, wherein 1≤i≤j-1, i are integer;
Determine the corresponding i+1 road for caching the part or all of data in first data of each value of i By the ident value of device.
Specifically, when calculating for second, Hash(The mark of the first router)=the second cryptographic Hash, the second cryptographic Hash moden =the second router is identified.
Specifically, during third time computing, Hash(The mark of the second router)=the three cryptographic Hash, the 3rd cryptographic Hash moden =third router is identified;During the 4th computing, Hash(The mark of third router)=the four cryptographic Hash, the 4th cryptographic Hash The Router Distinguishers of moden=the 4th, the rest may be inferred, during jth time computing, Hash(The mark of the router of jth -1)=jth cryptographic Hash, Jth cryptographic Hash moden=jth Router Distinguishers.
The embodiment of the present invention provides a kind of method for determining cache policy, and route is received by counting node in methods described The requested information of the first data that device is reported, according to the first-class of hash function, the metadata of the first data and the first data Row degree rating calculation stores the ident value of the router of first data;It is used for by adjudicating router and being received from user equipment The message of the first data is asked, the Router Distinguisher for storing first data is calculated according to hash function;The user sets Standby is function input value with the metadata of the first data, and Hash operation is carried out using hash function, obtains the first cryptographic Hash so that Popularity grade request content high caches many parts, low few part of request content caching of popular grade, it is to avoid right in the prior art All the elements are all cached or only cache the content of latest requests, so as to realize that coordinated regions intradomain router cooperates caching, Improve the efficiency of router cache.
Example IV
Assuming that collaboration region provided in an embodiment of the present invention is responsible in statistics as shown in figure 4, counting node in the present embodiment The popularity of the request of data that each router is reported is counted after end cycle, each data request information is divided according to popularity Certain popularity grade, and popularity grade is issued to each router, calculated by each router and be responsible for caching each data The Router Distinguisher of request, i.e. distributed way.
Used as another optional mode, the present embodiment can also be calculated by statistics node to be responsible for caching each request of data Router Distinguisher, each router, i.e. centralized fashion are issued to by the mark after calculating.
Below in a distributed way as a example by, include that n=3 platforms have the router of caching capabilities, 2 use in the collaboration region Family equipment and a statistics node(Statistics node may be provided on certain router).It is related to 10 texts in following examples altogether Part burst, the size of each is 2M, and the caching capabilities of each router are the file fragmentation of 4M, i.e., 2.Router 1 is one's respective area With the tie point in other regions.In following examples, the hash algorithm used in collaboration region is FNV1A.Propped up in collaboration region The maximum popularity grade K=2 for holding.Measurement period is 5 minutes, and first order popularity grade threshold values is that every measurement period receives 100 Individual request, second level popularity grade threshold values is that every measurement period receives 150 requests.The journey of user equipment in following examples Sequence, router and statistics node have completed the work of initialization.User equipment passes through network tool(Such as, PING)Know To the distance of all-router.User equipment 1 increases successively to the distance of router 3,1,2, and user equipment 2 arrives router 1,3, 2 distance increases successively.
When coordinated regions intradomain router just brings into operation, when receiving certain content of user equipment requests, all of route All without cache contents, when system starts, the popularity grade of all the elements is all defaulted as 1 to device.
User equipment 1 performs step as shown in Figure 5, and router performs step as shown in Figure 6, and statistics node performs such as Fig. 7 Shown step.
Step 501, user equipment adds collaboration region, and the Hash letter used in the collaboration region is obtained from statistics node Number, router sum n, Router Distinguisher, the maximum popularity grade K supported in collaboration region;
Step 502, the program of user equipment 1 receives upper strata asks content C1;
Step 503, performs K=2 Hash operation, n=3;
Hash (metadata of C1) mode n=1, are responsible for by router 1
Hash (1) mode n=3, have router 3 to be responsible for
Step 504, currently there is two routers that may be responsible for caching;
Step 505, to distance closer to router 3 make requests on;
The request is delivered to router 3, performs
Step 602, receives request;
Step 603, the purpose of request is oneself;
Step 604, receives the content for the first time, list item is created in popularity (x) statistical form and is updated;
Step 605, i=1 Hash operation is carried out according to popularity grade,(Default level is 1);
Hash (metadata of C1) mode n=1;
Step 606, is not responsible for by this router;
Step 608, notifying user equipment inquiry failure;
User equipment 1 receives the reply of router 3
Step 506, what is received is not data content
Step 504, it is current to also have 1 router that be responsible for caching
Step 505, to distance closer to router 1 make requests on
The request is delivered to router 1, performs
Step 602, receives request
Step 603, the purpose of request is oneself
Step 604, receives the content for the first time, list item is created in popularity (x) statistical form and is updated
Step 605, i=1 Hash operation is carried out according to popular grade,(Default level is 1)
Hash (metadata of C1) mode n=1, are responsible for by this router
Step 606, is responsible for by this router
Step 607, does not cache locally
Step 608, notifying user equipment inquiry failure
User equipment 1 receives the reply of router 1
Step 506, what is received is not data content
Step 504, is asked to the router for being possible to be responsible for caching
Step 507, asks to original content providers
The request is routed to the outlet of one's respective area, i.e. router 1
Step 602, receives request
Step 603, the purpose of request is not oneself
Step 610, the purpose of request is overseas
Step 611, receives the content for the first time, list item is created in popularity (x) statistical form and is updated
Step 612, is forwarded according to table of router
After first measurement period terminates, now, all-router is not all cached, only the explanation by taking router 1 as an example.
Step 602, measurement period terminates, it should carry out local popularity (x) notice
Step 609, the popularity (x) of the content having in local cache is advertised to statistics node, simultaneously because router 1 It is the tie point of one's respective area and other regions, therefore also needs to the popularity (x) of the content by other regions oneself are forwarded to enter Row notice, it is assumed that only have content C1 in this measurement period, C2, C5, C6, C7, C10 is requested, due to no caching, therefore all Can original content providers' acquisition.
Step 610, traversal is all should local responsible, but the local content not cached, it is assumed that in route Device 1 should be cached including C1, C7, due to not caching locally, it is therefore desirable to obtain a to original content providers, Ran Houjin Row local cache;
After first measurement period terminates, statistics node can receive the local popularity (x) of the notice of router 1, perform
Step 702, measurement period terminates, it should carry out popularity (x) and collect to issue;
Step 703, collects the popularity (x) for receiving, C1, C2, C5, C6, C7, C10;
Step 704, according to popularity threshold values, the popular grade of C10 is k=2, and the popular grade of C1, C2, C5, C6, C7 is equal It is k=1, remaining is all adjusted to 0;
Step 705, the popularity (x) of the content that popular grade is changed is sent to the router being to blame.
Router receives the new popular grade that statistics node is issued, and by taking router 1 as an example, router has delayed during beginning C1 and C7 is deposited, because the popular grade of C10 is improved, router 1 needs to be responsible for caching, performs;
Step 602, receives the popular grade that statistics node sends;
Step 615, C10 is the responsible content of this router the need for newly adding;
Step 616 is, it is necessary to judge whether to need to cache C10;
Step 617, by C10 in local popularity (xC10) with the popularity (x of C1 and C7C7) be compared, due to C10 Popularity (xC10) higher than C7, it is necessary to be replaced;
Step 618, obtains and caches C10 to primary routing device.
Embodiment five
With reference to Fig. 8, Fig. 8 is a kind of equipment structure chart of determination cache policy that the embodiment of the present invention five is provided.Such as Fig. 8 institutes Show, the equipment includes such as lower unit:
First receiving unit 801, for counting the expression that node is reported respectively according to m router in receiving area The requested information of one data, m >=1;
First arithmetic element 802, for being function input value with the metadata of first data, is entered using hash function Row Hash operation, obtains the first cryptographic Hash;
Wherein, the hash function includes:MD5, SHA1, BKDRHash or FNVIA
First Modulo Operation Unit 803, for carrying out mould n computings to first cryptographic Hash, obtains for caching described The mark of the first router of the part or all of data in one data, the n is the sum of the Intra-Domain Router, m≤ n。
Used as a kind of optional embodiment, with reference to Fig. 9, Fig. 9 is a kind of determination caching plan that the embodiment of the present invention five is provided Equipment structure chart slightly.As shown in figure 9,
First receiving unit 901, for counting the expression that node is reported respectively according to m router in receiving area The requested information of one data, m >=1;
First arithmetic element 902, for being function input value with the metadata of first data, is entered using hash function Row Hash operation, obtains the first cryptographic Hash;
Wherein, the hash function includes:MD5, SHA1, BKDRHash or FNVIA
First Modulo Operation Unit 903, for carrying out mould n computings to first cryptographic Hash, obtains for caching described The mark of the first router of the part or all of data in one data, the n is the sum of the Intra-Domain Router, m≤ n。
The equipment for determining cache policy also includes:
Second arithmetic element 904, when the absolute value for the first popularity grade when the first data is more than or equal to 2, Function input value is designated with the first router, Hash operation is carried out using the hash function, obtain the second Hash Value;
Second Modulo Operation Unit 905, for carrying out mould n computings to second cryptographic Hash, obtains for caching described The ident value of the second router of the part or all of data in one data.
Used as an alternative embodiment, with reference to Figure 10, Figure 10 is that a kind of determination that the embodiment of the present invention five is provided is slow Deposit the equipment structure chart of strategy.As shown in Figure 10,
First receiving unit 1001, for counting the expression that node is reported respectively according to m router in receiving area The requested information of first data, m >=1;
First arithmetic element 1002, for being function input value with the metadata of first data, uses hash function Hash operation is carried out, the first cryptographic Hash is obtained;
Wherein, the hash function includes:MD5, SHA1, BKDRHash or FNVIA
First Modulo Operation Unit 1003, for carrying out mould n computings to first cryptographic Hash, obtains for caching described The mark of the first router of the part or all of data in one data, the n is the sum of the Intra-Domain Router, m≤ n。
The requested information of the data of expression first that the m router is reported respectively goes up respectively for the m router The popularity of first data of report, the equipment of the determination cache policy also includes:
First determining unit 1004, the popularity of first data for being reported respectively according to the m router, Determine total popularity of first data;
Second determining unit 1005, for inquiring about grade corresponding relation according to total popularity of first data, it is determined that First popularity grade of total popularity of first data;
The equipment for determining cache policy also includes:
3rd arithmetic element 1006, for being more than or equal to j, and j for just when the absolute value of the first popularity grade Integer, during j >=2, function input value is designated with the i-th router, and Hash operation is carried out using the hash function, obtains I+1 cryptographic Hash;
3rd Modulo Operation Unit 1007, mould n computings are carried out to the i+1 cryptographic Hash, are obtained for caching described first The ident value of the i+1 router of the part or all of data in data, wherein 1≤i≤j-1, i are integer;
3rd determining unit 1008, determine i each value it is corresponding for cache the part in first data or The ident value of the i+1 router of total data.
Wherein, the grade corresponding relation includes the corresponding relation of total popularity and the popularity grade, or, institute Corresponding relation of the grade corresponding relation including popularity value region and the popularity grade is stated, and total popularity is in institute State within popularity value region.
The embodiment of the present invention provides a kind of equipment for determining cache policy, and route is received by counting node in the equipment The requested information of the first data that device is reported, according to the first-class of hash function, the metadata of the first data and the first data Row degree rating calculation stores the ident value of the router of first data;It is used for by adjudicating router and being received from user equipment The message of the first data is asked, the Router Distinguisher for storing first data is calculated according to hash function;The user sets Standby is function input value with the metadata of the first data, and Hash operation is carried out using hash function, obtains the first cryptographic Hash so that Popularity grade request content high caches many parts, low few part of request content caching of popular grade, it is to avoid right in the prior art All the elements are all cached or only cache the content of latest requests, so as to realize that coordinated regions intradomain router cooperates caching, Improve the efficiency of router cache.
Embodiment six
With reference to Figure 11, Figure 11 is a kind of equipment structure chart of determination cache policy that the embodiment of the present invention six is provided.As schemed Shown in 11, the equipment includes:
Second receiving unit 1101, for adjudicate router from user equipment receive for ask the first data message;
4th arithmetic element 1102, for being function input value with the metadata of first data, uses hash function Hash operation is carried out, the first cryptographic Hash is obtained;
Wherein, the hash function includes:MD5, SHA1, BKDRHash or FNVIA.
4th Modulo Operation Unit 1103, for carrying out mould n computings to first cryptographic Hash, obtains for caching described The mark of the first router of the part or all of data in one data, the n is the sum of the Intra-Domain Router, m≤ n。
Used as a kind of optional embodiment, as shown in figure 12, Figure 12 is that a kind of determination that the embodiment of the present invention six is provided is slow Deposit the equipment structure chart of strategy.As shown in figure 12, the equipment includes:
Second receiving unit 1201, for adjudicate router from user equipment receive for ask the first data message;
4th arithmetic element 1202, for being function input value with the metadata of first data, uses hash function Hash operation is carried out, the first cryptographic Hash is obtained;
Wherein, the hash function includes:MD5, SHA1, BKDRHash or FNVIA.
4th Modulo Operation Unit 1203, for carrying out mould n computings to first cryptographic Hash, obtains for caching described The mark of the first router of the part or all of data in one data, the n is the sum of the Intra-Domain Router, m≤ n。
3rd receiving unit 1204, the first popularity grade for receiving first data that statistics node sends;
The equipment for determining cache policy also includes:
5th arithmetic element 1205, for being more than or equal to j, and j for just when the absolute value of the first popularity grade Integer, during j >=2, function input value is designated with the i-th router, and Hash operation is carried out using the hash function, obtains I+1 cryptographic Hash;
5th Modulo Operation Unit 1206, for carrying out mould n computings to the i+1 cryptographic Hash, obtains described for caching The ident value of the i+1 router of the part or all of data in the first data, wherein 1≤i≤j-1, i are integer;
4th determining unit 1207, the corresponding portion for caching in first data of each value for determining i Point or total data i+1 router ident value.
The embodiment of the present invention provides a kind of equipment for determining cache policy, and route is received by counting node in the equipment The requested information of the first data that device is reported, according to the first-class of hash function, the metadata of the first data and the first data Row degree rating calculation stores the ident value of the router of first data;It is used for by adjudicating router and being received from user equipment The message of the first data is asked, the Router Distinguisher for storing first data is calculated according to hash function;The user sets Standby is function input value with the metadata of the first data, and Hash operation is carried out using hash function, obtains the first cryptographic Hash so that Popularity grade request content high caches many parts, low few part of request content caching of popular grade, it is to avoid right in the prior art All the elements are all cached or only cache the content of latest requests, so as to realize that coordinated regions intradomain router cooperates caching, Improve the efficiency of router cache.
Embodiment seven
With reference to Figure 13, Figure 13 is a kind of equipment structure chart of determination cache policy that the embodiment of the present invention seven is provided.As schemed Shown in 13, the equipment includes:
6th arithmetic element 1301, with the metadata of the first data is function input value for user equipment, uses Hash Function carries out Hash operation, obtains the first cryptographic Hash;
Wherein, the hash function includes:MD5, SHA1, BKDRHash or FNVIA.
6th Modulo Operation Unit 1302, for carrying out mould n computings to first cryptographic Hash, obtains for caching described The mark of the first router of the part or all of data in one data, the n is the sum of the Intra-Domain Router, m≤ n。
Used as a kind of optional embodiment, Figure 14 is a kind of equipment of determination cache policy that the embodiment of the present invention seven is provided Structure chart.As shown in figure 14, the equipment includes:
6th arithmetic element 1401, with the metadata of the first data is function input value for user equipment, uses Hash Function carries out Hash operation, obtains the first cryptographic Hash;
Wherein, the hash function includes:MD5, SHA1, BKDRHash or FNVIA.
6th Modulo Operation Unit 1402, for carrying out mould n computings to first cryptographic Hash, obtains for caching described The mark of the first router of the part or all of data in one data, the n is the sum of the Intra-Domain Router, m≤ n。
Acquiring unit 1403, the maximum popularity grade of first data is obtained for the user equipment;
The equipment for determining cache policy also includes:
7th arithmetic element 1404, for being more than or equal to j, and j for just when the absolute value of the maximum popularity grade Integer, during j >=2, function input value is designated with the i-th router, and Hash operation is carried out using the hash function, obtains I+1 cryptographic Hash;
7th Modulo Operation Unit 1405, for carrying out mould n computings to the i+1 cryptographic Hash, obtains described for caching The ident value of the i+1 router of the part or all of data in the first data, wherein 1≤i≤j-1, i are integer;
5th determining unit 1406, the corresponding portion for caching in first data of each value for determining i Point or total data i+1 router ident value.
Wherein, the user equipment can be computer or mobile phone etc..
The embodiment of the present invention provides a kind of equipment for determining cache policy, and route is received by counting node in the equipment The requested information of the first data that device is reported, according to the first-class of hash function, the metadata of the first data and the first data Row degree rating calculation stores the ident value of the router of first data;It is used for by adjudicating router and being received from user equipment The message of the first data is asked, the Router Distinguisher for storing first data is calculated according to hash function;The user sets Standby is function input value with the metadata of the first data, and Hash operation is carried out using hash function, obtains the first cryptographic Hash so that Popularity grade request content high caches many parts, low few part of request content caching of popular grade, it is to avoid right in the prior art All the elements are all cached or only cache the content of latest requests, so as to realize that coordinated regions intradomain router cooperates caching, Improve the efficiency of router cache.
Embodiment eight
With reference to Figure 15, Figure 15 is a kind of structure drawing of device of statistics node that the embodiment of the present invention eight is provided.With reference to Figure 15, Figure 15 is a kind of statistics node 1500 provided in an embodiment of the present invention, and the specific embodiment of the invention is not to the specific of the equipment Realization is limited.The statistics node 1500 includes:
Processor (processor) 1501, communication interface (Communications Interface) 1502, memory (memory) 1503, bus 1504.
Processor 1501, communication interface 1502, memory 1503 completes mutual communication by bus 1504.
Communication interface 1502, for being communicated with router;
Processor 1501, for configuration processor.
Specifically, program can include program code, and described program code includes computer-managed instruction.
Processor 1501 is probably a central processor CPU, or specific integrated circuit ASIC(Application Specific Integrated Circuit), or it is arranged to implement one or more integrated electricity of the embodiment of the present invention Road.
Memory 1503, for depositing program.Memory 1503 may include high-speed RAM memory, it is also possible to also include Nonvolatile memory(non-volatile memory).Program can specifically include:
The requested information of data of expression first that statistics node is reported respectively according to m router in receiving area, m ≥1;
Metadata with first data is function input value, and Hash operation is carried out using hash function, obtains first Cryptographic Hash;
Mould n computings are carried out to first cryptographic Hash, is obtained for caching the part or all of number in first data According to the first router mark, the n is the sum of the Intra-Domain Router, m≤n.
When the absolute value of the first popularity grade of the first data is more than or equal to 2, methods described also includes:
Function input value is designated with the first router, Hash operation is carried out using the hash function, obtained Second cryptographic Hash;
Mould n computings are carried out to second cryptographic Hash, is obtained for caching the part or all of number in first data According to the second router ident value.
The requested information of the data of expression first that the m router is reported respectively goes up respectively for the m router The popularity of first data of report, methods described also includes:
The popularity of first data reported respectively according to the m router, determines the total of first data Popularity;
Total popularity inquiry grade corresponding relation according to first data, determines total popularity of first data The first popularity grade;
When the absolute value of the first popularity grade is more than or equal to j, and j is positive integer, and during j >=2, methods described is also Including:
Function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Cryptographic Hash;
Mould n computings are carried out to the i+1 cryptographic Hash, is obtained for caching the part or all of number in first data According to i+1 router ident value, wherein 1≤i≤j-1, i are integer;
Determine the corresponding i+1 road for caching the part or all of data in first data of each value of i By the ident value of device.
The grade corresponding relation includes the corresponding relation of total popularity and the popularity grade, or, described etc. Level corresponding relation includes the corresponding relation of popularity value region and the popularity grade, and total popularity is in the stream Within row degree value region.
The hash function includes:MD5, SHA1, BKDRHash or FNVIA
Embodiment nine
With reference to Figure 16, Figure 16 is a kind of structure drawing of device of router that the embodiment of the present invention nine is provided.With reference to Figure 16, figure 16 is a kind of router 1600 provided in an embodiment of the present invention, and the specific embodiment of the invention is not implemented to the equipment Limit.The router 1600 includes:
Processor (processor) 1601, communication interface (Communications Interface) 1602, memory (memory) 1603, bus 1604.
Processor 1601, communication interface 1602, memory 1603 completes mutual communication by bus 1604.
Communication interface 1602, for being communicated with user equipment and statistics node;
Processor 1601, for configuration processor.
Specifically, program can include program code, and described program code includes computer-managed instruction.
Processor 1601 is probably a central processor CPU, or specific integrated circuit ASIC(Application Specific Integrated Circuit), or it is arranged to implement one or more integrated electricity of the embodiment of the present invention Road.
Memory 1603, for depositing program.Memory 1603 may include high-speed RAM memory, it is also possible to also include Nonvolatile memory(non-volatile memory).Program can specifically include:
Judgement router receives the message for asking the first data from user equipment;
Metadata with first data is function input value, and Hash operation is carried out using hash function, obtains first Cryptographic Hash;
Mould n computings are carried out to first cryptographic Hash, is obtained for caching the part or all of number in first data According to the first router mark, the n is the sum of the Intra-Domain Router, m≤n.
Methods described also includes:
Receive the first popularity grade of first data that statistics node sends;
When the absolute value of the first popularity grade is more than or equal to j, and j is positive integer, and during j >=2, methods described is also Including:
Function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Cryptographic Hash;
Mould n computings are carried out to the i+1 cryptographic Hash, is obtained for caching the part or all of number in first data According to i+1 router ident value, wherein 1≤i≤j-1, i are integer;
Determine the corresponding i+1 road for caching the part or all of data in first data of each value of i By the ident value of device.
The hash function includes:MD5, SHA1, BKDRHash or FNVIA.
Embodiment ten
With reference to Figure 17, Figure 17 is a kind of structure drawing of device of user equipment that the embodiment of the present invention ten is provided.With reference to Figure 17, Figure 17 is a kind of user equipment 1700 provided in an embodiment of the present invention, and the specific embodiment of the invention is not to the specific of the equipment Realization is limited.The user equipment 1700 includes:
Processor (processor) 1701, communication interface (Communications Interface) 1702, memory (memory) 1703, bus 1704.
Processor 1701, communication interface 1702, memory 1703 completes mutual communication by bus 1704.
Communication interface 1702, for being communicated with router;
Processor 1701, for configuration processor.
Specifically, program can include program code, and described program code includes computer-managed instruction.
Processor 1701 is probably a central processor CPU, or specific integrated circuit ASIC(Application Specific Integrated Circuit), or it is arranged to implement one or more integrated electricity of the embodiment of the present invention Road.
Memory 1703, for depositing program.Memory 1703 may include high-speed RAM memory, it is also possible to also include Nonvolatile memory(non-volatile memory).Program can specifically include:
User equipment is function input value with the metadata of the first data, and Hash operation is carried out using hash function, is obtained First cryptographic Hash;
Mould n computings are carried out to first cryptographic Hash, is obtained for caching the part or all of number in first data According to the first router mark, the n is the sum of the Intra-Domain Router, m≤n.
Methods described also includes:
The user equipment obtains the maximum popularity grade of first data;
When the absolute value of the maximum popularity grade is more than or equal to j, and j is positive integer, and during j >=2, methods described is also Including:
Function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Cryptographic Hash;
Mould n computings are carried out to the i+1 cryptographic Hash, is obtained for caching the part or all of number in first data According to i+1 router ident value, wherein 1≤i≤j-1, i are integer;
Determine the corresponding i+1 road for caching the part or all of data in first data of each value of i By the ident value of device.
The preferred embodiment of the present invention is the foregoing is only, is not intended to limit the scope of the present invention..It is any Any modification, equivalent and improvement for being made within the present invention etc., should be included within the scope of application claims include.

Claims (16)

1. it is a kind of determine cache policy method, it is characterised in that methods described includes:
The requested information of data of expression first that statistics node is reported respectively according to m router in receiving area, m >=1;
Metadata with first data is function input value, and Hash operation is carried out using hash function, obtains the first Hash Value;
Mould n computings are carried out to first cryptographic Hash, is obtained for caching the part or all of data in first data The mark of the first router, the n is the sum of the Intra-Domain Router, m≤n;
Wherein, when the requested information of the data of expression first that the m router is reported respectively is m router difference During the popularity of first data for reporting, the popularity of first data reported respectively according to the m router, Determine total popularity of first data;
Total popularity inquiry grade corresponding relation according to first data, determines the of total popularity of first data One popularity grade;
When the absolute value of the first popularity grade is more than or equal to j, and j is positive integer, and during j >=2, methods described is also wrapped Include:
Function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Hash Value;
Mould n computings are carried out to the i+1 cryptographic Hash, is obtained for caching the part or all of data in first data The ident value of i+1 router, wherein 1≤i≤j-1, i are integer;
Determine the corresponding i+1 router for caching the part or all of data in first data of each value of i Ident value.
2. method according to claim 1, it is characterised in that when the absolute value of the first popularity grade of the first data is big When 2, methods described also includes:
Function input value is designated with the first router, Hash operation is carried out using the hash function, obtain second Cryptographic Hash;
Mould n computings are carried out to second cryptographic Hash, is obtained for caching the part or all of data in first data The ident value of the second router.
3. method according to claim 1, it is characterised in that the grade corresponding relation includes total popularity and institute The corresponding relation of popularity grade is stated, or, the grade corresponding relation includes popularity value region and the popularity grade Corresponding relation, and total popularity is within the popularity value region.
4. according to the method in any one of claims 1 to 3, it is characterised in that the hash function includes:MD5、 SHA1, BKDRHash or FNVIA.
5. it is a kind of determine cache policy method, it is characterised in that methods described includes:
Judgement router receives the message for asking the first data from user equipment;
Metadata with first data is function input value, and Hash operation is carried out using hash function, obtains the first Hash Value;
Mould n computings are carried out to first cryptographic Hash, is obtained for caching the part or all of data in first data The mark of the first router, the n is the sum of Intra-Domain Router;
Receive the first popularity grade of first data that statistics node sends;
When the absolute value of the first popularity grade is more than or equal to j, and j is positive integer, and during j >=2, methods described is also wrapped Include:
Function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Hash Value;
Mould n computings are carried out to the i+1 cryptographic Hash, is obtained for caching the part or all of data in first data The ident value of i+1 router, wherein 1≤i≤j-1, i are integer;
Determine the corresponding i+1 router for caching the part or all of data in first data of each value of i Ident value.
6. method according to claim 5, it is characterised in that the hash function includes:MD5, SHA1, BKDRHash or FNVIA。
7. it is a kind of determine cache policy method, it is characterised in that methods described includes:
User equipment is function input value with the metadata of the first data, and Hash operation is carried out using hash function, obtains first Cryptographic Hash;
Mould n computings are carried out to first cryptographic Hash, is obtained for caching the part or all of data in first data The mark of the first router, the n is the sum of Intra-Domain Router;
The user equipment obtains the maximum popularity grade of first data;
When the absolute value of the maximum popularity grade is more than or equal to j, and j is positive integer, and during j >=2, methods described is also wrapped Include:
Function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Hash Value;
Mould n computings are carried out to the i+1 cryptographic Hash, is obtained for caching the part or all of data in first data The ident value of i+1 router, wherein 1≤i≤j-1, i are integer;
Determine the corresponding i+1 router for caching the part or all of data in first data of each value of i Ident value.
8. method according to claim 7, it is characterised in that the hash function includes:MD5, SHA1, BKDRHash or FNVIA。
9. it is a kind of determine cache policy equipment, it is characterised in that the equipment of the determination cache policy includes:
First receiving unit, the data of expression first for being reported respectively according to m router in receiving area are requested Information, m >=1;
First arithmetic element, for being function input value with the metadata of first data, Hash is carried out using hash function Computing, obtains the first cryptographic Hash;
First Modulo Operation Unit, for carrying out mould n computings to first cryptographic Hash, in obtaining for caching first data Part or all of data the first router mark, the n is the sum of the Intra-Domain Router, m≤n;
Wherein, when the requested information of the data of expression first that the m router is reported respectively is m router difference During the popularity of first data for reporting, the equipment of the determination cache policy also includes:
First determining unit, the popularity of first data for being reported respectively according to the m router, it is determined that described Total popularity of the first data;
Second determining unit, for inquiring about grade corresponding relation according to total popularity of first data, determines described first First popularity grade of total popularity of data;
The equipment for determining cache policy also includes:
3rd arithmetic element, for being more than or equal to j when the absolute value of the first popularity grade, and j is positive integer, j >=2 When, function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Hash Value;
3rd Modulo Operation Unit, for carrying out mould n computings to the i+1 cryptographic Hash, obtains for caching first data In part or all of data i+1 router ident value, wherein 1≤i≤j-1, i are integer;
3rd determining unit, each value for determining i is corresponding part or all of in first data for caching The ident value of the i+1 router of data.
10. the equipment for determining cache policy according to claim 9, it is characterised in that the determination cache policy sets It is standby also to include:
Second arithmetic element, when the absolute value for the first popularity grade when the first data is more than or equal to 2, with described the One router is designated function input value, and Hash operation is carried out using the hash function, obtains the second cryptographic Hash;
Second Modulo Operation Unit, for carrying out mould n computings to second cryptographic Hash, in obtaining for caching first data Part or all of data the second router ident value.
11. equipment for determining cache policy according to claim 9, it is characterised in that the grade corresponding relation includes The corresponding relation of total popularity and the popularity grade, or, the grade corresponding relation includes popularity value region With the corresponding relation of the popularity grade, and total popularity is within the popularity value region.
The equipment of the 12. determination cache policy according to any one of claim 9 to 11, it is characterised in that the Hash Function includes:MD5, SHA1, BKDRHash or FNVIA.
13. a kind of equipment for determining cache policy, it is characterised in that the equipment of the determination cache policy includes:
Second receiving unit, for receiving the message for asking the first data from user equipment;
4th arithmetic element, for being function input value with the metadata of first data, Hash is carried out using hash function Computing, obtains the first cryptographic Hash;
4th Modulo Operation Unit, for carrying out mould n computings to first cryptographic Hash, in obtaining for caching first data Part or all of data the first router mark, the n for Intra-Domain Router sum;
3rd receiving unit, the first popularity grade for receiving first data that statistics node sends;
The equipment for determining cache policy also includes:
5th arithmetic element, for being more than or equal to j when the absolute value of the first popularity grade, and j is positive integer, j >=2 When, function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Hash Value;
5th Modulo Operation Unit, for carrying out mould n computings to the i+1 cryptographic Hash, obtains for caching first data In part or all of data i+1 router ident value, wherein 1≤i≤j-1, i are integer;
4th determining unit, each value for determining i is corresponding part or all of in first data for caching The ident value of the i+1 router of data.
14. equipment for determining cache policy according to claim 13, it is characterised in that the hash function includes: MD5, SHA1, BKDRHash or FNVIA.
15. a kind of equipment for determining cache policy, it is characterised in that the equipment of the determination cache policy includes:
6th arithmetic element, for being function input value with the metadata of the first data, Hash operation is carried out using hash function, Obtain the first cryptographic Hash;
6th Modulo Operation Unit, for carrying out mould n computings to first cryptographic Hash, in obtaining for caching first data Part or all of data the first router mark, the n for Intra-Domain Router sum;
Acquiring unit, the maximum popularity grade for obtaining first data;
The equipment for determining cache policy also includes:
7th arithmetic element, for being more than or equal to j when the absolute value of the maximum popularity grade, and j is positive integer, j >=2 When, function input value is designated with the i-th router, Hash operation is carried out using the hash function, obtain i+1 Hash Value;
7th Modulo Operation Unit, for carrying out mould n computings to the i+1 cryptographic Hash, obtains for caching first data In part or all of data i+1 router ident value, wherein 1≤i≤j-1, i are integer;
5th determining unit, each value for determining i is corresponding part or all of in first data for caching The ident value of the i+1 router of data.
16. equipment for determining cache policy according to claim 15, it is characterised in that the hash function includes: MD5, SHA1, BKDRHash or FNVIA.
CN201210590587.7A 2012-12-31 2012-12-31 A kind of method and apparatus for determining cache policy Active CN103905332B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201210590587.7A CN103905332B (en) 2012-12-31 2012-12-31 A kind of method and apparatus for determining cache policy
PCT/CN2013/091185 WO2014101894A1 (en) 2012-12-31 2013-12-31 Method and device for determining caching policy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210590587.7A CN103905332B (en) 2012-12-31 2012-12-31 A kind of method and apparatus for determining cache policy

Publications (2)

Publication Number Publication Date
CN103905332A CN103905332A (en) 2014-07-02
CN103905332B true CN103905332B (en) 2017-06-09

Family

ID=50996487

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210590587.7A Active CN103905332B (en) 2012-12-31 2012-12-31 A kind of method and apparatus for determining cache policy

Country Status (2)

Country Link
CN (1) CN103905332B (en)
WO (1) WO2014101894A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106162218B (en) * 2015-04-03 2020-11-06 中兴通讯股份有限公司 Program recording control method, system and management and popularity statistical server
CN106997351B (en) 2016-01-22 2021-03-02 斑马智行网络(香港)有限公司 Resource cache management method, system and device
CN108076350A (en) * 2016-11-14 2018-05-25 中国科学院声学研究所 A kind of video service system and method based on router collaboration caching
CN106790421B (en) * 2016-12-01 2020-11-24 广东技术师范大学 ICN two-step caching method based on community
CN107911799B (en) * 2017-05-18 2021-03-23 北京聚通达科技股份有限公司 Method for utilizing intelligent route
CN107733998B (en) * 2017-09-22 2020-03-27 北京邮电大学 Cache content placing and providing method of cellular heterogeneous hierarchical network
CN110837499B (en) * 2018-08-16 2023-08-22 阿里巴巴集团控股有限公司 Data access processing method, device, electronic equipment and storage medium
CN113726830B (en) * 2020-05-25 2023-09-12 网联清算有限公司 Message identifier generation method and device
CN115242817B (en) * 2022-07-21 2023-10-24 阿里巴巴(中国)有限公司 Data access processing method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6341311B1 (en) * 1998-05-29 2002-01-22 Microsoft Corporation Directing data object access requests in a distributed cache
US6754662B1 (en) * 2000-08-01 2004-06-22 Nortel Networks Limited Method and apparatus for fast and consistent packet classification via efficient hash-caching
CN101247349A (en) * 2008-03-13 2008-08-20 华耀环宇科技(北京)有限公司 Network flux fast distribution method
CN102402394A (en) * 2010-09-13 2012-04-04 腾讯科技(深圳)有限公司 Hash algorithm-based data storage method and device
CN102523256A (en) * 2011-11-30 2012-06-27 华为技术有限公司 Content management method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6341311B1 (en) * 1998-05-29 2002-01-22 Microsoft Corporation Directing data object access requests in a distributed cache
US6754662B1 (en) * 2000-08-01 2004-06-22 Nortel Networks Limited Method and apparatus for fast and consistent packet classification via efficient hash-caching
CN101247349A (en) * 2008-03-13 2008-08-20 华耀环宇科技(北京)有限公司 Network flux fast distribution method
CN102402394A (en) * 2010-09-13 2012-04-04 腾讯科技(深圳)有限公司 Hash algorithm-based data storage method and device
CN102523256A (en) * 2011-11-30 2012-06-27 华为技术有限公司 Content management method, device and system

Also Published As

Publication number Publication date
WO2014101894A1 (en) 2014-07-03
CN103905332A (en) 2014-07-02

Similar Documents

Publication Publication Date Title
CN103905332B (en) A kind of method and apparatus for determining cache policy
Din et al. Caching in information-centric networking: Strategies, challenges, and future research directions
Zhang et al. A survey of caching mechanisms in information-centric networking
EP2813060B1 (en) A method for collaborative caching for content-oriented networks
Li et al. A chunk caching location and searching scheme in content centric networking
Han et al. Publisher mobility support in content centric networks
US9401868B2 (en) Method of traffic engineering for provisioning routing and storage in content-oriented networks
Nour et al. A distributed cache placement scheme for large-scale information-centric networking
Le et al. Social caching and content retrieval in disruption tolerant networks (DTNs)
Hu et al. Enhancing in-network caching by coupling cache placement, replacement and location
CN108965479B (en) Domain collaborative caching method and device based on content-centric network
Zhang et al. A distributed in-network caching scheme for P2P-like content chunk delivery
Trossen et al. Towards an information centric network architecture for universal internet access
CN104580165A (en) Cooperative caching method in intelligence cooperative network
Feng et al. A popularity-based cache consistency mechanism for information-centric networking
Wang et al. Fog computing based content-aware taxonomy for caching optimization in information-centric networks
CN105282041A (en) Method and device of flooding on the basis of ISIS (intermediate system to intermediate system)
Liu et al. A novel cache replacement scheme against cache pollution attack in content-centric networks
Nguyen et al. Adaptive caching for beneficial content distribution in information-centric networking
Woo et al. Proactive neighbor pushing for enhancing provider mobility support in content-centric networking
Chen et al. Caching in information-centric networking: From a content delivery path perspective
Yufei et al. A centralized control caching strategy based on popularity and betweenness centrality in ccn
Zhu et al. A Popularity-Based Collaborative Caching Algorithm for Content-Centric Networking.
Qu et al. Efficient congestion control scheme based on caching strategy in NDN
Reshadinezhad et al. An efficient adaptive cache management scheme for named data networks

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