Soft cache: does rec. really work?

Soft cache: does rec. really work?

参考论文:Soft Cache Hits: Improving Performance Through Recommendation and Delivery of Related Content

关键问题
1、如何实现
Soft cache的流程:

for the case of YouTube (or, any similar service). If a user requests a content, e.g., by typing on the YouTube search bar, and the content is not available in the local cache(s), then a local app proxy located near the cache and having knowledge of the cached contents (e.g. a YouTube recommender code running at a Multi-access Edge Computing (MEC) server [14]), could recommend a set of related contents that are also locally available. If the user prefers or accepts (under some incentives; see below) one of these contents, instead of the one she initially typed/requested, a soft cache hit (SCH) occurs, and an expensive remote access is avoided. We will use the term soft cache hit to describe such scenarios.

当本地缓存miss时,cache附近的本地app代理利用MEC和推荐系统推荐相似的内容(本地缓存可用),如果用户(在一定的激励下)接受该内容,**soft cache hit(SCH)**实现,从而避免了远距离传输,

2、如何衡量cache命中

As a simple example, consider a single cache with a tiny content catalog with contents A, B, C of popularities 3, 2, 2, respectively (e.g. number of requests per minute). If the cache could fit only a single content, traditional caching will choose to store the most popular content (A), leading to a cache hit ratio of 3/(3 + 2 + 2), approx. 43%. However, assume we knew that 1 out of 2 users requesting A, would be willing to watch content C instead (e.g. because C is highly related to A, and available locally at HD). Same for users requesting content B. Then, caching content C would satisfy all requests for C (2), half the requests for B (0.5 · 2), and half the requests for A (0.5·3), leading to a cache hit ratio of 4.5/7, approximately 64% (an almost 50% improvement over the standard policy).

传统:
pop: 3 2 2
cache: A
hit ratio: 3/(3 + 2 + 2) = 43%

soft:
half of users requst A B can allow C:
cache: C
hit ratio: (2 + 0.5*(5)) /7 =64%

3、是否真的有意义
4、提升空间在哪里?(论文未解决的问题)

Abstract

  1. In this paper, we introduce the concept of “soft cache hits” (SCHs).

An SCH occurs if a user’s requested content is not in the local cache, but the user can be (partially) satisfied by a related content that is.

用户需求内容不存在于本地缓存,但相关内容可(部分)满足用户

  1. What will the soft cache system do?

In case of a cache miss, an application proxy (e.g., YouTube) running close to the helper node (e.g., at a multi-access edge computing server) can recommend the most related files that are locally cached.

当本地缓存miss,由应用代理(更方便对用户和内容建模)向local storage (helper node)推荐本地已缓存的相关内容。

  1. When should the soft cache mechanism work?

This system could be activated during periods of predicted congestion, or for selected users (e.g., low-cost plans), to improve cache hit ratio with limited (and tunable) user quality of experience performance impact.

这个系统可以在预测的拥堵期间被激活,或者针对选定的用户(例如,low-cost plans ???),以有限的用户体验性能代价(可调整)改善缓存命中率。

  1. Contribute

soft cache hits model
discussion about SCHs (when it should be allowed)
problem analyze and algorithm ?
证明即使对于单个缓存,带SCH的最佳缓存也是NP-hard的。基于此,本文在一个充分通用的设置中提出了带有SCH的最佳femto-cache(柔性缓存)‘问题’,并提出了具有可证明性能的高效算法。最后,本文用大量的真实数据集证实了论文的主张。

Introduction

1. Mobile edge caching + Small cells

Mobile edge caching has been identified as one of the five most disruptive enablers for 5G networks [1], both to reduce content access latency and to alleviate backhaul congestion. However, the number of required storage points in future cellular networks will be orders of magnitude more than in traditional CDNs [2] (e.g., 100s or 1000s of small cells (SCs) corresponding to an area covered by a single CDN server today).

2.Storage space small

As a result, the storage space per local edge cache must be significantly smaller to keep costs reasonable.

3. Edge cache hit ratio would still be low

Even if we considered a small subset of the entire Internet catalog, e.g., a typical torrent catalog (1.5 PB) or the Netflix catalog (3 PB), edge cache hit ratio would still be low even with a relatively skewed popularity distribution and more than 1 TB of local storage

4. Related work
To increase the ‘effective’ cache size visible to each user. (增加用户的’有效’cache size)

  • a. Coverage overlaps 重叠覆盖
    femto-caching: 每个用户受到多个基站服务,利用这些基站的聚合存储能力[5][6]
    [5] N. Golrezaei, K. Shanmugam, A. G. Dimakis, A. F. Molisch, and G. Caire, “FemtoCaching: Wireless content delivery through distributed caching helpers,” in Proc. IEEE INFOCOM, Mar. 2012, pp. 1107–1115.
    [6] K. Poularakis, G. Iosifidis, and L. Tassiulas, “Approximation algorithms for mobile data caching in small cell networks,” IEEE Trans. Commun., vol. 62, no. 10, pp. 3665–3677, Oct. 2014

  • b. Coded caching
    用户可以从同一频段的其他用户处的缓存获取内容

  • c. Delayed content access
    用户等待一定时间(TTL),这期间不断寻找有效缓存。(给缓冲一点时间)

以上三种方法都存在理论上的有效性,但实际应用起来都具有一定的缺陷:
a. 需要足够的基站密度覆盖
b. 子包问题复杂性
c. 引入额外时延

5. Core idea

move away from trying to satisfy every possible user request, and instead try to satisfy the user.

支持/解释:
(a)用户需求越来越收到推荐系统的影响
(b)相关内容对用户具有相似的效用:substitute(alternative, related) goods

6. scenarios
(i) cache-aware recommendation plugin to application(在用户请求内容时提供选择)
请添加图片描述

(ii) 当出现预测堵塞时激活系统,通过一定的激励鼓励用户切换至本地缓存内容
请添加图片描述

(iii) 提供具有较高数据配额的低费率计划,并约定在拥堵期间只能提供本地缓存的内容。

避免用户心理的潜在影响:
在后续视频推荐中考虑缓存与否对推荐内容进行排序。

7. 带来的变化(cache policy and hit ratio cacculation)
见问题2

8. Contributions

  • Soft Cache Hits (SCH) concept: apply in edge caching for cellular networks
  • SCH model: 结合模型同时介绍了集中使用场景,并说明了模型适用于非协作/协作缓存架构
  • Analytical Invertigation 理论分析:证明即使只考虑单个缓存,有SCH的最佳边缘缓存问题也是NP-hard。这与没有SCH的标准情况形成了鲜明的对比。然后论文证明,尽管复杂度增加了,带SCH的femto-caching的一般问题仍然表现出一些特性,可以利用这些特性来推导出具有可证明性能的高效近似算法。
  • 基于数据的分析:我们通过对包含相关内容信息的5个真实数据集的扩展评估,证实了我们的SCH建议和分析结果,表明在实践中可以实现有希望的额外缓存收益。

9. 最后,作者再次强调了本工作的意义:
随着MEC和RAN Sharing架构的发展,Mobile Network Operators与content provoders的区别变得愈发模糊,这种讲推荐系统与缓存系统相结合的工作是非常必要的。

Problem Setup

请添加图片描述

1)Network Model
N: set of users ∣ N ∣ = N |N| = N N=N
M: set of SCs ∣ M ∣ = M |M| = M M=M
q i j q_{ij} qij = P r o b { Prob\{ Prob{user i i i in range of SC j } j\} j}
equivalently: 等效地, q i j q_{ij} qij为用户 i i i S C j SC_j SCj上所花的时间占比。

因此 q i j ∈ [ 0 , 1 ] q_{ij} \in [0, 1] qij[0,1]代表了用户与SC之前的确定(0/1)性或模糊相关。

2) Contetn Model
K: set of catalog |K| = K
p k i p_k^i pki 表示用户i需求内容k的概率
assumption: all contents have same size

3)Cache Model(Baseline)
x i j ∈ { 0 , 1 } x_{ij} \in \{0, 1\} xij{0,1} 表示内容k是否缓存在SC j

4)Related Content Recommendation
流程:1.user request content->2.miss->3.app proxy checks related content->4.check whcih are available->5.recommend to user->6.soft cache or miss.

utilities: u k n i u_{kn}^i ukni :用户i需求内容k,但接受内容n的概率。 u k k i = 1 u_{kk}^i = 1 ukki=1
内容相关度矩阵: U i = { u k n i } U^i = \{ u_{kn}^i\} Ui={ukni} :由之前的统计结果得出。
例如通过协同过滤算法得到对用户i来说,内容k和n的相关度为0.5,则 u k n i = 0.5 u_{kn}^i = 0.5 ukni=0.5

除此之外,论文给出了两种假设(subcases):

  1. system 不确定所有的 u k n i u_{kn}^i ukni,但知道其概率分布,即: F k n ( x ) = P { u k n i ≤ x } F_{kn}(x) = P\{u_{kn}^i ≤ x\} Fkn(x)=P{uknix}
  2. system 仅知道对内容对{k, n}的平均利用率 u k n ( 全 部 用 户 的 均 值 ) u_{kn} (全部用户的均值) ukn

单一(SC)缓存

使用cache hit ratio (CHR)作为基本的performance metric

A. Soft cache hit ratio 缓存命中率
基本:
C H R ( k ) = x k CHR(k) = x_k CHR(k)=xk

Soft CHR:
S C H R = ∑ i = 1 N ∑ k = 1 K p k i ⋅ q i ⋅ ( 1 − ∏ n = 1 K ( 1 − u k n i ⋅ x n ) ) SCHR = \sum_{i=1} ^ N\sum_{k=1} ^ K p_k^i \cdot q_i \cdot(1-\prod_{n=1} ^K(1-u_{kn}^i \cdot x_n)) SCHR=i=1Nk=1Kpkiqi(1n=1K(1uknixn))

Proof:
对单一用户来说:
S C H R ( i , k , U ) = 1 − ∏ n = 1 K ( 1 − u k n i ⋅ x n ) SCHR(i,k,U) = 1-\prod_{n=1} ^K(1-u_{kn}^i \cdot x_n) SCHR(i,k,U)=1n=1K(1uknixn)

结合全部用户,全部SC得到上式。

对于sub-case1 和 2,SCHR有如下两种相应的变换:
请添加图片描述

B. Optimal SCH for Equal Content Sizes

Optimization Problem 1:
m a x i m i z e X = { x 1 , . . . , x K } f ( X ) = ∑ i = 1 N ∑ k = 1 K p k i ⋅ q i ⋅ ( 1 − ∏ n = 1 K ( 1 − u k n i ⋅ x n ) ) s . t . ∑ k = 1 K x k ≤ C \begin{aligned} \underset{X = \{x_1, ..., x_K \}}{maximize} f(X) &= \sum_{i=1} ^ N\sum_{k=1} ^ K p_k^i \cdot q_i \cdot(1-\prod_{n=1} ^K(1-u_{kn}^i \cdot x_n)) \\ s.t. \sum_{k=1}^K x_k &≤ C \end{aligned} X={x1,...,xK}maximizef(X)s.t.k=1Kxk=i=1Nk=1Kpkiqi(1n=1K(1uknixn))C

Lemma 2: 优化问题1是NP-hard的
请添加图片描述

上述证明将问题对应为一个带权覆盖问题。
Lemma 3: 上式是次模函数,且单调非负(可用贪心算法求解)

作者提出了对应的贪心算法解决这一问题:
请添加图片描述

算法复杂度: O ( C ⋅ K ) O(C \cdot K) O(CK)

其核心 “内容选取” 可以通过lazy evaluations of the objective function (A. Krause and D. Golovin, “Submodular function maximization,” in Tractability: Practical Approaches to Hard Problems, vol. 3. 2012, p. 8)来解决。

针对此类次模函数的优化问题,贪心算法具有已知的performance bound 表现下界:
f ( S ∗ ) ≥ ( 1 − 1 e ) ⋅ O P T f(S^*) \geq (1-\frac{1}{e}) \cdot OPT f(S)(1e1)OPT

其中OPT是最优解。

C. Optimal SCH for Different Content Sizes
实际场景中,内容的大小并不相同,这一点同样需要被缓存系统所考虑。
在这一前提下,新的优化问题形式化为:
m a x i m i z e X = { x 1 , . . . , x K } f ( X ) = ∑ i = 1 N ∑ k = 1 K p k i ⋅ q i ⋅ ( 1 − ∏ n = 1 K ( 1 − u k n i ⋅ x n ) ) s . t . ∑ k = 1 K s k x k ≤ C \begin{aligned} \underset{X = \{x_1, ..., x_K \}}{maximize} f(X) &= \sum_{i=1} ^ N\sum_{k=1} ^ K p_k^i \cdot q_i \cdot(1-\prod_{n=1} ^K(1-u_{kn}^i \cdot x_n)) \\ s.t. \sum_{k=1}^K s_kx_k &≤ C \end{aligned} X={x1,...,xK}maximizef(X)s.t.k=1Kskxk=i=1Nk=1Kpkiqi(1n=1K(1uknixn))C

作者针对此问题提出了改进的贪心算法:
请添加图片描述

上述算法的复杂度为 O ( K 2 ) O(K^2) O(K2)

同时可证明上个优化问题为NP-hard的,贪心算法存在类似的最优效果下界:
f ( S ∗ ) ≥ 1 2 ( 1 − 1 e ) ⋅ O P T f(S^*) \geq \frac{1}{2}(1-\frac{1}{e}) \cdot OPT f(S)21(1e1)OPT

作者说明类似的问题(a set cover problem variant with a knapsack type constraint)具有 ( 1 − 1 e ) ⋅ O P T (1-\frac{1}{e}) \cdot OPT (1e1)OPT下界的算法解,但会让复杂度大大提升 O ( K 5 ) O(K^5) O(K5),这在现实世界(K较大)是难以实现的。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个错误信息是由于在系统重装后使用了旧的pip路径导致的。你可以根据以下步骤来解决这个问题: 1. 打开命令提示符窗口。 2. 输入命令【python -m pip install --upgrade --force-reinstall pip】,这会强制重新安装最新版本的pip。 3. 如果步骤2没有解决问题,你可以尝试更新pip,使用命令【python -m pip install --upgrade】。 4. 重新运行你的命令,应该就不会再出现"Fatal error in launcher: Unable to create process using '"d:\python.exe" "D:\Scripts\pyinstaller.exe" -F ??.py': ???????????"的错误信息了。 请注意,确保你的Python环境和pip都已正确安装,并且路径设置正确。如果问题仍然存在,你可能需要重新安装Python,并确保路径设置正确。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [解决:系统重装后的pip报错:Fatal error in launcher: Unable to create process using](https://download.csdn.net/download/weixin_38618819/13740484)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [Fatal error in launcher: Unable to create process using d:\pycharm\venv\scripts\python.exe D:\soft](https://blog.csdn.net/qq_53837235/article/details/125346460)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值