
Owners refer to entities such as restaurants and hotels who own a Wi-Fi network and deploy DiFi, and users refer to their customers who require Wi-Fi access. Figure 1 provides an overview. DiFi is deployed on top of a Wi-Fi router/access point (AP) that is typically connected to the wired connection. It intervenes between the router/AP and users to grant Wi-Fi access. It is installed on a dedicated hardware, e.g., Raspberry Pi, so it does not require modification on the existing Wi-Fi infrastructure. Because the hardware provides the complete functions of DiFi, we also refer to it as the DiFi adapter. If multiple routers/APs are installed, e.g., in an airport, each will be connected to a DiFi adapter that runs a copy of the system.
业主是指拥有 Wi-Fi 网络并部署 DiFi 的餐厅和酒店等实体,用户是指需要 Wi-Fi 访问的客户。 图 1 提供了概述。 DiFi 部署在通常连接到有线连接的 Wi-Fi 路由器/接入点 (AP) 之上。 它在路由器/AP 和用户之间进行干预以授予 Wi-Fi 访问权限。 它安装在专用硬件上,例如 Raspberry Pi,因此不需要对现有 Wi-Fi 基础设施进行修改。 因为硬件提供了DiFi的完整功能,所以我们也称它为DiFi适配器。 如果安装了多个路由器/AP,例如在机场,每个都将连接到运行系统副本的 DiFi 适配器。
To support the go-as-you-pay design, we follow a layered system design. The top layer includes a user interface for the interaction between users and DiFi, e.g., indicating requirements and paying for Wi-Fi access. The uniqueness of our design is that users can indicate their own requirements by submitting demand, i.e., desired resources. Each user either selects from a set of preconfigured options, or specifies the particular quantities of desired resources. After demand is processed by lower layers, users will know the results such the allocated resources and pending payment at the interface.
为了支持按需付费设计,我们遵循分层系统设计。 顶层包括一个用户界面,用于用户和 DiFi 之间的交互,例如,提交需求和支付 Wi-Fi 访问费用。 我们设计的独特之处在于用户可以通过提交需求来表明自己的需求,即期望的资源。 每个用户要么从一组预先配置的选项中进行选择,要么指定特定数量的所需资源。 需求经过下层处理后,用户将在接口处获知资源分配、待付款等结果。
The second layer includes the allocation and pricing mechanisms for achieving the go-as-you-pay design. As DiFi attempts to allocate resources to satisfy the various user requirements, this layer accounts for computation of the allocation results. It also dynamically adjusts the prices according to real-time user demand. Similar to pay-as-you-go systems, DiFi charges the price for unit resource usage per unit time, and users pay the corresponding usage fees for allocated resources.
The bottom layer includes the scheduling and feedback mechanisms. The scheduling mechanism ensures that each user receives the resources specified by the allocation results. Meanwhile, a feedback mechanism that monitors the real-time resource utilization could benefit both users and owners. Users may have idle resources, e.g., due to overly estimated demand or weak signals. The utilization level serves as a feedback signal for the scheduling mechanism to redistribute the idle resources. Users with low utilization will be suggested to adjust the demand to avoid unnecessary usage fees. Owners could then improve the resource utilization.
第二层包括实现go-as-you-pay 设计的分配和定价机制。由于 DiFi 尝试分配资源以满足各种用户需求,因此该层负责计算分配结果。它还根据实时用户需求动态调整价格。与按量付费系统类似,DiFi 对单位时间的单位资源使用量收费,用户为分配的资源支付相应的使用费。
底层包括调度和反馈机制。调度机制保证每个用户都能收到分配的资源。同时,监控实时资源利用率的反馈机制可以使用户和所有者都受益。用户可能有空闲资源,例如,由于过度估计的需求或信号较弱。利用率水平作为调度机制重新分配空闲资源的反馈信号。建议使用率低的用户调整需求,避免不必要的使用费用。然后,所有者可以提高资源利用率。
DiFi attempts to address the realistic concerns of users and owners. First, users would desire better privacy and anonymity, since it is a common pratice for existing systems to collect personal details. Second, as DiFi enables owners to dynamically allocate resources and prices to generate revenues, it is also desirable to ensure users that the system follows agreed rules in allocation and pricing. Third, owners would expect a system with less deployment cost. In particular, gaining trust from users generates cost of verification, while bootstrapping and attracting users generate cost of networking. Most importantly, DiFi is deployed in a distributed manner at the edge of the Internet, i.e., Wi-Fi ingress/egress points, hence the decentralization of control and management will be more efficient and flexible. Blockchain [19], [20] provides an ideal solution that addresses the concerns. It provides better privacy and data ownership, as users only need to provide a blockchain address that could be reset by themselves. It provides trust and decentralization by establishing a distributed consensus [21], as it records a traceable and irreversible history that could be verified by each participant. Smart contract [22] is based on blockchain that automatically executes, being able to perform the tasks of allocation and pricing mechanisms. The execution of smart contracts provides a guarantee that our system could be trusted on its own, without a central authority, a third-party intermediator or enforcement mechanism. Blockchain is also able to reduce both types of cost effectively [23], compared to traditional off-chain methods such as verification through an intermediary. In consequence, we leverage the blockchainbased smart contract in system implementation.
DiFi 试图解决用户和所有者的现实问题。首先,用户希望获得更好的隐私和匿名性,因为现有系统收集个人详细信息是一种常见做法。其次,由于 DiFi 使所有者能够动态分配资源和价格以产生收入,因此还需要确保用户系统在分配和定价方面遵循商定的规则。第三,业主会期望系统的部署成本更低。特别是,获得用户的信任会产生验证成本,而引导和吸引用户会产生网络成本。最重要的是,DiFi 以分布式方式部署在互联网边缘,即 Wi-Fi 入口/出口点,因此控制和管理的去中心化将更加高效和灵活。区块链 [19]、[20] 提供了解决这些问题的理想解决方案。它提供了更好的隐私和数据所有权,因为用户只需要提供一个可以自行重置的区块链地址。它通过建立分布式共识来提供信任和去中心化 [21],因为它记录了一个可追溯且不可逆的历史,每个参与者都可以验证该历史。智能合约 [22] 基于自动执行的区块链,能够执行分配和定价机制的任务。智能合约的执行保证了我们的系统可以独立地被信任,而无需中央机构、第三方中介或执行机制。与传统的链下方法(例如通过中介进行验证)相比,区块链还能够有效地降低这两种类型的成本 [23]。因此,我们在系统实施中利用了基于区块链的智能合约。
DiFi 部署在Wi-Fi 路由器/接入点 (AP) 之上。安装在专用硬件上,称它为DiFi适配器。 如果安装了多个路由器/AP,例如在机场,每个都将连接到运行系统副本的 DiFi 适配器。
遵循分层系统设计。

structure
顶层包括一个用户界面,用于用户提交需求和支付 Wi-Fi 访问费用。 用户可以通过提交需求,即期望的资源。需求经过下层处理后,用户将在接口处获知资源分配、待付款等结果。
第二层包括实现go-as-you-pay 设计的分配和定价机制。由于 DiFi 尝试分配资源以满足各种用户需求,因此该层负责计算分配结果。它还根据实时用户需求动态调整价格。与按量付费系统类似,DiFi 对单位时间的单位资源使用量收费,用户为分配的资源支付相应的使用费。
底层包括调度和反馈机制。
挑战:
更好的隐私和匿名性,
分配和定价方面遵循商定的规则。
期望系统的部署成本更低。
DiFi 以分布式方式部署在互联网边缘,即 Wi-Fi 入口/出口点,因此控制和管理的去中心化将更加高效和灵活。
区块链 [19]、[20] 提供了解决这些问题的理想解决方案。
智能合约的执行保证了我们的系统可以独立地被信任。
We first explain the interactions between DiFi and users through which we show some unique designs. In particular, DiFi offers not only bandwidth but also data burst to satisfy user requirements for burstiness, and includes a feedback and suggestion mechanism for better resource utilization.
我们首先解释了 DiFi 和用户之间的交互,通过这些交互我们展示了一些独特的设计。 特别是,DiFi 不仅提供带宽,还提供数据突发,以满足用户对突发性的需求,并包含反馈和建议机制,以更好地利用资源。
User Requirements for Connection Quality: Despite the variety of user characteristics and Internet applications, users usually have requirements for the connection in terms of both bandwidth and burstiness. Bandwidth characterizes the maximum throughput of data transmission in order to support the quality of Internet services. For example, streaming 1080p videos on YouTube requires 5 Mbps of sustained speed [24]. Burstiness characterizes the consecutive group of packets with shorter interarrival times than the majority of packets transmitted, corresponding to occasional requirements for larger bandwidth. We introduce data burst as another resource, which is a certain volume of data without bandwidth constraint in the short run. Regardless of whether is being actively consumed by users, the data burst is always “refilled” at the rate equivalent to the user’s allocated bandwidth. Users may alternatively request data burst, instead of more bandwidth that might be idle during the majority of time. For example, data burst helps users who view short-form videos on TikTok start videos faster and load the majority length of videos. Less idle bandwidth also increases the resource utilization for the owner.

A user i indicates her requirement by submitting demand, characterized by desired bandwidth Bi > 0 and data burst Vi > 0. Figure 2 illustrates the user interface. To bring more convenience and easiness, we allow the user to directly select from preconfigured options of (Bi; Vi) that cater to most scenarios, namely normal or high-resolution video streaming, web surfing and file transfer. More experienced users may also input the specific values instead. In addition, DiFi offers adaptive adjustment of demand that is optional. It automatically detects if a user has surging or dropping demand and adjust accordingly, so the user no longer needs to manually resubmit demand when switching to a new application each time.
Standard Mode and Guaranteed Mode: Because of the limited capacity of a Wi-Fi connection, e.g., the limited total bandwidth, DiFi may be not able to always fulfill the demand of users. Thus, it provides a standard mode by default. User i can actually use the allocated bandwidth bi Bi and allocated data burst vi Vi, which may even vary with the demand of other users (more details in Section IV-B2). Given the real-time unit prices of bandwidth and data burst pB and pV , DiFi charges user i a fee depending on the actual usage, i.e., pBbi+pV vi per unit time. We allow user i to also specify her budget threshold ti for the usage fee per unit time along with the submitted demand, or use a value speculated by DiFi based on demand and prices upon submission. Our allocation and pricing mechanisms ensure that the usage fee does not exceed the threshold under the standard mode. For users with higher budget that desire guaranteed connection quality, DiFi also provides a guaranteed mode. If user i is willing to pay pBBi +pV Vi per unit time, DiFi guarantees that the allocated bandwidth bi and data burst vi are exactly the desired quantities Bi and Vi. The pricing scheme is fair to users under both modes, i.e., DiFi charges user i the same unit prices for per unit allocated resources. Figure 2 illustrates that DiFi provides the estimated usage fees under both modes. For example, user i has to pay around 1.56 per second to be guaranteed to receive 4 Mbps of bandwidth or only pays around 1.11 but receives around 3.5 Mbps instead. This mode allows users who are willing to pay more to experience better connection quality than standard users. It may also generate more revenue for the owner. Nonetheless, if the aggregate demand is extremely high and the available bandwidth cannot satisfy all guaranteed users, DiFi will temporarily disable the guaranteed mode. Also, DiFi will switch a guaranteed user to a standard user once her threshold ti is exceeded.
用户对连接质量的要求:尽管用户特征和互联网应用多种多样,但用户通常对连接的带宽和突发性都有要求。带宽表征了数据传输的最大吞吐量,以支持 Internet 服务的质量。例如,在 YouTube 上流式传输 1080p 视频需要 5 Mbps 的持续速度 [24]。突发性表征连续的一组数据包,其到达时间比传输的大多数数据包短,对应于偶尔需要更大的带宽。我们将数据突发作为另一种资源引入,它是在短期内没有带宽限制的一定量的数据。无论用户是否正在积极消费,数据突发总是以相当于用户分配的带宽的速率“重新填充”。用户也可以请求数据突发,而不是在大部分时间可能空闲的更多带宽。例如,数据突发可以帮助在 TikTok 上观看短视频的用户更快地启动视频并加载大部分视频长度。较少的空闲带宽也增加了所有者的资源利用率。

用户 i 通过提交需求来表明她的需求,其特征是所需带宽 Bi > 0 和数据突发 Vi > 0。图 2 说明了用户界面。 为了带来更多的便利和轻松,我们允许用户直接从(Bi,Vi)的预配置选项中进行选择,以满足大多数场景,即普通或高分辨率视频流、网上冲浪和文件传输。 更有经验的用户也可以改为输入特定值。 此外,DiFi 提供可选的需求自适应调整。 它会自动检测用户是否有需求激增或下降并进行相应调整,因此用户在每次切换到新应用时不再需要手动重新提交需求。
标准模式和保证模式:由于 Wi-Fi 连接的容量有限,例如总带宽有限,DiFi 可能无法始终满足用户的需求。因此,它默认提供标准模式。用户 i 实际上可以使用分配的带宽 bi ≤ Bi 和分配的数据突发 vi≤Vi,这甚至可能随着其他用户的需求而变化(更多细节在第 IV-B2 节中)。给定带宽和数据突发的实时单价 pB 和 pV ,DiFi 根据实际使用量向用户 i 收取费用,即 pB bi+pV vi 每单位时间。我们允许用户 i 连同提交的需求一起指定单位时间使用费的预算阈值 ti,或者使用 DiFi 根据提交时的需求和价格推测的值。我们的分配和定价机制确保使用费不超过标准模式下的门槛。对于预算较高、希望保证连接质量的用户,DiFi 也提供了保证模式。如果用户 i 愿意为单位时间支付 pB Bi +pV Vi,DiFi 保证分配的带宽 bi 和数据突发 vi 正好是期望的数量 Bi 和 Vi。两种模式下的定价方案对用户都是公平的,即 DiFi 对用户 i 对每单位分配的资源收取相同的单价。图 2 说明了 DiFi 提供了两种模式下的估计使用费。例如,用户 i 必须每秒支付大约 1.56 才能保证接收 4 Mbps 的带宽,或者只支付大约 1.11 但接收大约 3.5 Mbps 的带宽。这种模式让愿意支付更多费用的用户体验到比标准用户更好的连接质量。它还可能为所有者带来更多收入。尽管如此,如果总需求极高,可用带宽无法满足所有保障用户,DiFi 将暂时禁用保障模式。此外,一旦超过阈值 ti,DiFi 会将保证用户切换为标准用户。
反馈和建议:有时用户可能由于需求过高或 Wi-Fi 信号或干扰问题而无法充分利用分配的带宽。 用户和所有者都希望更好地利用有限的资源。 用户必须为闲置资源支付不必要的费用,而所有者可能会因部分闲置资源而失去潜在收入。 DiFi 提供了有效的反馈机制来提高利用率。 它持续监控每个用户的带宽利用率,如果空闲带宽百分比一直很高,它会通知她,也可能会建议用户调整需求。 此外,我们设计了一种工作节约调度机制[25],试图将空闲带宽重新分配给具有足够利用率的其他用户。 结果,向用户收取折扣费用,并通过反馈机制提高用户和所有者的满意度。
DiFi
用户选择
反馈和建议
我在开发的Rails3网站的一些搜索功能上遇到了一个小问题。我有一个简单的Post模型,如下所示:classPost我正在使用acts_as_taggable_on来更轻松地向我的帖子添加标签。当我有一个标记为“rails”的帖子并执行以下操作时,一切正常:@posts=Post.tagged_with("rails")问题是,我还想搜索帖子的标题。当我有一篇标题为“Helloworld”并标记为“rails”的帖子时,我希望能够通过搜索“hello”或“rails”来找到这篇帖子。因此,我希望标题列的LIKE语句与acts_as_taggable_on提供的tagged_with方法
刚入门rails,开始慢慢理解。有人可以解释或给我一些关于在application_controller中编码的好处或时间和原因的想法吗?有哪些用例。您如何为Rails应用程序使用应用程序Controller?我不想在那里放太多代码,因为据我了解,每个请求都会调用此Controller。这是真的? 最佳答案 ApplicationController实际上是您应用程序中的每个其他Controller都将从中继承的类(尽管这不是强制性的)。我同意不要用太多代码弄乱它并保持干净整洁的态度,尽管在某些情况下ApplicationContr
目录前言滤波电路科普主要分类实际情况单位的概念常用评价参数函数型滤波器简单分析滤波电路构成低通滤波器RC低通滤波器RL低通滤波器高通滤波器RC高通滤波器RL高通滤波器部分摘自《LC滤波器设计与制作》,侵权删。前言最近需要学习放大电路和滤波电路,但是由于只在之前做音乐频谱分析仪的时候简单了解过一点点运放,所以也是相当从零开始学习了。滤波电路科普主要分类滤波器:主要是从不同频率的成分中提取出特定频率的信号。有源滤波器:由RC元件与运算放大器组成的滤波器。可滤除某一次或多次谐波,最普通易于采用的无源滤波器结构是将电感与电容串联,可对主要次谐波(3、5、7)构成低阻抗旁路。无源滤波器:无源滤波器,又称
我有这个代码File.open(file_name,'r'){|file|file.read}但是Rubocop发出警告:Offenses:Style/SymbolProc:Pass&:readasargumenttoopeninsteadofablock.你是怎么做到的? 最佳答案 我刚刚创建了一个名为“t.txt”的文件,其中包含“Hello,World\n”。我们可以按如下方式阅读。File.open('t.txt','r',&:read)#=>"Hello,World\n"顺便说一下,由于第二个参数的默认值是'r',所以这样
我希望生成一个链接,该链接的前缀附加到命名路由本身。像这样显示路径“/old/recipes”:recipes_path(:prefix=>"old/")#thecorrectwayshouldshow"/old/recipes"我不想动routes.rb文件,而是修改带前缀的命名路由。这可能吗?您将如何正确地做到这一点?编辑:我正在使用Rails3。添加可选前缀的原因是我也想使用普通的recipes_path。所以我想同时使用“/recipes”和“/old/recipes”。 最佳答案 如果您不想触及路由文件,您将会遇到很多麻烦
如何将自己的字段类型添加到formtastic中?例如,我需要一个自定义的日期时间输入,我想要这样的东西::my_date%>这显然是行不通的,因为formtastic不知道:my_date(只有:boolean、:string、:datetime等等...)但是我怎样才能添加额外的输入类型呢? 最佳答案 您需要添加自定义输入法:classMyCustomFormtasticFormBuilder这非常适合新的HTML5输入类型。你可以这样使用它:MyCustomFormtasticFormBuilderdo|f|%>:my_dat
我有一个Rails应用程序,我正在尝试使用acts_as_list插件设置可排序列表。数据库中的位置字段正在更新,但是在呈现页面时,不考虑顺序。我想我是在寻求帮助。这是我的模型...classQuestionMembership:question_membershipsendclassQuestion:question_membershipsacts_as_listend还有给我列表的草率View代码...>true)%>拖放用于重新排序。数据库中QuestionMembership对象的位置值更新,页面实际上正确显示重新排序。问题是在页面重新加载时,它默认返回到它感觉的任何顺序。我认
写在之前Shader变体、Shader属性定义技巧、自定义材质面板,这三个知识点任何一个单拿出来都是一套知识体系,不能一概而论,本文章目的在于将学习和实际工作中遇见的问题进行总结,类似于网络笔记之用,方便后续回顾查看,如有以偏概全、不祥不尽之处,还望海涵。1、Shader变体先看一段代码......Properties{ [KeywordEnum(on,off)]USL_USE_COL("IsUseColorMixTex?",int)=0 [Toggle(IS_RED_ON)]_IsRed("IsRed?",int)=0}......//中间省略,后续会有完整代码 #pragmamulti_c
TCL脚本语言简介•TCL(ToolCommandLanguage)是一种解释执行的脚本语言(ScriptingLanguage),它提供了通用的编程能力:支持变量、过程和控制结构;同时TCL还拥有一个功能强大的固有的核心命令集。TCL经常被用于快速原型开发,脚本编程,GUI和测试等方面。•实际上包含了两个部分:一个语言和一个库。首先,Tcl是一种简单的脚本语言,主要使用于发布命令给一些互交程序如文本编辑器、调试器和shell。由于TCL的解释器是用C\C++语言的过程库实现的,因此在某种意义上我们又可以把TCL看作C库,这个库中有丰富的用于扩展TCL命令的C\C++过程和函数,所以,Tcl是
所以我正在使用acts_as_taggablegem提供的标签。这些帖子是我正在标记的内容。我怎么能说类似=>的东西(这里是伪代码)ifacollectionofPostshasatagwithacorrespondingStockQuote,displaythestockquote所以现在我有一个acts_as_taggable的Post资源。这是我的帖子索引操作现在的样子:defindex@stock=StockQuote::Stock.quote("symbol")ifparams[:tag]@posts=Post.tagged_with(params[:tag])else@po