Efficient incentive mechanism for video distribution on the home Internet of Things devices

: Providing users with nearby video distribution services based on Edge Computing (EC) reduces backbone traffic and improves users' viewing experience. However, the behavior of edge networks is difficult to manage and cannot guarantee the rationality of video resource distribution, which has become a significant challenge for online video services. This paper takes the idle resources from home Internet of Things (IoT) devices for video distribution service as the research point. It proposes an incentive mechanism based on behavior management and balance of resources (BMBR). By paying attention to the rationality of resource distribution and establishing reasonable reward and punishment measures for edge devices, the incentive mechanism makes the initiative of edge devices and the relationship between resource supply and demand reach a stable equilibrium. Simulation results and analysis show that the incentive mechanism can effectively improve the enthusiasm for resource sharing in the edge network, ensure the rationality of resource distribution to reduce the resource price fluctuations, and maintain the balance of resource supply and demand.


Introduction
With the rapid development of online video, live broadcasts, and other services, consumers have put forward higher requirements for video content and a good viewing experience [1]. In the current global network, data traffic is growing explosively, and video has become the primary carrier of network traffic [2]. Cisco Visual Networking Index [3] shows that 75% of global data traffic in 2017 was generated by video, and this figure will reach 86% in 2024. In terms of IoT devices, by 2022, there are more than 60 billion home IoT devices, but effective utilization of resources is only 28% [4]. Home IoT device brings convenience for the users and generates significant idle resources. To reduce the investment of video service providers in bandwidth, storage, and other network resources, it has become reliable solution to build content distribution services by mining the idle resources of home IoT devices [5].
The content distribution service of the edge network refers to the deployment of content data on edge devices close to users or user terminal devices to provide lower content service delay [6]. Video content distribution based on EC has become a hot spot in the current academic and industrial circles. Sun et al. [7] proposed a framework for video content distribution through the network, storage, and computing capabilities of EC. They gave the optimization strategy design of video distribution such as edge caching and replacement, edge content prefetching, edge content collection, and EC migration under this framework. Markakis et al. [8][9] proposed unified computing, caching, and communication (3C) solution for 5g, which allows service, content, and function providers to deploy their services, content, and functions near end users. The solution also will enable end-users to share and cooperate to form a virtual edge resource pool. End-users will be able to become 3C resource providers of the edge network ecosystem.
Some network systems and peer-to-peer (P2P) systems use end-user devices to share content resources, such as the file sharing system platforms, BitTorrent, boinc [10], and seti@ home [11]. These volunteer platforms apply to file-sharing systems. Researchers at the University of Minnesota have studied the possibility of using users' resources to provide content services near edge networks and proposed a distributed edge cloud system. Nebula [12] supports distributed data-intensive applications through close interaction between resources, supports field data-intensive application deployment through location-aware data placement, replication, and recovery, and utilizes edge resources.
Li et al. [13] designed network middleware for developing countries, such as low network bandwidth and unstable service quality. They realized a better offline download experience by combining the download methods based on cloud hosts and intelligent routers, that is, the middleware. The software downloads the content requested by the user in advance; after downloading, users can get the content at high speed. Hu [14] et al. proposed a new architecture for video content distribution in edge networks. Under this new architecture, intelligent routers deployed in users' homes play the role of small content distribution nodes, serving neighboring user requests by caching content and improving the user experience. Chen et al. [15] developed a crowdsourcingbased content distribution model by utilizing idle bandwidth resources and storage resources of intelligent routers scattered in users' homes and measured the performance of the system through practical deployment. Chang et al. [16] The proposed fog computing system, Indie Fog, which considers consumer resource sharing and suggests that network infrastructure providers or cloud service providers could leverage user equipment to provide edge-based services. Given some incentives, consumers will be willing to share their devices with providers to provide services.
In addition to utilizing the idle resources of consumers, it is also possible to self-deploy data centers to provide content services, such as CloudPath proposed by Mortazavi et al. [17], which deploys a multilayer cloud structure within the geographic scope of the network, along with IoT devices and a cloud path to a data center, deploying a chain of data centers that grow in size to provide storage resources. CloudPath supports the dynamic installation of lightweight, stateless functions and a distributed uniform storage system. CloudPath can also automatically migrate application data across data centers to minimize latency and bandwidth usage.
Kamiyama et al. [18] proposed that the response time of modern websites can be reduced by generating dynamic web content on edge nodes close to ending users. In addition, the author measured the response time of about 1000 popular web pages from 12 locations around the world to assess whether the edge network is suitable for providing dynamic web content. According their experiments, edge networks can reduce Web response time around the world.
Mehta et al. [19] focused on solving the following problems: where the edge data center must be placed and how much computing power needs to be allocated to each data center to achieve high-cost performance while meeting the bandwidth and performance requirements of applications. The author believes that adding an edge layer data center can save many costs for network-intensive applications, while adding an intermediate data center near the data center benefits low and medium-demand computing-intensive applications. Norris et al. [20] provide a new capacity planning solution for hierarchical edge clouds. The scheme considers the response delay and the Quality of Service (QoS) requirements for CPU, GPU, and network resources. It improves edge utilization by meeting the QoS requirements and combining supplementary resources.
El Kafhali et al. [21] propose a mathematical analysis model based on queuing theory to determine the number of edge nodes required to meet QoS metrics given IoT workload. From this model, the authors derive formulas for key performance indicators, including system response time, system packet loss, system throughput, CPU utilization, and the average number of message requests, and cross-validate them using discrete-event simulator simulations.
The above literature has positively contributed to edge network architecture and content distribution strategy research. The solutions mentioned in the literature, such as the deployment of data centers, the investment of computing resources, and the optimization of distribution strategies, have made in-depth and practical research in improving edge network computing power and response speed. However, there are few studies on using home IoT devices for edge computing services in the academic field. As the primary source of idle resources, home IoT devices have natural location advantages, sufficient computing resources, and lowcost access and maintenance. It is well combined for edge computing, but the behavior is difficult to manage, and the reasonable allocation of resources cannot be guaranteed, which has become an unstable factor for it as an edge computing node. This paper takes home IoT devices as the research object and, based on distributed EC services, proposes an incentive mechanism based on behavior management and balance of resources to manage edge devices, and improve their enthusiasm for resource sharing and utilization of idle resources through the incentive mechanism. Section 2 introduces the rules, definitions, and calculation methods of some critical data of BMBR. Section 3 analyzes how to improve the enthusiasm for resource sharing of edge devices and the formation process of resource balance through game theory. The simulation results are given and discussed in Sec-tion 4. Section 5 provides the conclusion of this paper and the follow-up work arrangement.

BMBR Model
The model is mainly composed of three parts, including the reputation mechanism, competition mechanism, and punishment mechanism. Through the cooperation of the three, an incentive mechanism with reputation value as the core is formed to manage edge devices' behavior while ensuring the rationality of resource distribution. We call home IoT devices that provide edge computing as edge nodes.

Reputation mechanism
The model is mainly composed of three parts, including the reputation mechanism, competition mechanism, and punishment mechanism. Through the cooperation of the three, an incentive mechanism with reputation value as the core is formed to manage edge devices' behavior while ensuring the rationality of resource distribution. We call home IoT devices that provide edge computing as edge nodes.

Reputation mechanism
The reputation mechanism describes the definition and calculation method of reputation-related parameters in the service process of edge nodes. Reputation represents the situation of the node's request and contributing resources before time . Income refers to the reward given by the system after devices share idle resources. The reputation mechanism is described as follows: Definition 1. The initial reputation value of the edge node and the minimum reputation threshold are both 0. When < 0, there would be no income when providing services, but the reputation value would increase. Definition 2. The system prices resources based on the existing quantity of each resource and the number of times it has been requested in the most recent period. Define the degree of scarcity ( , ) = ( , ) ( , ) , and the resource price can be calculated as follows: is the base price of the resource, ( , ) is the quantity of the existing resource at time , and ( , ) is the number of requests for the resource m in the most recent 0 period. The price of resources will change with the degree of scarcity of resources in time 0 , which has good real-time performance. Resources with high lack are usually in short supply, and the node can obtain higher benefits by sharing resources with high scarcity. Definition 3. Let the reputation value consumed by the edge node provide resources each time ( ), which is related to the bandwidth and storage overhead of the current node. Definition 4. Let the number of resources contributed by the edge node currently be , and define the contribution coefficient ( ) , then the contribution coefficient of the node can be calculated as follows: It can be seen that the contribution coefficient increases gradually with the increase of the number of resources contributed by the edge nodes.
Definition 5. The increment of the resource reputation each time the node contributes is + ( , , ) = ( ) ( , ). The more resources contributed by edge nodes, the greater the contribution coefficient, so the more reputation value increments obtained by nodes contributing resources.

Competitive mechanism
The platform offers a competition mechanism to select edge nodes with higher reliability to provide video transmission services. The selected nodes are called active nodes, and the reliability of nodes is related to bandwidth, storage, and reputation value. Definition 1. ( , ) is set as the remaining bandwidth percentage of the node at time , which can be calculated as follows: _ represents the remaining bandwidth value of the node at the current time , and _ represents the initial bandwidth value of the node. Under the same conditions, the larger the remaining bandwidth percentage of the node, the easier it is to be selected as a candidate node. Definition 2.
( , ) is set as the remaining cache percentage of the node at time t, which can be calculated as follows: ( , ) = _ _ (4) ( , ) represents the remaining cache value of the device at time , and _ represents the maximum cache value of the node. Under the same conditions, the larger the remaining cache percentage of the node, the easier it is to be selected as a candidate node. Definition 3. ( , ) is set as the resource abundance of the node at time t, it can be calculated as follows: and are the weight values of ( , ) and ( , ), and + = 1. The greater the resource abundance of the node, the more abundant the remaining bandwidth and storage, and the stronger the ability to provide services. Definition 4. The minimum threshold of resource abundance is ( , ) . When ( , ) < , the edge node does not have enough idle resources and will not be chosen first and will only be considered when the number of nodes is insufficient.
Definition 5. ( , ) is set as the node reliability at time t, which can be calculated as follows: ( , ) is a decisive factor for whether an edge node can be selected? It is reasonable to determine whether an edge node is reliable based on resource abundance and device reputation value. The reputation value of the node is lower when ( , ) < 0. However, it is still possible to transform into a node with a higher reputation value through resource sharing, so it has the opportunity to be selected as a candidate node.

Punishment mechanism
With sufficient idle resources, edge nodes may still provide poor quality services, this kind of device is called a negative node, and the system introduces a punishment mechanism to restrict its behavior. Rule 1. At time , the user initiates a resource request, and the system selects a candidate node that can provide resources according to the actual demand. If a candidate node has problems in the service process, the node will be marked as a negative node; then, the node will be punished by time , which can be calculated as follows: , > 1 (7) is the number of times the node is punished, and 0 is the basic penalty time. It can be seen that the more times a node is punished, the longer it is punished. Rule 2. During the penalty period, the negative node will increase the reputation value of resource sharing but will not be able to gain benefits. In addition, negative nodes need to download the scarce resources specified by the system to maintain the resource balance. The system asks once per unit time, and the negative node can obtain time reduction reward at time 0 by downloading the highly scarce resources. That is, the penalty time becomes − 0 . In this way, the negative nodes that download the scarce resources can be encouraged to provide services to users after the punishment ends. At the same time, the imbalance between the supply and demand of scarce resources can be alleviated.

Node selection strategy
Assuming the number of edge nodes required to complete a video, transmission is ( , ), the number of nodes that can provide services in this area is . It is necessary to select nodes with better comprehensive conditions for service to ensure the QoS. We discuss the selection method of nodes in the following two cases: ≥ , the steps are as follows: Calculate the resource abundance ( , ) of each node. Count the number of nodes that satisfy ( , ) ≥ ( , ). If ≥ , calculate the reliability ( , ) of nodes. Select nodes with larger ( , ) as candidate nodes. If < , all nodes are as candidate nodes. Calculate the reliability ( , ) of the remaining − nodes.
Select − nodes with larger ( , ) as candidate nodes.
< , the steps are as follows: Calculate the resource abundance ( , ) of each node. Count the number of nodes that satisfy ( , ) ≥ ( , ). Take nodes that meet the conditions as candidate nodes. The remaining traffic is compensated by the central server.

Income calculation
The income after the node provides a service is determined by reliability, resource tightness, service quality, and other conditions. The income will be reduced if there is a problem with the service quality in the video transmission process. Definition 1. The reduced income due to packet loss or offline service quality degradation is defined as , which can be calculated as follows: is the reverse yield coefficient, is the packet loss rate, and is the number of nodes providing services? Definition 2. The income obtained by a node by providing services is , which can be calculated as follows: is the positive return coefficient? Therefore, the node should be paid as follows: = − = ( , ) ( , ) (( ( , ) + ( , )) ( , ) − ) (10)

BMBR game analysis
According to the above incentive mechanism, edge node is assumed to be selected as a candidate node. The reputation function for node to choose cooperation in a game can be calculated as follows: = ( , ) + + ( , , ) − ( ) In the process of resource interaction, the system is responsible for selecting the node that provides the resource, so the node cannot predict whether it will participate in the next game. Assuming that the probability that a node is required to contribute resources in a unit of time is , the mathematical expectation of the penalty time is ( ) . Assuming that the probability that node chooses to download the scarce resource during the penalty period is , the final penalty time is ( ) − 0 . During the penalty time, the node will have ( ( ) − 0 ) opportunities to provide resources. Then the reputation function of node refusing to cooperate in a game can be calculated as follows: To eliminate the noncooperation motive of node , first of all, it must be ensured that the reputation benefit of choosing cooperation is greater than the reputation benefit of choosing noncooperation, that is, > , which can be obtained: Second, it is necessary to ensure that the price return of the resource when it chooses to cooperate is greater than 0, that is, > 0: By setting reasonable 0 , K, g, and values, according to the actual situation of system resource interaction, Equation (13) can be held constant, that is, > can be held constant. By setting a reasonable , , , , and the packet loss rate are within a reasonable range, Equation (14) can be established constantly, that is, > 0 can be established constantly. The cooperation strategy that satisfies both the increase of reputation of edge nodes and the increase of income is the best strategy for node selection, and nodes will tend to choose cooperation.

Experiment environment
Use Python to build an environment for simulation experiments. Initially, set 100 video resources and 400 nodes, including 200 positive nodes (The probability of choosing cooperation is 80%) and 200 negative nodes (The probability of choosing cooperation is 20%). Initialization node bandwidth and storage occupancy are randomly distributed between 0-50%. Finally, the entire simulation time is 1500s, totaling 1500 resource interactions.

Experimental results
The experiment is divided into the following three parts: BMBR distinguishes between positive nodes and negative nodes Figures 1(a) and 1(b) show the reputation value distribution of positive nodes and negative nodes in the distributed edge computing system without incentive mechanism and BMBR, respectively. Without an incentive mechanism, the system does not treat the two differently. Figure 1(a) shows that the reputation value distribution of positive and negative nodes is not much different. Comparing Figure 1(b) with figure 1(a), we can see that the reputation value of positive nodes can be concentrated in the range of [12,17] by using BMBR. In contrast, the reputation value of negative nodes can be concentrated in the range of [4,10]. The experimental results show that using the incentive mechanism and the system can effectively distinguish between positive and negative nodes. The influence of BMBR on the reliability and income of edge nodes Figure 2(a) shows the change in node reliability with increased service time in the distributed edge computing system without incentive mechanism and BMBR. It can be seen that without an incentive mechanism, the reliability of the node does not change significantly with the increase in service time, and the reliability of the node has been clearly distinguished under the action of BMBR. Figure 2(b) shows that, in the absence of an incentive mechanism, the income from the service provided by the node is not affected by the reputation value, which is concentrated in the range of [40,60], and the node with a larger reputation value cannot obtain higher income. Under the action of BMBR, the income from node service has been significantly improved with the increased reputation value, and the enthusiasm for node resource contribution has increased. The BMBR proposed in this paper adds the concept of resource price, which is used to measure the scarcity of resources. At the same time, nodes in the penalty period can shorten the penalty time by downloading resources in short supply, increasing the number of resources in short supply, balancing the price of resources, and ensuring the rational distribution of resources. In addition, the resource price set in this paper also has the characteristics of real-time and dynamic self-adjustment, which changes with the tightness of resources in different periods. Figure 3 shows the price fluctuation variance of each resource within 1500s without the incentive mechanism and BMBR. It can be seen from the figure that after adding BMBR, the price fluctuation of each resource is significantly reduced. The smaller the price fluctuation of resources, the higher the balance between supply and demand of resources. Therefore, the incentive mechanism can effectively control the balance of the number of resources according to the demand situation.

Conclusions
To promote home IoT devices to actively and reliably share idle resources and ensure the reasonable distribution of video resources, the author proposes an incentive mechanism based on behavior management and balance of resources to manage edge devices. The experimental results show that using BMBR is significantly better than no incentive mechanism. BMBR improves the enthusiasm for edge network resources sharing by distinguishing between positive devices and negative devices and establishes reasonable reward and punishment measures while maintaining the balance between the supply and demand of system resources.
The BMBR model proposed in this paper needs to run on a centralized platform. Home IoT devices can contribute idle resources after accessing the platform by deploying the relevant environment. All requests and processing need to go through platform, which the following three problems will accompany: (1) The platform must process the selection of transmission nodes, information recording, behavior management, and income distribution, and the centralized platform is under too much pressure.
(2) In the process of video distribution, the information of IoT devices is easy to leak, and security cannot be guaranteed.
(3) The centralized platform will charge a certain service fee and cannot maximize the interests of users and resource providers.
The decentralization of blockchain and the programmability of smart contracts provide ideas for solving the above problems. Blockchain provides a decentralized network through which home IoT devices can directly establish connections with video requesting users. Smart contracts automatically perform node selection, reputation calculation, and income distribution. Therefore, the focus of the following research is how to design smart contracts according to the requirements based on this paper.