WO2011044829A1 - 资源缓存方法、资源获取方法及其装置、系统 - Google Patents

资源缓存方法、资源获取方法及其装置、系统 Download PDF

Info

Publication number
WO2011044829A1
WO2011044829A1 PCT/CN2010/077639 CN2010077639W WO2011044829A1 WO 2011044829 A1 WO2011044829 A1 WO 2011044829A1 CN 2010077639 W CN2010077639 W CN 2010077639W WO 2011044829 A1 WO2011044829 A1 WO 2011044829A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
cache
server
cache server
database
Prior art date
Application number
PCT/CN2010/077639
Other languages
English (en)
French (fr)
Inventor
兰刚
王瑞
公晨
周树国
Original Assignee
成都市华为赛门铁克科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 成都市华为赛门铁克科技有限公司 filed Critical 成都市华为赛门铁克科技有限公司
Publication of WO2011044829A1 publication Critical patent/WO2011044829A1/zh
Priority to US13/446,777 priority Critical patent/US9503518B2/en
Priority to US15/204,816 priority patent/US9882975B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1029Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers using data related to the state of servers by a load balancer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1012Server selection for load balancing based on compliance of requirements or conditions with available server resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1023Server selection for load balancing based on a hash applied to IP addresses or costs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data

Definitions

  • the present application claims to be submitted to the Chinese Patent Office on October 13, 2009, the application number is 200910207231.9, and the invention name is "resource caching method, resource acquisition method and device thereof, system” Priority of Chinese Patent Application, the entire contents of which is incorporated herein by reference.
  • the present invention relates to the field of storage technologies, and in particular, to a resource cache method, a resource acquisition method, an apparatus, and a system thereof.
  • the scheduling server in the resource caching system determines whether the access times of the resources reach a preset threshold according to the access heat of the resources, and the access heat of the resources reaches the heat threshold.
  • the embodiment of the invention provides a resource caching method, including:
  • Receiving a resource query request querying the database according to the resource query request and determining that the resource requested by the user is cached; receiving information of all cache servers buffered by the database and all cache servers having resources cached; The information of all the cache servers of the resource and the load value of all cache servers that have the resources cached selects the target download cache server to notify the user to download the resources from the target download cache server.
  • the embodiment of the invention provides a resource cache device, including:
  • An obtaining module configured to acquire a access heat value of the resource from the database every first predetermined time, and obtain a load value of the cache server from the database if the access heat value reaches a preset first threshold; the first determining module a copy cache server for determining a copy resource according to the access heat value and the load value; the first notification module is configured to notify the copy cache server from the cache that holds the resource The resources are copied and cached in the server.
  • the embodiment of the invention further provides a resource cache system, including:
  • the dispatching server configured to obtain the access heat value of the resource from the database every first predetermined time, and determine that the access heat value reaches a preset first threshold
  • the cache server is used to The resources are copied and cached from the cache server that holds the resources under the control of the dispatch server.
  • FIG. 1 is a schematic structural diagram of a resource cache system in the prior art
  • FIG. 5 is a flowchart of a resource acquisition method according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a resource cache apparatus according to an embodiment of the present invention.
  • FIG. 9 is a schematic diagram of a resource cache system according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a P2P cache system according to an embodiment of the present invention.
  • the carrier-class resource cache system includes dozens of cache servers, each of which carries different resources and provides services for tens of thousands of online users.
  • Each cache server can generally load up to 1000 to 2000 users.
  • a certain resource exists only on one cache server, there is no hot content processing mechanism, and no multiple backup resources are stored in other cache servers.
  • resource A and resource B are cached in cache server 1
  • resource F and resource X are cached in cache server 2.
  • the resource ⁇ , resource ⁇ , and resource ⁇ are cached in the cache server ⁇ . If the user wants to download the resource F, the user can only download it from the cache server 2.
  • Step 201 The scheduling server acquires the access heat value of the resource from the database every first predetermined time (for example, 10 seconds), and determines whether the access heat value reaches a preset first threshold, and determines that the access heat value reaches a preset value.
  • first predetermined time for example, 10 seconds
  • the load value of the cache server is obtained from the database; in the embodiment of the present invention, the load value of the cache server obtained from the database may not include the cache server that currently caches the resource itself.
  • Step 202 The scheduling server determines, according to the access heat value and the load value, a replication cache server that copies the resource, that is, the scheduling server selects one of the cache servers other than the cache server that caches the resource itself to copy the resource. Server.
  • the cache server that replicates the resource is simply referred to as a copy cache server.
  • Step 203 The scheduling server notifies the replication cache server to copy the resource from the cache server that holds the resource and cache.
  • Step 301 The user sends a resource download request to the source station server.
  • Step 302 The detection server of the resource cache system acquires a resource download request sent by the user to the source station server, and sends a resource query request to the scheduling server.
  • Step 303 The scheduling server queries the database according to the resource query request whether the resource is cached in the cache server of the resource cache system, and instructs the database to increase the access heat value of the resource by one, where the access heat value is determined according to a predetermined algorithm. For example, determining the access popularity value of the resource according to the number of downloads of the resource and the download time of each download of the resource;
  • Step 304 The database queries whether the resource has been cached, and updates the access heat value of the resource. The database does not cache the resource, so the uncached response message is sent to the scheduling server.
  • Step 305 After receiving the uncached response message, the scheduling server forwards the uncached response message to the redirecting server.
  • Step 306 The redirect server responds to the uncached response message. Since the resource is not cached in the resource cache system, the redirect operation is not required, and the user still downloads the resource from the source server (external network).
  • Step 307 after the user download is completed, the source station server sends a download completion message to the user;
  • the resource cache system downloads resources with a large number of downloads by users to a cache server, and subsequent users download the resources from the cache server;
  • Step 308 The scheduling server queries the database for the access heat value of the resource.
  • the scheduling server queries the database for the access heat value of the resource at a certain time.
  • the scheduling server may query the access heat value of all resources, or query the access heat value of a current resource separately.
  • the access popularity value includes: the number of downloads and the download time;
  • Step 309 the database returns an access heat value of the resource, where the access heat value may include information such as the number of downloads of the query resource and the download time;
  • Step 310 The scheduling server calculates the number of downloads of the queried resources in the unit time according to the number of downloads and the download time, and determines whether the corresponding access heat value reaches the threshold according to the number of downloads of the queried resources in the unit time, that is, whether the user is judged whether The resource is downloaded in a large amount from the cache server that caches the resource.
  • the resource in the above case is called a hotspot resource. If the scheduling server determines that the access heat value does not reach the preset threshold, no operation is performed.
  • the database is queried for the load value of each cache server (excluding the cache server that has cached the resource); wherein all cache servers write their own load values to the database at regular intervals. , for scheduling server queries, for example, all cache servers write their own load values to the database every 5 seconds;
  • Step 312 The scheduling server determines, according to the access heat value of the resource and the load value of each cache server, a replication cache server that copies the resource. Further, the scheduling server may select a server with a lower load according to the access heat value and the load value to copy the resource. ; Specifically, in step 312, the scheduling server selects a server with a lower load, and specifically includes the following processing: 1. The scheduling server first determines the number of downloads of the resource in a unit time according to the access heat value of the resource, and according to the resource in the unit time. The number of downloads determines the level of the number of times the resource is downloaded per unit time; 2. The scheduling server sorts all cache servers except the cache server that has cached the resource according to the load value, and obtains the sort result; 3.
  • determining the number of copies of the cache server according to the level of the number of downloads includes: The more downloads of the resource per unit time, the higher the level of download times per unit time, and the more the number of cache servers selected.
  • the scheduling server determines the level of downloading the number of resources per unit time
  • the number of idle servers is determined according to the load value
  • the number of copies of the resources is determined according to the number of idle servers.
  • the server is scheduled. It is possible to schedule a free cache server to replicate hotspot resources to the source server.
  • Step 314 The replication replication cache server that completes the replication sends a replication completion notification to the cache server that has cached the resource.
  • the scheduling server writes the replication completion notification and the replication information to the database, wherein the replication information is information of the replication cache server in which the resource is cached.
  • the database can query which cache servers the cache of the resource is cached according to the replication information of the resource.
  • the technical solution adopted by the embodiment of the present invention discards the practice that hotspot resource access can only be borne by a single cache server. Automatically copy hotspot data to multiple free cache servers, so that multiple cache servers can provide the load together and fully utilize the cache server resources.
  • the service for providing hotspot resources to the user is not interrupted. Since multiple cache servers provide services together, the pressure on the export bandwidth can be reduced, and the pressure on the export bandwidth is prevented from increasing suddenly, thereby improving the system. Reliability and scalability.
  • the system determines the number of copies of the resource to be retained according to the access heat of the resource. Then, the resources in the cache server with higher load values are deleted according to the determined number of copies that need to be reserved, and according to the load values of the respective cache servers. Achieve the goal of optimizing system resources.
  • FIG. 4 is a signaling flowchart of the hotspot resource space recovery according to the embodiment of the present invention. As shown in FIG. 4, the following processing is included: Step 401, scheduling The server obtains the replication information of the resource and the access heat value of the resource from the database at a certain time.
  • the resource is one or more hotspot resources.
  • Step 402 The database returns, to the scheduling server, the replication information of the hotspot resource and the access heat value, where the access heat value includes the download times and the download time.
  • Step 403 The scheduling server determines whether the access heat value of the hotspot resource reaches a preset first threshold, and if the preset first threshold is reached, no processing is performed, if the hotspot resource access heat value does not reach the preset first Threshold, the scheduling server queries the database for the load value of all cache servers that cache hotspot resources according to the replication information of the hotspot resource;
  • Step 405 The scheduling server determines, according to the access heat value of the hotspot resource, the number of downloads of the hotspot resource in a unit time, determines the level of the hotspot resource download times according to the number of downloads per unit time, and determines the number of copies of the hotspot resource to be copied according to the level. Then, the scheduling server determines, according to the load value of all the cache servers that cache the hotspot resources and the number of copies of the hotspot resource to save the cached server that caches the hotspot resource with the third threshold whose load is higher than the preset third threshold, and then schedules the server.
  • the resource download request sent by the user is not scheduled to be sent to the determined cache server, and the determined cache server is notified to delete the resource after the user downloads the resource; that is, the hot resource on the cache server with relatively high load is preferentially deleted. .
  • Step 406 The determined cache server deletes the hotspot resource after the user downloads the resource, and returns a delete complete message to the scheduling server.
  • Step 501 Receive a resource query request, query the database according to the resource query request, and determine that the resource requested by the user is cached.
  • Step 502 Receive information about all cache servers that have resources stored in the database and load values of all cache servers that have resources cached.
  • Step 503 Select a target download cache server according to information of all cache servers that have resources cached and load values of all cache servers that have resources cached, and notify the user to download resources from the target download cache server. Specifically, the user may be notified by the redirect server to download the resource from the target download cache server.
  • the user can download resources from multiple cache servers in the system.
  • the user can download from other cache servers that cache the resources, thereby improving the efficiency of downloading resources by users. speed.
  • Step 601 The user sends a resource download request to the source station server.
  • Step 602 The detection server of the resource cache system acquires a resource download request sent by the user to the source station server, and sends a resource query request to the scheduling server.
  • Step 603 The scheduling server queries the database according to the resource query request whether the resource is cached in the cache server of the resource cache system, and instructs the database to increase the access heat value of the resource by one;
  • Step 604 The database queries whether the resource has been cached, and updates the access popularity value of the resource. After determining that the resource has been cached, determine which cache servers the resource is cached, and send information of all cache servers that cache the resource to the dispatch server;
  • Step 606 The database feeds back to the scheduling server, the load value of all cache servers that cache the resource;
  • Step 607 The scheduling server selects a cache server that caches the resource with the lowest load value as the target download cache server, and notifies the redirect server of the information of the target download cache server. Step 608, the redirect server redirects the resource download request of the user. Download the cache server to the target;
  • Step 609 the user connects to the target download cache server, and downloads the resource from the target download cache server.
  • the embodiments of the present invention can be widely applied to various application scenarios in which data is automatically copied between different cache servers in a resource cache system, and different application functions can be implemented through automatic replication.
  • application functions including but not It is limited to the following application functions: 1. It is used to solve the problem of dynamic expansion of the content caching system. When the performance or capacity of the cache server is insufficient, the cache server is dynamically added without affecting the normal operation of the system. 2.
  • anti-virus used to solve the problem of dynamic migration of the resource cache system, for example, by file access hot server storage
  • 4 used to solve the resource cache system content classification storage problem, for example, automatically migrate to different file accesses Different application servers.
  • FIG. 7 is a schematic diagram of a resource cache device according to an embodiment of the present invention. As shown in FIG. The obtaining module 70, the first determining module 72, and the first notification module 74 are obtained.
  • the resource buffering device of the embodiment of the present invention will be described in detail below. It should be noted that, in the embodiment of the present invention, the resource cache device may be a scheduling server.
  • the obtaining module 70 is configured to obtain an access heat value of the resource from the database every first predetermined time (for example, 10 seconds), and obtain a cache from the database if it is determined that the access heat value reaches a preset first threshold.
  • the load value of the server In the embodiment of the present invention, the load value of the cache server obtained from the database may not include the cache server that currently caches the resource itself.
  • the first determining module 72 determines the copy cache server of the copy resource according to the access heat value and the load value. Specifically, the first determining module 72 further includes: a determining submodule, a sorting module, and a selecting module.
  • the first notification module 74 After the first determining module 72 determines the copy cache server of the copy resource, the first notification module 74 notifies the copy cache server to copy the resource from the cache server that holds the resource and cache.
  • the system determines the number of copies of the resource to be retained according to the access heat of the resource. Then, the resources in the cache server with higher load values are deleted according to the determined number of copies that need to be reserved, and according to the load values of the respective cache servers. Achieve the goal of optimizing system resources.
  • the resource cache device further includes: a second determining module, a second notification module, a first receiving module, and an updating module.
  • the second determining module determines at least one cache server in the cache server that caches resources when the access heat value of the resource saved in the replication cache server is lower than a first threshold; specifically, the second determining module Determining the number of times the hotspot resource is downloaded in a unit time according to the access heat value of the hotspot resource, determining the level of the hotspot resource downloading number according to the number of downloads per unit time, and determining the number of copies of the hotspot resource to be copied according to the level; subsequently, the second The determining module determines, according to the load value of all the cache servers that cache hotspot resources and the number of copies of the hotspot resource save copy, at least one cache server that caches hotspot resources with a load higher than a preset third threshold.
  • the second notification module notifies the determined cache server to delete the resource after the user downloads the resource; the cache server deletes the hotspot resource after the user downloads the resource, and returns a delete complete message to the first receiving module of the scheduling server.
  • the first receiving module receives the deletion completion message sent by the cache server; the update module is configured to write the deletion completion message into the database, and update the replication information of the resources in the database.
  • FIG. 8 is a schematic diagram of a resource acquisition apparatus according to an embodiment of the present invention.
  • a resource acquisition apparatus according to an embodiment of the present invention includes: a second receiving module. 80.
  • the resource acquisition apparatus according to the embodiment of the present invention will be described in detail. It should be noted that the resource obtaining apparatus in the embodiment of the present invention is a scheduling server.
  • the user sends a resource download request to the source station server
  • the detection server of the resource cache system acquires the resource download request sent by the user to the source station server, and sends a resource query request to the scheduling server
  • the second receiving module 80 of the scheduling server Receiving a resource query request
  • the third determining module 81 queries the database according to the resource query request and determines that the resource requested by the user is cached; after the database determines that the resource has been cached, determining which cache servers the resource is cached in And sending, to the scheduling server, all the information of the cache server that caches the resource, and the third receiving module 82 of the scheduling server receives the information of all the cache servers that are cached by the database and that have the resources cached.
  • the fourth determining module 83 selects the target download cache server according to the information of all the cache servers in which the resources are cached and the load values of all the cache servers in which the resources are cached;
  • the module 84 notifies the redirect server of the information of the target download cache server, and the redirect server redirects the user's resource download request to the target download cache server, and then the user can connect to the target download cache server and from the target Download the resource in the download cache server.
  • FIG. 9 is a schematic diagram of a resource cache system according to an embodiment of the present invention.
  • a resource cache system according to an embodiment of the present invention includes: a database 90, a scheduling server. 92. Cache server 94.
  • the resource cache system of the embodiment of the present invention will be described in detail below.
  • the scheduling server 92 acquires the access heat value of the resource from the database 90 every first predetermined time (for example, 10 seconds), and determines whether the access heat value reaches a preset first threshold, and determines that the access heat value reaches a preset value.
  • the load value of each cache server 94 is obtained from the database 90; subsequently, the dispatch server 92 determines at least one cache server 94 that replicates the resource based on the access heat value and the load value; under the control of the dispatch server 92 At least one cache server 94 copies the resource from the cache server that holds the resource and caches it.
  • the database 90 is used to store the access heat value of the resource and the load value of the cache server 94. In the embodiment of the present invention, the database 90 can also be used to store copy information of all resources.
  • the resource cache system server load is offloaded through the hotspot resource replication mechanism of the resource cache system, so that the access of the hotspot resource does not cause a system bottleneck.
  • the processing procedure of the user requesting to download the uncached resource the case where the user requests to download the cached resource, and the processing procedure of the resource space recovery mechanism are described in detail in the embodiment of the present invention.
  • the user sends a resource download request to the source station server, and the detection server of the resource cache system acquires the resource download request sent by the user to the source station server, and sends a resource query request to the dispatch server 92.
  • the dispatch server 92 queries its database 90 based on the resource query request whether the resource has been cached in the cache server 94 of the resource cache system and instructs the database 90 to increment the access heat value of the resource by one.
  • the database 90 queries whether the resource has been cached and updates the access popularity value for the resource. Since the database 90 queries that the resource is not cached, the database 90 sends an uncached response message to the dispatch server 92. After receiving the uncached response message, the dispatch server 92 forwards the uncached response message to the redirect server.
  • the redirect server Since the resource is not cached in the resource cache system, the redirect server does not need to perform the redirect operation, and the user still needs to go from the source server. (External) Download the resource. After the user download is completed, the source station server sends a download completion message to the user; as the number of downloads by the user increases, the resource cache system downloads the resources with more user download times to a cache server 94, and the subsequent users The resource is downloaded from the cache server.
  • the scheduling server 92 queries the database 90 for the access heat value of the resource; the database 90 returns the access heat value of the resource; the scheduling server 92 determines whether the preset first threshold is reached according to the obtained access heat value, that is, whether the user is determined whether The resource is downloaded in a large amount from the cache server that caches the resource.
  • the resource in the above case is a hotspot resource. If the scheduling server 92 determines that the access heat value does not reach the preset first threshold, the resource is not performed.
  • any operation if it is determined that the access heat value reaches the first threshold, query the database 90 for the load value of each cache server 94 (excluding the cache server that has cached the resource); wherein all cache servers 94 are A certain time will write its own load value to the database 90 for the query of the scheduling server 92, for example, all cache servers 94 write their own load values to the database 90 every 5 seconds;
  • the scheduling server 92 determines whether the access heat value reaches the preset threshold value, and specifically includes the following processing: 1.
  • the scheduling server 92 acquires the access heat value of the resource from the database 90 at a certain time, wherein the access heat of the resource The value may be determined according to a predetermined algorithm, for example, determining the access heat value of the resource according to the number of downloads of the resource and the download time of the resource for each download; 2.
  • the scheduling server 92 calculates the resource according to the number of downloads and the download time. The number of downloads, and whether the access popularity value reaches the preset first threshold according to the number of downloads of the resource in the unit time.
  • the scheduling server 92 selects a server with a lower load, and specifically includes the following processing: 1.
  • the scheduling server 92 first determines the number of downloads of the resource in a unit time according to the access heat value of the resource, and according to the number of downloads of the resource in a unit time. Determining the level of the number of times the resource is downloaded in a unit time is another; J. 2.
  • the scheduling server 92 sequentially sorts all the cache servers 94 except the cache server that holds the resource according to the load value to obtain a sort result; 3.
  • the dispatch server 92 The number of cache servers to be copied is determined according to the level of the number of downloads, and the cache server 94 whose load value is lower than a preset second threshold is selected as the copy cache server from the sort result according to the number. Specifically, determining, according to the level of the number of downloads, the number of copies of the cache server to be included includes: the resource in a unit time The more downloads, the higher the number of downloads per unit time, and the more cache servers 94 are selected.
  • At least one copy cache server 94 copies the resource from the cache server that holds the resource and caches; the cache server that holds the resource sends a copy completion notification to at least one copy cache server 94 that completes the copy; at least one copy cache server 94 sends a copy completion notification to the dispatch server 92; the dispatch server 92 takes the copy completion notification sent by at least one copy cache server 94.
  • the scheduling server 92 writes the replication completion notification and the replication information of the resource to the database 90.
  • the database 90 can query the cache server 94 of the resource according to the replication information of the resource. in.
  • the technical solution adopted by the embodiment of the present invention discards the practice that hotspot resource access can only be borne by a single cache server.
  • Automatically copy hotspot data to multiple free cache servers which allows multiple cache servers to provide the same load and improve system reliability and scalability.
  • concurrent access of hotspot data can be shared by multiple cache servers, and the cache server resources can be fully utilized.
  • the service for providing hotspot resources to users is not interrupted; in addition, because multiple cache servers provide services together, the pressure on the export bandwidth can be reduced, and the pressure on the export bandwidth can be prevented from increasing suddenly.
  • the user sends a resource download request to the source station server; the detection server of the resource cache system acquires the resource download request sent by the user to the source station server, and sends a resource query request to the dispatch server 92; the dispatch server 92 requests the resource query according to the resource query request.
  • the database 90 queries whether the resource has been cached in the cache server 94 of the resource cache system. Subsequently, the dispatch server 92 instructs the database 90 to increment the access heat value of the resource by 1, that is, to update the access heat value of the resource; the database 90 is based on The replication information of the resource queries whether the resource has been cached, and updates the access popularity value of the resource.
  • the database 90 determines in which cache servers 94 the resource is cached, and sends all the information of the cache server 94 that caches the resource to the dispatch server 92; the dispatch server 92 queries the database 90 for all cached resources.
  • the hot-spot resource access multi-node offloading technology satisfies the user's demand for hotspot data access, can solve the system bottleneck problem caused by the hotspot resource access, and maximizes the utilization rate of the cache server 94, and has high scalability. And high reliability.
  • the scheduling server 92 acquires the replication information of the resource and the access heat value of the resource from the database 90 at a certain time.
  • the resource is one or more hotspot resources.
  • the database 90 returns the access heat value of the hotspot resource to the dispatching server 92.
  • the dispatching server 92 determines whether the hotspot value of the hotspot resource reaches a preset threshold. If the preset threshold is reached, no processing is performed, and if the hotspot resource is accessed hot.
  • the dispatch server 92 queries the database 90 for the load value of the cache server 94 that caches the hotspot resource; the database 90 queries all the copy cache servers 94 that cache the hotspot resource according to the copy information of the hotspot resource, and The load value of all the replication cache servers 94 that cache the hotspot resource and the hotspot resource
  • the access heat value is sent to the scheduling server 92; subsequently, the scheduling server 92 determines the number of downloads of the hotspot resource in the unit time according to the access heat value of the hotspot resource (ie, the download time and the number of downloads), and determines the number of downloads according to the unit time.
  • the number of hotspot resource download times is determined, and the number of copies of the hotspot resource is determined according to the level. Then, the scheduling server 92 determines that the hotspot resource needs to be deleted according to the load value of the cache server 94 that caches the hotspot resource and the number of copies of the hotspot resource saved and copied. At least one cache server 94 having a hotspot resource cached with a load value higher than a preset third threshold, and then the dispatch server 92 no longer schedules the resource download request sent by the user to a determined load value higher than a preset value.
  • Hotspot resources The cache server 94 that has at least one load value higher than the preset third threshold deletes the hotspot resource after no user downloads the resource, and returns a delete complete message to the dispatch server 92; the dispatch server 92 writes the delete complete message to the database 90. And update the replication information of the hotspot resource in the database 90.
  • the hot space resource space recovery mechanism can improve the storage space utilization rate and ensure that the storage space is not wasted.
  • the scheduling server 92 determines that the resource P stored in the cache server 4 is a hotspot resource, and calculates the access popularity value of P, and decides to copy the resource P to the two cache servers 94, that is, The cache server 1 and the cache server 2, preferably, are preferentially copied to the idle cache server 94.
  • the dispatch server 92 issues an instruction for the cache server 1 and the cache server 2 to copy the resource P to the local. After the replication of the cache server 1 and the cache server 2 is completed, the dispatch server 92 is notified by notifying the database, and at the same time, the dispatch server 92 is notified which servers can provide the cache resources for the user.
  • the scheduling server 92 can schedule the cache server 1, the cache server 2, and the cache server 4 that can access the resource according to the scheduling algorithm to provide services for the user.
  • the scheduling server reduces the appropriate amount of hotspot file copy according to the state of the cache server 1, the cache server 2, and the cache server 4, without causing waste of resources.
  • FIG. 11 is a schematic structural diagram of a system for classifying and storing resources according to an embodiment of the present invention.
  • the system includes a user 1, a user 2, a user 3, a scheduling server, a general cache server, a media resource cache server, and an Exe resource cache server. Iso resource cache server.
  • the scheduling server copies the hotspot files in the general server according to the file type to the optimized dedicated cache server with different performances through the hotspot scheduling algorithm, and the dedicated cache server provides high-performance data transmission to the user, and fully utilizes different performance servers. Resources to improve overall cache system performance.
  • the above system architecture can be applied to the expansion of the original system, fully utilizing servers of different performances, and saving overall cost.
  • the hotspot resource judgment mechanism is used in the cache system, and the hotspot resource is copied to multiple cache servers to implement access load offloading.
  • the scheduling between servers is implemented by the scheduling server, so that multiple cache servers provide services together, thereby improving the scalability and efficiency of the cache system.
  • When one or more cache servers fail services that provide hotspot resources to users are not interrupted.
  • the pressure on the export bandwidth can be reduced, and the pressure on the export bandwidth can be prevented from increasing suddenly.
  • the utilization of the cache server The hotspot resource space recovery mechanism can improve storage space utilization and ensure that storage space is not wasted. Implement load shunting and automatic cleanup of storage space in the resource cache system.

Landscapes

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

Description

资源緩存方法、 资源获取方法及其装置、 系统 本申请要求于 2009 年 10 月 13 日提交中国专利局、 申请号为 200910207231.9、 发明名称为"资源緩存方法、 资源获取方法及其装置、 系统" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域 本发明实施例涉及存储技术领域, 尤其涉及一种资源緩存方法、 资源获取 方法及其装置、 系统。 背景技术 目前, 资源緩存技术中, 为了降低出口带宽的压力, 资源緩存系统中的调 度服务器会根据资源的访问热度判断该资源的访问次数是否到达预设的阈值, 在资源的访问热度到达热度阈值后,调度服务器根据调度算法调度某一台緩存 服务器下载需要緩存的资源。下载完成后,緩存服务器通知调度服务器的数据 库该资源已被緩存在某一台緩存服务器上,在实际应用中, 系统中只有一个緩 存服务器可以提供緩存。 如果有用户需要下载该资源, 则系统会查询该资源是否已经被系统緩存, 如果已经緩存, 进一步查询緩存该资源的緩存服务器 A的相关信息, 使得用 户可以从緩存服务器 A中下载该资源。 在实现本发明过程中, 发明人发现现有技术中至少存在如下问题: 目前的资源緩存系统中, 不支持多个节点负载分流以及多机热点备份机 制, 如图 1所示, 资源 A、 资源 B緩存于緩存服务器 1 中, 资源 F、 资源 X 緩存在緩存服务器 2中, 资源 N、 资源 P、 资源 0緩存在緩存服务器 n中, 用 户如果想下载资源 F, 只能从一台緩存有该资源的緩存服务器 2中下载, 导致 相对空闲的緩存服务器无法为繁忙的緩存服务器分担负载。此外,如果含有热 点该资源的服务器出现故障,则大量用户只能通过外网下载该资源,造成出口 带宽压力突增。
发明内容
本发明实施例提供一种资源緩存方法、 资源获取方法及其装置、 系统, 能 够减少系统中繁忙的緩存服务器的负载, 减轻出口带宽的压力。
本发明实施例提供一种资源緩存方法, 包括:
每隔第一预定时间从数据库获取资源的访问热度值,并在判断访问热度值 达到预先设置的第一阈值的情况下, 从数据库获取緩存服务器的负载值; 根据 访问热度值以及负载值确定复制资源的复制緩存服务器,并通知复制緩存服务 器从保存有资源的緩存服务器中复制资源并緩存。
本发明实施例提供一种资源获取方法, 包括:
接收资源查询请求,根据资源查询请求向数据库查询并确定用户请求下载 的资源已緩存;接收数据库发送的緩存有资源的所有緩存服务器的信息以及緩 存有资源的所有緩存服务器的负载值;根据緩存有资源的所有緩存服务器的信 息以及緩存有资源的所有緩存服务器的负载值选择目标下载緩存服务器,通知 用户从目标下载緩存服务器中下载资源。
本发明实施例提供一种资源緩存装置, 包括:
获取模块, 用于每隔第一预定时间从数据库获取资源的访问热度值, 并在 判断访问热度值达到预先设置的第一阈值的情况下,从数据库获取緩存服务器 的负载值; 第一确定模块, 用于根据访问热度值以及负载值确定复制资源的复 制緩存服务器; 第一通知模块, 用于通知复制緩存服务器从保存有资源的緩存 服务器中复制资源并緩存。
本发明实施例提供一种资源获取装置, 包括:
第二接收模块, 用于接收资源查询请求; 第三确定模块, 用于根据资源查 询请求向数据库查询并确定用户请求下载的资源已緩存; 第三接收模块, 用于 接收数据库发送的緩存有资源的所有緩存服务器的信息以及緩存有资源的所 有緩存服务器的负载值; 第四确定模块, 用于根据緩存有资源的所有緩存服务 器的信息以及緩存有资源的所有緩存服务器的负载值选择目标下载緩存服务 器; 第三通知模块, 用于通知用户从目标下载緩存服务器中下载资源。
本发明实施例还提供一种资源緩存系统, 包括:
数据库, 用于存储资源的访问热度值以及緩存服务器的负载值; 调度服务 器, 用于每隔第一预定时间从数据库获取资源的访问热度值, 并在判断访问热 度值达到预先设置的第一阈值的情况下, 从数据库获取緩存服务器的负载值, 根据访问热度值以及负载值确定复制资源的复制緩存服务器,并通知复制緩存 服务器从保存有资源的緩存服务器中复制资源; 緩存服务器, 用于在调度服务 器的控制下从保存有资源的緩存服务器中复制资源并緩存。
本发明实施例的源緩存方法、 资源获取方法及其装置、 系统, 通过将热点 资源复制到多个空闲服务器中,克服了现有技术中同一资源只能在一台緩存服 务器中緩存而导致的相对空闲的緩存服务器无法为繁忙的緩存服务器分担负 载的缺陷, 实现了多个緩存服务器共同提供资源下载服务, 能够减少系统中繁 忙的緩存服务器的负载, 减轻出口带宽的压力。
附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地, 下面描 述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出 创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1是现有技术中资源緩存系统的架构示意图;
图 2是本发明实施例的资源緩存方法的流程图;
图 3是本发明实施例的用户请求下载未緩存资源的信令流程图;
图 4是本发明实施例的热点资源空间回收的信令流程图;
图 5是本发明实施例的资源获取方法的流程图;
图 6是本发明实施例的用户请求下载已緩存资源的信令流程图;
图 7是本发明实施例的资源緩存装置的示意图;
图 8是本发明实施例的资源获取装置的示意图;
图 9是本发明实施例的资源緩存系统的示意图;
图 10是本发明实施例的 P2P緩存系统的结构示意图;
图 11是本发明实施例的对资源分类存储的系统结构示意图。
具体实施方式
下面结合附图和具体实施例进一步说明本发明实施例的技术方案。
目前, 电信级资源緩存系统中包括数十台緩存服务器,每个緩存服务器承 载不同的资源, 为数万在线用户提供服务,每台緩存服务器一般最多能够负载 1000至 2000用户访问。 并且, 某一资源只存在于一台緩存服务器上, 没有热 点内容处理机制,不会有多个备份资源存储于其他緩存服务器中。如图 1所示, 资源 A、 资源 B緩存于緩存服务器 1中, 资源 F、 资源 X緩存在緩存服务器 2 中, 资源 Ν、 资源 Ρ、 资源 Ο緩存在緩存服务器 η中, 用户如果想下载资源 F, 只能从緩存服务器 2中下载。
此外, 其他服务器上由于没有备份资源, 就不能为用户提供緩存, 导致资 源緩存系统的性能受一台服务器性能的限制, 无法进行性能扩展。 由于有的服 务器负载过重, 有的服务器负载 4艮低, 从而导致负载低的服务器利用率低, 业 务相对空闲的服务器无法为繁忙服务器分担负载。
为了解决上述问题, 根据本发明的实施例, 提供了一种资源緩存方法, 图 2是本发明实施例的资源緩存方法的流程图, 如图 2所示, 根据本发明实施例 的资源緩存方法包括:
步骤 201 , 调度服务器每隔第一预定时间(例如, 10秒)从数据库获取资 源的访问热度值, 并判断访问热度值是否达到预先设置的第一阈值,在确定访 问热度值达到预先设置的第一阈值的情况下,从数据库获取緩存服务器的负载 值; 在本发明的实施例中,从数据库获取的緩存服务器的负载值可以不包括当 前本身就緩存有该资源的緩存服务器。
步骤 202, 调度服务器根据访问热度值以及负载值确定复制该资源的复制 緩存服务器,也就是说,调度服务器从除本身就緩存有该资源的緩存服务器之 外的其他緩存服务器中选择一个复制该资源的服务器。在以下的描述中,将复 制该资源的緩存服务器简称为复制緩存服务器。
步骤 203 , 调度服务器通知复制緩存服务器从保存有该资源的緩存服务器 中复制资源并緩存。
从上述处理可以看出, 本发明实施例将热点资源判断机制用于緩存系统 中, 复制热点资源到多台緩存服务器中, 以实现访问的负载分流。 通过调度服 务器实现各个緩存服务器之间的调度,使得多个緩存服务器共同提供服务,从 而提高了緩存系统的可扩展性和资源下载的效率,能够减少系统中繁忙的緩存 服务器的负载, 减轻出口带宽的压力。
下面, 结合附图,对本发明实施例中用户请求下载未緩存资源的情况的处 理流程进行详细说明。
图 3 是本发明实施例的用户请求下载未緩存资源的信令流程图, 如图 3 所示, 包括如下处理:
步骤 301 , 用户向源站服务器发送资源下载请求;
步骤 302, 资源緩存系统的检测服务器获取用户向源站服务器发送的资源 下载请求, 并向调度服务器发送资源查询请求;
步骤 303 , 调度服务器根据资源查询请求向其数据库查询该资源是否已经 緩存在资源緩存系统的緩存服务器中,并指示数据库将该资源的访问热度值加 1 , 其中, 访问热度值根据预定算法确定, 例如, 根据资源的下载次数及该资 源每次下载的下载时间确定该资源的访问热度值;
步骤 304,数据库查询该资源是否已经緩存,并更新该资源的访问热度值。 由于数据库查询到该资源没有緩存,因此,向调度服务器发送未緩存响应消息; 步骤 305 , 调度服务器接收到未緩存响应消息后, 向重定向服务器转发未 緩存响应消息;
步骤 306, 重定向服务器响应于未緩存响应消息, 由于该资源未緩存在资 源緩存系统中, 因此, 不需要进行重定向操作,用户依然从源站服务器(外网 ) 下载该资源;
步骤 307, 在用户下载完成后, 源站服务器向用户发送下载完成消息; 随 着用户下载次数的增多,资源緩存系统会将用户下载次数较多的资源下载到一 台緩存服务器中, 以后的用户从该緩存服务器中下载该资源;
步骤 308, 调度服务器向数据库查询该资源的访问热度值;
具体地,调度服务器每隔一定时间向数据库查询资源的访问热度值,在本 发明实施例中,调度服务器可以查询所有资源的访问热度值,也可以查询单独 查询当前某个资源的访问热度值, 其中, 访问热度值包括: 下载次数及下载时 间;
步骤 309, 数据库返回该资源的访问热度值, 该访问热度值可以包括所查 询资源的下载次数及下载时间等信息;
步骤 310, 调度服务器根据下载次数及下载时间计算单位时间内所查询资 源的下载次数,并根据单位时间内所查询资源的下载次数判断相应的访问热度 值是否达到阈值,也就是说, 判断用户是否从緩存有该资源的緩存服务器中大 量下载该资源, 在下面的描述中, 将上述情况下的资源称为热点资源, 如果调 度服务器判断访问热度值未达到预先设置的阈值, 则不进行任何操作; 如果确 定访问热度值达到阈值, 则向数据库查询各緩存服务器(不包括已緩存该资源 的緩存服务器)的负载值; 其中, 所有緩存服务器每隔一定时间就会将自己的 负载值写入数据库, 以供调度服务器的查询, 例如, 所有緩存服务器每隔 5 秒将自己的负载值写入数据库;
步骤 311 , 数据库向调度服务器返回各緩存服务器的负载值;
步骤 312, 调度服务器根据该资源的访问热度值以及各緩存服务器的负载 值确定复制该资源的复制緩存服务器; 进一步地,调度服务器可以根据访问热 度值和负载值选择负载较低的服务器复制该资源; 具体地,在步骤 312中,调度服务器选择负载较低的服务器具体包括如下 处理: 1、 调度服务器首先根据该资源的访问热度值确定单位时间内该资源的 下载次数,并根据单位时间内该资源的下载次数确定单位时间内该资源下载次 数的级别; 2、 调度服务器根据负载值将除已緩存该资源的緩存服务器之外所 有緩存服务器顺序排序, 得到排序结果; 3、 根据下载次数的级别确定需要复 制緩存服务器的数量,并根据该数量从排序结果中选择负载值低于预先设置的 第二阈值的緩存服务器作为所述复制緩存服务器。具体地,根据下载次数的级 别确定需要复制緩存服务器的数量包括: 单位时间内该资源的下载次数越多, 单位时间内下载次数的级别越高, 选择的緩存服务器的数量也就越多。
换句话说,调度服务器确定单位时间内资源的下载次数的级别后,根据负 载值确定空闲服务器的数量, 并根据空闲服务器的数量确定资源的复制份数, 在确定复制的份数后,调度服务器就可以调度空闲緩存服务器向源站服务器复 制热点资源。
步骤 313 , 复制緩存服务器从已緩存该资源的緩存服务器中复制该资源并 緩存;
步骤 314, 完成复制的复制緩存服务器向已緩存该资源的緩存服务器发送 复制完成通知;
步骤 315 , 复制緩存服务器向调度服务器发送复制完成通知;
步骤 316,调度服务器将复制完成通知、 以及复制信息写入数据库,其中, 复制信息为緩存有该资源的复制緩存服务器的信息。 在以后用户下载该资源 时 ,数据库可以根据该资源的复制信息查询该资源的緩存在哪几台緩存服务器 中。 从上述处理可以看出,本发明实施例采用的技术方案摒弃了热点资源访问 只能由单台緩存服务器负担的做法。 自动将热点数据复制到多台空闲緩存服务 器, 可使多台緩存服务器共同提供负载, 能够对緩存服务器资源进行充分地利 用。 并且, 在一个甚至多个緩存服务器出现故障时, 为用户提供热点资源的服 务不会中断, 由于多台緩存服务器共同提供服务, 可以减少出口带宽的压力, 防止出口带宽压力突增, 提高了系统的可靠性和可扩展性。
在用户下载该资源后,如果该资源的下载次数减少, 需要对该资源所占用 的空间进行回收,在资源空间回收过程中, 系统会根据该资源的访问热度确定 该资源需要保留的份数, 随后, 根据确定的需要保留的份数, 以及根据各个緩 存服务器的负载值将负载值比较高的緩存服务器中的资源删除。达到优化系统 资源的目的。
下面, 结合图 4, 对热点资源空间回收的处理过程进行详细说明, 图 4是 本发明实施例的热点资源空间回收的信令流程图,如图 4所示,包括如下处理: 步骤 401 , 调度服务器每隔一定时间从数据库获取资源的复制信息以及资 源的访问热度值, 在本发明实施例中, 该资源为一个或多个热点资源。
步骤 402, 数据库向调度服务器返回热点资源的复制信息以及访问热度 值, 该访问热度值包括下载次数和下载时间;
步骤 403 , 调度服务器判断热点资源的访问热度值是否达到预先设置的第 一阈值, 如果达到预先设置的第一阈值, 则不进行任何处理, 如果热点资源的 访问热度值未达到预先设置的第一阈值,调度服务器根据热点资源的复制信息 向数据库查询緩存有热点资源的所有緩存服务器的负载值;
步骤 404, 数据库根据热点资源的复制信息查询緩存有该热点资源的所有 緩存服务器,并将緩存有该热点资源的所有緩存服务器的负载值及该热点资源 的访问热度值发送到调度服务器;
步骤 405 , 调度服务器根据热点资源的访问热度值确定热点资源在单位时 间内的下载次数, 根据单位时间内的下载次数确定热点资源下载次数的级别, 并根据该级别确定热点资源保存复制的份数; 随后,调度服务器根据緩存有热 点资源的所有緩存服务器的负载值以及热点资源保存复制的份数确定至少一 个负载高于预先设置的第三阈值的緩存有热点资源的緩存服务器, 随后,调度 服务器不再将之后用户发送的资源下载请求调度到确定的緩存服务器上,并通 知确定的緩存服务器在无用户下载该资源后, 删除该资源; 即, 优先删除负载 相对高的緩存服务器上的热点资源。
步骤 406, 确定的緩存服务器在无用户下载该资源后, 将热点资源删除, 并向调度服务器返回删除完成消息;
步骤 407, 调度服务器将删除完成消息写入数据库, 并更新数据库中的热 点资源的复制信息。
从上述处理可以看出,通过热点资源空间回收机制可以提高存储空间利用 率, 确保存储空间不被浪费。 实现资源緩存系统的负载分流、存储空间自动清 理。
根据本发明的实施例,提供了一种緩存资源获取方法, 图 5是本发明实施 例的资源获取方法的流程图, 如图 5所示,根据本发明实施例的緩存资源获取 方法包括:
步骤 501 , 接收资源查询请求, 根据资源查询请求向数据库查询并确定用 户请求下载的资源已緩存; 步骤 502, 接收数据库发送的緩存有资源的所有緩存服务器的信息以及緩 存有资源的所有緩存服务器的负载值;
步骤 503 , 根据緩存有资源的所有緩存服务器的信息以及緩存有资源的所 有緩存服务器的负载值选择目标下载緩存服务器,并通知用户从目标下载緩存 服务器中下载资源。具体地, 可以通过重定向服务器通知用户从目标下载緩存 服务器中下载资源。
通过上述处理, 用户可以从系统中多台緩存服务器中下载资源,在其中一 台緩存服务器出现故障的情况下,可以从其他緩存有该资源的緩存服务器中下 载, 提高了用户下载资源的效率和速度。
下面, 结合附图,对本发明实施例的上述处理过程中用户请求下载已緩存 资源的处理流程进行说明。图 6是本发明实施例的用户请求下载已緩存资源的 信令流程图, 如图 6所示, 包括如下处理:
步骤 601 , 用户向源站服务器发送资源下载请求;
步骤 602, 资源緩存系统的检测服务器获取用户向源站服务器发送的资源 下载请求, 并向调度服务器发送资源查询请求;
步骤 603 , 调度服务器根据资源查询请求向其数据库查询该资源是否已经 緩存在资源緩存系统的緩存服务器中,并指示数据库将该资源的访问热度值加 1 ;
步骤 604,数据库查询该资源是否已经緩存,并更新该资源的访问热度值。 在判断该资源已经緩存后,确定该资源緩存在哪些緩存服务器中, 并将所有緩 存该资源的緩存服务器的信息发送到调度服务器;
步骤 605 , 调度服务器向数据库查询所有緩存该资源的緩存服务器的负载 值;
步骤 606, 数据库向调度服务器反馈所有緩存该资源的緩存服务器的负载 值;
步骤 607, 调度服务器选择负载值最低的緩存该资源的緩存服务器作为目 标下载緩存服务器, 并将该目标下载緩存服务器的信息通知重定向服务器; 步骤 608, 重定向服务器将用户的资源下载请求重定向到该目标下载緩存 服务器;
步骤 609, 用户连接至该目标下载緩存服务器, 并从该目标下载緩存服务 器中下载该资源。
从上述处理可以看出,通过热点资源访问多节点分流技术满足用户对热点 数据访问需求, 能够解决热点资源访问造成的系统瓶颈问题, 最大程度提高了 緩存服务器的利用率, 具有高可扩展性和高可靠性。
需要说明的 ,本发明实施例可广泛应用在资源緩存系统中不同緩存服务器 之间数据自动复制的各个应用场景,通过自动复制的方式, 可以实现不同的应 用功能, 在实际应用中, 包括但不限于以下应用功能: 1、 用于解决内容緩存 系统动态扩展的问题,在緩存服务器性能或容量不足时动态添加緩存服务器而 不影响系统正常运行; 2、 用于解决内容緩存系统数据安全问题, 例如, 防病 毒; 3、 用于解决资源緩存系统动态迁移的问题, 例如, 按文件访问热度分服 务器存储; 4、 用于解决资源緩存系统内容分类存储问题, 例如, 按文件访问 量不同自动迁移到不同应用服务器。
根据本发明的实施例,提供了一种资源緩存装置, 图 7是本发明实施例的 资源緩存装置的示意图,如图 7所示,根据本发明实施例的资源緩存装置包括: 获取模块 70、 第一确定模块 72、 第一通知模块 74。 下面, 对本发明实施例的 资源緩存装置进行详细说明。 需要说明的是, 在本发明实施例中, 资源緩存装 置可以为调度服务器。
具体地, 获取模块 70用于每隔第一预定时间 (例如, 10秒)从数据库获 取资源的访问热度值, 并在判断访问热度值达到预先设置的第一阈值的情况 下, 从数据库获取緩存服务器的负载值; 在本发明的实施例中, 从数据库获取 的緩存服务器的负载值可以不包括当前本身就緩存有该资源的緩存服务器。
第一确定模块 72根据访问热度值以及负载值确定复制资源的复制緩存服 务器; 具体地, 第一确定模块 72中还包括: 确定子模块、 排序模块、 选择模 块。
其中, 确定子模块根据访问热度值确定单位时间内资源的下载次数的级 别;排序模块根据负载值将除保存有资源的緩存服务器之外的所有緩存服务器 顺序排序,得到排序结果; 选择模块根据下载次数的级别确定需要复制緩存服 务器的数量,并根据该数量从排序结果中选择负载值低于预先设置的第二阈值 的緩存服务器作为复制緩存服务器。具体地,根据下载次数的级别确定需要复 制緩存服务器的数量包括: 单位时间内该资源的下载次数越多,单位时间内下 载次数的级别越高, 选择的緩存服务器的个数就越多。
在第一确定模块 72确定复制资源的复制緩存服务器之后, 第一通知模块 74通知复制緩存服务器从保存有资源的緩存服务器中复制资源并緩存。
从上述处理可以看出,本发明实施例采用的技术方案摒弃了热点资源访问 只能由单台緩存服务器负担的做法。 自动将热点数据复制到多台空闲緩存服务 器, 可使多台緩存服务器共同提供负载, 能够对緩存服务器资源进行充分地利 用。 并且, 在一个甚至多个緩存服务器出现故障时, 为用户提供热点资源的服 务不会中断, 由于多台緩存服务器共同提供服务, 可以减少出口带宽的压力, 防止出口带宽压力突增, 提高了系统的可靠性和可扩展性。
在用户下载该资源后,如果该资源的下载次数减少, 需要对该资源所占用 的空间进行回收,在资源空间回收过程中, 系统会根据该资源的访问热度确定 该资源需要保留的份数, 随后, 根据确定的需要保留的份数, 以及根据各个緩 存服务器的负载值将负载值比较高的緩存服务器中的资源删除。达到优化系统 资源的目的。
具体地, 资源緩存装置还包括: 第二确定模块、 第二通知模块、 第一接收 模块、 更新模块。
其中,当当所述复制緩存服务器中保存的所述资源的访问热度值低于第一 阈值时, 第二确定模块在緩存有资源的緩存服务器中确定至少一个緩存服务 器; 具体地, 第二确定模块根据热点资源的访问热度值确定热点资源在单位时 间内的下载次数, 根据单位时间内的下载次数确定热点资源下载次数的级别, 并根据该级别确定热点资源保存复制的份数; 随后, 第二确定模块根据緩存有 热点资源的所有緩存服务器的负载值以及热点资源保存复制的份数确定至少 一个负载高于预先设置的第三阈值的緩存有热点资源的緩存服务器。
随后, 第二通知模块通知确定的緩存服务器在无用户下载该资源后,删除 资源; 緩存服务器在无用户下载该资源后, 将热点资源删除, 并向调度服务器 的第一接收模块返回删除完成消息,第一接收模块接收緩存服务器发送的删除 完成消息; 更新模块用于将删除完成消息写入数据库, 并更新数据库中资源的 复制信息。 从上述处理可以看出,通过热点资源空间回收机制可以提高存储空间利用 率, 确保存储空间不被浪费。 实现资源緩存系统的负载分流、存储空间自动清 理。
根据本发明的实施例,提供了一种资源获取装置, 图 8是本发明实施例的 资源获取装置的示意图,如图 8所示,根据本发明实施例的资源获取装置包括: 第二接收模块 80、 第三确定模块 81、 第三接收模块 82、 第四确定模块 83、 第 三通知模块 84。 下面, 对本发明实施例的资源获取装置进行详细的说明。 需 要说明的是, 本发明实施例中的资源获取装置为调度服务器。
具体地, 首先, 用户向源站服务器发送资源下载请求, 资源緩存系统的检 测服务器获取用户向源站服务器发送的资源下载请求,并向调度服务器发送资 源查询请求, 调度服务器的第二接收模块 80接收资源查询请求; 随后, 第三 确定模块 81根据所述资源查询请求向所述数据库查询并确定用户请求下载的 资源已緩存; 在数据库判断该资源已经緩存后, 确定该资源緩存在哪些緩存服 务器中, 并将所有緩存该资源的緩存服务器的信息发送到调度服务器,调度服 务器的第三接收模块 82接收所述数据库发送的緩存有所述资源的所有緩存服 务器的信息以及緩存有所述资源的所有緩存服务器的负载值; 随后, 第四确定 模块 83根据緩存有所述资源的所有緩存服务器的信息以及緩存有所述资源的 所有緩存服务器的负载值选择目标下载緩存服务器; 第三通知模块 84将该目 标下载緩存服务器的信息通知重定向服务器,重定向服务器将用户的资源下载 请求重定向到该目标下载緩存服务器, 随后, 用户就可以连接至该目标下载緩 存服务器, 并从该目标下载緩存服务器中下载该资源。
通过上述处理, 用户可以从系统中多台緩存服务器中下载资源,在其中一 台緩存服务器出现故障的情况下,可以从其他緩存有该资源的緩存服务器中下 载, 提高了用户下载资源的效率和速度。
根据本发明的实施例,提供一种资源緩存系统, 图 9是本发明实施例的资 源緩存系统的示意图,如图 9所示,根据本发明实施例的资源緩存系统包括: 数 据库 90、 调度服务器 92、 緩存服务器 94。 下面, 对本发明实施例的资源緩存 系统进行详细说明。
具体地, 调度服务器 92每隔第一预定时间 (例如, 10秒)从数据库 90 获取资源的访问热度值, 并判断访问热度值是否达到预先设置的第一阈值, 在 确定访问热度值达到预先设置的第一阈值的情况下, 从数据库 90获取各个緩 存服务器 94的负载值; 随后,调度服务器 92根据访问热度值以及负载值确定 至少一个复制该资源的緩存服务器 94; 在调度服务器 92的控制下, 至少一个 緩存服务器 94从保存有该资源的緩存服务器中复制该资源并緩存。 其中, 数 据库 90用于存储资源的访问热度值以及緩存服务器 94的负载值。在本发明实 施例中, 数据库 90还可以用于保存所有资源的复制信息。
此外, 本发明实施例还可以包括: 检测服务器和重定向服务器, 其中, 检 测服务器用于获取用户向源站服务器发送的资源下载请求,并在获取了资源下 载请求后, 向调度服务器 92发送资源查询请求; 重定向服务器用于在调度服 务器 92 确定了为用户提供服务的目标下载緩存服务器后, 在调度服务器 92 的控制下,将用户的资源下载请求重定向到目标下载緩存服务器, 用户就可以 从目标下载緩存服务器下载请求的资源。
从上述处理可以看出,通过资源緩存系统的热点资源复制机制, 实现资源 緩存系统服务器负载分流, 使得热点资源的访问不会造成系统瓶颈。 下面,对本发明实施例中用户请求下载未緩存资源的情况、用户请求下载 已緩存资源的情况、 以及资源空间回收机制的处理过程进行详细说明。
首先, 对用户请求下载未緩存资源情况下的处理过程进行说明。
用户向源站服务器发送资源下载请求,资源緩存系统的检测服务器获取用 户向源站服务器发送的资源下载请求,并向调度服务器 92发送资源查询请求。 调度服务器 92根据资源查询请求向其数据库 90查询该资源是否已经緩存在资 源緩存系统的緩存服务器 94中,并指示数据库 90将该资源的访问热度值加 1。 随后, 数据库 90查询该资源是否已经緩存, 并更新该资源的访问热度值。 由 于数据库 90查询到该资源没有緩存, 因此, 数据库 90向调度服务器 92发送 未緩存响应消息。 调度服务器 92接收到未緩存响应消息后, 向重定向服务器 转发未緩存响应消息, 由于该资源未緩存在资源緩存系统中, 因此, 重定向服 务器不需要进行重定向操作, 用户依然从源站服务器(外网)下载该资源。 在 用户下载完成后, 源站服务器向用户发送下载完成消息; 随着用户下载次数的 增多 , 资源緩存系统会将用户下载次数较多的资源下载到一台緩存服务器 94 中, 以后的用户从该緩存服务器中下载该资源。
随后, 调度服务器 92向数据库 90查询该资源的访问热度值; 数据库 90 返回该资源的访问热度值; 调度服务器 92根据获取的访问热度值判断是否达 到预先设置的第一阈值, 即, 判断用户是否从緩存有该资源的緩存服务器中大 量下载该资源, 在下面的描述中, 将上述情况下的资源成为热点资源, 如果调 度服务器 92判断访问热度值未达到预先设置的第一阈值,则不进行任何操作, 如果确定访问热度值达到第一阈值, 则向数据库 90查询各緩存服务器 94 (不 包括已緩存该资源的緩存服务器) 的负载值; 其中, 所有緩存服务器 94每隔 一定时间就会将自己的负载值写入数据库 90, 以供调度服务器 92的查询, 例 如, 所有緩存服务器 94每隔 5秒将自己的负载值写入数据库 90;
在上述过程中, 调度服务器 92判断访问热度值是否达到预先设置的阈值 具体包括如下处理: 1、 调度服务器 92每隔一定时间从数据库 90获取该资源 的访问热度值, 其中, 该资源的访问热度值可以根据预定算法确定, 例如, 根 据该资源的下载次数及该资源每次下载的下载时间确定该资源的访问热度值; 2、 调度服务器 92根据下载次数及下载时间计算单位时间内该资源的下载次 数,并根据单位时间内该资源的下载次数判断访问热度值是否达到预先设置的 第一阈值。
随后,数据库 90向调度服务器 92返回除已緩存该资源的緩存服务器之外 各緩存服务器 94的负载值;调度服务器 92根据该资源的访问热度值以及除已 緩存该资源的緩存服务器之外各緩存服务器 94的负载值确定除已緩存该资源 的緩存服务器之外至少一个复制该资源的复制緩存服务器 94; 也就是说, 调 度服务器 92根据访问热度值和负载值选择负载较低的服务器复制该资源。
具体地, 调度服务器 92选择负载较低的服务器具体包括如下处理: 1、 调 度服务器 92 首先根据该资源的访问热度值确定单位时间内该资源的下载次 数,并根据单位时间内该资源的下载次数确定单位时间内该资源下载次数的级 另' J ; 2、调度服务器 92根据负载值将除保存有该资源的緩存服务器之外的所有 緩存服务器 94顺序排序, 得到排序结果; 3、 调度服务器 92根据下载次数的 级别确定需要复制緩存服务器的数量,并根据该数量从排序结果中选择负载值 低于预先设置的第二阈值的緩存服务器 94作为复制緩存服务器。 具体地, 根 据下载次数的级别确定需要复制緩存服务器的数量包括:单位时间内该资源的 下载次数越多, 单位时间内下载次数的级别越高, 选择的緩存服务器 94的个 数就越多。
随后, 至少一个复制緩存服务器 94从保存有该资源的緩存服务器中复制 该资源并緩存;保存有该资源的緩存服务器向完成复制的至少一个复制緩存服 务器 94发送复制完成通知; 至少一个复制緩存服务器 94向调度服务器 92发 送复制完成通知;调度服务器 92取至少一个复制緩存服务器 94发送的复制完 成通知。 随后, 调度服务器 92将复制完成通知、 以及该资源的复制信息写入 数据库 90, 在以后用户下载该资源时, 数据库 90可以根据该资源的复制信息 查询该资源的緩存在哪几台緩存服务器 94中。
从上述处理可以看出,本发明实施例采用的技术方案摒弃了热点资源访问 只能由单台緩存服务器负担的做法。 自动将热点数据复制到多台空闲緩存服务 器,既可使多台緩存服务器共同提供负载,又提高了系统的可靠性和可扩展性。 此外,通过热点资源的复制机制, 热点数据的并发访问可以由多个緩存服务器 分担, 能够对緩存服务器资源进行充分地利用。 并且, 在一个甚至多个緩存服 务器出现故障时, 为用户提供热点资源的服务不会中断; 此外, 由于多台緩存 服务器共同提供服务, 可以减少出口带宽的压力, 防止出口带宽压力突增。
下面, 对用户请求下载已緩存资源情况下的处理进行详细说明。
具体地, 用户向源站服务器发送资源下载请求; 资源緩存系统的检测服务 器获取用户向源站服务器发送的资源下载请求, 并向调度服务器 92发送资源 查询请求;调度服务器 92根据资源查询请求向其数据库 90查询该资源是否已 经緩存在资源緩存系统的緩存服务器 94中, 随后,调度服务器 92指示数据库 90将该资源的访问热度值加 1 , 即, 更新资源的访问热度值; 数据库 90根据 该资源的复制信息查询该资源是否已经緩存, 并更新该资源的访问热度值。数 据库 90在判断该资源已经緩存后, 确定该资源緩存在哪些緩存服务器 94中, 并将所有緩存该资源的緩存服务器 94的信息发送到调度服务器 92; 调度服务 器 92向数据库 90查询所有緩存该资源的緩存服务器 94的负载值; 数据库 90 向调度服务器 92反馈所有緩存该资源的緩存服务器 94的负载值;调度服务器 92选择緩存有该资源的所有緩存服务器 94中负载值最低的緩存服务器作为目 标下载緩存服务器,调度服务器 92将该目标下载緩存服务器 94的信息通知重 定向服务器;重定向服务器将用户的资源下载请求重定向到该目标下载緩存服 务器 94; 用户连接至该目标下载緩存服务器 94, 并从该目标下载緩存服务器 94中下载该资源。
从上述处理可以看出,通过热点资源访问多节点分流技术满足用户对热点 数据访问需求, 能够解决热点资源访问造成的系统瓶颈问题, 最大程度提高了 緩存服务器 94的利用率, 具有高可扩展性和高可靠性。
下面, 对热点资源空间回收机制的处理过程进行详细说明。
具体地,调度服务器 92每隔一定时间从数据库 90获取资源的复制信息以 及资源的访问热度值, 在本发明实施例中, 该资源为一个或多个热点资源。 数 据库 90向调度服务器 92返回热点资源的访问热度值; 调度服务器 92判断热 点资源的访问热度值是否达到预先设置的阈值,如果达到预先设置的阈值, 则 不进行任何处理,如果热点资源的访问热度值未达到预先设置的阈值,调度服 务器 92向数据库 90查询緩存有热点资源的緩存服务器 94的负载值; 数据库 90 根据热点资源的复制信息查询緩存有该热点资源的所有复制緩存服务器 94, 并将緩存有该热点资源的所有复制緩存服务器 94的负载值及该热点资源 的访问热度值发送到调度服务器 92; 随后, 调度服务器 92根据热点资源的访 问热度值(即,下载时间及下载次数)确定热点资源在单位时间内的下载次数, 根据单位时间内的下载次数确定热点资源下载次数的级别,并根据该级别确定 热点资源保存复制的份数; 随后, 调度服务器 92根据緩存有热点资源的緩存 服务器 94的负载值以及热点资源保存复制的份数确定需要删除热点资源的至 少一个负载值高于预先设置的第三阈值的緩存有热点资源的緩存服务器 94, 随后, 调度服务器 92不再将之后用户发送的资源下载请求调度到确定的负载 值高于预先设置的第三阈值的緩存服务器上,并通知确定的至少一个负载值高 于预先设置的第三阈值的緩存服务器在无用户下载该资源后,删除该资源;即, 优先删除负载相对高的緩存服务器 94上的热点资源。 至少一个负载值高于预 先设置的第三阈值的緩存服务器 94在无用户下载该资源后,将热点资源删除, 并向调度服务器 92返回删除完成消息;调度服务器 92将删除完成消息写入数 据库 90, 并更新数据库 90中的热点资源的复制信息。
从上述处理可以看出,通过热点资源空间回收机制可以提高存储空间利用 率, 确保存储空间不被浪费。 实现资源緩存系统的负载分流、存储空间自动清 理。
下面, 对本发明实施例的资源緩存系统为 P2P緩存系统的情况进行说明。 图 10是本发明实施例的 P2P緩存系统的结构示意图, 如图 10所示, P2P緩存 系统包括: 用户 1 , 用户 2, 用户 n, 緩存服务器 1 , 緩存服务器 2, 緩存 服务器 3 , 緩存服务器 4。
如上所述,调度服务器 92判断存储在緩存服务器 4的资源 P为热点资源, 并计算 P的访问热度值, 决定将资源 P复制 2份到两台緩存服务器 94, 即, 緩存服务器 1和緩存服务器 2, 优选地, 优先向空闲緩存服务器 94复制。 调 度服务器 92发出指令让緩存服务器 1和緩存服务器 2将资源 P复制到本地。 緩存服务器 1和緩存服务器 2复制完成后,通过通知数据库的方式通知调度服 务器 92,同时通告调度服务器 92哪些服务器可为用户提供该緩存资源。此后, 调度服务器 92便可根据调度算法调度可以访问此资源的緩存服务器 1、 緩存 服务器 2、 緩存服务器 4为用户提供服务。 当热点值改变到阈值时, 调度服务 器会根据緩存服务器 1、 緩存服务器 2、 緩存服务器 4的状态减少适量的热点 文件副本, 不会造成资源浪费。
使用本机磁盘作为存储, 通过调度服务器 92计算统计热点资源并控制复 制方向, 各个含有相同热点资源的緩存服务器 94共同提供访问, 可满足 P2P 緩存系统大用户量的应用, 尤其适用于有较多热点资源的场景。
图 11是本发明实施例的对资源分类存储的系统结构示意图,如图 11所示, 包括用户 1、 用户 2、 用户 3 , 调度服务器、 通用緩存服务器、 媒体资源緩存 服务器、 Exe资源緩存服务器、 Iso资源緩存服务器。
调度服务器通过热点调度算法将通用服务器中的热点文件, 按照文件类 型, 复制到优化过的不同性能的专用緩存服务器中, 由专用緩存服务器对用户 提供高性能的数据传输, 充分利用不同性能服务器的资源, 以此提高整个緩存 系统性能。
上述系统构架可以应用于原有系统的扩充, 将不同性能的服务器充分利 用, 节省整体成本。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的 单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也 可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。 可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目 的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子 硬件、计算机软件或者二者的结合来实现, 为了清楚地说明硬件和软件的可互 换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些 功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束 能, 但是这种实现不应认为超出本发明的范围。
综上所述,借助于本发明的技术方案,通过将热点资源判断机制用于緩存 系统中, 复制热点资源到多台緩存服务器中, 以实现访问负载分流。 通过调度 服务器实现各个緩存服务器之间的调度, 使得多个緩存服务器共同提供服务, 从而提高了緩存系统的可扩展性和效率。在一个甚至多个緩存服务器出现故障 时, 为用户提供热点资源的服务不会中断; 此外, 由于多台緩存服务器共同提 供服务, 可以减少出口带宽的压力, 防止出口带宽压力突增, 最大程度提高了 緩存服务器的利用率。 通过热点资源空间回收机制可以提高存储空间利用率, 确保存储空间不被浪费。 实现资源緩存系统的负载分流、 存储空间自动清理。
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其限 制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术人员 应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其 中部分技术特征进行等同替换; 而这些修改或者替换, 并不使相应技术方案的 本质脱离本发明各实施例技术方案的精神和范围。

Claims

权 利 要 求
1、 一种资源緩存方法, 其特征在于, 包括:
每隔第一预定时间从数据库获取资源的访问热度值,并在判断所述访问热 度值达到预先设置的第一阈值的情况下,从所述数据库获取緩存服务器的负载 值;
根据所述访问热度值以及所述负载值确定复制所述资源的复制緩存服务 器,并通知所述复制緩存服务器从保存有所述资源的緩存服务器中复制所述资 源并緩存。
2、根据权利要求 1所述的方法, 其特征在于, 所述根据所述访问热度值以 及所述负载值确定所述复制緩存服务器包括:
根据所述访问热度值确定单位时间内所述资源的下载次数的级别; 根据所述负载值将除保存有所述资源的緩存服务器之外的所有緩存服务 器顺序排序, 得到排序结果;
根据所述下载次数的级别确定需要所述复制緩存服务器的数量,并根据所 述数量从所述排序结果中选择负载值低于预先设置的第二阈值的緩存服务器 作为所述复制緩存服务器。
3、 根据权利要求 1所述的方法, 其特征在于, 还包括:
获取所述复制緩存服务器发送的复制完成通知, 将所述复制完成通知以 及复制信息写入所述数据库, 其中, 所述复制信息为緩存有所述资源的复制緩 存服务器的信息。
4、 根据权利要求 3所述的方法, 其特征在于, 还包括:
当所述复制緩存服务器中保存的所述资源的访问热度值低于所述第一阈 值时,在緩存有所述资源的緩存服务器中确定至少一个緩存服务器, 并通知所 述确定的緩存服务器删除所述资源;
接收所述緩存服务器发送的删除完成消息,将所述删除完成消息写入所述 数据库, 并更新所述数据库中所述资源的复制信息。
5、 一种资源获取方法, 其特征在于, 包括:
接收资源查询请求, 向数据库查询所请求的资源是否有緩存;
接收所述数据库发送的緩存有所述资源的所有緩存服务器的信息以及緩 存有所述资源的所有緩存服务器的负载值;
根据緩存有所述资源的所有緩存服务器的信息以及緩存有所述资源的所 有緩存服务器的负载值选择目标下载緩存服务器;
通知所述用户从所述目标下载緩存服务器中下载所述资源。
6、根据权利要求 5所述的方法, 其特征在于, 所述根据緩存有所述资源的 所有緩存服务器的信息以及緩存有所述资源的所有緩存服务器的负载值选择 目标下载緩存服务器包括:
选择緩存有所述资源的所有緩存服务器中负载值最低的緩存服务器作为 目标下载緩存服务器。
7、 一种资源緩存装置, 其特征在于, 包括:
获取模块, 用于每隔第一预定时间从数据库获取资源的访问热度值, 并在 判断所述访问热度值达到预先设置的第一阈值的情况下,从所述数据库获取緩 存服务器的负载值; 第一确定模块,用于根据所述访问热度值以及所述负载值确定复制所述资 源的复制緩存服务器;
第一通知模块,用于通知所述复制緩存服务器从保存有所述资源的緩存服 务器中复制所述资源并緩存。
8、根据权利要求 7所述的装置,其特征在于,所述第一确定模块具体包括: 确定子模块,用于根据所述访问热度值确定单位时间内所述资源的下载次 数的级别;
排序模块,用于根据所述负载值将除保存有所述资源的緩存服务器之外的 所有緩存服务器顺序排序, 得到排序结果;
选择模块,用于根据所述下载次数的级别确定需要所述复制緩存服务器的 数量,并根据所述数量从所述排序结果中选择负载值低于预先设置的第二阈值 的緩存服务器作为所述复制緩存服务器。
9、 根据权利要求 7所述的装置, 其特征在于, 所述资源緩存装置还包括: 第二确定模块,用于当所述复制緩存服务器中保存的所述资源的访问热度 值低于所述第一阈值时,在緩存有所述资源的緩存服务器中确定至少一个緩存 服务器;
第二通知模块, 用于通知所述确定的緩存服务器删除所述资源;
第一接收模块, 用于接收所述确定的緩存服务器发送的删除完成消息; 更新模块, 用于将所述删除完成消息写入所述数据库, 并更新所述数据库 中所述资源的复制信息。
10、 一种资源获取装置, 其特征在于, 包括:
第二接收模块, 用于接收资源查询请求; 第三确定模块,用于根据所述资源查询请求向数据库查询所请求的资源是 否有緩存; 第三接收模块,用于接收所述数据库发送的緩存有所述资源的所有緩存服 务器的信息以及緩存有所述资源的所有緩存服务器的负载值; 第四确定模块,用于根据緩存有所述资源的所有緩存服务器的信息以及緩 存有所述资源的所有緩存服务器的负载值选择目标下载緩存服务器; 第三通知模块,用于通知所述用户从所述目标下载緩存服务器中下载所述 资源。
11、 一种资源緩存系统, 其特征在于, 包括: 数据库, 用于存储资源的访问热度值以及緩存服务器的负载值; 调度服务器, 用于每隔第一预定时间从数据库获取资源的访问热度值, 并 在判断所述访问热度值达到预先设置的第一阈值的情况下,从所述数据库获取 緩存服务器的负载值,根据所述访问热度值以及所述负载值确定复制所述资源 的复制緩存服务器,并通知所述复制緩存服务器从保存有所述资源的緩存服务 器中复制所述资源;
緩存服务器,用于在所述调度服务器的控制下从保存有所述资源的緩存服 务器中复制所述资源并緩存。
PCT/CN2010/077639 2009-10-13 2010-10-11 资源缓存方法、资源获取方法及其装置、系统 WO2011044829A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US13/446,777 US9503518B2 (en) 2009-10-13 2012-04-13 Method and apparatus for buffering and obtaining resources, resource buffering system
US15/204,816 US9882975B2 (en) 2009-10-13 2016-07-07 Method and apparatus for buffering and obtaining resources, resource buffering system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910207231.9 2009-10-13
CN2009102072319A CN101668046B (zh) 2009-10-13 2009-10-13 资源缓存方法及其装置、系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/446,777 Continuation US9503518B2 (en) 2009-10-13 2012-04-13 Method and apparatus for buffering and obtaining resources, resource buffering system

Publications (1)

Publication Number Publication Date
WO2011044829A1 true WO2011044829A1 (zh) 2011-04-21

Family

ID=41804485

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/077639 WO2011044829A1 (zh) 2009-10-13 2010-10-11 资源缓存方法、资源获取方法及其装置、系统

Country Status (3)

Country Link
US (2) US9503518B2 (zh)
CN (1) CN101668046B (zh)
WO (1) WO2011044829A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102955764A (zh) * 2011-08-23 2013-03-06 北京中文在线数字出版股份有限公司 一种数字图书提供方法及装置
WO2013097076A1 (zh) * 2011-12-26 2013-07-04 华为技术有限公司 一种缓存管理方法及设备
CN103581336A (zh) * 2013-11-20 2014-02-12 中国联合网络通信集团有限公司 基于云计算平台的业务流程调度方法及系统
US20140129667A1 (en) * 2011-06-14 2014-05-08 Nec Corporation Content delivery system, controller and content delivery method
CN104935654A (zh) * 2015-06-10 2015-09-23 华为技术有限公司 一种服务器集群系统中的缓存方法、写入点客户端和读客户端
EP2860637A4 (en) * 2012-06-11 2016-03-02 Murakumo Corp INFORMATION PROCESSING SYSTEM, METHOD AND PROGRAM THEREOF
CN111327622A (zh) * 2020-02-27 2020-06-23 典基网络科技(上海)有限公司 一种资源调度方法及系统

Families Citing this family (52)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668046B (zh) 2009-10-13 2012-12-19 成都市华为赛门铁克科技有限公司 资源缓存方法及其装置、系统
CN102137283B (zh) * 2010-06-10 2014-10-08 华为软件技术有限公司 应用的上线部署方法及其装置与系统
CN102006330B (zh) * 2010-12-01 2013-06-12 北京瑞信在线系统技术有限公司 分布式缓存系统、数据的缓存方法及缓存数据的查询方法
CN102096556B (zh) * 2010-12-03 2013-11-06 华为数字技术(成都)有限公司 拷贝数据的方法、读取数据的方法和装置及系统
CN102651861B (zh) * 2011-02-24 2014-08-20 腾讯科技(深圳)有限公司 用于移动终端的下载方法、移动终端和代理下载服务器
CN102761572B (zh) * 2011-04-28 2016-07-27 腾讯科技(深圳)有限公司 动态调整数据流量的方法及系统
CN102263822B (zh) * 2011-07-22 2014-01-22 北京星网锐捷网络技术有限公司 一种分布式缓存的控制方法、系统及装置
CN102333130A (zh) * 2011-10-31 2012-01-25 北京蓝汛通信技术有限责任公司 一种访问缓存服务器的方法、系统及缓存智能调度器
CN102521260B (zh) * 2011-11-18 2014-04-02 华为技术有限公司 数据预热方法及装置
KR20130064906A (ko) * 2011-12-09 2013-06-19 삼성전자주식회사 통신 시스템에서의 부하 균등화를 위한 방법 및 장치
CN103812881B (zh) * 2012-11-06 2018-06-22 腾讯科技(深圳)有限公司 离线下载控制方法及装置
CN103236989B (zh) * 2013-04-25 2015-12-02 青岛海信传媒网络技术有限公司 一种内容分发网络中的缓存控制方法、设备及系统
CN103312776A (zh) * 2013-05-08 2013-09-18 青岛海信传媒网络技术有限公司 边缘节点服务器缓存视频的内容的方法和装置
CN104168299A (zh) * 2013-05-16 2014-11-26 方正宽带网络服务股份有限公司 资源处理系统和资源处理方法
CN104298691B (zh) * 2013-07-19 2017-12-08 国际商业机器公司 用于评估数据库索引的效率的方法和装置
KR20150039524A (ko) * 2013-10-02 2015-04-10 삼성전자주식회사 클라우드 시스템, 클라우드 시스템 제어 방법, 관리 서버 및 그 제어 방법
CN103595782A (zh) * 2013-11-11 2014-02-19 中安消技术有限公司 一种分布式存储系统及其下载文件的方法
US9535837B2 (en) * 2013-11-19 2017-01-03 Alcatel-Lucent Usa Inc. Decentralized online cache management for digital content conveyed over shared network connections based on cache fullness and cache eviction policies
CN104735110B (zh) * 2013-12-23 2019-03-26 中国电信股份有限公司 元数据管理方法和系统
CN104812006B (zh) * 2014-01-24 2019-11-01 北京三星通信技术研究有限公司 基于缓存的数据传输方法及装置
CN104811392B (zh) * 2014-01-26 2018-04-17 国际商业机器公司 用于处理网络中的资源访问请求的方法和系统
CN105191259B (zh) * 2014-03-03 2019-09-13 华为技术有限公司 提供数据服务的方法和网络设备
WO2016082205A1 (zh) * 2014-11-28 2016-06-02 华为技术有限公司 一种多级缓存的功耗控制方法、装置及设备
CN105763585A (zh) * 2014-12-17 2016-07-13 中兴通讯股份有限公司 一种实现数据推送的方法和gslb
CN105868045A (zh) * 2015-01-21 2016-08-17 中国移动通信集团陕西有限公司 一种数据缓存方法及装置
CN104994152B (zh) * 2015-06-30 2018-11-09 中国科学院计算技术研究所 一种Web协同缓存系统和方法
CN106411978B (zh) * 2015-07-31 2020-01-21 华为技术有限公司 一种资源缓存方法及装置
CN106453461A (zh) * 2015-08-12 2017-02-22 中兴通讯股份有限公司 资源缓存方法及装置
CN105335517A (zh) * 2015-11-06 2016-02-17 努比亚技术有限公司 选择热度多媒体的方法及终端
CN106790324B (zh) * 2015-11-20 2020-06-16 华为技术有限公司 内容分发方法、虚拟服务器管理方法、云平台和系统
CN105550338B (zh) * 2015-12-23 2018-11-23 北京大学 一种基于HTML5应用缓存的移动Web缓存优化方法
CN107180043B (zh) * 2016-03-09 2019-08-30 北京京东尚科信息技术有限公司 分页实现方法和分页系统
CN105791427B (zh) * 2016-04-22 2019-09-20 百度在线网络技术(北京)有限公司 资源热度补充方法、装置和系统
CN106020945B (zh) * 2016-05-04 2020-08-11 腾讯科技(深圳)有限公司 快捷项添加方法及装置
CN107517241A (zh) * 2016-06-16 2017-12-26 中兴通讯股份有限公司 请求调度方法及装置
CN106407244A (zh) * 2016-06-21 2017-02-15 平安科技(深圳)有限公司 基于多数据库的数据查询方法、系统和装置
CN106502789A (zh) * 2016-10-12 2017-03-15 阔地教育科技有限公司 一种资源访问方法及装置
CN108574714B (zh) * 2017-03-14 2021-06-01 南方银谷科技有限公司 互联网资源获取方法、装置及互联网缓存系统
CN107707597A (zh) * 2017-04-26 2018-02-16 贵州白山云科技有限公司 一种突发热点访问均衡处理方法及装置
CN109151512A (zh) * 2018-09-12 2019-01-04 中国联合网络通信集团有限公司 Cdn网络中获取内容的方法及装置
CN109246229B (zh) * 2018-09-28 2021-08-27 网宿科技股份有限公司 一种分发资源获取请求的方法和装置
CN109672900B (zh) * 2018-12-05 2021-04-16 北京奇艺世纪科技有限公司 一种热点内容列表的生成方法及装置
CN109922008B (zh) * 2019-03-21 2022-06-21 新华三信息安全技术有限公司 一种报文发送方法及装置
CN110032421B (zh) * 2019-04-18 2021-09-28 腾讯科技(深圳)有限公司 内存中图集的管理方法、装置、终端及存储介质
CN110149394A (zh) * 2019-05-20 2019-08-20 典基网络科技(上海)有限公司 系统资源的调度方法、装置和存储介质
CN110233892A (zh) * 2019-06-12 2019-09-13 湖南快乐阳光互动娱乐传媒有限公司 Cdn热点资源处理方法、系统及全局热片调度系统
CN111010603A (zh) * 2019-12-18 2020-04-14 浙江大华技术股份有限公司 一种视频缓存转发处理方法及装置
CN111984889A (zh) * 2020-02-21 2020-11-24 广东三维家信息科技有限公司 缓存方法及系统
CN111800486B (zh) * 2020-06-22 2021-09-17 山东大学 一种云边协同的资源调度方法及系统
CN112187950B (zh) * 2020-10-10 2022-09-16 深圳市智百威科技发展有限公司 一种解决远程数据访问慢的方法
CN114124969A (zh) * 2021-11-25 2022-03-01 广州市昊链信息科技股份有限公司 一种数据复制方法、装置、设备以及存储介质
US20230171099A1 (en) * 2021-11-27 2023-06-01 Oracle International Corporation Methods, systems, and computer readable media for sharing key identification and public certificate data for access token verification

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1322315A (zh) * 1998-10-09 2001-11-14 国际商业机器公司 负载均衡协同高速缓存服务器
CN1489069A (zh) * 2002-10-10 2004-04-14 华为技术有限公司 面向内容的负载均衡方法和设备
CN101668046A (zh) * 2009-10-13 2010-03-10 成都市华为赛门铁克科技有限公司 资源缓存方法、资源获取方法及其装置、系统

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6088721A (en) * 1998-10-20 2000-07-11 Lucent Technologies, Inc. Efficient unified replication and caching protocol
US7689637B1 (en) 2000-05-04 2010-03-30 Koninklijke Philips Electronics N.V. Adaptive filtering method and related device
US6771706B2 (en) 2001-03-23 2004-08-03 Qualcomm Incorporated Method and apparatus for utilizing channel state information in a wireless communication system
US20030063750A1 (en) * 2001-09-26 2003-04-03 Alexander Medvinsky Unique on-line provisioning of user terminals allowing user authentication
US8255989B2 (en) * 2001-09-26 2012-08-28 General Instrument Corporation Access control and key management system for streaming media
US7237108B2 (en) * 2001-09-26 2007-06-26 General Instrument Corporation Encryption of streaming control protocols and their headers
US20030059053A1 (en) * 2001-09-26 2003-03-27 General Instrument Corporation Motorola, Inc. Key management interface to multiple and simultaneous protocols
US7243366B2 (en) * 2001-11-15 2007-07-10 General Instrument Corporation Key management protocol and authentication system for secure internet protocol rights management architecture
CA2399159A1 (en) 2002-08-16 2004-02-16 Dspfactory Ltd. Convergence improvement for oversampled subband adaptive filters
EP1414164A1 (en) 2002-10-25 2004-04-28 Alcatel Method for cross-talk cancellation
US7254636B1 (en) * 2003-03-14 2007-08-07 Cisco Technology, Inc. Method and apparatus for transparent distributed network-attached storage with web cache communication protocol/anycast and file handle redundancy
US7350046B2 (en) * 2004-04-02 2008-03-25 Seagate Technology Llc Managed reliability storage system and method monitoring storage conditions
CN100442724C (zh) 2005-09-16 2008-12-10 华为技术有限公司 多用户通讯线路串扰测试方法及设备
US8140695B2 (en) 2005-12-12 2012-03-20 International Business Machines Corporation Load balancing and failover of distributed media resources in a media server
US8171251B2 (en) 2006-03-16 2012-05-01 Sandisk Il Ltd. Data storage management method and device
CN101018213A (zh) * 2007-02-06 2007-08-15 华为技术有限公司 文件资源服务的方法及系统
US8417816B2 (en) * 2009-02-20 2013-04-09 Alcatel Lucent Topology aware cache cooperation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1322315A (zh) * 1998-10-09 2001-11-14 国际商业机器公司 负载均衡协同高速缓存服务器
CN1489069A (zh) * 2002-10-10 2004-04-14 华为技术有限公司 面向内容的负载均衡方法和设备
CN101668046A (zh) * 2009-10-13 2010-03-10 成都市华为赛门铁克科技有限公司 资源缓存方法、资源获取方法及其装置、系统

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140129667A1 (en) * 2011-06-14 2014-05-08 Nec Corporation Content delivery system, controller and content delivery method
EP2722765A4 (en) * 2011-06-14 2015-03-04 Nec Corp CONTENT SYSTEM, CONTROL UNIT AND CONTENT PROCESSING
CN102955764A (zh) * 2011-08-23 2013-03-06 北京中文在线数字出版股份有限公司 一种数字图书提供方法及装置
WO2013097076A1 (zh) * 2011-12-26 2013-07-04 华为技术有限公司 一种缓存管理方法及设备
EP2860637A4 (en) * 2012-06-11 2016-03-02 Murakumo Corp INFORMATION PROCESSING SYSTEM, METHOD AND PROGRAM THEREOF
CN103581336A (zh) * 2013-11-20 2014-02-12 中国联合网络通信集团有限公司 基于云计算平台的业务流程调度方法及系统
CN103581336B (zh) * 2013-11-20 2017-01-11 中国联合网络通信集团有限公司 基于云计算平台的业务流程调度方法及系统
CN104935654A (zh) * 2015-06-10 2015-09-23 华为技术有限公司 一种服务器集群系统中的缓存方法、写入点客户端和读客户端
CN104935654B (zh) * 2015-06-10 2018-08-21 华为技术有限公司 一种服务器集群系统中的缓存方法、写入点客户端和读客户端
CN111327622A (zh) * 2020-02-27 2020-06-23 典基网络科技(上海)有限公司 一种资源调度方法及系统
CN111327622B (zh) * 2020-02-27 2023-02-28 典基网络科技(上海)有限公司 一种资源调度方法及系统

Also Published As

Publication number Publication date
CN101668046B (zh) 2012-12-19
CN101668046A (zh) 2010-03-10
US20160323369A1 (en) 2016-11-03
US9503518B2 (en) 2016-11-22
US9882975B2 (en) 2018-01-30
US20120203910A1 (en) 2012-08-09

Similar Documents

Publication Publication Date Title
WO2011044829A1 (zh) 资源缓存方法、资源获取方法及其装置、系统
US10904597B2 (en) Dynamic binding for use in content distribution
CN102523279B (zh) 一种分布式文件系统及其热点文件存取方法
US7047287B2 (en) Method and apparatus for automatically adapting a node in a network
US9703752B2 (en) Caching in mobile networks
US10915455B2 (en) Cache warming: agility for a stateful service
EP1364510A2 (en) Method and system for managing distributed content and related metadata
EP1368948A2 (en) Method and apparatus for large payload distribution in a network
US11675501B2 (en) Streaming data service with isolated read channels
US10999371B2 (en) Request multiplexing
US8775456B2 (en) System and method for scheduled and collaborative distribution of software and data to many thousands of clients over a network using dynamic virtual proxies

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10823059

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10823059

Country of ref document: EP

Kind code of ref document: A1