WO2019042298A1 - 一种实现智能缓存的方法及装置及其计算机可读存储介质和计算机设备 - Google Patents
一种实现智能缓存的方法及装置及其计算机可读存储介质和计算机设备 Download PDFInfo
- Publication number
- WO2019042298A1 WO2019042298A1 PCT/CN2018/102817 CN2018102817W WO2019042298A1 WO 2019042298 A1 WO2019042298 A1 WO 2019042298A1 CN 2018102817 W CN2018102817 W CN 2018102817W WO 2019042298 A1 WO2019042298 A1 WO 2019042298A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- access object
- update time
- time point
- client
- object type
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
- H04L67/5682—Policies or rules for updating, deleting or replacing the stored data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
Definitions
- Embodiments of the present invention relate to, but are not limited to, the field of Internet technologies, and in particular, to a method and apparatus for implementing intelligent cache, and a computer readable storage medium and computer device thereof.
- CDN Content Delivery Network
- the content of the cached content is buffered by Time To Live (TTL).
- TTL Time To Live
- the CDN cache server will be triggered to return to the source station (the CDN client's website content server) to reacquire the content. If the TTL is too long, the update of the source station cannot be automatically synchronized in time; if the TTL is too short, the source will frequently affect the quality of service and improve the pressure and performance requirements of the source station.
- the TTL of the CDN cache server generally follows the source station, that is, the client sets the TTL value, and the CDN cache server synchronizes with it. This method does not give the user a reasonable reference value. The client can only set the TTL as short as possible, resulting in returning the source. The number of times increases and the pressure of the source station increases.
- the CDN system cannot know the historical behavior of the customer and cannot adjust the TTL time intelligently.
- an embodiment of the present invention provides a method and apparatus for implementing an intelligent cache.
- An embodiment of the present invention provides a method for implementing an intelligent cache, including:
- the corresponding TTL value is determined according to the access object type of the access object of the client, and the access object is updated according to the TTL value.
- the above method for implementing the smart cache also has the following features:
- Determining the TTL value corresponding to the corresponding access object type of the corresponding client according to the update time point sequence includes: arranging the update time point sequence in time series, and performing update time point merging according to the preset time length, according to the merged update time point The sequence determines the TTL value corresponding to the corresponding access object type of the corresponding customer.
- the above method for implementing the smart cache also has the following features:
- the determining, according to the sequence of the updated update time points, the TTL value corresponding to the corresponding access object type of the corresponding client includes:
- the interval duration of all the adjacent two update time points in the sequence of the updated update time point is calculated, and the median of all the interval durations is used as the corresponding client.
- the TTL value corresponding to the object type corresponds to the object type
- the value of the cycle is taken as the TTL value corresponding to the corresponding access object type of the corresponding client;
- the set having the plurality of sub-cycles is taken as the TTL value corresponding to the corresponding access object type of the corresponding client.
- the above method for implementing the smart cache also has the following features:
- the method further includes:
- the update time point sequence of each access object type of each customer corresponding to the industry is determined, and the TTL value corresponding to the corresponding access object type of the industry is determined according to the update time point sequence.
- the above method for implementing the smart cache also has the following features:
- the method further includes: updating the TTL value of the access object type like the access object of the old customer using the access to the old customer, and using the access object type of the access object of the industry to which the new customer belongs.
- the TTL value is updated.
- An embodiment of the present invention further provides an implementation of an intelligent cache device, including:
- a pre-processing module configured to determine an update time point of each access object within a preset time period
- a determining module configured to determine an update time point sequence of each access object type of each client according to a mapping relationship between the access object and each client, and determine a TTL value corresponding to each client's corresponding access object type according to the update time point sequence;
- the update module determines a corresponding TTL value according to the access object type of the access object of the client, and updates the access object according to the TTL value.
- the determining module includes a sorting unit, a merging unit, and a determining unit;
- the sorting unit is configured to arrange the sequence of update time points in time series
- the merging unit is configured to perform update time point merging with a preset time length as a granularity
- the determining unit is configured to determine a TTL value corresponding to the corresponding access object type of the corresponding client according to the merged update time point sequence.
- the determining unit is configured to determine, according to the merged update time point sequence, a TTL value corresponding to the corresponding access object type of the corresponding client by using the following method:
- the interval duration of all the adjacent two update time points in the sequence of the updated update time point is calculated, and the median of all the interval durations is used as the corresponding client.
- the TTL value corresponding to the object type corresponds to the object type
- the value of the cycle is taken as the TTL value corresponding to the corresponding access object type of the corresponding client;
- the set having the plurality of sub-cycles is used as the TTL value corresponding to the corresponding access object type of the corresponding client.
- the determining unit is further configured to determine, according to a mapping relationship between the customer and the industry, an update time point sequence of each access object type of each customer corresponding to the industry, and determine a corresponding access object type corresponding to the industry according to the update time point sequence.
- the TTL value is further configured to determine, according to a mapping relationship between the customer and the industry, an update time point sequence of each access object type of each customer corresponding to the industry, and determine a corresponding access object type corresponding to the industry according to the update time point sequence.
- the apparatus further includes a cache module configured to update the TTL value of the access object type of the access object using the old client for access by the old customer, and to use the access object of the industry to which the new customer belongs for the new customer The access is updated with the TTL value of the image type.
- Another aspect of an embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the above method.
- Another aspect of an embodiment of the present invention provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the program The steps of the above method.
- the method according to the embodiment of the present invention determines that the TTL according to the historical rule of the client's access object update conforms to the customer behavior, and is more reasonable than the TTL determined by the method in the prior art.
- 1 is a flow chart of a method for implementing smart caching in an embodiment
- FIG. 2 is a structural diagram of an apparatus for implementing smart buffer in an embodiment
- FIG. 3 is a structural diagram of a computer device implementing intelligent buffering in an embodiment.
- 1 is a flow chart of a method for implementing intelligent caching in an embodiment; the method includes:
- Step 1 determining an update time point of each access object in the preset time period
- Step 2 Determine a sequence of update time points of each access object type of each client according to the mapping relationship between the access object and each client, and determine a TTL value corresponding to each client's corresponding access object type according to the update time point sequence;
- Step 3 Determine a corresponding TTL value according to the access object type of the access object of the client, and update the access object according to the TTL value.
- the method further includes determining a step of determining whether the TTL value needs to be updated.
- the determining step includes: reaching a specified time period update time point, and adding a user triggering to perform TTL update.
- the access object in step 1 can be a file or a URL.
- Step 1 includes:
- Step 101 Obtain a data source of each access object in a preset time period, where the data source includes an access log in a preset time period, where the access log is an access log that satisfies at least one of the following conditions:
- Step 102 Determine an update time point of each access object, and arrange the update time points of each access object in time series.
- step 2 a sequence of update time points of each access object type of the client is determined according to the mapping relationship between the access object and the client.
- mapping relationship between the access object and the client is that customer A corresponds to file1 and file2; and customer B corresponds to url1.
- determining the TTL value corresponding to the corresponding access object type of the corresponding client according to the update time point sequence includes: arranging the update time point sequence in time series, and performing update time point merging according to the preset time length, according to the merged update.
- the time point sequence determines the TTL value corresponding to the corresponding access object type of the corresponding client.
- the preset time is 5 minutes
- the update time point is combined with the preset time length.
- the time point of the preset position of the time window corresponding to the granularity is used as the combined time point, and the preset position may be the starting point.
- the TTL value corresponding to the corresponding access object type of the customer is determined according to the sequence of the updated update time points in step 2, including:
- the interval duration of all the adjacent two update time points in the sequence of the updated update time point is calculated, and the median of all the interval durations is used as the corresponding client.
- the TTL value corresponding to the object type corresponds to the object type
- the value of the cycle is taken as the TTL value corresponding to the corresponding access object type of the corresponding client;
- the set having the plurality of sub-cycles is used as the TTL value corresponding to the corresponding access object type of the corresponding client.
- the merged update time point sequence of the access object type of the client A's network logo image has a periodic feature and has only one cycle, and the cycle is one day.
- the merged update time point sequence of the access object type of the client B's home page address has a periodic feature and has only one cycle, which is 12 hours. If a merged update point-in-time sequence of a certain access type of a customer C has a periodic feature and has two sub-periods, for example, 3 hours, 21 hours, the corresponding access object of the customer C is collected in a sub-cycle.
- the TTL value of the type is a merged update point-in-time sequence of a certain access type of a customer C.
- the method further includes: determining, according to a mapping relationship between the customer and the industry, an update time point sequence of each access object type of each customer corresponding to the industry, and determining a TTL value corresponding to the corresponding access object type of the industry according to the update time point sequence; . For example, if both customer A and customer B correspond to industry one, the TTL value corresponding to the corresponding access object type of this industry one is:
- the method for determining the TTL value corresponding to the access object type of the industry according to the update time point sequence is the same as the method for determining the TTL value corresponding to the access object type of the client according to the update time point sequence, and details are not described herein again.
- the method of using the TTL in the method includes at least one of the following ways:
- the access to the old customer is updated to the TTL value of the access type of the access object like the access object of the old customer, and the TTL value of the access object type of the access object of the new customer using the industry of the new customer is updated.
- the TTL value of each access object type of the client is sent to the cache server, and the default TTL value of the specified client and the access object type is updated, and the newly cached data of the client is cached. Time; and send the TTL value of each new type of file to the client.
- the TTL value of each type of file is sent to the client every other time period, and the customer determines whether to update the data.
- the TTL value of each access object type of each customer and the TTL value of each access object type of each industry are sent to the operation administrator every other time period as an optimized data reference.
- FIG. 2 is a structural diagram of implementing an intelligent cache device, the device comprising: a preprocessing module, a determining module, and an updating module.
- the pre-processing module is configured to determine an update time point of each access object within the preset time period
- the determining module is configured to determine an update time point sequence of each access object type of each client according to the mapping relationship between the access object and each client, and determine a TTL value corresponding to each client's corresponding access object type according to the update time point sequence;
- the update module determines a corresponding TTL value according to the access object type of the access object of the client, and updates the access object according to the TTL value.
- the determining module includes a sorting unit, a merging unit, and a determining unit;
- the sorting unit is arranged to arrange the sequence of update time points in time series;
- the merging unit is set to update the time point merging with a preset time granularity
- the determining unit is configured to determine a TTL value corresponding to the corresponding access object type of the corresponding client according to the merged update time point sequence.
- the determining unit is further configured to determine the TTL value corresponding to the corresponding access object type of the corresponding customer according to the merged update time point sequence using the following method:
- the interval duration of all the adjacent two update time points in the sequence of the updated update time point is calculated, and the median of all the interval durations is used as the corresponding client.
- the TTL value corresponding to the object type corresponds to the object type
- the value of the cycle is taken as the TTL value corresponding to the corresponding access object type of the corresponding client;
- the set having the plurality of sub-cycles is used as the TTL value corresponding to the corresponding access object type of the corresponding client.
- the determining unit is further configured to determine an update time point sequence of each access object type of each customer corresponding to the industry according to the mapping relationship between the customer and the industry, and determine a TTL value corresponding to the corresponding access object type of the industry according to the update time point sequence.
- the apparatus also includes the cache module being configured to update the TTL value of the access object type of the access object using the old client for access by the old customer, and to access the access object of the industry to which the new customer belongs. Update the TTL value of the image type.
- the embodiment of the present invention further provides a computer readable storage medium, where the computer program stores a computer program, and when the program is executed by the processor, the steps of the foregoing method are implemented.
- the embodiment of the present invention further provides a computer device, as shown in FIG. 3, comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the steps of the method when executing the program. .
- the method according to the embodiment of the present invention determines that the TTL according to the historical rule of the client's access object update conforms to the customer behavior, and is more reasonable than the TTL determined by the method in the prior art.
- the TTL determined according to the historical rule of the client's access object update is in line with the customer behavior, and the TTL determined by the method in the prior art is more reasonable.
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)
- Computer And Data Communications (AREA)
Abstract
本发明实施例公开了一种实现智能缓存的方法及装置,此方法包括:确定预设时段内的各访问对像的更新时间点;根据访问对像与客户的映射关系确定客户的各访问对像类型的更新时间点序列,根据更新时间点序列确定此客户的相应访问对像类型对应的TTL值;根据客户的访问对像的访问对像类型确定相应的TTL值根据此TTL值对此访问对像进行更新。本发明实施例的方法根据客户的访问对像更新的历史规则确定出的TTL符合客户行为,相比现有技术中的方法确定出的TTL更为合理。
Description
本申请要求在2017年08月30日提交中国专利局、申请号为201710763354.5、发明名称为“一种实现智能缓存的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明实施例涉及但不限于互联网技术领域,尤其涉及一种实现智能缓存的方法及装置及其计算机可读存储介质和计算机设备。
随着互联网的发展,内容分发网络(Content Delivery Network,CDN)作为提升服务质量的解决方案被广泛应用。在内容分发网络业务中,通过在现有互联网架构中加入一个缓存层,并引导用户到最邻近网络边缘的缓存层去获取数据达到提升访问效果的目的。其中流量调度和边缘缓存为CDN的核心技术。
在CDN边缘缓存技术中,缓存的内容通过生命周期(Time To Live,TTL)缓存内容的时间。当TTL变为0则会将访问对像置为过期,如果有新的用户将会触发CDN缓存服务器回源站(CDN客户的网站内容服务器)重新获取内容。如果TTL过长则源站的更新不能及时自动同步;如果TTL过短,则会频繁回源影响服务质量、提升源站的压力和性能要求。
现有技术的缺点包括:
1、CDN缓存服务器的TTL一般会遵从源站,即客户设置TTL值,CDN缓存服务器与之同步,此种方式没有给客户合理的参考值,客户只能将TTL设置的尽量短,导致回源次数增加、源站压力增大。
2、CDN系统无法获知客户的历史行为无法智能调整TTL时间。
3、不存在智能缓存策略的实现方案,缺少体系性计算TTL的方案,缺少不同访问对像的TTL数据模型及应用方法。
所以确定一个合理的TTL是需要解决的技术问题。
发明内容
为了解决上述技术问题,本发明实施例提供了一种实现智能缓存的方法及装置。
本发明实施例提供了一种实现智能缓存的方法,包括:
确定预设时段内的各访问对像的更新时间点;
根据访问对像与各客户的映射关系确定各客户的各访问对像类型的更新时间点序列,根据更新时间点序列确定各客户的相应访问对像类型对应的TTL值;
根据客户的访问对像的访问对像类型确定相应的TTL值,根据此TTL值对此访问对像进行更新。
上述实现智能缓存的方法还具有以下特点:
所述根据更新时间点序列确定相应客户的相应访问对像类型对应的TTL值包括:将更新时间点序列按时序排列,以预设时长为粒度进行更新时间点合并,根据合并后的更新时间点序列确定相应客户的相应访问对像类型对应的TTL值。
上述实现智能缓存的方法还具有以下特点:
所述根据合并后的更新时间点序列确定相应客户的相应访问对像类型对应的TTL值包括:
判断合并后的更新时间点序列是否具有周期特征;
在合并后的更新时间点序列的不具有周期特征时,计算此合并后的更新时间点序列中所有相邻的两个更新时间点的间隔时长,将所有间隔时长的中位数作为相应客户的相应访问对像类型对应的TTL值;
在合并后的更新时间点序列的具有周期特征并且只具有一个周期时,将此周期的值作为相应客户的相应访问对像类型对应的TTL值;
在合并后的更新时间点序列的具有周期特征并且每个周期内包括多个子 周期时,将具有此多个子周期的集合作为相应客户的相应访问对像类型对应的TTL值。
上述实现智能缓存的方法还具有以下特点:
所述方法还包括:
根据客户与行业的映射关系,确定行业对应的各客户的各访问对像类型的更新时间点序列,根据更新时间点序列确定此行业的相应访问对像类型对应的TTL值。
上述实现智能缓存的方法还具有以下特点:
所述方法还包括:针对老客户的访问对像使用此老客户的访问对像的访问对像类型的TTL值进行更新,针对新客户使用此新客户所属行业的访问对像的访问对像类型的TTL值进行更新。
本发明实施例还提供了一种实现智能缓存装置,包括:
预处理模块,被设置为确定预设时段内的各访问对像的更新时间点;
确定模块,被设置为根据访问对像与各客户的映射关系确定各客户的各访问对像类型的更新时间点序列,根据更新时间点序列确定各客户的相应访问对像类型对应的TTL值;
更新模块,根据客户的访问对像的访问对像类型确定相应的TTL值,根据此TTL值对此访问对像进行更新。
上述实现智能缓存装置还具有以下特点:
所述确定模块包括排序单元、合并单元、确定单元;
所述排序单元,被设置为将更新时间点序列按时序排列;
所述合并单元,被设置为以预设时长为粒度进行更新时间点合并;
所述确定单元,被设置为根据合并后的更新时间点序列确定相应客户的相应访问对像类型对应的TTL值。
上述实现智能缓存装置还具有以下特点:
所述确定单元,被设置为使用以下方法根据合并后的更新时间点序列确定相应客户的相应访问对像类型对应的TTL值:
判断合并后的更新时间点序列是否具有周期特征;
在合并后的更新时间点序列的不具有周期特征时,计算此合并后的更新时间点序列中所有相邻的两个更新时间点的间隔时长,将所有间隔时长的中位数作为相应客户的相应访问对像类型对应的TTL值;
在合并后的更新时间点序列的具有周期特征并且只具有一个周期时,将此周期的值作为相应客户的相应访问对像类型对应的TTL值;
在合并后的更新时间点序列的具有周期特征并且每个周期内包括多个子周期时,将具有此多个子周期的集合作为相应客户的相应访问对像类型对应的TTL值。
上述实现智能缓存装置还具有以下特点:
所述确定单元,还被设置为根据客户与行业的映射关系,确定行业对应的各客户的各访问对像类型的更新时间点序列,根据更新时间点序列确定此行业的相应访问对像类型对应的TTL值。
上述实现智能缓存装置还具有以下特点:
所述装置还包括缓存模块,被设置为针对老客户的访问对像使用此老客户的访问对像的访问对像类型的TTL值进行更新,针对新客户使用此新客户所属行业的访问对像的访问对像类型的TTL值进行更新。
本发明实施例的另一方面提供了一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述程序被处理器执行时实现上述方法的步骤。
本发明实施例的另一方面提供了一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现上述方法的步骤。
本发明实施例的方法根据客户的访问对像更新的历史规则确定出的TTL符合客户行为,相比现有技术中的方法确定出的TTL更为合理。
参照附图来阅读对于示例性实施例的以下描述,本发明实施例的其他特性特征和优点将变得清晰。
并入到说明书中并且构成说明书的一部分的附图示出了本发明的实施例,并且与描述一起用于解释本发明实施例的原理。在这些附图中,类似的附图标记用于表示类似的要素。下面描述中的附图是本发明的一些实施例,而不是全部实施例。对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,可以根据这些附图获得其他的附图。
图1是实施例中实现智能缓存的方法的流程图;
图2是实施例中实现智能缓存的装置的结构图;
图3是实施例中实现智能缓存的计算机设备的结构图。
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
图1是实施例中实现智能缓存的方法的流程图;此方法包括:
步骤1,确定预设时段内的各访问对像的更新时间点;
步骤2,根据访问对像与各客户的映射关系确定各客户的各访问对像类型的更新时间点序列,根据更新时间点序列确定各客户的相应访问对像类型对应的TTL值;
步骤3,根据客户的访问对像的访问对像类型确定相应的TTL值,根据此TTL值对此访问对像进行更新。
其中,
在步骤1之前还包括判断是否需要进行TTL值更新的判断步骤,此判断步骤包括:到达指定的时间周期更新时间点、新增用户触发进行TTL的更新。
步骤1中访问对像可以是文件或URL。步骤1包括:
步骤101获取预设时段内各访问对像的数据源,此数据源包括预设时段内的访问日志,此访问日志是满足以下条件中至少一种的访问日志:
一,过滤掉TCP_MISS字段的访问日志;
二,包括HTTP code为304的访问日志;
三,文件的md5值发生变化的访问日志。
步骤102,确定各访问对像的更新时间点,按时序排列各访问对像的更新时间点。
例如:
步骤2中根据访问对像与客户的映射关系确定客户的各访问对像类型的更新时间点序列。
例如:访问对像与客户的映射关系为客户A对应于file1和file2;客户B对应于url1。
则确定客户的各访问对像类型的更新时间点序列为:
步骤2中,根据更新时间点序列确定相应客户的相应访问对像类型对应的TTL值包括:将更新时间点序列按时序排列,以预设时长为粒度进行更新时间点合并,根据合并后的更新时间点序列确定相应客户的相应访问对像类型对应的TTL值。
例如:预设时长为5分钟,以预设时长为粒度进行更新时间点合并后将此粒度对应的时间窗口的预设位置的时间点作为合并后的时间点,预设位置可以是起始点、结束点、中间点或者预设比例的位置。
进行更新时间点合并后的各客户的更新时间点序列为:
步骤2中根据合并后的更新时间点序列确定此客户的相应访问对像类型对应的TTL值包括:
判断合并后的更新时间点序列是否具有周期特征;
在合并后的更新时间点序列的不具有周期特征时,计算此合并后的更新时间点序列中所有相邻的两个更新时间点的间隔时长,将所有间隔时长的中位数作为相应客户的相应访问对像类型对应的TTL值;
在合并后的更新时间点序列的具有周期特征并且只具有一个周期时,将此周期的值作为相应客户的相应访问对像类型对应的TTL值;
在合并后的更新时间点序列的具有周期特征并且每个周期内包括多个子周期时,将具有此多个子周期的集合作为相应客户的相应访问对像类型对应的TTL值。
根据上述举例中,客户A的网络LOGO图片的访问对像类型的合并后的更新时间点序列的具有周期特征并且只具有一个周期,此周期为一天。客户B的首页页面地址的访问对像类型的合并后的更新时间点序列的具有周期特征并且只具有一个周期,此周期为12小时。如果某个客户C的某访问对像类型的合并后的更新时间点序列的具有周期特征并且具有两个子周期,例如3小时、21小时,则将子周期的集合此客户C的相应访问对像类型的TTL值。
本方法中还包括:根据客户与行业的映射关系,确定行业对应的各客户的各访问对像类型的更新时间点序列,根据更新时间点序列确定此行业的相应访问对像类型对应的TTL值。例如,客户A和客户B均对应于行业一,则此行业一的相应访问对像类型对应的TTL值为:
根据更新时间点序列确定此行业的访问对像类型对应的TTL值与上述根据更新时间点序列确定客户的访问对像类型对应的TTL值的方法相同,此处不再赘述。
所述方法中使用此TTL的方法包括以下方式中的至少一种:
针对老客户的访问对像使用此老客户的访问对像的访问对像类型的TTL值进行更新,针对新客户使用此新客户所属行业的访问对像的访问对像类型的TTL值进行更新。
针对启用自动智能缓存策略的客户,将客户各个访问对像类型的TTL数值发送给缓存服务器,进行指定客户和访问对像类型的默认TTL数值的更新,后续此客户新缓存的数据,将缓存TTL时间;并将新的各个类型文件的TTL数值发送给客户。
针对没有开启自动智能缓存策略的客户,每隔一个时间周期,将各个类型文件的TTL数值发送给客户,客户自行判断是否进行数据更新。
每隔一个时间周期将各客户的各访问对像类型的TTL值、各行业的各访问对像类型的TTL值发送给运营管理员,作为优化数据参考。
图2是实现智能缓存装置的结构图,此装置包括:预处理模块、确定模块和更新模块。
预处理模块被设置为确定预设时段内的各访问对像的更新时间点;
确定模块被设置为根据访问对像与各客户的映射关系确定各客户的各访问对像类型的更新时间点序列,根据更新时间点序列确定各客户的相应访问对像类型对应的TTL值;
更新模块根据客户的访问对像的访问对像类型确定相应的TTL值,根据此TTL值对此访问对像进行更新。
其中,
确定模块包括排序单元、合并单元、确定单元;
排序单元被设置为将更新时间点序列按时序排列;
合并单元被设置为以预设时长为粒度进行更新时间点合并;
确定单元被设置为根据合并后的更新时间点序列确定相应客户的相应访问对像类型对应的TTL值。
确定单元还被设置为使用以下方法根据合并后的更新时间点序列确定相应客户的相应访问对像类型对应的TTL值:
判断合并后的更新时间点序列是否具有周期特征;
在合并后的更新时间点序列的不具有周期特征时,计算此合并后的更新时间点序列中所有相邻的两个更新时间点的间隔时长,将所有间隔时长的中位数作为相应客户的相应访问对像类型对应的TTL值;
在合并后的更新时间点序列的具有周期特征并且只具有一个周期时,将此周期的值作为相应客户的相应访问对像类型对应的TTL值;
在合并后的更新时间点序列的具有周期特征并且每个周期内包括多个子周期时,将具有此多个子周期的集合作为相应客户的相应访问对像类型对应的TTL值。
确定单元还被设置为根据客户与行业的映射关系,确定行业对应的各客户的各访问对像类型的更新时间点序列,根据更新时间点序列确定此行业的相应访问对像类型对应的TTL值。
此装置还包括缓存模块被设置为针对老客户的访问对像使用此老客户的访问对像的访问对像类型的TTL值进行更新,针对新客户使用此新客户所属行业的访问对像的访问对像类型的TTL值进行更新。
本发明实施例还提供了一种计算机可读存储介质,此存储介质上存储有计算机程序,所述程序被处理器执行时实现上述方法的步骤。
本发明实施例还提供了一种计算机设备,如图3所示,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行此程序时实现上述方法的步骤。
本发明实施例的方法根据客户的访问对像更新的历史规则确定出的TTL符合客户行为,相比现有技术中的方法确定出的TTL更为合理。
上面描述的内容可以单独地或者以各种方式组合起来实施,而这些变型方式都在本发明的保护范围之内。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现,相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本发明实施例不限制于任何特定形式的硬件和软件的结合。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的物品或者设备中还存在另外的相同要素。
以上实施例仅用以说明本发明实施例的技术方案而非限制,仅仅参照较佳实施例对本发明进行了详细说明。本领域的普通技术人员应当理解,可以对本发明实施例的技术方案进行修改或者等同替换,而不脱离本发明实施例技术方案的精神和范围,均应涵盖在本发明的权利要求范围当中。
本发明实施例根据客户的访问对像更新的历史规则确定出的TTL符合客户行为,相比现有技术中的方法确定出的TTL更为合理。
Claims (12)
- 一种实现智能缓存的方法,包括:确定预设时段内的各访问对像的更新时间点;根据访问对像与各客户的映射关系确定各客户的各访问对像类型的更新时间点序列,根据更新时间点序列确定各客户的相应访问对像类型对应的TTL值;根据客户的访问对像的访问对像类型确定相应的TTL值,根据此TTL值对此访问对像进行更新。
- 如权利要求1所述的实现智能缓存的方法,其中,所述根据更新时间点序列确定相应客户的相应访问对像类型对应的TTL值包括:将更新时间点序列按时序排列,以预设时长为粒度进行更新时间点合并,根据合并后的更新时间点序列确定相应客户的相应访问对像类型对应的TTL值。
- 如权利要求2所述的实现智能缓存的方法,其中,所述根据合并后的更新时间点序列确定相应客户的相应访问对像类型对应的TTL值包括:判断合并后的更新时间点序列是否具有周期特征;在合并后的更新时间点序列的不具有周期特征时,计算此合并后的更新时间点序列中所有相邻的两个更新时间点的间隔时长,将所有间隔时长的中位数作为相应客户的相应访问对像类型对应的TTL值;在合并后的更新时间点序列的具有周期特征并且只具有一个周期时,将此周期的值作为相应客户的相应访问对像类型对应的TTL值;在合并后的更新时间点序列的具有周期特征并且每个周期内包括多个子周期时,将具有此多个子周期的集合作为相应客户的相应访问对像类型对应的TTL值。
- 如权利要求1、2或3所述的实现智能缓存的方法,其中,所述方法还包括:根据客户与行业的映射关系,确定行业对应的各客户的各访问对像类型的更新时间点序列,根据更新时间点序列确定此行业的相应访问对像类型对应的 TTL值。
- 如权利要求4所述的实现智能缓存的方法,其中,所述方法还包括:针对老客户的访问对像使用此老客户的访问对像的访问对像类型的TTL值进行更新,针对新客户使用此新客户所属行业的访问对像的访问对像类型的TTL值进行更新。
- 一种实现智能缓存装置,包括:预处理模块,被设置为确定预设时段内的各访问对像的更新时间点;确定模块,被设置为根据访问对像与各客户的映射关系确定各客户的各访问对像类型的更新时间点序列,根据更新时间点序列确定各客户的相应访问对像类型对应的TTL值;更新模块,根据客户的访问对像的访问对像类型确定相应的TTL值,根据此TTL值对此访问对像进行更新。
- 如权利要求6所述的实现智能缓存装置,其中,所述确定模块包括排序单元、合并单元、确定单元;所述排序单元,被设置为将更新时间点序列按时序排列;所述合并单元,被设置为以预设时长为粒度进行更新时间点合并;所述确定单元,被设置为根据合并后的更新时间点序列确定相应客户的相应访问对像类型对应的TTL值。
- 如权利要求7所述的实现智能缓存装置,其中,所述确定单元,被设置为使用以下方法根据合并后的更新时间点序列确定相应客户的相应访问对像类型对应的TTL值:判断合并后的更新时间点序列是否具有周期特征;在合并后的更新时间点序列的不具有周期特征时,计算此合并后的更新时间点序列中所有相邻的两个更新时间点的间隔时长,将所有间隔时长的中位数作为相应客户的相应访问对像类型对应的TTL值;在合并后的更新时间点序列的具有周期特征并且只具有一个周期时,将此周期的值作为相应客户的相应访问对像类型对应的TTL值;在合并后的更新时间点序列的具有周期特征并且每个周期内包括多个子周 期时,将具有此多个子周期的集合作为相应客户的相应访问对像类型对应的TTL值。
- 如权利要求6、7或8所述的实现智能缓存装置,其中,所述确定单元,还被设置为根据客户与行业的映射关系,确定行业对应的各客户的各访问对像类型的更新时间点序列,根据更新时间点序列确定此行业的相应访问对像类型对应的TTL值。
- 如权利要求9所述的实现智能缓存装置,其中,所述装置还包括缓存模块,被设置为针对老客户的访问对像使用此老客户的访问对像的访问对像类型的TTL值进行更新,针对新客户使用此新客户所属行业的访问对像的访问对像类型的TTL值进行更新。
- 一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述程序被处理器执行时实现权利要求1至5中任意一项所述方法的步骤。
- 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求1至5中任意一项所述方法的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710763354.5 | 2017-08-30 | ||
CN201710763354.5A CN107707621B (zh) | 2017-08-30 | 2017-08-30 | 一种实现智能缓存的方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019042298A1 true WO2019042298A1 (zh) | 2019-03-07 |
Family
ID=61170291
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/102817 WO2019042298A1 (zh) | 2017-08-30 | 2018-08-29 | 一种实现智能缓存的方法及装置及其计算机可读存储介质和计算机设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107707621B (zh) |
WO (1) | WO2019042298A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3855707A1 (en) * | 2020-01-21 | 2021-07-28 | CBS Interactive Inc. | Systems, methods, and storage media for managing traffic on a digital content delivery network |
USRE50195E1 (en) | 2022-04-25 | 2024-10-29 | Cbs Interactive Inc. | Systems, methods, and storage media for managing traffic on a digital content delivery network |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107707621B (zh) * | 2017-08-30 | 2018-07-20 | 贵州白山云科技有限公司 | 一种实现智能缓存的方法及装置 |
CN110046175B (zh) * | 2019-03-18 | 2023-02-28 | 创新先进技术有限公司 | 一种缓存更新、数据返回方法及装置 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101656753A (zh) * | 2008-08-21 | 2010-02-24 | 中国移动通信集团公司 | 动态内容分发的内容同步方法、设备及系统 |
US20150229733A1 (en) * | 2012-08-02 | 2015-08-13 | Telefonica, S.A. | Web caching method and system for content distribution network |
CN107707621A (zh) * | 2017-08-30 | 2018-02-16 | 贵州白山云科技有限公司 | 一种实现智能缓存的方法及装置 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102571839B (zh) * | 2010-12-15 | 2015-02-18 | 北京邮电大学 | 基于用户社会属性的p2p内容分发方法及系统 |
CN102137006B (zh) * | 2010-12-31 | 2013-12-18 | 华为技术有限公司 | Cdn网络中的数据传输方法及设备 |
US9438487B2 (en) * | 2012-02-23 | 2016-09-06 | Ericsson Ab | Bandwith policy management in a self-corrected content delivery network |
US9276983B2 (en) * | 2015-05-01 | 2016-03-01 | Amazon Technologies, Inc. | Content delivery network video content invalidation through adaptive bitrate manifest manipulation |
CN105072172B (zh) * | 2015-07-31 | 2019-03-19 | 网宿科技股份有限公司 | 一种基于内容分发网络的热点统计及推送方法及系统 |
-
2017
- 2017-08-30 CN CN201710763354.5A patent/CN107707621B/zh active Active
-
2018
- 2018-08-29 WO PCT/CN2018/102817 patent/WO2019042298A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101656753A (zh) * | 2008-08-21 | 2010-02-24 | 中国移动通信集团公司 | 动态内容分发的内容同步方法、设备及系统 |
US20150229733A1 (en) * | 2012-08-02 | 2015-08-13 | Telefonica, S.A. | Web caching method and system for content distribution network |
CN107707621A (zh) * | 2017-08-30 | 2018-02-16 | 贵州白山云科技有限公司 | 一种实现智能缓存的方法及装置 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3855707A1 (en) * | 2020-01-21 | 2021-07-28 | CBS Interactive Inc. | Systems, methods, and storage media for managing traffic on a digital content delivery network |
USRE50195E1 (en) | 2022-04-25 | 2024-10-29 | Cbs Interactive Inc. | Systems, methods, and storage media for managing traffic on a digital content delivery network |
Also Published As
Publication number | Publication date |
---|---|
CN107707621B (zh) | 2018-07-20 |
CN107707621A (zh) | 2018-02-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10579608B2 (en) | Index maintenance based on a comparison of rebuild vs. update | |
US9652538B2 (en) | Web crawler optimization system | |
CN106796547B (zh) | 用于代理缓存智能对象淘汰的方法和系统 | |
US8984058B2 (en) | Pre-fetching remote resources | |
US20150143377A1 (en) | Dynamic scheduling of tasks for collecting and processing data using job configuration data | |
US10103994B2 (en) | Opportunistic network updates | |
WO2019042298A1 (zh) | 一种实现智能缓存的方法及装置及其计算机可读存储介质和计算机设备 | |
US11487714B2 (en) | Data replication in a data analysis system | |
CN109194711B (zh) | 一种组织架构的同步方法、客户端、服务端及介质 | |
US9064013B1 (en) | Application of resource limits to request processing | |
US10761735B2 (en) | Tier aware caching solution to increase application performance | |
WO2019006775A1 (zh) | 一种数据传输方法及其系统 | |
US20200364241A1 (en) | Method for data synchronization between a source database system and target database system | |
WO2020108544A1 (zh) | 同步缓存数据的方法、装置和系统 | |
US20170237805A1 (en) | Worker reuse deadline | |
CN105991769A (zh) | 数据迁移方法及装置、边缘节点服务器 | |
CN105610917B (zh) | 实现系统中同步数据修复的方法及系统 | |
US10705978B2 (en) | Asynchronous tracking for high-frequency and high-volume storage | |
US11074222B2 (en) | Lockless management of deduplicated data using reference tags | |
JP6225606B2 (ja) | データベース監視装置、データベース監視方法、並びにコンピュータ・プログラム | |
CN102164309A (zh) | 节目的处理方法和系统以及装置 | |
JP2018511131A (ja) | オンライン媒体のための階層的なコストベースのキャッシング | |
CN105162891A (zh) | 一种基于ip网络的数据存储方法 | |
CN106649601A (zh) | 一种文件系统数据处理方法、客户端、服务端及系统 | |
CN109981391B (zh) | 一种采样方法、设备及可读存储介质 |
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: 18850596 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: 18850596 Country of ref document: EP Kind code of ref document: A1 |