Summary of the invention
The embodiment of the present invention provides the recommendation of a kind of Web content, buffer replacing method and equipment, solves
The content that commending system is recommended to user not in CDN caches, the problem causing period of reservation of number length.
First aspect present invention provides a kind of recommendation method of Web content, including:
Commending system receives the cache contents in the cache contents queue that content distributing network CDN sends
Mark, according to mark and the information of the described cache contents of all content storehouse acquisition of described cache contents, will
The mark of described cache contents and the information of described cache contents add cache contents storehouse to;
When described commending system receives the recommendation request message that client sends, described commending system root
According to the user interest profile obtained in advance and described all content storehouse, the first proposed algorithm is used to be calculated
First recommendation results;
Described commending system obtains the second recommendation results according to described cache contents storehouse;
Described first recommendation results and described second are recommended by described commending system according to the blending algorithm preset
Result merges, and obtains target recommendation results;
Described target recommendation results is pushed to targeted customer by described commending system.
In conjunction with first aspect, in the first possible implementation of first aspect, described commending system
The second recommendation results is obtained according to described cache contents storehouse, including:
Described commending system, according to described user interest profile and described cache contents storehouse, uses the second recommendation
Algorithm is calculated described second recommendation results.
In conjunction with first aspect, in the implementation that the second of first aspect is possible, described commending system
The second recommendation results is obtained according to described cache contents storehouse, including:
Described commending system belongs in the recommendation in described cache contents storehouse from described first recommendation results selection
Hold, using selected content recommendation as described second recommendation results.
In conjunction with first aspect, first aspect the first to arbitrary in the possible implementation of the second
Kind, in the third possible implementation of first aspect, described commending system is according to the fusion preset
Described first recommendation results and described second recommendation results are merged by algorithm, obtain target recommendation results,
Including:
Described commending system determines recommendation common in described first recommendation results and described second recommendation results
Content;
Described commending system deletes described common content recommendation from described first recommendation results, obtains
Three recommendation results;
Described second recommendation results and the described 3rd, according to the score of content recommendation, are pushed away by described commending system
Recommend the unification of the content recommendation in result to be ranked up;
Described commending system will sequence after content recommendation as described target recommendation results, or, described
Commending system selects part content recommendation conduct according to default algorithm from the content recommendation after described sequence
Described target recommendation results.
In conjunction with first aspect, first aspect the first to arbitrary in the possible implementation of the second
Kind, in the 4th kind of possible implementation of first aspect, described commending system is according to the fusion preset
Described first recommendation results and described second recommendation results are merged by algorithm, obtain target recommendation results,
Including:
Described commending system determines recommendation common in described first recommendation results and described second recommendation results
Content;
Described commending system deletes described common content recommendation from described first recommendation results, obtains
Three recommendation results;
Described commending system selects a%*k content recommendation from described 3rd recommendation results, and wherein, k is
The number of the content recommendation that described target recommendation results includes, a is less than or equal to 100 more than or equal to 0;
Described commending system selects k content recommendation of (1-a%) * from described second recommendation results;
Selection from described 3rd recommendation results, according to the score of content recommendation, is pushed away by described commending system
Recommend content and the content recommendation selected from described second recommendation results carries out unifying sequence, unification is sorted
After content recommendation as described target recommendation results.
In conjunction with the 4th kind of possible implementation of first aspect, in the 5th kind of possible reality of first aspect
In existing mode, described commending system selects a%*k content recommendation from described 3rd recommendation results, bag
Include:
Content recommendation in described 3rd recommendation results is entered by described commending system according to the score of content recommendation
Row sequence, preceding a%*k the content recommendation of selected and sorted from described 3rd recommendation results after sequence;
Described commending system selects k content recommendation of (1-a%) * from described second recommendation results, including:
Content recommendation in described second recommendation results is entered by described commending system according to the score of content recommendation
Row sequence, k recommendation of selected and sorted preceding (1-a%) * from described second recommendation results after sequence
Content.
In conjunction with the third of first aspect to any in the 5th kind of possible implementation, first
In 6th kind of possible implementation of aspect, described commending system is deleted from described first recommendation results
After described common content recommendation, described method also includes:
The described common content recommendation that described second recommendation results of described commending system raising includes
Point.
In conjunction with first aspect, first aspect the first to arbitrary in the possible implementation of the second
Kind, in the 7th kind of possible implementation of first aspect, described commending system is according to the fusion preset
Described first recommendation results and described second recommendation results are merged by algorithm, obtain target recommendation results,
Including:
Described commending system determines recommendation common in described first recommendation results and described second recommendation results
Content;
Described commending system deletes described common content recommendation from described second recommendation results, obtains
Four recommendation results;
Described first recommendation results and the described 4th, according to the score of content recommendation, are pushed away by described commending system
Recommend the unification of the content recommendation in result to be ranked up;
Described commending system will sequence after content recommendation as described target recommendation results, or, described
Commending system selects part content recommendation conduct according to default algorithm from the content recommendation after described sequence
Described target recommendation results.
In conjunction with first aspect, first aspect the first to arbitrary in the possible implementation of the second
Kind, in the 8th kind of possible implementation of first aspect, described commending system is according to the fusion preset
Described first recommendation results and described second recommendation results are merged by algorithm, obtain target recommendation results,
Including:
Described commending system determines recommendation common in described first recommendation results and described second recommendation results
Content;
Described commending system deletes described common content recommendation from described second recommendation results, obtains
Four recommendation results;
Described commending system selects a%*k content recommendation from described first recommendation results, and wherein, k is
The number of the content recommendation that described target recommendation results includes, a is less than or equal to 100 more than or equal to 0;
Described commending system selects k content recommendation of (1-a%) * from described 4th recommendation results;
Selection from described first recommendation results, according to the score of content recommendation, is pushed away by described commending system
Recommend content and the content recommendation selected from described 4th recommendation results carries out unifying sequence, and unification is arranged
Content recommendation after sequence is as described target recommendation results.
In conjunction with the 8th kind of possible implementation of first aspect, in the 9th kind of possible reality of first aspect
In existing mode, described commending system selects a%*k content recommendation from described first recommendation results, bag
Include:
Content recommendation in described first recommendation results is entered by described commending system according to the score of content recommendation
Row sequence, preceding a%*k the content recommendation of selected and sorted from described first recommendation results after sequence;
Described commending system selects k content recommendation of (1-a%) * from described 4th recommendation results, including:
Content recommendation in described 4th recommendation results is entered by described commending system according to the score of content recommendation
Row sequence, selects k content recommendation of (1-a%) * from described 4th recommendation results after sequence.
In conjunction with any in the 7th kind to the 9th kind possible implementation of first aspect, first
In tenth kind of possible implementation of aspect, described commending system is deleted from described second recommendation results
After described common content recommendation, described method also includes:
The described common content recommendation that described first recommendation results of described commending system raising includes
Point.
In conjunction with first aspect, first aspect the first to arbitrary in the possible implementation of the second
Kind, in the 11st kind of possible implementation of first aspect, described method also includes:
Described commending system generates according to the recommended case of all content in described all content storehouse recommends heat
Degree storehouse, described recommendation temperature storehouse includes that all content in described all content storehouse is in Preset Time
Recommend temperature;
Described commending system is sent to described CDN by recommending all the elements in temperature storehouse.
In conjunction with the 11st kind of possible implementation of first aspect, in the 12nd kind of possibility of first aspect
Implementation in, described commending system according to preset blending algorithm to described first recommendation results and institute
Stating the second recommendation results to merge, after obtaining target recommendation results, described method also includes:
Described commending system updates described recommendation temperature storehouse according to described target recommendation results.
In conjunction with first aspect, the first arbitrary in the 12nd kind of possible implementation of first aspect
One, in the 13rd kind of possible implementation of first aspect, the cache contents that described CDN sends
For the content of the front P% of described cache contents queue, or, for the front P% of described cache contents queue
Content is relative to the incremental data of the content sent last time, and wherein, P is less than 100 more than 0.
Second aspect present invention provides the buffer replacing method of a kind of Web content, including:
Content distributing network CDN Edge Server obtains the recommendation of the cache contents in cache contents queue
Temperature and access temperature;
Described CDN Edge Server is according to the access temperature of the cache contents in described cache contents queue
Replace with recommending temperature that described cache contents queue carries out caching.
In conjunction with second aspect, in the first possible implementation of second aspect, described CDN edge
Server delays described according to access temperature and the recommendation temperature of the cache contents in described cache contents queue
Deposit content queue and carry out caching replacement, including:
If the size of the cache contents in described cache contents queue is more than or equal to first threshold, then described
CDN Edge Server determines that the tail of the queue to described cache contents queue accesses the cache contents that temperature is less
Eliminate;
The tail of the queue of described CDN Edge Server more described cache contents queue has identical access temperature
The recommendation temperature of cache contents, eliminate described in there is recommendation temperature in the cache contents of identical access temperature
Less cache contents, until the size of the cache contents in described cache contents queue is less than Second Threshold,
Then stopping eliminating described cache contents queue, described Second Threshold is less than or equal to described first threshold
Value.
In conjunction with second aspect, in the implementation that the second of second aspect is possible, described CDN edge
Server delays described according to access temperature and the recommendation temperature of the cache contents in described cache contents queue
Deposit content queue and carry out caching replacement, including:
If the size of the cache contents in described cache contents queue is more than or equal to first threshold, then described
In CDN Edge Server determines the caching that the access temperature of the tail of the queue to described cache contents queue is less
Hold and eliminate;
Described CDN Edge Server is according to the access of the cache contents of the tail of the queue of described cache contents queue
Temperature and recommendation temperature, calculate the comprehensive temperature of cache contents in the tail of the queue of described cache contents queue;
It is less that described CDN Edge Server eliminates comprehensive temperature in the tail of the queue of described cache contents queue
Cache contents, until the size of the cache contents in described cache contents queue is less than Second Threshold, then stops
Only eliminating described cache contents queue, described Second Threshold is less than or equal to described first threshold.
In conjunction with second aspect, in the third possible implementation of second aspect, described CDN edge
Server obtains the recommendation temperature of the cache contents in cache contents queue and accesses temperature, including:
Described CDN Edge Server accesses according to the history of the cache contents in described cache contents queue
Situation generates the access temperature of the cache contents in described cache contents queue;
Described CDN Edge Server receives the caching in the described cache contents queue that commending system sends
The recommendation temperature of content, the recommendation temperature of the cache contents in described cache contents queue is that described recommendation is
Unite what the recommended case according to the cache contents in described cache contents queue generated.
In conjunction with second aspect, second aspect the first in the third possible implementation any,
In the 4th kind of possible implementation of second aspect, described method also includes:
Described CDN Edge Server obtains recommendation temperature and the visit of the alternating content in alternating content queue
Ask temperature;
Described CDN Edge Server is according to the recommendation temperature of the alternating content in described alternating content queue
With accessing temperature, described alternating content queue is carried out caching replacement.
In conjunction with the 4th kind of possible implementation of second aspect, in the 5th kind of possible reality of second aspect
In existing mode, described CDN Edge Server is according to the recommendation of the alternating content in described alternating content queue
Temperature and access temperature carry out caching and replace described alternating content queue, including:
If the size of the alternating content in described alternating content queue is more than or equal to the 3rd threshold value, then described
In CDN Edge Server determines the candidate that the access temperature of the tail of the queue to described alternating content queue is less
Hold and eliminate;
The more described alternating content queue of described CDN Edge Server has the time of identical access temperature
Select the recommendation temperature of content, eliminate described in have in the alternating content of identical access temperature recommend temperature less
Alternating content, until the size of the alternating content in described alternating content queue is less than the 4th threshold value, then
Stopping eliminating described alternating content queue, described 4th threshold value is less than or equal to described 3rd threshold value.
In conjunction with the 4th kind of possible implementation of second aspect, in the 6th kind of possible reality of second aspect
In existing mode, described CDN Edge Server is according to the recommendation of the alternating content in described alternating content queue
Temperature and access temperature carry out caching and replace described alternating content queue, including:
If the size of the alternating content in described alternating content queue is more than or equal to the 3rd threshold value, then described
In CDN Edge Server determines the candidate that the access temperature of the tail of the queue to described alternating content queue is less
Hold and eliminate;
Described CDN Edge Server is according to the access of alternating content in the tail of the queue of described alternating content queue
Temperature and recommendation temperature, calculate the comprehensive temperature of alternating content in the tail of the queue of described alternating content queue;
Described CDN Edge Server eliminates the comprehensive of alternating content in the tail of the queue of described alternating content queue
The alternating content that temperature is less, until the size of the alternating content in described alternating content queue is less than the 4th
Threshold value, then stop eliminating described alternating content queue, and described 4th threshold value is less than or equal to described
3rd threshold value.
In conjunction with the 4th kind of possible implementation of second aspect, in the 7th kind of possible reality of second aspect
In existing mode, described CDN Edge Server obtains the recommendation temperature of the alternating content in alternating content queue
With access temperature, including:
Described CDN Edge Server accesses according to the history of the alternating content in described alternating content queue
Situation generates the access temperature of the alternating content in described alternating content queue;
Described commending system receives the recommendation temperature of the described alternating content that commending system sends, described candidate
The recommendation temperature of content is that described commending system generates according to the recommended case of described alternating content.
Third aspect present invention provides the buffer replacing method of a kind of Web content, including:
The Edge Server of CDN receives the content acquisition request that client sends, described content acquisition request
Include the identification information of content to be visited;
Described CDN Edge Server determines described to be visited according to the identification information of described content to be visited
Whether content is in the cache contents queue of oneself;
If described content to be visited is in described cache contents queue, the most described CDN Edge Server is to institute
State client and return described content to be visited;
Described CDN Edge Server updates the access temperature of described content to be visited, and visits according to described waiting
Ask the access temperature of content and recommend temperature to calculate the temperature information of described content to be visited, treating according to described
Access cache contents queue described in the temperature information updating of content;
When needs described cache contents queue carried out caching replace time, described CDN Edge Server according to
The temperature information of cache contents in described cache contents queue, in superseded described cache contents queue, temperature is relatively
Little cache contents.
In conjunction with the third aspect, in the first possible implementation of the third aspect, if described to be visited
The identification information of content not in described cache contents queue, described CDN Edge Server according to described in treat
The identification information accessing content determines that described content to be visited is whether in the time of described CDN Edge Server
Select in content queue;
If described content to be visited is in described alternating content queue, the most described CDN Edge Server updates
The access temperature of described content to be visited, access temperature and recommendation temperature according to described content to be visited are true
The temperature information of fixed described content to be visited;
Described CDN Edge Server judges described to be visited according to the temperature information of described content to be visited
Whether the temperature of content is more than the heat degree threshold preset;
If the temperature of described content to be visited is more than described heat degree threshold, the most described CDN Edge Server will
Described content to be visited is added in described cache contents queue, and deletes from described alternating content queue
Described content to be visited;
Described CDN Edge Server returns to described content server place to be visited to described client
The IP address of original server.
In conjunction with the third aspect, in the implementation that the second of the third aspect is possible, if described to be visited
Content is not in described alternating content queue, and described content to be visited is added by described CDN Edge Server
In described alternating content queue;
Described CDN Edge Server updates the access temperature of described content to be visited, according to described to be visited
The temperature of content and the recommendation temperature of described content to be visited determine the temperature information of described content to be visited,
Alternating content queue described in temperature information updating according to described content to be visited;
Described CDN Edge Server returns to described content server place to be visited to described client
The IP address of original server.
In conjunction with the third aspect, in the third possible implementation of the third aspect, if described to be visited
The temperature of content be less than or equal to described heat degree threshold, the most described CDN Edge Server according to described in wait to visit
Ask alternating content queue described in the temperature information updating of content;
Described CDN Edge Server returns to described content server place to be visited to described client
The IP address of original server.
In conjunction with the first of the third aspect and the third aspect to the third possible realization, third party
In the 4th kind of possible implementation in face, described method also includes:
When needs described alternating content queue carried out caching replace time, described CDN Edge Server according to
The temperature information of alternating content in described alternating content queue, in superseded described alternating content queue, temperature is relatively
Little alternating content.
Fourth aspect present invention provides a kind of commending system, including:
Receiver module, in receiving the caching in the cache contents queue that content distributing network CDN sends
The mark held, according to mark and the information of the described cache contents of all content storehouse acquisition of described cache contents,
Add the mark of described cache contents and the information of described cache contents to cache contents storehouse;
Recommending module, during for receiving the recommendation request message of client transmission when described commending system,
According to the user interest profile obtained in advance and described all content storehouse, the first proposed algorithm is used to calculate
To the first recommendation results;
Described recommending module, is additionally operable to obtain the second recommendation results according to described cache contents storehouse;
Fusion Module, for pushing away described first recommendation results and described second according to the blending algorithm preset
Recommend result to merge, obtain target recommendation results;
Sending module, for being pushed to targeted customer by described target recommendation results.
In conjunction with fourth aspect, in the first possible implementation of fourth aspect, described recommending module
The second recommendation results is obtained according to described cache contents storehouse, particularly as follows:
According to described user interest profile and described cache contents storehouse, the second proposed algorithm is used to be calculated
Described second recommendation results.
In conjunction with fourth aspect, in the implementation that the second of fourth aspect is possible, described recommending module
The second recommendation results is obtained according to described cache contents storehouse, particularly as follows:
Select to belong to the content recommendation in described cache contents storehouse from described first recommendation results, by selected
Content recommendation is as described second recommendation results.
In conjunction with fourth aspect, fourth aspect the first to arbitrary in the possible implementation of the second
Kind, in the third possible implementation of fourth aspect, described Fusion Module specifically for:
Determine content recommendation common in described first recommendation results and described second recommendation results;
From described first recommendation results, delete described common content recommendation, obtain the 3rd recommendation results;
According to the score of content recommendation, to pushing away in described second recommendation results and described 3rd recommendation results
Recommend content unification to be ranked up;
Will sequence after content recommendation as described target recommendation results, or, according to default algorithm from
Content recommendation after described sequence select part content recommendation as described target recommendation results.
In conjunction with fourth aspect, fourth aspect the first to arbitrary in the possible implementation of the second
Kind, in the 4th kind of possible implementation of fourth aspect, described Fusion Module specifically for:
Determine content recommendation common in described first recommendation results and described second recommendation results;
From described first recommendation results, delete described common content recommendation, obtain the 3rd recommendation results;
Selecting a%*k content recommendation from described 3rd recommendation results, wherein, k is that described target is recommended
The number of the content recommendation that result includes, a is less than or equal to 100 more than or equal to 0;
K content recommendation of (1-a%) * is selected from described second recommendation results;
According to the score of content recommendation, to the content recommendation selected from described 3rd recommendation results with from institute
State the content recommendation selected in the second recommendation results to carry out unifying sequence, by the content recommendation after unified sequence
As described target recommendation results.
In conjunction with the 4th kind of possible implementation of fourth aspect, in the 5th kind of possible reality of fourth aspect
In existing mode, described Fusion Module selects a%*k content recommendation from described 3rd recommendation results, tool
Body is:
Content recommendation in described 3rd recommendation results is ranked up, from row by the score according to content recommendation
Preceding a%*k the content recommendation of selected and sorted in described 3rd recommendation results after sequence;
Described Fusion Module selects k content recommendation of (1-a%) * from described second recommendation results, specifically
For:
Content recommendation in described second recommendation results is ranked up, from row by the score according to content recommendation
Selected and sorted preceding (1-a%) k content recommendation of * in described second recommendation results after sequence.
In conjunction with the third of fourth aspect to any in the 5th kind of possible implementation, the 4th
In 6th kind of possible implementation of aspect, described Fusion Module is deleted from described first recommendation results
After described common content recommendation, it is additionally operable to:
Improve the score of the described common content recommendation that described second recommendation results includes.
In conjunction with fourth aspect, fourth aspect the first to arbitrary in the possible implementation of the second
Kind, in the 7th kind of possible implementation of fourth aspect, described Fusion Module specifically for:
Determine content recommendation common in described first recommendation results and described second recommendation results;
From described second recommendation results, delete described common content recommendation, obtain the 4th recommendation results;
According to the score of content recommendation, to pushing away in described first recommendation results and described 4th recommendation results
Recommend content unification to be ranked up;
Will sequence after content recommendation as described target recommendation results, or, according to default algorithm from
Content recommendation after described sequence select part content recommendation as described target recommendation results.
In conjunction with fourth aspect, fourth aspect the first to arbitrary in the possible implementation of the second
Kind, in the 8th kind of possible implementation of fourth aspect, described Fusion Module specifically for:
Determine content recommendation common in described first recommendation results and described second recommendation results;
From described second recommendation results, delete described common content recommendation, obtain the 4th recommendation results;
Selecting a%*k content recommendation from described first recommendation results, wherein, k is that described target is recommended
The number of the content recommendation that result includes, a is less than or equal to 100 more than or equal to 0;
K content recommendation of (1-a%) * is selected from described 4th recommendation results;
According to the score of content recommendation, to the content recommendation selected from described first recommendation results with from institute
State the content recommendation selected in the 4th recommendation results and carry out unifying sequence, and by the recommendation after unified sequence
Hold as described target recommendation results.
In conjunction with the 8th kind of possible implementation of fourth aspect, in the 9th kind of possible reality of fourth aspect
In existing mode, described Fusion Module selects a%*k content recommendation from described first recommendation results, tool
Body is:
Content recommendation in described first recommendation results is ranked up, from row by the score according to content recommendation
Preceding a%*k the content recommendation of selected and sorted in described first recommendation results after sequence;
Described Fusion Module selects k content recommendation of (1-a%) * from described 4th recommendation results, particularly as follows:
Content recommendation in described 4th recommendation results is ranked up, from row by the score according to content recommendation
Described 4th recommendation results after sequence selects k content recommendation of (1-a%) *.
In conjunction with any in the 7th kind to the 9th kind possible implementation of fourth aspect, the 4th
In tenth kind of possible implementation of aspect, described Fusion Module is deleted from described second recommendation results
After described common content recommendation, it is additionally operable to:
Improve the score of the described common content recommendation that described first recommendation results includes.
In conjunction with fourth aspect, fourth aspect the first to arbitrary in the possible implementation of the second
Kind, in the 11st kind of possible implementation of fourth aspect, described commending system also includes:
Recommend temperature generation module, for the recommended case according to all content in described all content storehouse
Generating and recommend temperature storehouse, described recommendation temperature storehouse includes that all content in described all content storehouse is in advance
If the recommendation temperature in the time;
Described sending module, is additionally operable to all the elements in temperature storehouse to be recommended to be sent to described CDN.
In conjunction with the 11st kind of possible implementation of fourth aspect, in the 12nd kind of possibility of fourth aspect
Implementation in, described Fusion Module according to preset blending algorithm to described first recommendation results and institute
State the second recommendation results to merge, after obtaining target recommendation results, described recommendation temperature generation module
It is additionally operable to:
Described recommendation temperature storehouse is updated according to described target recommendation results.
In conjunction with fourth aspect, the first arbitrary in the 12nd kind of possible implementation of fourth aspect
One, in the 13rd kind of possible implementation of fourth aspect, the cache contents that described CDN sends
For the content of the front P% of described cache contents queue, or, for the front P% of described cache contents queue
Content is relative to the incremental data of the content sent last time, and wherein, P is less than 100 more than 0.
Fifth aspect present invention provides a kind of content distributing network CDN Edge Server, including:
Acquisition module, for obtaining the recommendation temperature of the cache contents in cache contents queue and accessing temperature;
Caching replacement module, for according to the access temperature of the cache contents in described cache contents queue and
Recommend temperature that described cache contents queue carries out caching to replace.
In conjunction with the 5th aspect, in the first possible implementation of the 5th aspect, described caching is replaced
Module specifically for:
If the size of the cache contents in described cache contents queue is more than or equal to first threshold, it is determined that
The cache contents that the tail of the queue of described cache contents queue is accessed temperature less is eliminated;
The relatively recommendation of the cache contents that the tail of the queue of described cache contents queue has identical access temperature is hot
Degree, eliminate described in have in the cache contents of identical access temperature and recommend the less cache contents of temperature, directly
The size of the cache contents in described cache contents queue is less than Second Threshold, then stop described caching
Content queue is eliminated, and described Second Threshold is less than or equal to described first threshold.
In conjunction with the 5th aspect, in the implementation that the second of the 5th aspect is possible, described caching is replaced
Module specifically for:
If the size of the cache contents in described cache contents queue is more than or equal to first threshold, it is determined that
The cache contents that the access temperature of the tail of the queue of described cache contents queue is less is eliminated;
The access temperature of the cache contents of the tail of the queue according to described cache contents queue and recommendation temperature, calculate
The comprehensive temperature of cache contents in the tail of the queue of described cache contents queue;
Eliminate the cache contents that in the tail of the queue of described cache contents queue, comprehensive temperature is less, until described slow
The size depositing the cache contents in content queue is less than Second Threshold, then stop described cache contents queue
Eliminating, described Second Threshold is less than or equal to described first threshold.
In conjunction with the 5th aspect, in the third possible implementation of the 5th aspect, described acquisition module
Specifically for:
History according to the cache contents in described cache contents queue accesses situation and generates described cache contents
The access temperature of the cache contents in queue;
The recommendation temperature of the cache contents in the described cache contents queue that reception commending system sends, described
The recommendation temperature of the cache contents in cache contents queue is that described commending system is according to described cache contents team
The recommended case of the cache contents in row generates.
In conjunction with the 5th aspect, the 5th aspect the first in the third possible implementation any,
In the 4th kind of possible implementation of the 5th aspect, described acquisition module is additionally operable to:
Obtain the recommendation temperature of the alternating content in alternating content queue and access temperature;
Described caching replacement module, is additionally operable to: according to pushing away of the alternating content in described alternating content queue
Recommend temperature and access temperature carries out caching and replaces described alternating content queue.
In conjunction with the 4th kind of possible implementation of the 5th aspect, in the 5th kind of possible reality of the 5th aspect
In existing mode, described caching replacement module specifically for:
If the size of the alternating content in described alternating content queue is more than or equal to the 3rd threshold value, it is determined that
The alternating content that the access temperature of the tail of the queue of described alternating content queue is less is eliminated;
Described alternating content queue relatively has the recommendation temperature of the alternating content of identical access temperature, washes in a pan
Have described in eliminating in the alternating content of identical access temperature and recommend the alternating content that temperature is less, until described
The size of the alternating content in alternating content queue is less than the 4th threshold value, then stop described alternating content team
Row are eliminated, and described 4th threshold value is less than or equal to described 3rd threshold value.
In conjunction with the 4th kind of possible implementation of the 5th aspect, in the 6th kind of possible reality of the 5th aspect
In existing mode, described caching replacement module specifically for:
If the size of the alternating content in described alternating content queue is more than or equal to the 3rd threshold value, it is determined that
The alternating content that the access temperature of the tail of the queue of described alternating content queue is less is eliminated;
In tail of the queue according to described alternating content queue, the access temperature of alternating content and recommendation temperature, calculate
The comprehensive temperature of alternating content in the tail of the queue of described alternating content queue;
Eliminate the alternating content that in the tail of the queue of described alternating content queue, the comprehensive temperature of alternating content is less,
Until the size of the alternating content in described alternating content queue is less than the 4th threshold value, then stop described time
Selecting content queue to eliminate, described 4th threshold value is less than or equal to described 3rd threshold value.
In conjunction with the 4th kind of possible implementation of the 5th aspect, in the 7th kind of possible reality of the 5th aspect
In existing mode, described acquisition module specifically for:
History according to the alternating content in described alternating content queue accesses situation and generates described alternating content
The access temperature of the alternating content in queue;
Receive the recommendation temperature of the described alternating content that commending system sends, the recommendation heat of described alternating content
Degree is that described commending system generates according to the recommended case of described alternating content.
Sixth aspect present invention provides the Edge Server of a kind of content distributing network CDN, including:
Receiver module, for receiving the content acquisition request that client sends, in described content acquisition request
Identification information including content to be visited;
According to the identification information of described content to be visited, processing module, for determining that described content to be visited is
It is no in the cache contents queue of oneself, if described content to be visited is in described cache contents queue, then
Described content to be visited is returned to described client;
More new module, for updating the access temperature of described content to be visited, and according to described to be visited interior
The access temperature held and the temperature information recommending the temperature described content to be visited of calculating, according to described to be visited
Cache contents queue described in the temperature information updating of content;
Caching replacement module, is used for when needs carry out caching replacement to described cache contents queue, according to
The temperature information of cache contents in described cache contents queue, in superseded described cache contents queue, temperature is relatively
Little cache contents.
In conjunction with the 6th aspect, in the first possible implementation of the 6th aspect, if described to be visited
The identification information of content is not in described cache contents queue, and described processing module is additionally operable to:
Identification information according to described content to be visited determines that whether described content to be visited is at described CDN
In the alternating content queue of Edge Server;
If described content to be visited is in described alternating content queue, then update the visit of described content to be visited
Asking temperature, access temperature and recommendation temperature according to described content to be visited determine described content to be visited
Temperature information;
Temperature information according to described content to be visited judges that whether the temperature of described content to be visited is more than pre-
If heat degree threshold;
If the temperature of described content to be visited is more than described heat degree threshold, then described content to be visited is added
In described cache contents queue, and from described alternating content queue, delete described content to be visited;
The IP address of the original server at described content server place to be visited is returned to described client.
In conjunction with the 6th aspect, in the implementation that the second of the 6th aspect is possible, if described to be visited
Content is not in described alternating content queue, and described processing module is additionally operable to:
Described content to be visited is added in described alternating content queue;
Update the access temperature of described content to be visited, according to the temperature of described content to be visited with described treat
The recommendation temperature accessing content determines the temperature information of described content to be visited, according to described content to be visited
Temperature information updating described in alternating content queue;
The IP address of the original server at described content server place to be visited is returned to described client.
In conjunction with the 6th aspect, in the third possible implementation of the 6th aspect, if described to be visited
The temperature of content is less than or equal to described heat degree threshold, and the most described processing module is additionally operable to:
Alternating content queue described in temperature information updating according to described content to be visited;
The IP address of the original server at described content server place to be visited is returned to described client.
In conjunction with the first of the 6th aspect and the 6th aspect to the third possible realization, the 6th side
In the 4th kind of possible implementation in face, described caching replacement module is additionally operable to:
When needs carry out caching replacement to described alternating content queue, according in described alternating content queue
The temperature information of alternating content, eliminates the alternating content that in described alternating content queue, temperature is less.
The recommendation of Web content, buffer replacing method and the equipment that the embodiment of the present invention provides, CDN passes through
The mark of the cache contents in commending system transmission cache contents queue, in order to commending system is to user
During content recommendation, recommendation results can be generated according to the cache contents that CDN sends, so that it is guaranteed that commending system
Recommend the recommendation results of user as far as possible in the cache contents queue of CDN, when user is to CDN
During the content recommendation that request recommendation results includes, CDN can get user from caching content queue
The content of request, the original server without the content place asked from user obtains, and decreases use
The time that family waits, and can reduce CDN return the taking of source bandwidth.Commending system also can be according to pushing away
Recommend result and generate the recommendation temperature of all content, and the recommendation temperature of all content is sent to CDN, with
It is easy to CDN when carrying out caching and replacing in view of recommending temperature, thus as much as possible recommending temperature high
Content retains in the buffer, makes user can obtain the content that commending system is recommended faster.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with this
Accompanying drawing in bright embodiment, is clearly and completely described the technical scheme in the embodiment of the present invention,
Obviously, described embodiment is a part of embodiment of the present invention rather than whole embodiments.Based on
Embodiment in the present invention, those of ordinary skill in the art are obtained under not making creative work premise
The every other embodiment obtained, broadly falls into the scope of protection of the invention.
At present, a lot of network application systems include CDN and two parts of commending system simultaneously, as network is assisted
View TV (Internet Protocol Television, be called for short IPTV), video request program (Video On Demand,
Be called for short VoD), video website (such as Netflix, YouTube, excellent extremely regarding with happy), ecommerce
(Electronic Commerce) website (such as Taobao, Jingdone district and Amazon etc.), mobile applications and
Betting-shops (such as the App Store of Apple) etc..
Commending system can be divided three classes according to proposed algorithm: content-based recommendation system, based on collaborative
Commending system and mixing commending system.Content-based recommendation system obtains user interest profile vector sum
The characteristic vector of content, by calculate user interest profile vector sum content characteristic vector between similar
Property is that user recommends article.Do not rely on based on collaborative commending system and user and content itself are pushed away
Recommend, but the article bought based on other users are that targeted customer recommends article.Mixing commending system meeting
Comprehensively use content-based recommendation method and based on collaborative recommendation method.In general, it is recommended that mesh
Exactly in the content library of magnanimity, select the article most useful to user and be presented to user, thus avoid
User gets lost among selection of numerous names, saves the time of user, and improves the exposure of end article
Degree.It should be noted that the content mentioned in following example is also referred to as Web content, Web content
Can be specifically video, music, commodity, application (APP), game etc..
CDN includes multiple network cluster, and the network cluster that CDN includes can be divided into center cluster and edge
Cluster, center cluster includes one or more CDN central server, and edge cluster includes one or more
CDN Edge Server.Center cluster typically can cache needs the all-network content of distribution, and edge collection
Group's only caching needs a part for the Web content of distribution.When user accesses a certain content, Yong Hutong
Cross client and send address resolution request to domain name system (Domain Name System is called for short DNS),
DNS can be assigned to the access of user on the edge cluster that user is nearest, if this edge cluster-based storage
There is the content that user is accessed, then this edge cluster stores the CDN limit of the content having user to be accessed
The content that user asks can be directly returned to user by edge server.If the edge cluster that user accesses does not has
There is the content that storage user is accessed, then edge cluster just obtains to the original server accessing content place
Take this access content, then return again to user.In the case of the latter, for a user, user
Generally require the response waiting that the long period could obtain edge cluster, affect Consumer's Experience, for operation
For business, CDN obtains from the original server accessing content place and accesses content, can take back source bandwidth,
Cause network resources waste, return source bandwidth bandwidth i.e. between CDN and the original server of content.
As a example by video recommendations, Fig. 1 is the schematic diagram of a kind of existing video recommendations process, such as Fig. 1 institute
Showing, video recommendations process may include steps of:
Step 101, client send video recommendations request message to web page server (Web Server).
In video recommendations, client is specifically as follows browser or player, and this process is typically by user
Trigger, such as, be used for opening excellent cruel player, click on the movie option in player homepage, excellent extremely broadcast
Put device and will send video recommendations request message from trend web page server.
Step 102, web page server send inquiry request message to commending system.
Inquiry request is used for obtaining inquiry recommendation list, it is recommended that system receives the video that web page server sends
Message after recommendation request, obtains user interest profile, according to default proposed algorithm and user interest profile
Recommendation results is obtained from video content storehouse.Wherein, user interest profile is mainly according to following two information
Generate: the information that a kind of information provides when log-on webpage server for user, including: user sex,
Age, region, educational background, personal interest etc., another kind of information is the history access record of user.Recommend
System can be positioned in same hardware device with web page server, it is also possible to is positioned at single hardware device
In.
Step 103, commending system return video recommendations list to web page server.
Recommendation results, after getting recommendation results, can be included by commending system according to the score of video
Video be ranked up obtaining video recommendations list, video recommendations list is returned to web page server.
Step 104, web page server return video recommendations list to client.
Step 105, client ask certain video content to CDN Edge Server.
This operation is usually is clicked on what certain video in (or viewing) video recommendations list triggered by user.
Step 106, CDN Edge Server return the video content of request to client.
The video of client request may be buffered in CDN Edge Server, it is also possible to is not buffered in
In CDN Edge Server, when the video of client request is on CDN Edge Server, CDN edge
The video that client is asked directly is sent to client by server, if the video of client request does not exists
On CDN Edge Server, CDN Edge Server can ask this to regard to the original server at this video place
Frequently, by this video cache in CDN Edge Server, then, CDN Edge Server is to client
Return this video.
By above-mentioned example, when commending system is when the content that user recommends is not in CDN, CDN
Needing back source to obtain Web content, CDN returns source acquisition Web content and can cause period of reservation of number length, account for
Source bandwidth etc. is returned with CDN.
In order to solve problem of the prior art, the embodiment of the present invention one provides the recommendation side of a kind of Web content
Method, it is recommended that system, when to user's content recommendation, can consider the content of caching in CDN, protect as far as possible
Demonstrate,prove the content recommended to user to be stored in CDN.The Web content that Fig. 2 provides for the embodiment of the present invention one
The flow chart of recommendation method, as in figure 2 it is shown, the method that the present embodiment provides may comprise steps of:
Step 201, commending system receive the mark of the cache contents in the cache contents queue that CDN sends,
Mark according to cache contents and the information of all content storehouse acquisition cache contents, by the mark of cache contents
Cache contents storehouse is added to the information of cache contents.
CDN sends the caching of storage in cache contents queue to commending system under the triggering triggering signal
The mark of content, the mark of cache contents can be the URL of cache contents
(uniform/universal resource locator is called for short url, or the cryptographic Hash of the url of cache contents
(HASH).The cache contents queue of CDN is used for memory buffers cache contents in CDN, CDN
When commending system sends the mark of cache contents, can be by all cache contents in cache contents queue
Mark be all sent to commending system, it is also possible to only send the part cache contents in buffer queue.Mainly
Being because, the cache contents in CDN cache contents queue is tactic according to temperature, comes slow
Deposit the cache contents of content queue can be eliminated out when cache contents capacity of queue is full cache contents queue,
If the cache contents may being eliminated in cache contents queue is sent and gives commending system by commending system,
And this cache contents is recommended to give user by commending system, when user accesses this cache contents, this delays
Depositing content may be eliminated, at this moment, CDN needs for the original clothes storing this cache contents
Business device obtains this cache contents.
Depend on when user accesses in order to ensure the cache contents in the cache contents queue that commending system is recommended
So being positioned in cache contents queue, in the present embodiment, the cache contents that CDN sends is cache contents queue
The content of front P%, or, in sending relative to last time for the content of the front P% of cache contents queue
The incremental data, wherein held, P be to be less than 100 more than 0.
After commending system receives the mark of cache contents, generate according to cache contents mark and all content storehouse
Cache contents storehouse, all content storehouse includes the information of all the elements in commending system: each content
Information includes: the mark of content, the metadata of content, content grading information, with video content be
Example, the metadata of video content includes the attribute tags of content, and the attribute tags of content includes title, work
Person, performer, style, shooting time etc., as a example by content of good, the attribute tags of content of good includes
Trade name, price, retail shop's title, color, style etc..CDN only sends in caching to commending system
After the mark held, it is recommended that system finds cache contents according to the mark of cache contents from all content storehouse
Information, adds the information of cache contents and the mark of cache contents to cache contents storehouse, cache contents storehouse
A subset for all content storehouse.
Step 202, when commending system receive client send recommendation request message time, it is recommended that system
According to the user interest profile obtained in advance and all content storehouse, the first proposed algorithm is used to be calculated
One recommendation results.
In first recommendation results, all content recommendations broadly fall into all content storehouse, in recommendation process, it is recommended that
System can generate the feature in all content storehouse according to all content storehouse, according in user interest profile and entirety
The feature of Rong Ku generates the first recommendation results.
Step 203, commending system obtain the second recommendation results according to cache contents storehouse.
In a kind of implementation, it is recommended that system, according to user interest profile and described cache contents storehouse, uses
Second proposed algorithm is calculated two recommendation results.In another kind of implementation, it is recommended that system pushes away from first
Recommend result and select to belong to the content recommendation in cache contents storehouse, selected content recommendation is recommended as second
Result.In former implementation, it is recommended that system can generate cache contents storehouse according to cache contents storehouse
Feature, generates the second recommendation results according to the feature of user interest profile and caching content library.In latter
In implementation, it is recommended that first system determines from the first recommendation results which content recommendation belongs in caching
Rong Ku, then, obtains the content recommendation belonging to cache contents storehouse, by selected from the first recommendation results
Content recommendation as the second recommendation results.
In the present embodiment and following embodiment, the user interest profile mentioned, the feature in all content storehouse
And the feature in cache contents storehouse is all referring to characteristic vector.
In the present embodiment, the first proposed algorithm and the second proposed algorithm may each comprise one or more and recommend
Algorithm, it is recommended that algorithm can use any one algorithm existing, such as, algorithm based on content, base
In collaborative algorithm, based on content and collaborative hybrid algorithm.And in the present embodiment, the first proposed algorithm
Can be the same or different with the second proposed algorithm.
In the present embodiment, the first recommendation results and the second recommendation results all include at least one content recommendation,
First recommendation results and the second recommendation results can represent in the form of a list.It should be noted that, step 202
Do not has sequencing upon execution, it is also possible to perform with step 203 simultaneously.
First recommendation results and second are recommended knot according to the blending algorithm preset by step 204, commending system
Fruit is merged, and obtains target recommendation results.
Specifically by following several ways, the first recommendation results and the second recommendation results can be merged:
First kind of way, first, it is recommended that system determines in the first recommendation results and the second recommendation results common
Content recommendation.Secondly, it is recommended that system deletes common content recommendation from the first recommendation results, obtains
3rd recommendation results;Then, it is recommended that system is according to the score of content recommendation, to the second recommendation results and
Content recommendation in three recommendation results is unified to be ranked up;Finally, it is recommended that system is by the recommendation after sequence
Hold as target recommendation results, or, it is recommended that system according to default algorithm from sequence after content recommendation
Middle selection part content recommendation is as target recommendation results, such as, it is recommended that system needs to return K altogether and pushes away
Recommend content, then commending system from sequence after content recommendation preceding K the content of selected and sorted as mesh
Mark recommendation results.
First recommendation results and the second recommendation results all include multiple content recommendation, in the first recommendation results
Including content recommendation and the content recommendation that includes of the second recommendation results to there may be part identical, it is recommended that
System determines content recommendation common in the two by comparing the first recommendation results and the second recommendation results.
The second way, first, it is recommended that system determines in the first recommendation results and the second recommendation results common
Content recommendation, from the first recommendation results, delete described common content recommendation, obtain the 3rd recommendation knot
Really.Secondly, it is recommended that system selects a%*k content recommendation from the 3rd recommendation results, and wherein, K is
The number of the content recommendation that target recommendation results includes, a is less than or equal to 100 more than or equal to 0, from second
Recommendation results selects k content recommendation of (1-a%) *.Finally, it is recommended that system according to the score of content recommendation,
The content recommendation selected from the 3rd recommendation results and the content recommendation selected from the second recommendation results are entered
The unified sequence of row, using the content recommendation after unified sequence as target recommendation results.
Commending system selects a%*k content recommendation to be specifically as follows from the 3rd recommendation results: recommend system
Content recommendation in 3rd recommendation results is ranked up by system according to the score of content recommendation, after sequence
Preceding a%*k the content recommendation of selected and sorted in 3rd recommendation results, preceding a%*k recommendation of sorting
Content is the content recommendation that score is higher, or, it is recommended that system is according to default principle (such as, geometric ratio
Example principle) from the 3rd recommendation results after sequence, select a%*k content recommendation.In like manner, it is recommended that be
When system selects (1-a%) k content recommendation of * from the second recommendation results, it is also possible to obtaining according to content recommendation
The content recommendation to the second recommendation results is divided to be ranked up, the row of selection from the second recommendation results after sequence
Sequence preceding (1-a%) k content recommendation of *, or, it is recommended that system according to default principle from sequence after
Second recommendation results selects k content recommendation of (1-a%) *.Certainly, it is recommended that system is recommending knot from the 3rd
Fruit and the second recommendation results select can not also sort during content recommendation, or carry out according to other parameters
Sequence, this is not limited by the embodiment of the present invention.
Optionally, in first kind of way and the second way, it is recommended that system is deleted from the first recommendation results
After common content recommendation, it is recommended that system improves in the common recommendation that the second recommendation results includes
The score held, accordingly, it is recommended that the content recommendation in the second recommendation results is being sorted by system according to score
Time, it is to be ranked up according to the score after improving.
The third mode, first, it is recommended that system determines in the first recommendation results and the second recommendation results common
Content recommendation;Secondly, it is recommended that system deletes common content recommendation from the second recommendation results, obtains
4th recommendation results;Then, it is recommended that system is according to the score of content recommendation, to the first recommendation results and
Content recommendation in four recommendation results is unified to be ranked up;Finally, it is recommended that system is by the recommendation after sequence
Hold as target recommendation results, or, it is recommended that system is according to default algorithm content recommendation after sequence
Select part content recommendation as target recommendation results.
4th kind of mode, first, it is recommended that system determines in the first recommendation results and the second recommendation results common
Content recommendation, from the second recommendation results, delete common content recommendation, obtain the 4th recommendation results;
Then, it is recommended that system selects k content recommendation of (1-a%) * from the first recommendation results, knot is recommended from the 4th
K content recommendation of (1-a%) * is selected in Guo;Finally, it is recommended that system according to the score of content recommendation, to from
The content recommendation selected in first recommendation results and the content recommendation selected from the 4th recommendation results are united
One sequence, and using the content recommendation after unified sequence as target recommendation results.
Wherein, it is recommended that system selects k content recommendation of (1-a%) * from the first recommendation results, particularly as follows:
Content recommendation in first recommendation results is ranked up, from row by commending system according to the score of content recommendation
Preceding a%*k the content recommendation of selected and sorted in the first recommendation results after sequence;Or, it is recommended that system
From the first recommendation results after sequence, a%*k content recommendation is selected according to default principle.In like manner,
When commending system selects (1-a%) k content recommendation of * from the 4th recommendation results, it is also possible in recommending
Content recommendation in 4th recommendation results is ranked up by the score held, the 4th recommendation results after sequence
K content recommendation of middle selection (1-a%) *, or, according to the default principle the 4th recommendation knot after sequence
K content recommendation of (1-a%) * is selected in Guo.Certainly, it is recommended that system is pushing away from the first recommendation results and the 4th
Recommend and result selects can not also sort during content recommendation, or be ranked up according to other parameters, this
This is not limited by bright embodiment.
Optionally, in the third mode and the 4th kind of mode, it is recommended that system is deleted from the second recommendation results
After common content recommendation, it is recommended that system improves in the common recommendation that the first recommendation results includes
The score held, accordingly, it is recommended that the content recommendation in the first recommendation results is being sorted by system according to score
Time, it is to be ranked up according to the score after improving.
Target recommendation results is pushed to targeted customer by step 205, commending system.
In the present embodiment, it is recommended that system is by receiving the cache contents in the cache contents queue that CDN sends
Mark, generate cache contents storehouse according to the mark of cache contents and all content storehouse, follow-up when recommending system
When system receives the recommendation request message that client sends, not only according to user interest profile and default pushing away
Recommend algorithm, from all content storehouse, obtain the first recommendation results, calculate always according to user interest profile and recommendation
Method, obtains the second recommendation results, then, according to default blending algorithm to first from caching content library
Recommendation results and the second recommendation results merge, and obtain target recommendation results, finally, target are recommended
Result is pushed to targeted customer.In described method, all content recommendations in the second recommendation results all exist
In the cache contents queue of CDN, so that it is guaranteed that commending system recommends the recommendation results of user as far as possible
In the cache contents queue of CDN, when the content recommendation that user includes to CDN request recommendation results
Time, CDN can get the content of user's request from caching content queue, ask without from user
The original server at the content place asked obtains, and decreases the time that user waits, and can reduce
CDN returns taking of source bandwidth.
Hereinafter by several specific embodiments, the method for embodiment one will be described in detail.
The embodiment of the present invention two illustrates how CDN sends in cache contents queue to commending system
The mark of cache contents, CDN that Fig. 3 provides for the embodiment of the present invention two and the structural representation of commending system
Figure, as it is shown on figure 3, commending system includes: cache contents queue receptor, cache contents storehouse, recommendation
Result, all content are recommended temperature storehouse, are recommended temperature transmitter, propelling movement trigger.CDN includes: push away
Recommend temperature receptor, recommend temperature list, propelling movement trigger, cache contents queue transmitter and caching interior
Hold queue.The mark of the cache contents in the cache contents queue of CDN is in the propelling movement trigger control of CDN
Under system, cache contents queue transmitter it is sent to the cache contents queue receptor of commending system, it is recommended that
The mark of the cache contents that system receives according to cache contents queue receptor and all content storehouse (Fig. 3
Not shown in) obtain the information of cache contents, the information of the mark of cache contents and cache contents is added
To cache contents storehouse, it is recommended that system can set up multiple cache contents storehouse.
In the embodiment of the present invention, in order to be further ensured that commending system is recommended the recommendation results of user and existed
In the cache contents queue of CDN, it is recommended that system is additionally operable to generate in all content storehouse according to recommendation results
The recommendation temperature of all content, the recommendation temperature of all content is saved in all content and recommends in temperature storehouse,
Under the control pushing trigger of commending system, recommend temperature transmitter recommended in temperature storehouse by all content
Data are sent to the recommendation temperature receptor of CDN, it is recommended that temperature receptor is by all content that receives
Temperature is recommended to be saved in recommendation temperature list.The embodiment of the present invention introduces the recommendation temperature of content,
The recommendation temperature of content represents that content will be accessed for probability future, in the biggest expression of recommendation temperature of content
Hold that future, to be accessed for probability the biggest, it is recommended that temperature is specifically as follows the recommendation number of times of content.
The CDN that Fig. 4 provides for the embodiment of the present invention two sends the stream of the mark of cache contents to commending system
Cheng Tu, as shown in Figure 4, the method that the present embodiment provides may comprise steps of:
Step 301, the propelling movement trigger of CDN send to cache contents queue transmitter and trigger signal.
In the present embodiment, the propelling movement trigger of CDN can be to use periodic mode to cache contents queue
Transmitter sends and triggers signal, sends cache contents to commending system triggering cache contents queue transmitter
Mark.Triggering signal and be divided into two kinds, full dose triggers signal and incremental trigger signal.Cache contents queue
Transmitter, can be the url of p% cache contents before all cache contents queues when receiving full dose and triggering signal
Or the cryptographic Hash of url (different according to the recommendation granularity of commending system, the url of cache contents can be correspondence
Url or the url of burst) it is sent to commending system.Cache contents queue transmitter is receiving incremental trigger letter
Number time, can be the content of the front P% of cache contents queue relative to the url of the incremental data sending content last time
Being sent to commending system, this incremental data is full dose data and caching when sending last time of buffer queue content
The data that the full dose data of queue content are different, this incremental data is generally much smaller than full dose data.Citing comes
Saying, it is assumed that the content preserved in t1 moment cache contents queue is " a, b, c, d, e ", CDN will
The url of these contents is sent to commending system in the way of full dose data, in t2 moment cache contents queue
The content preserved is " b, c, d, e, f ", is now " a, f " relative to the incremental data in t1 moment,
CDN is sent to commending system the url of incremental data.Commending system, after receiving incremental data, contrasts
The content information " a, b, c, d, e " that in cache contents storehouse, the t1 moment preserves, find " a " the t1 moment
Exist, then just delete " a ";Find that " f " did not existed in the t1 moment, then just " f "
Content is added in cache contents storehouse.
In the present embodiment, full dose triggers signal and uses event to trigger and the generation of periodic triggers two ways.
Event triggers the triggering signal referring to produce the CDN bandwidth free time when;Periodic triggers refer to every
The triggering signal that one cycle T 0 (such as 24 hours) produces.Both modes can be used alone, it is possible to
To be used in combination, the example that both are used in combination such as: the CND bandwidth free time when produce event
Property trigger signal;If the event that do not produces within the time of cycle T 0 triggers signal, then produce the cycle
Property trigger signal.
Incremental trigger signal uses periodic mode to produce.Generally, the product of incremental trigger signal
Raw cycle T 1 is less than full dose and triggers the event-triggered times cycle T 0 of signal.Full dose triggers and incremental trigger
Can also use and be used in combination, full dose triggers and incremental trigger combines can ensure to recommend to greatest extent
System obtains the cache contents of accurate cache contents queue with less network traffics cost.In some situation
Under, in the case of as less in content library quantity or CDN idle bandwidth is the most abundant, it is possible to use only complete
Amount triggering pattern.
Step 302, cache contents queue transmitter judge to trigger whether signal is that full dose triggers signal.
The most i.e. triggering signal is that full dose triggers signal, then perform step 303, if it is not, i.e. trigger letter
Number it is incremental trigger signal, then performs step 304.
Step 303, CDN obtain the data of the front p% of cache contents queue.
CDN is likely to be of multiple cache contents queue, is usually according to cache contents in cache contents queue
Temperature tactic, in prior art, the temperature of cache contents is the access temperature of cache contents,
In the embodiment of the present invention, the temperature of cache contents includes the access temperature of cache contents and recommends temperature.Row
Be listed in the cache contents capacity of queue of cache contents queue tail full time can be eliminated out cache contents queue.
So the present embodiment can not select whole cache contents of cache contents queue be sent to commending system, with
Avoid recommendation results comprises the content that will be eliminated.Therefore, CDN is sending caching to commending system
The part of p% before only selecting during the data of content queue in cache contents queue, so that it is guaranteed that commending system institute
Cache contents in the buffer queue content recommended still is positioned at the cache contents team of CDN when user accesses
In row, it is to avoid the period of reservation of number caused owing to content recommendation is eliminated extends.Here the selection of p%
Time interval t (such as 0.5 hour) can be defined, according to the historical data of CDN caching, calculate history
The content eliminated in time interval t in data accounts for the average percent q% of cache contents queue, then
P%=1-q%, or rule of thumb select a percentage ratio, such as 80% or 90%, or join according to other
The method (as utilized historical data to simulate) that number adjusts obtains p%.
The content preserved in the cache contents queue of CDN can be multimedia object, and multimedia object is basic
On can be divided into two classes, a class be video and the bigger multimedia object of audio frequency equal-volume, another kind of is figure
The multimedia object that sheet equal-volume is less.The feature of video and the bigger multimedia object of audio frequency equal-volume is
One object is generally divided into multiple burst and is saved in cache contents queue, and user is passing through browser
Or when certain video of client-access such as player and the bigger multimedia object of audio frequency equal-volume, client
The request obtaining related object burst can be sent to CDN;And the less multimedia object of picture equal-volume leads to
Being often not carry out burst, user is in the multimedia pair less by certain picture equal-volume of client-access
As time, client can to CDN send obtain this object request.Due in the cache contents queue of CDN
May preserve is the burst information of object, and preserve in the cache contents storehouse of commending system is object
Information, CDN is obtaining before cache contents queue after the burst of p%, in addition it is also necessary to resolve these bursts
Obtain the information of object belonging to this burst.
In example as follows, " 187.204.219.57--[09/Jul/2014:04:54:58+0000] " GET
http://sscdn.clarovideo.com/multimediav81/plataforma_vod/ISM/201301/WMP4
H01538MTSS_full/WMP4H01538MTSS_full.ism/QualityLevels(1200000)/Frag
Ments (video=3563560000) HTTP/1.1 " 200 319213 "-" " Mozilla/5.0 (Windows
NT 6.2;WOW64)AppleWebKit/537.36(KHTML,like Gecko)
Chrome/37.0.2008.2 Safari/537.36 " "-" asks certain video and audio frequency equal-volume bigger for user
The burst of multimedia object time the example of CDN daily record that produces, wherein
“http://sscdn.clarovideo.com/multimediav81/plataforma_vod/ISM/201301/WMP
4H01538MTSS_full/WMP4H01538MTSS_full.ism " it is multimedia object belonging to this burst
Url, QualityLevels (1200000) be the code rate information of this multimedia object, (video=3563560000)
It is the type of this multimedia object and corresponding timestamp.For pushing away with multimedia object for granularity
(as recommended certain video or audio frequency) for recommending system, before CDN needs first to parse cache contents queue
The url of the multimedia object belonging to p% burst, when the burst quantity of certain multimedia object is more than certain threshold
Value (as this multimedia object all burst quantity 60%) time, CDN just will be considered that this multimedia pair
As being saved in CDN cache contents queue, the url of this multimedia object can be sent to push away by CDN afterwards
Recommend system.(as recommended the climax parts of certain video) for the commending system with burst as granularity,
CDN need not to resolve the url of the multimedia object before cache contents queue corresponding to p% burst, directly institute
The url of the burst of request is sent to commending system.
The content that the data of the front p% that step 304, CDN obtain cache contents queue sent relative to last time
Incremental data.
CDN, after determining the data of front p% of cache contents queue, contrasts the front p% of cache contents queue
Data and last time send content obtain incremental data.
Step 305, CDN are by the data of the front p% of cache contents queue got or the mark of incremental data
Know and be sent to commending system.
It should be noted that the url general data volume of multimedia object is relatively big, after needing to be compressed
Commending system can be sent to, such as, after the url of multimedia object is carried out Hash operation, by the Hash of url
Value is sent to commending system.
Step 306, commending system obtain slow according to mark and all content storehouse of the cache contents received
Deposit the information of content, add the information of cache contents to cache contents storehouse.
The specific implementation of this step can refer to the associated description of embodiment one, repeats no more here.
In the present embodiment, CDN by the mark by the cache contents of the front P% of cache contents queue, or
Person, is sent to commending system by the mark of the incremental data of the cache contents of the front P% of cache contents queue,
To ensure that user's recommendation results that commending system recommends, still in the cache contents queue of CDN, follow-up is worked as
When user accesses recommendation results, CDN can return the content of request from caching content queue to user,
Thus decrease the time that user waits.
The recommendation that the commending system that Fig. 5 provides for the embodiment of the present invention three sends all content storehouse to CDN is hot
The flow chart of degree, refer to Fig. 3 and Fig. 5, and the method that the present embodiment provides may comprise steps of:
Step 401, the propelling movement trigger of commending system send to recommendation temperature transmitter and trigger signal.
It is to carry out under the control pushing trigger that commending system sends recommendation temperature information to CDN, pushes away
System of recommending sends the mode using full dose to send when recommending temperature to CDN.Triggering signal is also adopted by event and touches
Sending out and periodic triggers two ways produces, event triggers for example: push trigger at network idle band
Produce the when that width being bigger and trigger signal, periodic triggers for example: push trigger fixing with one
Cycle T produces and triggers signal.The selection of T can be empirically determined, such as 1 hour.Both triggers
Mode is used alone, it is also possible to be applied in combination.A kind of example that both are applied in combination is, touches with event
Signalling is main, if the event that do not produces within the time of cycle T triggers signal, then produces the cycle
Property trigger signal.
The recommendation temperature in all content storehouse recommended in temperature storehouse sent out by step 402, recommendation temperature transmitter
Give the recommendation temperature receptor of CDN.
Recommend temperature transmitter before sending the recommendation temperature of all content, it is recommended that system also can be according to entirely
The recommended case of all content in body content library generates recommends temperature storehouse, it is recommended that temperature storehouse includes entirety
The all content in content library recommendation temperature in Preset Time.
In the present embodiment, it is recommended that the recommendation temperature of all content is sent to CDN by system, the mesh of do so
Be to make CDN when carrying out the afterbody content of cache contents queue eliminating, not only consider the access of content
Temperature, it is also considered that the recommendation temperature of content, so that it is little to access temperature at present, but future is more likely
It is accessed for content to be not easy to eliminate out cache contents queue.It is certain when what cache contents queue stored
During the burst of object, the recommendation temperature of this burst can be the recommendation temperature of its affiliated object, it is also possible to
It is to be weighted, according to this burst location in affiliated object, the recommendation temperature that obtains, such as,
The burst weight value being positioned at object header is 0.8, and the weight value of middle climax parts is 1.0, afterbody
Weight value be 0.7, calculate burst recommendation temperature time, by the recommendation temperature of the object belonging to burst
The weight being multiplied by burst obtains the recommendation temperature of burst.
It should be noted that recommend temperature be have the strongest ageing, so, be used for calculating recommendation
The time window W of temperature can not be too big, and one of method determining this time window size is employing experience
Value obtained, such as 12 hours.Recommending temperature can be to recommend the recommended number of times of content in time window, should
Recommendation temperature can be with a byte representation, and a byte at most can represent that content is recommending time window
Interior recommended 2^8=1024 time, it is recommended that temperature can also represent with less bit, for example with
Nybble, nybble at most can represent that content is recommending recommended 2^4=16 in time window
Secondary.In the present embodiment, even if recommending temperature generation data to overflow also do not interfere with recommendation temperature in caching
Hold the replacement of queue, because the most content of recommended number of times there is a high likelihood that it is often to be accessed for
Content, these contents can be present in cache contents queue more stablely.Therefore, in caching
Consider that the main purpose recommending temperature is to allow cache contents team as far as possible when holding the cache contents replacement of queue
It is little that row end accesses temperature, but be more likely accessed for content in future and be not eliminated away.As for
Content before cache contents queue, before and after the present invention is not concerned with the position of its sequence, because in caching
Holding the content before queue the most forward the most rearward, being saved in that these contents can be more stable is slow
Deposit in content queue.
Step 403, the recommendation temperature receptor of CDN send the recommendation temperature of all content received
Give and recommend temperature list.
In the present embodiment, it is recommended that system is by sending the recommendation temperature of the middle all content in all content storehouse
To CDN, in order to CDN when carrying out caching and replacing to cache contents queue, it is possible to according in caching
The recommendation temperature held carries out caching and replaces, thus it is little to ensure to access at present temperature, but future likely by
The content accessed is not easy the cache contents queue that is eliminated out, so, when commending system is by this partial content
After recommending user, user is when asking this partial content to CDN, and CDN can be from cache contents team
Row return to user the content of request, thus decreases the time that user waits.
The signal of the operation flow of the recommendation method of the Web content that Fig. 6 provides for the embodiment of the present invention four
Figure, as shown in Figure 6, it is recommended that system includes data base and recommended engine, data base includes: generation
User interest profile, all content storehouse and caching content library, it is recommended that engine includes core recommended engine and melts
Close engine.Core recommended engine has three inputs: in user interest profile, all content storehouse and caching
Rong Ku, when carrying out commending contents, core recommended engine is first according to user interest profile and all content
Storehouse obtains the first recommendation results, and then, core recommended engine is according to user interest profile and caching content library
Obtain the second recommendation results, the first recommendation results and the second recommendation results to represent by the form of list,
Such as, the first recommendation results r_1, r_2 ..., r_n represents, the second recommendation results rq_1, rq_2 ...,
Rq_m represents.Finally, the first recommendation results and second are recommended by fusion engines according to the blending algorithm preset
Result carries out fusion and obtains target recommendation results, and output target recommendation results is to client.
The flow chart of the recommendation method of the Web content that Fig. 7 provides for the embodiment of the present invention four, refer to figure
6 and Fig. 7, the method that the present embodiment provides may comprise steps of:
Step 501, user A check the recommendation page.
Step 502, client send recommendation request message to web page server.
Recommendation process is triggered by user, when user accesses the recommendation page, or has browsed certain object
After (such as music or video), browser or player will trigger a recommendation process, to web service
Device sends recommendation request message.
Step 503, web page server send the looking into of recommendation list for inquiring about user A to commending system
Ask request message.
Step 504, commending system core recommended engine according to the interest characteristics of user A and all content
Storehouse, uses the first proposed algorithm to be calculated the first recommendation results.
Step 505, core recommended engine, according to the interest characteristics of user A and caching content library, use the
Two proposed algorithms are calculated the second recommendation results.
Cache contents in buffer queue storehouse is usually tactic according to update, is i.e. arranged in caching
The content of content queue afterbody can be eliminated out when cache contents capacity of queue is full cache contents queue, core
When heart recommended engine obtains the second recommendation results according to cache contents queue, it is impossible to select cache contents queue
Whole cache contents, to avoid recommendation results comprises the content that will be eliminated.Solution is core
Heart recommended engine only selects the cache contents of the p% of cache contents queue, the system of selection of p value and embodiment
Two is identical, and here is omitted.
Step 506, fusion engines delete the recommendation common with the second recommendation results from the first recommendation results
Content obtains the 3rd recommendation results.
Optionally, after procedure 506, it is also possible to improve content recommendation common in the second recommendation results
Score.
3rd recommendation results and second are recommended knot according to the score of content recommendation by step 507, fusion engines
Content recommendation in Guo is unified to be ranked up.
Step 508, fusion engines select K content recommendation as target from the content recommendation after sequence
Recommendation results.
Step 509, fusion engines update all content according to target recommendation results and recommend temperature storehouse.
If commending system and CDN collaborative work, and the recommendation that CDN needs commending system to send is hot
Degree carries out the renewal of cache contents queue, then fusion engines redefines target according to target recommendation results and pushes away
Recommend the recommendation temperature of content recommendation in result, according to the recommendation heat of the content recommendation in target recommendation results
Degree updates all content and recommends temperature storehouse, and otherwise, this step can be omitted.
Target recommendation results is sent to web page server by step 510, fusion engines.
Target recommendation results is transmitted to client by step 511, web page server.
Step 512, client show target recommendation results to user.
The flow chart of the recommendation method of the Web content that Fig. 8 provides for the embodiment of the present invention five, such as Fig. 8 institute
Showing, the method that the present embodiment provides may comprise steps of:
Step 601, user A check the recommendation page.
Step 602, client send recommendation request message to web page server.
Step 603, web page server send the looking into of recommendation list for inquiring about user A to commending system
Ask request message.
Step 604, commending system core recommended engine according to the interest characteristics of user A and all content
Storehouse, uses the first proposed algorithm to be calculated the first recommendation results.
Step 605, core recommended engine select to belong in cache contents storehouse from the first recommendation results to be recommended
Content, using selected content recommendation as the second recommendation results.
Step 606, fusion engines delete the second recommendation results from the first recommendation results, obtain the 3rd and push away
Recommend result.
In the present embodiment, all content recommendations that the second recommendation results includes are the first recommendation results and
The content recommendation that two recommendation results are common.Optionally, after step 606, it is also possible to improve second and push away
Recommend the score of content recommendation in result.
Step 607, fusion engines select a%*k content recommendation from the 3rd recommendation results.
A is one and coordinates the first recommendation results and the parameter of the second recommendation results: a=0, then target recommends knot
All content recommendations in Guo all derive from cache contents storehouse;A=1, then all in target recommendation results push away
Recommend content and all derive from all content storehouse.Under normal circumstances, a can be entered by historical data as a parameter
Row simulation obtains, or uses the algorithm of machine learning to calculate an optimal value, or uses online real
The method tested obtains an optimal value by user feedback.For CDN and commending system collaborative work it is
For system, in the span of a, (0,1), i.e. a are more than 0 and less than 1.Determining specifically taking of a
During value, for biasing toward the application allowing user have quickly experience, the value of a should push away not appreciably affecting
On the premise of recommending effect (such as the index such as precision and recall rate) the least, i.e. allow in more recommendation
Hold cache contents storehouse, source;Allowing user have the application that multiformity is experienced for biasing toward, the value of a should
On the premise of not appreciably affecting user's acquisition speed as far as possible greatly, more content recommendation is i.e. allowed to originate
In all content storehouse.
Step 608, fusion engines select k content recommendation of (1-a%) * from the second recommendation results.
Step 609, fusion engines, according to the score of content recommendation, push away from the 3rd recommendation results and second
Recommend K the content recommendation unification selected in result to be ranked up, obtain target recommendation results.
Step 610, fusion engines update all content according to target recommendation results and recommend temperature storehouse.
Target recommendation results is sent to web page server by step 611, fusion engines.
Target recommendation results is transmitted to client by step 612, web page server.
Step 613, client show target recommendation results to user.
It should be noted that step 604-606 in the present embodiment can be with step in embodiment four
504-506 exchanges, and in the present embodiment, step 607-608 can be exchanged with step 506-507 in embodiment four.
Fig. 9 is cache contents queue and the structural representation of alternating content queue of CDN Edge Server,
As it is shown in figure 9, CDN Edge Server typically can maintain two queues when carrying out caching replacement: caching
Content queue and alternating content queue, in various embodiments of the present invention, cache contents queue is used for storing reality
Border is buffered in the content in CDN, and alternating content queue is used for storing and may be accessed for content future, waits
The alternating content of storage in content queue is selected not to be buffered in CDN.CDN Edge Server has
At least one cache contents queue, but the number of alternating content queue can be zero, one or more.
It is all base that cache contents queue and the renewal of alternating content queue and caching are replaced by CDN Edge Server
In access temperature and the recommendation temperature of content, the access temperature of cache contents and alternating content is all saved in visit
Asking in temperature list, the recommendation temperature of cache contents and alternating content is all saved in recommendation temperature list.
Certainly, the access temperature of cache contents and alternating content can also be saved in different access temperature row respectively
In table, the recommendation temperature of cache contents and alternating content is saved in different recommendation temperature lists the most respectively,
This is also limited by the embodiment of the present invention.
Cache contents queue is used for depositing the content that temperature is bigger, and cache contents is in cache contents queue
Position is ranked up according to temperature size, and the temperature information of content includes: accesses temperature, recommend heat
Spend, according to accessing temperature and recommending the calculated comprehensive temperature of temperature, access temperature and recommend temperature
Combination.When the temperature of certain content in alternating content queue is more than a threshold value, CDN edge service
Device just joins this content in cache contents queue, and deletes this content, threshold from alternating content queue
The determination method of value is a lot, such as, can be the minimum thermal angle value in cache contents queue, it is also possible to by warp
Test the additive methods such as estimation calculated.If the length of cache contents queue reach certain threshold value (as
Total size of cache contents has exceeded the 90% of hard-disk capacity), then eliminate caching according to cache replacement algorithm
A part of content that in content queue, temperature is minimum, until the length of cache contents queue is less than certain threshold value
(if total size of cache contents is less than the 85% of hard-disk capacity), be eliminated in cache contents queue is interior
Hold and be added in alternating content queue.
Alternating content queue is used for depositing the content that temperature is less, and alternating content is pressed in alternating content queue
It is ranked up according to temperature size.When certain content is accessed, if this content is not in cache contents queue
In, then this content is saved in alternating content queue, is ranked up according to temperature after calculating its temperature;
If alternating content capacity of queue is the fullest, then alternating content queue end is newly added with alternating content queue
The identical content of the total size of content eliminate out alternating content queue.The length of alternating content queue and caching
Ratio the most fixing between content queue, and owing to the content in alternating content queue is not protected
Exist in the hard disk of CDN Edge Server, so being not take up hard-disc storage space.Toward alternating content queue
During the new content of middle interpolation, if alternating content queue is the fullest, then eliminate in alternating content queue temperature
Little content, the computational methods of the temperature of alternating content can be identical with the temperature computational methods of cache contents,
Can also be different.
The calculation accessing temperature is a lot, the most commonly used page displacedment algorithm (Least
Frequently Used, is called for short LFU) and recent minimum use algorithm (Least Recently Used, letter
Claim LRU), LFU uses in certain time the access times of content as the access temperature of this content,
LRU uses content the last time to access the time difference access heat as this content of time gap current time
Degree, now to access the time difference of time gap current time the least this content the last time, then this content
Access temperature the biggest.The calculation recommending temperature is also a lot, as content can be used in certain time period
Interior recommended number of times is as the access temperature of this content.It should be noted that commending system is being recommended
Time may have been utilized more broadly information, such as certain video position in popular video ranking list, must grade
Information, therefore, it is recommended that the calculating of temperature is likely to contain this category information.In inventing each embodiment,
Temperature is recommended to be obtained according to recommended case by commending system, it is recommended that system is under the control pushing trigger
The recommendation temperature of all content is sent to CDN.The calculation of comprehensive temperature can have multiple, such as
To accessing temperature and temperature can be recommended linearly or nonlinearly to weight, the weight wherein weighted can be adopted
Obtain with empirical data, it would however also be possible to employ the method for machine learning obtains optimal value.Access temperature and recommendation
The combination of temperature includes: to access temperature, in the case of access temperature is identical, it is recommended that temperature is more
Greatly, then temperature is the biggest, it is also possible to recommend temperature, in the case of recommending temperature identical, accesses
Temperature is the biggest, then temperature is the biggest.
The flow chart of the buffer replacing method of the Web content that Figure 10 provides for the embodiment of the present invention six, please join
According to Fig. 9 and Figure 10, the method that the present embodiment provides may comprise steps of:
Step 701, CDN Edge Server obtain the recommendation temperature of the cache contents in cache contents queue
With access temperature.
Concrete, it is recommended that system accesses situation according to the history of the cache contents in cache contents queue and generates
The access temperature of the cache contents in cache contents queue.Commending system is according to receiving what commending system sent
The recommendation temperature of the cache contents in cache contents queue, the recommendation of the cache contents in cache contents queue
Temperature is that commending system generates according to the recommended case of the cache contents in cache contents queue, it is recommended that be
Unite when sending recommendation temperature to CDN, the recommendation temperature of all the elements in all content storehouse all can be sent out
Give CDN Edge Server.
Step 702, CDN Edge Server are according to the access temperature of the cache contents in cache contents queue
Replace with recommending temperature that cache contents queue carries out caching.
CDN Edge Server can regularly detect the size of the hard disk remaining space of oneself, as every ten minutes
Detection is once.If be detected that the size of the cache contents of hard-disc storage has exceeded first threshold (such as hard disk
The 90% of capacity), then CDN Edge Server will start caching replacement process, until hard-disc storage
The size of cache contents less than Second Threshold (such as the 85% of hard-disk capacity).Delaying of cache contents queue
Deposit replacement process and be usually the cache contents eliminating temperature minimum.
In a kind of implementation, if the size of the cache contents in cache contents queue is more than or equal to first
Threshold value, then CDN Edge Server determines that the cache contents to the tail of the queue temperature of cache contents queue is less enters
Row is eliminated, and the cache contents in usual cache contents queue is ranked up from high to low according to accessing temperature,
The access temperature of the cache contents of cache contents queue tail of the queue is little, and the tail of the queue of cache contents queue needs to eliminate
Cache contents in the access temperature of some cache contents may be identical.The caching identical for accessing temperature
Content, CDN Edge Server can compare the recommendation temperature of cache contents further.Concrete, CDN
Edge Server compares the recommendation heat that the tail of the queue of cache contents queue has the cache contents of identical access temperature
Degree, eliminates and recommends the cache contents that temperature is less in the cache contents with identical access temperature, until slow
Cache contents queue is washed in a pan by the size depositing the cache contents in content queue less than Second Threshold, stopping
Eliminating, Second Threshold is less than or equal to described first threshold.Such as, CDN Edge Server needs to wash in a pan every time
Eliminate 10 cache contents of cache contents queue tail of the queue, but, cache contents queue tail of the queue has 12 cachings
The access temperature of content is the most identical, then, CDN Edge Server compares pushing away of these 12 cache contents
Recommend temperature, from these 12 cache contents, eliminate 10 cache contents recommending temperature less.
In another kind of implementation, if the size of the cache contents in cache contents queue is more than or equal to the
One threshold value, then CDN Edge Server determines less the delaying of access temperature of the tail of the queue to cache contents queue
Deposit content to eliminate.Then, in the CDN Edge Server caching according to the tail of the queue of cache contents queue
The access temperature held and recommendation temperature, calculate the comprehensive temperature of cache contents in the tail of the queue of cache contents queue;
CDN Edge Server eliminates the cache contents that in the tail of the queue of cache contents queue, comprehensively temperature is less, until
The size of the cache contents in cache contents queue is less than Second Threshold, then stop entering cache contents queue
Row is eliminated.Such as, CDN Edge Server needs to eliminate cache contents queue tail of the queue 10 caching every time
Content, but, cache contents queue tail of the queue has the access temperature of 12 cache contents the most identical, then,
CDN Edge Server can calculate the comprehensive of these 12 cache contents according to recommending temperature and access temperature
Temperature, eliminates 10 cache contents that comprehensive temperature is less from these 12 cache contents.
In the present embodiment, CDN Edge Server obtains the recommendation heat of the cache contents in cache contents queue
Degree and access temperature, when needs carry out caching replacement to cache contents queue, according to cache contents queue
In cache contents access temperature and recommend temperature cache contents queue is carried out caching replace.Described side
In method, when cache contents queue being carried out caching and replacing, not only allow for the access temperature of cache contents,
Further contemplate the recommendation temperature of cache contents, thus as much as possible recommending the content that temperature is high to be retained in caching
In, make user can obtain the content that commending system is recommended faster.
The flow chart of the buffer replacing method of the Web content that Figure 11 provides for the embodiment of the present invention seven, this reality
The difference of the embodiment six executing example is: in the present embodiment, and CDN Edge Server i.e. includes cache contents
When queue includes again alternating content queue, CDN Edge Server replaces alternating content queue is carried out caching
When changing, alternating content queue is carried out caching replacement by the recommendation temperature also according to alternating content.Such as Figure 11 institute
Showing, the method that the present embodiment provides may comprise steps of:
Step 801, CDN Edge Server obtain the recommendation temperature of the cache contents in cache contents queue
With access temperature.
Step 802, CDN Edge Server are according to the access temperature of the cache contents in cache contents queue
Replace with recommending temperature that cache contents queue carries out caching.
Step 801 and 802 specific implementation can refer to the description of embodiment six, repeat no more here.
Step 803, CDN Edge Server obtain the recommendation temperature of the alternating content in alternating content queue
With access temperature.
Concrete, CDN Edge Server accesses feelings according to the history of the alternating content in alternating content queue
Condition generates the access temperature of this alternating content, it is recommended that system receives this alternating content of commending system transmission
Recommending temperature, the recommendation temperature of this alternating content is that commending system is raw according to the recommended case of this alternating content
Become.
Step 804, CDN Edge Server are according to the recommendation temperature of the alternating content in alternating content queue
With accessing temperature, alternating content queue is carried out caching replacement.
In a kind of implementation, if the size of the alternating content in alternating content queue is more than or equal to the 3rd
Threshold value, then CDN Edge Server determines the candidate that the access temperature of the tail of the queue to alternating content queue is less
Content is eliminated.The generally alternating content in alternating content queue is carried out from high to low according to accessing temperature
Sequence, the access temperature of the alternating content of alternating content queue tail of the queue is little, and the tail of the queue of alternating content queue needs
In alternating content to be eliminated, the access temperature of some alternating content may be identical.Identical for accessing temperature
Alternating content, CDN Edge Server can compare the recommendation temperature of alternating content further.Concrete,
CDN Edge Server compares the recommendation of the alternating content in alternating content queue with identical access temperature
Temperature, eliminates and recommends the alternating content that temperature is less in the alternating content with identical access temperature, until
The size of the alternating content in alternating content queue is less than the 4th threshold value, then stop entering alternating content queue
Row is eliminated, and the 4th threshold value is less than or equal to the 3rd threshold value.
In another kind of implementation, if the size of the alternating content in alternating content queue is more than or equal to the
Three threshold values, then CDN Edge Server determines the time that the access temperature of the tail of the queue to alternating content queue is less
Content is selected to eliminate;Then, CDN Edge Server is according in candidate in the tail of the queue of alternating content queue
The access temperature held and recommendation temperature, calculate the comprehensive temperature of alternating content in the tail of the queue of alternating content queue;
Finally, compare the comprehensive temperature of alternating content in the tail of the queue of alternating content queue, eliminate alternating content queue
Tail of the queue in the less alternating content of the comprehensive temperature of alternating content, until the candidate in alternating content queue
The size of content is less than the 4th threshold value, then stop eliminating alternating content queue, and the 4th threshold value is less than
Or equal to the 3rd threshold value.
In the present embodiment, when cache contents queue and alternating content queue being carried out caching and replacing, not only
Consider the access temperature of cache contents and alternating content, it is also contemplated that cache contents and the recommendation of alternating content
Temperature, thus as much as possible recommending the high content of temperature to retain in the buffer, makes the user can be faster
Obtain the content that commending system is recommended.
CDN is when recommending temperature to be used for caching replacement, and a kind of method is to whole cache contents queue more
Newly all consider to recommend temperature with eliminating;Another kind of method is only to carry out the tail of the queue of cache contents queue
Just consider when eliminating to recommend temperature, such as, at the cache contents queue tail of the queue number that superseded access temperature is less
According to time, preferential eliminate that to access temperature identical but recommend the content that temperature is less, both modes can also be answered
It is used in the caching replacement of alternating content queue.In the method for embodiment six and embodiment seven, heat will be recommended
Degree is applied during carrying out the tail of the queue of cache contents queue and alternating content queue eliminating, and below two
In individual embodiment, CDN applies recommending temperature to the renewal of whole cache contents queue and selection process
In.
The flow chart of the buffer replacing method of the Web content that Figure 12 provides for the embodiment of the present invention eight, such as figure
Shown in 12, the method for the present embodiment may comprise steps of:
Step 901, CDN Edge Server receive the content acquisition request that client sends, content obtaining
Request includes the identification information of content to be visited.
The caching replacement process of CDN, by the access triggers of user, recommends the recommendation of the page to tie when user clicks on
During certain content on fruit or terminal applies, just triggering a caching replacement process, client can be to
CDN Edge Server sends a content acquisition request.
It should be noted that client is not directly to send content obtaining to CDN Edge Server to ask
Asking, first client sends address resolution request to the dns server of CDN, in address resolution request
Including the identification information of content to be visited, according to the mark of content to be visited, dns server determines that distance is used
The edge cluster that family is nearest, the nearest edge cluster of this distance users includes that at least one CDN edge takes
Business device, when the edge cluster that this distance users is nearest includes a CDN Edge Server, DNS
Directly the IP address of this CDN Edge Server being returned to client, client takes to this CDN edge
Business device sends content acquisition request.When the edge cluster that this distance users is nearest includes multiple CDN edge
During server, each CDN Edge Server has independent IP address, and it is slow only to preserve a part
Depositing content, cache contents is allocated according to certain mode in the cluster, for example, it is possible to in caching
The value of the url held carries out Hash and calculates the hash value obtaining cache contents, different CDN edge service
Device preserves the cache contents that different hash value scopes is corresponding, so, each CDN in edge cluster
According to the hash value of the url of a content, Edge Server is assured that this content is on which CDN limit
In edge server.If DNS knows each CDN edge service in the edge cluster that distance users is nearest
The scope of the hash value of the cache contents that device is stored, then dns server is according to content to be visited
Url is calculated the hash value of the url of content to be visited, according to the hash value of the url of content to be visited from
The plurality of CDN Edge Server finds the CDN Edge Server at content place to be visited, will wait to visit
Asking that the IP address of the CDN Edge Server at content place returns to client, client is in be visited
The CDN Edge Server holding place sends content acquisition request.If DNS knows that distance users is nearest
The scope of the hash value of the cache contents that each CDN Edge Server in edge cluster is stored, that
Dns server finds the CDN edge service that load is minimum from the edge cluster that distance users is nearest
Device, sends content acquisition request to CDN Edge Server, the CDN Edge Server that this load is minimum
By calculating the hash value of the url of content to be visited, the CDN edge at content place to be visited is found to take
Business device, and the IP address of the CDN Edge Server at content place to be visited is returned to dns server,
The IP address of the CDN Edge Server at content place to be visited is transmitted to client by dns server,
Client is according to the IP address of the CDN Edge Server at content place to be visited, to content institute to be visited
CDN Edge Server IP address send content acquisition request.
Step 902, CDN Edge Server determine content to be visited according to the identification information of content to be visited
Whether in the cache contents queue of oneself.
If CDN Edge Server can be sentenced during the url that the identification information of content to be visited is content to be visited
Whether the hash value of the url of disconnected content to be visited is in the range of the hash value of oneself, if content to be visited
The hash value of url in the range of the hash value of oneself, it is determined that content to be visited is at the caching of oneself
In content queue, if the hash value of the url of content to be visited is not in the range of the hash value of oneself, then
Determine that content to be visited is not in the cache contents queue of oneself.CDN Edge Server can also directly be sentenced
Whether the url of disconnected content to be visited is in the cache contents queue of oneself.
If step 903 content to be visited is in cache contents queue, then CDN Edge Server is to client
End returns content to be visited.
Step 904, CDN Edge Server update the access temperature of content to be visited, and according to be visited
The access temperature of content and the recommendation temperature of content to be visited calculate the temperature information of content to be visited, according to
The temperature information updating cache contents queue of content to be visited.
The temperature information of content to be visited here can be the comprehensive temperature of content to be visited, it is also possible to for
The access temperature of content to be visited and the combination of recommendation temperature.Cache contents in cache contents queue is all
According to temperature information sorting, here according to the temperature information updating cache contents queue of content to be visited,
I.e. adjust the sequence of cache contents in cache contents queue according to the temperature information of content to be visited.
If the cache contents in cache contents queue is ranked up according to comprehensive temperature, then, visit according to waiting
Ask that the access temperature of content and the recommendation temperature of content to be visited calculate the temperature information of content to be visited, root
According to the temperature information updating cache contents queue of content to be visited, particularly as follows: CDN Edge Server is treated
Access the access temperature of content and recommend temperature to use the mode of linear weighted function or nonlinear weight to be calculated
The comprehensive temperature of content to be visited, then, CDN Edge Server is according to the comprehensive temperature of content to be visited
The sequence of the cache contents in adjustment cache contents queue.
If the cache contents in cache contents queue is main being ranked up to access temperature, in two cache
When the access temperature of appearance is identical, then compare the recommendation temperature of the two cache contents, it is recommended that big the delaying of temperature
The temperature depositing content is big, and during sequence, order is before recommending the cache contents that temperature is little.So, according to treating
The recommendation temperature of the access temperature and content to be visited that access content calculates the temperature information of content to be visited,
Temperature information updating cache contents queue according to content to be visited, particularly as follows: CDN Edge Server ratio
The size of the access temperature of other cache contents in content more to be visited and caching content queue, if to be visited
The access temperature of content does not has identical with the access temperature of other cache contents, then CDN Edge Server is straight
Connect renewal cache contents queue, if the access temperature of content to be visited and the access temperature of certain cache contents
Identical, then the recommendation temperature of CDN Edge Server content more to be visited has identical access temperature with this
The recommendation temperature of cache contents, if the recommendation temperature of content more to be visited has more than this identical accesses heat
The recommendation temperature of the cache contents of degree, the order of content the most to be visited has the slow of identical access temperature at this
Before depositing content, if the recommendation temperature of content more to be visited has in the caching of identical access temperature less than this
Hold recommendation temperature, the order of content the most to be visited after this has the cache contents of identical access temperature,
If the recommendation temperature of content more to be visited is hot equal to the recommendation of this cache contents with identical access temperature
Degree, the order of content the most to be visited before the order of this cache contents with identical access temperature or it
After can.
If the cache contents in cache contents queue is main being ranked up to recommend temperature, in two cache
When the recommendation temperature of appearance is identical, then compare the access temperature of the two cache contents, access big the delaying of temperature
The temperature depositing content is big, and during sequence, order is before accessing the cache contents that temperature is little.So, according to treating
The recommendation temperature of the access temperature and content to be visited that access content calculates the temperature information of content to be visited,
Temperature information updating cache contents queue according to content to be visited, particularly as follows: CDN Edge Server ratio
The size of the recommendation temperature of other cache contents in content more to be visited and caching content queue, if to be visited
The recommendation temperature of content does not has identical with the recommendation temperature of other cache contents, then CDN Edge Server is straight
Connect renewal cache contents queue, if the recommendation temperature of content to be visited and the recommendation temperature of certain cache contents
Identical, then the access temperature of CDN Edge Server content more to be visited has identical access recommendation with this
The access temperature of cache contents, if the access temperature of content more to be visited has more than this identical recommends heat
The access temperature of the cache contents of degree, the order of content the most to be visited has the slow of identical recommendation temperature at this
Before depositing content, if the access temperature of content more to be visited has in the caching of identical recommendation temperature less than this
Hold access temperature, the order of content the most to be visited after this has the cache contents of identical recommendation temperature,
If the access temperature of content more to be visited is hot equal to the access of this cache contents with same buffered temperature
Degree, the order of content the most to be visited before the order of this cache contents with identical recommendation temperature or it
After can.
Step 905, when needs cache contents queue carried out caching replace time, CDN Edge Server root
According to the temperature information of cache contents in cache contents queue, eliminate less the delaying of temperature in cache contents queue
Deposit content.
In the present embodiment, CDN edge is when being updated cache contents queue, according to cache contents
Access temperature and recommend temperature to be updated, therefore, all cache contents in cache contents queue suitable
Cache contents queue all according to accessing temperature and recommending temperature sequence, follow-up is being delayed by sequence
When depositing replacement, directly eliminate the cache contents that the tail of the queue temperature of cache contents queue is less, and be no longer not required to
Will be according to the access temperature of cache contents and the temperature information of the cache contents recommending temperature calculating tail of the queue, root
It is ranked up according to calculated temperature information.
In the present embodiment, CDN Edge Server is by according to the access temperature of content to be visited and to be visited
The recommendation temperature of content updates cache contents queue, in order to when cache contents carrying out caching and replacing,
Ensure that current time accesses temperature little, but following access the big cache contents of probability be not easy by
Eliminating out cache contents queue, follow-up when user accesses recommendation results, CDN can be from cache contents team
Row return to user the content of request, thus decreases the time that user waits.
The flow chart of the buffer replacing method of the Web content that Figure 13 provides for the embodiment of the present invention nine, this reality
The difference executing example and embodiment eight is: in the present embodiment, and CDN Edge Server i.e. includes cache contents
When queue includes again alternating content queue, alternating content queue is being updated by CDN Edge Server
Time, alternating content queue is updated by recommendation temperature and access temperature also according to alternating content.This reality
The method executing example is performed by CDN Edge Server, and as shown in figure 13, the method for the present embodiment can be wrapped
Include following steps:
The content acquisition request that step 1001, reception client send, content acquisition request includes waiting to visit
Ask the identification information of content.
Step 1002, identification information according to content to be visited determine that whether content to be visited is at cache contents
In queue.
If content to be visited is in the cache contents queue of CDN Edge Server, then perform step 1003,
If content to be visited is not in the cache contents queue of CDN Edge Server, then perform step 1005.
Step 1003, update the access temperature of content to be visited, and according to the access temperature of content to be visited
With the temperature information that the recommendation temperature of content to be visited determines content to be visited, according to the heat of content to be visited
Degree information updating cache contents queue.
After step 1003 has performed, perform step 1004.
Step 1004, to client return content to be visited.
The specific implementation of step 1001-1004, can refer to the associated description of embodiment eight, the most not
Repeat again.
Step 1005, identification information according to content to be visited determine that whether content to be visited is at alternating content
In queue.
If content to be visited is in alternating content queue, then perform step 1006, if content to be visited does not exists
In subsequent content queue, then perform step 1011.CDN Edge Server is according to the mark of content to be visited
Information determines the content to be visited concrete grammar whether in alternating content queue, with CDN Edge Server
Determine that cache contents is similar in cache contents queue, repeat no more here.
Step 1006, update the access temperature of content to be visited, according to the access temperature of content to be visited and
Temperature is recommended to determine the temperature information of content to be visited.
Step 1007, temperature information according to content to be visited judge whether the temperature of content to be visited is more than
The heat degree threshold preset.
If the temperature of content to be visited is more than heat degree threshold, then perform step 1008, if content to be visited
Temperature is less than or equal to heat degree threshold, then perform step 1010.
Step 1008, content to be visited is added in cache contents queue, and from alternating content queue
Delete content to be visited.
Step 1009, to client return content server place to be visited original server IP ground
Location.
Step 1010, temperature information updating alternating content queue according to content to be visited.
After step 1010 has performed, perform step 1009.
Step 1011, content to be visited is added in alternating content queue, update the visit of content to be visited
Ask temperature, calculate content to be visited according to the temperature of content to be visited and the recommendation temperature of content to be visited
Temperature information.
After step 1011 has performed, perform step 1010.
If CDN Edge Server is to the original service that the information that client returns is content place to be visited
The IP address of device, then client, please to this original server according to the IP address of this original server
Seek content to be visited, and after obtaining content to be visited, by content displaying to be visited to user.
The structural representation of a kind of commending system that Figure 14 provides for the embodiment of the present invention ten, such as Figure 14 institute
Showing, the commending system that the present embodiment provides includes: receiver module 11, recommending module 12, Fusion Module
13 and sending module 14.
Receiver module 11, for receiving the mark of the cache contents in the cache contents queue that CDN sends,
Mark according to described cache contents and the information of the described cache contents of all content storehouse acquisition, by described slow
The information of the mark and described cache contents of depositing content adds cache contents storehouse to;
Recommending module 12, during for receiving the recommendation request message of client transmission when described commending system,
According to the user interest profile obtained in advance and described all content storehouse, the first proposed algorithm is used to calculate
To the first recommendation results;
Described recommending module 12, is additionally operable to obtain the second recommendation results according to described cache contents storehouse;
Fusion Module 13, is used for according to the blending algorithm preset described first recommendation results and described second
Recommendation results merges, and obtains target recommendation results;
Sending module 14, for being pushed to targeted customer by described target recommendation results.
In a kind of implementation, described recommending module obtains the second recommendation results according to described cache contents storehouse,
Particularly as follows: according to described user interest profile and described cache contents storehouse, use the second proposed algorithm to calculate
Obtain described second recommendation results.In another kind of implementation, described recommending module is according in described caching
Rong Ku obtains the second recommendation results, particularly as follows: select to belong in described caching from described first recommendation results
The content recommendation of Rong Ku, using selected content recommendation as described second recommendation results.
Optionally, described Fusion Module 13 specifically for: determine described first recommendation results and described second
Content recommendation common in recommendation results;Delete in described common recommendation from described first recommendation results
Hold, obtain the 3rd recommendation results;According to the score of content recommendation, to described second recommendation results and described
Content recommendation in 3rd recommendation results is unified to be ranked up;Using the content recommendation after sequence as described mesh
Mark recommendation results, or, push away according to default algorithm selection part from the content recommendation after described sequence
Recommend content as described target recommendation results.
Optionally, described Fusion Module 13 specifically for: determine described first recommendation results and described second
Content recommendation common in recommendation results;Delete in described common recommendation from described first recommendation results
Hold, obtain the 3rd recommendation results;A%*k content recommendation is selected from described 3rd recommendation results, its
In, k is the number of the content recommendation that described target recommendation results includes, a is less than or equal to more than or equal to 0
100;K content recommendation of (1-a%) * is selected from described second recommendation results;According to content recommendation
Score, selects to the content recommendation selected from described 3rd recommendation results with from described second recommendation results
The content recommendation selected carries out unifying sequence, and as described target, the content recommendation after unified sequence is recommended knot
Really.
Wherein, described Fusion Module 13 selects a%*k content recommendation from described 3rd recommendation results,
Particularly as follows: the content recommendation in described 3rd recommendation results is ranked up according to the score of content recommendation,
Preceding a%*k the content recommendation of selected and sorted from described 3rd recommendation results after sequence.Described melt
Compound module 13 selects k content recommendation of (1-a%) * from described second recommendation results, particularly as follows: root
According to the score of content recommendation, the content recommendation in described second recommendation results is ranked up, after sequence
Selected and sorted preceding (1-a%) k content recommendation of * in described second recommendation results.
Optionally, described Fusion Module 13 is deleted in described common recommendation from described first recommendation results
After appearance, be additionally operable to: improve the described common content recommendation that described second recommendation results includes
Point.
Optionally, described Fusion Module 13 specifically for: determine described first recommendation results and described second
Content recommendation common in recommendation results;Delete in described common recommendation from described second recommendation results
Hold, obtain the 4th recommendation results;According to the score of content recommendation, to described first recommendation results and described
Content recommendation in 4th recommendation results is unified to be ranked up;Using the content recommendation after sequence as described mesh
Mark recommendation results, or, push away according to default algorithm selection part from the content recommendation after described sequence
Recommend content as described target recommendation results.
Optionally, described Fusion Module 13 specifically for: determine described first recommendation results and described second
Content recommendation common in recommendation results;Delete in described common recommendation from described second recommendation results
Hold, obtain the 4th recommendation results;A%*k content recommendation is selected from described first recommendation results, its
In, k is the number of the content recommendation that described target recommendation results includes, a is less than or equal to more than or equal to 0
100;K content recommendation of (1-a%) * is selected from described 4th recommendation results;According to content recommendation
Score, selects to the content recommendation selected from described first recommendation results with from described 4th recommendation results
The content recommendation selected carries out unifying sequence, and is recommended as described target by the content recommendation after unified sequence
Result.
Wherein, described Fusion Module 13 selects a%*k content recommendation from described first recommendation results,
Particularly as follows: the content recommendation in described first recommendation results is ranked up according to the score of content recommendation,
Preceding a%*k the content recommendation of selected and sorted from described first recommendation results after sequence.Described melt
Compound module 13 selects k content recommendation of (1-a%) * from described 4th recommendation results, particularly as follows: according to
Content recommendation in described 4th recommendation results is ranked up by the score of content recommendation, the institute after sequence
State selection k content recommendation of (1-a%) * in the 4th recommendation results.
Optionally, described Fusion Module 13 is deleted in described common recommendation from described second recommendation results
After appearance, be additionally operable to: improve the described common content recommendation that described first recommendation results includes
Point.
Optionally, described commending system also includes: recommend temperature generation module, for according to described entirety
The recommended case of all content in content library generates recommends temperature storehouse, and described recommendation temperature storehouse includes institute
State the recommendation temperature in Preset Time of all content in all content storehouse;Described sending module 14, also
For all the elements in temperature storehouse being recommended to be sent to described CDN.Accordingly, described Fusion Module 13
According to default blending algorithm, described first recommendation results and described second recommendation results are merged,
After target recommendation results, described recommendation temperature generation module is additionally operable to: recommend knot according to described target
Fruit updates described recommendation temperature storehouse.
Alternatively, in the present embodiment, the cache contents that described CDN sends is described cache contents queue
The content of front P%, or, for the content of front P% of described cache contents queue relative to sending last time
The incremental data of content, wherein, P is less than 100 more than 0.
The commending system of the present embodiment can be used for the method performing embodiment one to embodiment five, implements
Mode is similar with technique effect, repeats no more here.
The structural representation of a kind of CDN Edge Server that Figure 15 provides for the embodiment of the present invention 11,
As shown in figure 15, the CDN Edge Server that the present embodiment provides includes: acquisition module 21 and caching replace
Die change block 22.
Acquisition module 21, for obtaining the recommendation temperature of the cache contents in cache contents queue and accessing heat
Degree;
Caching replacement module 22, for the access temperature according to the cache contents in described cache contents queue
Replace with recommending temperature that described cache contents queue carries out caching.
Optionally, described caching replacement module 22 specifically for: if the caching in described cache contents queue
The size of content is more than or equal to first threshold, it is determined that the tail of the queue of described cache contents queue is accessed heat
Spend less cache contents to eliminate;The relatively tail of the queue of described cache contents queue has identical access heat
The recommendation temperature of cache contents of degree, eliminate described in have in the cache contents of identical access temperature and recommend heat
Spend less cache contents, until the size of the cache contents in described cache contents queue is less than the second threshold
Value, then stop eliminating described cache contents queue, and described Second Threshold is less than or equal to described the
One threshold value.
Optionally, described caching replacement module 22 specifically for: if the caching in described cache contents queue
The size of content is more than or equal to first threshold, it is determined that the access to the tail of the queue of described cache contents queue
The cache contents that temperature is less is eliminated;The cache contents of the tail of the queue according to described cache contents queue
Access temperature and recommend temperature, calculating the comprehensive temperature of cache contents in the tail of the queue of described cache contents queue;
Eliminate the cache contents that in the tail of the queue of described cache contents queue, comprehensive temperature is less, until in described caching
The size holding the cache contents in queue is less than Second Threshold, then stop carrying out described cache contents queue
Eliminating, described Second Threshold is less than or equal to described first threshold.
In the present embodiment, described acquisition module 21 is specifically for slow according in described cache contents queue
The history depositing content accesses the access temperature of the cache contents in the situation described cache contents queue of generation;Connect
The recommendation temperature of the cache contents in the described cache contents queue that receipts commending system sends, in described caching
The recommendation temperature holding the cache contents in queue is that described commending system is according in described cache contents queue
The recommended case of cache contents generates.
The CDN Edge Server that the present embodiment provides, the method that can be used for performing embodiment six, specifically real
Existing mode is similar with technique effect, repeats no more here.
The embodiment of the present invention 12 provides a kind of CDN Edge Server, the CDN limit that the present embodiment provides
The structure of edge server is identical with the CDN Edge Server shown in Figure 15, refer to Figure 15, this enforcement
In example, described acquisition module 21 is additionally operable to: the recommendation temperature of the alternating content in acquisition alternating content queue
With access temperature;Described caching replacement module 22, is additionally operable to: according to the time in described alternating content queue
Recommendation temperature and the access temperature of selecting content carry out caching and replace described alternating content queue.
Optionally, described caching replacement module 22 specifically for: if the candidate in described alternating content queue
The size of content is more than or equal to the 3rd threshold value, it is determined that the access to the tail of the queue of described alternating content queue
The alternating content that temperature is less is eliminated;Relatively described alternating content queue has identical access temperature
The recommendation temperature of alternating content, eliminate described in there is recommendation temperature in the alternating content of identical access temperature
Less alternating content, until the size of the alternating content in described alternating content queue is less than the 4th threshold value,
Then stopping eliminating described alternating content queue, described 4th threshold value is less than or equal to described 3rd threshold
Value.
Optionally, described caching replacement module 22 specifically for: if the candidate in described alternating content queue
The size of content is more than or equal to the 3rd threshold value, it is determined that the access to the tail of the queue of described alternating content queue
The alternating content that temperature is less is eliminated;Alternating content in tail of the queue according to described alternating content queue
Access temperature and recommend temperature, calculating the comprehensive temperature of alternating content in the tail of the queue of described alternating content queue;
Eliminate the alternating content that in the tail of the queue of described alternating content queue, the comprehensive temperature of alternating content is less, until
The size of the alternating content in described alternating content queue is less than the 4th threshold value, then stop in described candidate
Holding queue to eliminate, described 4th threshold value is less than or equal to described 3rd threshold value.
In the present embodiment, described acquisition module 21 specifically for: according to the time in described alternating content queue
The history selecting content accesses situation and generates the access temperature of the alternating content in described alternating content queue;Connect
Receiving the recommendation temperature of the described alternating content that commending system sends, the recommendation temperature of described alternating content is institute
State what commending system generated according to the recommended case of described alternating content.
The CDN Edge Server that the present embodiment provides, the method that can be used for performing embodiment seven, specifically real
Existing mode is similar with technique effect, repeats no more here.
The structural representation of the Edge Server of a kind of CDN that Figure 16 provides for the embodiment of the present invention 13,
As shown in figure 16, the CDN Edge Server that the present embodiment provides includes: receiver module 31, process mould
Block 32, more new module 33 and caching replacement module 34.
Receiver module 31, for receiving the content acquisition request that client sends, described content acquisition request
Include the identification information of content to be visited;
Processing module 32, for determining described content to be visited according to the identification information of described content to be visited
Whether in the cache contents queue of oneself, if described content to be visited is in described cache contents queue,
Then return described content to be visited to described client;
More new module 33, for updating the access temperature of described content to be visited, and according to described to be visited
The access temperature of content and recommendation temperature calculate the temperature information of described content to be visited, visit according to described waiting
Ask cache contents queue described in the temperature information updating of content;
Caching replacement module 34, is used for when needs carry out caching replacement to described cache contents queue, root
According to the temperature information of cache contents in described cache contents queue, eliminate temperature in described cache contents queue
Less cache contents.
If the identification information of described content to be visited is not in described cache contents queue, described processing module
32 are additionally operable to: determine that whether described content to be visited is described according to the identification information of described content to be visited
In the alternating content queue of CDN Edge Server;If described content to be visited is in described alternating content queue
In, then update the access temperature of described content to be visited, according to the access temperature of described content to be visited and
Temperature is recommended to determine the temperature information of described content to be visited;Temperature information according to described content to be visited
Judge that whether the temperature of described content to be visited is more than the heat degree threshold preset;If described content to be visited
Temperature is more than described heat degree threshold, then add in described cache contents queue by described content to be visited,
And from described alternating content queue, delete described content to be visited;Wait to visit to described in the return of described client
Ask the IP address of the original server at content server place.
If described content to be visited is not in described alternating content queue, described processing module 32 is additionally operable to:
Described content to be visited is added in described alternating content queue;Update the access of described content to be visited
Temperature, according to the temperature of described content to be visited and the recommendation temperature of described content to be visited determine described in treat
Access the temperature information of content, according to alternating content team described in the temperature information updating of described content to be visited
Row;The IP address of the original server at described content server place to be visited is returned to described client.
If the temperature of described content to be visited is less than or equal to described heat degree threshold, the most described processing module 32
It is additionally operable to: according to alternating content queue described in the temperature information updating of described content to be visited;To described visitor
Family end returns to the IP address of the original server at described content server place to be visited.
Optionally, described caching replacement module 34 is additionally operable to: when described alternating content queue is carried out by needs
When caching is replaced, according to the temperature information of alternating content in described alternating content queue, eliminate described candidate
The alternating content that in content queue, temperature is less.
The CDN Edge Server that the present embodiment provides, can be used for performing embodiment eight and the side of embodiment nine
Method, specific implementation is similar with technique effect, repeats no more here.
The structural representation of the CDN Edge Server that Figure 17 provides for the embodiment of the present invention 14, such as figure
Shown in 17, the present embodiment provide CDN Edge Server 400 include: processor 41, memorizer 42,
Communication interface 43 and system bus 44, described memorizer 42 and described communication interface 43 are by described system
System bus 44 is connected with described processor 41 and communicates;Described memorizer 42, is used for storing computer and holds
Row instruction;Described communication interface 43 is used for and other equipment communicate, described processor 41, is used for
Run described computer executed instructions, method described under performing:
Obtain the recommendation temperature of the cache contents in cache contents queue and access temperature;
Access temperature according to the cache contents in described cache contents queue and recommendation temperature are to described caching
Content queue carries out caching and replaces.
Optionally, described processor 41 is according to the access temperature of the cache contents in described cache contents queue
Replace with recommending temperature that described cache contents queue carries out caching, if particularly as follows: described cache contents team
The size of the cache contents in row is more than or equal to first threshold, it is determined that to described cache contents queue
The cache contents that tail of the queue accesses temperature less is eliminated;Then, the team of relatively described cache contents queue
Tail has the recommendation temperature of the cache contents of identical access temperature, eliminate described in there is identical access temperature
Cache contents is recommended the cache contents that temperature is less, until the cache contents in described cache contents queue
Size less than Second Threshold, then stop described cache contents queue is eliminated, described Second Threshold
Less than or equal to described first threshold.
Optionally, described processor 41 is according to the access temperature of the cache contents in described cache contents queue
Replace with recommending temperature that described cache contents queue carries out caching, if particularly as follows: described cache contents team
The size of the cache contents in row is more than or equal to first threshold, it is determined that to described cache contents queue
The cache contents that the access temperature of tail of the queue is less is eliminated;Then, according to described cache contents queue
The access temperature of the cache contents of tail of the queue and recommendation temperature, calculate in the tail of the queue of described cache contents queue slow
Deposit the comprehensive temperature of content;Finally, comprehensive temperature in the tail of the queue of described cache contents queue is eliminated less
Cache contents, until the size of the cache contents in described cache contents queue is less than Second Threshold, then stops
Only eliminating described cache contents queue, described Second Threshold is less than or equal to described first threshold.
In the present embodiment, described processor 41 obtains the recommendation temperature of the cache contents in cache contents queue
With access temperature, particularly as follows: access situation according to the history of the cache contents in described cache contents queue
Generate the access temperature of cache contents in described cache contents queue;Receive the described of commending system transmission
The recommendation temperature of the cache contents in cache contents queue, the cache contents in described cache contents queue
Recommending temperature is that described commending system is raw according to the recommended case of the cache contents in described cache contents queue
Become.
Described processor 41 is additionally operable to: the recommendation temperature of the alternating content in acquisition alternating content queue and visit
Ask temperature;Recommendation temperature according to the alternating content in described alternating content queue and access temperature are to described
Alternating content queue carries out caching and replaces.
Optionally, described processor 41 is according to the recommendation temperature of the alternating content in described alternating content queue
With accessing temperature, described alternating content queue is carried out caching replacement, if particularly as follows: described alternating content team
The size of the alternating content in row is more than or equal to the 3rd threshold value, it is determined that to described alternating content queue
The alternating content that the access temperature of tail of the queue is less is eliminated;Then, compare in described alternating content queue
There is the recommendation temperature of the alternating content of identical access temperature, eliminate described in there is the time of identical access temperature
Select and content is recommended the alternating content that temperature is less, until the alternating content in described alternating content queue
Size is less than the 4th threshold value, then stop eliminating described alternating content queue, and described 4th threshold value is little
In or equal to described 3rd threshold value.
Optionally, described processor 41 is according to the recommendation temperature of the alternating content in described alternating content queue
With accessing temperature, described alternating content queue is carried out caching replacement, if particularly as follows: described alternating content team
The size of the alternating content in row is more than or equal to the 3rd threshold value, it is determined that to described alternating content queue
The alternating content that the access temperature of tail of the queue is less is eliminated;Then, according to described alternating content queue
In tail of the queue, the access temperature of alternating content and recommendation temperature, calculate in the tail of the queue of described alternating content queue and wait
Select the comprehensive temperature of content;Finally, alternating content comprehensive in the tail of the queue of described alternating content queue is eliminated
The alternating content that temperature is less, until the size of the alternating content in described alternating content queue is less than the 4th
Threshold value, then stop eliminating described alternating content queue, and described 4th threshold value is less than or equal to described
3rd threshold value.
In the present embodiment, described processor 41 obtains the recommendation temperature of the alternating content in alternating content queue
With access temperature, particularly as follows: access situation according to the history of the alternating content in described alternating content queue
Generate the access temperature of alternating content in described alternating content queue;Receive the described of commending system transmission
The recommendation temperature of alternating content, the recommendation temperature of described alternating content is that described commending system is according to described time
The recommended case selecting content generates.
The CDN Edge Server of the present embodiment, can be used for performing embodiment six and the method for embodiment seven,
Specific implementation is similar with technique effect, repeats no more here.
The structural representation of the CDN Edge Server that Figure 18 provides for the embodiment of the present invention 15, such as figure
Shown in 18, the present embodiment provide CDN Edge Server 500 include: processor 51, memorizer 52,
Communication interface 53 and system bus 54, described memorizer 52 and described communication interface 53 are by described system
System bus 54 is connected with described processor 51 and communicates;Described memorizer 52, is used for storing computer and holds
Row instruction;Described communication interface 53 is used for and other equipment communicate, described processor 51, is used for
Run described computer executed instructions, method described under performing:
Receiving the content acquisition request that client sends, described content acquisition request includes content to be visited
Identification information;
Identification information according to described content to be visited determines that described content to be visited is whether at the caching of oneself
In content queue;
If described content to be visited is in described cache contents queue, then treat to described in the return of described client
Access content;
Update the access temperature of described content to be visited, and according to the access temperature of described content to be visited and
Temperature is recommended to calculate the temperature information of described content to be visited, according to the temperature information of described content to be visited
Update described cache contents queue;
When needs carry out caching replacement to described cache contents queue, according in described cache contents queue
The temperature information of cache contents, eliminates the cache contents that in described cache contents queue, temperature is less.
If the identification information of described content to be visited is not in described cache contents queue, described processor 51
It is additionally operable to: determine that whether described content to be visited is described according to the identification information of described content to be visited
In the alternating content queue of CDN Edge Server;If described content to be visited is in described alternating content queue
In, then update the access temperature of described content to be visited, according to the access temperature of described content to be visited and
Temperature is recommended to determine the temperature information of described content to be visited;Temperature information according to described content to be visited
Judge that whether the temperature of described content to be visited is more than the heat degree threshold preset;If described content to be visited
Temperature is more than described heat degree threshold, then add in described cache contents queue by described content to be visited,
And from described alternating content queue, delete described content to be visited;Wait to visit to described in the return of described client
Ask the IP address of the original server at content server place.
If described content to be visited is not in described alternating content queue, described processor 51 is additionally operable to: will
Described content to be visited is added in described alternating content queue;Update the access heat of described content to be visited
Degree, according to the temperature of described content to be visited and the recommendation temperature of described content to be visited determine described in wait to visit
Ask the temperature information of content, according to alternating content queue described in the temperature information updating of described content to be visited;
The IP address of the original server at described content server place to be visited is returned to described client.
If the temperature of described content to be visited is less than or equal to described heat degree threshold, the most described processor 51 is also
For: according to alternating content queue described in the temperature information updating of described content to be visited;To described client
End returns to the IP address of the original server at described content server place to be visited.
Described processor 51 is additionally operable to: when needs carry out caching replacement to described alternating content queue, root
According to the temperature information of alternating content in described alternating content queue, eliminate temperature in described alternating content queue
Less alternating content.
The structural representation of the commending system that Figure 19 provides for the embodiment of the present invention 16, as shown in figure 19,
The commending system 600 that the present embodiment provides includes: processor 61, memorizer 62, communication interface 63 and
System bus 64, described memorizer 62 and described communication interface 63 are by described system bus 64 and institute
State processor 61 connect and communicate;Described memorizer 62, is used for storing computer executed instructions;Described
Communication interface 63 is used for and other equipment communicate, described processor 61, is used for running described calculating
Machine performs instruction, method described under performing:
The mark of the cache contents in the cache contents queue that reception CDN sends, according to described cache contents
Mark and all content storehouse obtain described cache contents information, by mark and the institute of described cache contents
The information stating cache contents adds cache contents storehouse to;
When described commending system receives the recommendation request message that client sends, according to obtain in advance
User interest profile and described all content storehouse, use the first proposed algorithm to be calculated the first recommendation results;
The second recommendation results is obtained according to described cache contents storehouse;
According to default blending algorithm, described first recommendation results and described second recommendation results are melted
Close, obtain target recommendation results;
Described target recommendation results is pushed to targeted customer.
Optionally, described processor 61 obtains the second recommendation results according to described cache contents storehouse, particularly as follows:
According to described user interest profile and described cache contents storehouse, the second proposed algorithm is used to be calculated described
Second recommendation results.
Optionally, described processor 61 obtains the second recommendation results according to described cache contents storehouse, particularly as follows:
Select to belong to the content recommendation in described cache contents storehouse from described first recommendation results, by selected recommendation
Content is as described second recommendation results.
Optionally, described processor 61 according to default blending algorithm to described first recommendation results and described
Second recommendation results merges, and obtains target recommendation results, particularly as follows: determine that described first recommends knot
Content recommendation common in fruit and described second recommendation results;Delete described from described first recommendation results
Common content recommendation, obtains the 3rd recommendation results;According to the score of content recommendation, push away described second
Recommend the unification of the content recommendation in result and described 3rd recommendation results to be ranked up;By in the recommendation after sequence
Hold as described target recommendation results, or, according to default algorithm content recommendation after described sequence
Middle selection part content recommendation is as described target recommendation results.
Optionally, described processor 61 according to default blending algorithm to described first recommendation results and described
Second recommendation results merges, and obtains target recommendation results, particularly as follows: determine that described first recommends knot
Content recommendation common in fruit and described second recommendation results;Delete described from described first recommendation results
Common content recommendation, obtains the 3rd recommendation results;A%*k is selected from described 3rd recommendation results
Content recommendation, wherein, k is the number of the content recommendation that described target recommendation results includes, a is more than
In 0 less than or equal to 100;K content recommendation of (1-a%) * is selected from described second recommendation results;Root
According to the score of content recommendation, to the content recommendation selected from described 3rd recommendation results with from described second
The content recommendation selected in recommendation results carries out unifying sequence, using the content recommendation after unified sequence as institute
State target recommendation results.
Wherein, described processor 61 selects a%*k content recommendation from described 3rd recommendation results, tool
Body is: be ranked up the content recommendation in described 3rd recommendation results according to the score of content recommendation, from
Preceding a%*k the content recommendation of selected and sorted in described 3rd recommendation results after sequence.Described process
Device 61 selects k content recommendation of (1-a%) * from described second recommendation results, particularly as follows: according to pushing away
Content recommendation in described second recommendation results is ranked up by the score recommending content, described in after sequence
Selected and sorted preceding (1-a%) k content recommendation of * in second recommendation results.
Optionally, described common content recommendation deleted from described first recommendation results by described processor 61
Afterwards, it is additionally operable to: improve the score of the described common content recommendation that described second recommendation results includes.
Optionally, described processor 61 according to default blending algorithm to described first recommendation results and described
Second recommendation results merges, and obtains target recommendation results, particularly as follows: determine that described first recommends knot
Content recommendation common in fruit and described second recommendation results;Delete described from described second recommendation results
Common content recommendation, obtains the 4th recommendation results;According to the score of content recommendation, push away described first
Recommend the unification of the content recommendation in result and described 4th recommendation results to be ranked up;By in the recommendation after sequence
Hold as described target recommendation results, or, according to default algorithm content recommendation after described sequence
Middle selection part content recommendation is as described target recommendation results.
Optionally, described processor 61 according to default blending algorithm to described first recommendation results and described
Second recommendation results merges, and obtains target recommendation results, particularly as follows: determine that described first recommends knot
Content recommendation common in fruit and described second recommendation results;Delete described from described second recommendation results
Common content recommendation, obtains the 4th recommendation results;A%*k is selected from described first recommendation results
Content recommendation, wherein, k is the number of the content recommendation that described target recommendation results includes, a is more than
In 0 less than or equal to 100;K content recommendation of (1-a%) * is selected from described 4th recommendation results;Root
According to the score of content recommendation, to the content recommendation selected from described first recommendation results with from the described 4th
The content recommendation selected in recommendation results carries out unifying sequence, and using the content recommendation after unified sequence as
Described target recommendation results.
Wherein, described processor 61 selects a%*k content recommendation from described first recommendation results, tool
Body is: be ranked up the content recommendation in described first recommendation results according to the score of content recommendation, from
Preceding a%*k the content recommendation of selected and sorted in described first recommendation results after sequence.Described process
Device 61 selects k content recommendation of (1-a%) * from described 4th recommendation results, particularly as follows: according to recommendation
Content recommendation in described 4th recommendation results is ranked up by the score of content, described the after sequence
Four recommendation results select k content recommendation of (1-a%) *.
Optionally, described common content recommendation deleted from described second recommendation results by described processor 61
Afterwards, it is additionally operable to: improve the score of the described common content recommendation that described first recommendation results includes.
Optionally, described processor 61 is additionally operable to: according to pushing away of all content in described all content storehouse
Situation of recommending generates recommends temperature storehouse, in described recommendation temperature storehouse includes the entirety in described all content storehouse
Hold the recommendation temperature in Preset Time;It is sent to described CDN by recommending all the elements in temperature storehouse.
Accordingly, described processor 61 according to default blending algorithm to described first recommendation results and described second
Recommendation results merges, and after obtaining target recommendation results, is additionally operable to: recommend knot according to described target
Fruit updates described recommendation temperature storehouse.
In the present embodiment, the front P% that cache contents is described cache contents queue that described CDN sends
Content, or, for the content of front P% of described cache contents queue relative to the increasing of the content sent last time
Amount data, wherein, P is less than 100 more than 0.
The commending system that the present embodiment provides, the method that can be used for performing embodiment one to embodiment five, tool
Body implementation is similar with technique effect, repeats no more here.
One of ordinary skill in the art will appreciate that: realize all or part of step of above-mentioned each method embodiment
Suddenly can be completed by the hardware that programmed instruction is relevant.Aforesaid program can be stored in a computer can
Read in storage medium.This program upon execution, performs to include the step of above-mentioned each method embodiment;And
Aforesaid storage medium includes: ROM, RAM, magnetic disc or CD etc. are various can store program code
Medium.
Last it is noted that various embodiments above is only in order to illustrate technical scheme, rather than right
It limits;Although the present invention being described in detail with reference to foregoing embodiments, this area common
Skilled artisans appreciate that the technical scheme described in foregoing embodiments still can be modified by it,
Or the most some or all of technical characteristic is carried out equivalent;And these amendments or replacement, and
The essence not making appropriate technical solution departs from the scope of various embodiments of the present invention technical scheme.