Dynamic Priority-Based Service Resource Allocation for Context-Aware Conflict Resolution in Wisdom Network with Fog Computing

With the development of wisdom network, this paper assumes that intelligent devices becomemore andmore intelligent, which can easily collect and provide a variety of context awareness data. The research goal is to design a dynamic conflict resolution strategy for context-aware resource allocation. The limited availability of resources inevitably leads to conflicts. Considering the characteristics of wisdom network, the quality of service when solving conflicts, a mechanism is proposed to improve the quality of services and to solve the resources allocation conflicts. This paper constructs the optimal model of context-aware based on a differential game and optimizes the resource allocation of context-aware based on the priority of scenarios. Fog computing is used to provide enough computing resources for the control of resource allocation of context-aware. The Bellman dynamic programming is introduced to solve the feedback Nash equilibrium solution of the proposed differential game model, to obtain the optimal allocation of service resources and solve the effectiveness of resource allocation.


Introduction
The next-generation network is a combination of the network intelligence, ubiquitous network, Internet of Things, and so on, which can always be considered a wisdom network. In the wisdom network, people can obtain more wisdom services from the network based on the network functions. In wisdom network, wisdom is the advanced form of network process [1], which can use the network intelligence to transform questions or instructions into actions or behaviors based on reasoning and judgment [2]. Then, in the wisdom network, how to identify the network resources, how to effectively provide network services, and how to improve the satisfaction of network users, all have great challenges. To develop the next-generation network based on wisdom, and to schedule, utilize, and perceive the network based on the wisdom, has become an important solution to the next generation network [3].
For the wisdom network, context awareness is the foundation. Context awareness is to obtain useful data from the surrounding state information and historical information to help the target decision-making [4]. Generally, context awareness includes data acquisition, information preprocessing, situational reasoning, and situational decision-making application. Context awareness is initially applied in pervasive computing. With the rise of the Internet of Things, smart city, smart earth, and so on, more and more intelligent applications appear in our daily life, and human life is more and more dependent on convenient intelligent applications [5]. Wisdom network is bound to become a synonym for the next-generation network, and context awareness is the feeler of wisdom network [6,7]. The context awareness in the wisdom network should be more subjective than that in the common sense, that is, learning and innovation can be carried out in the process of context awareness, and experience and knowledge can be acquired in the process of learning and innovation, so that every link of context awareness is in a real-time optimal state [8].
Context awareness in the wisdom network is one of the key technologies to realize the wisdom network successfully [9][10][11]. The main problems for the context awareness in the wisdom network that need to be solved are how to allocate the services resources for context awareness in the wisdom network, because the services resources are limited. In additional, in the wisdom network, there are different priority situations of different context-aware tasks, and there are conflicts in service resource allocation among all these tasks. Priority strategies are generally preassigned to various possible scenarios with different priorities. In case of conflict between two or more different scenarios, the scenario with higher priority will receive corresponding services [12,13]. Priority is assigned to various scenarios in advance, and scenario conflicts can only be handled in this static priority.
In this paper, we will try to implement dynamic prioritybased service resource allocation mechanism for contextaware based on differential game. As the resource for context awareness is limited in the researched network, fog computing is introduced as the main controller for the resource allocation, to achieve optimal resource allocation for different context-aware tasks. The main contributions of this paper are as follows.
(1) Resource allocation of context-aware is researched based on the priority of scenarios. All the scenarios in the proposed system are divided into two groups with different priorities, one is the set of scenarios in high priority and the other is the set of scenarios with low priority (2) Differential game is introduced into the resource allocation problems to find the optimal Nash equilibrium solutions for each group. In the proposed game model, the system state is given by the dynamic variations of the available allocated service resources, and the objectives for all scenarios are to find the optimal resource allocation strategies to maximize the revenue function The whole paper is organized as follows. Section 2 describes the related works of resource allocation for context-aware resource allocation. A system model is given in Section 3. Section 4 gives out the solutions to the game and proposed a game-based algorithm for the resource allocation. Numerical simulations are given in Section 5 and it is concluded in Section 6.

Related Works
In [14], a scenario aware embedded multimedia presentation system (CEMP) is proposed and designed. The conflict resolution mechanism provided by the CEMP system is to calculate the priority and weight of scenarios, so as to get better results of scenario conflict resolution.
In [15], a novel model-based method is introduced to build a correct component-based model for distributed execution priority constraints. The input model is transformed into an input mode without priority; then, the nonpriority model is transformed into another mode to solve the distributed conflict.
In [16], the context-aware resource allocation problem is formulated as a mixed integer nonlinear programming; then, an energy-efficient matching algorithm based on the Gale-Shapley algorithm is proposed to solve the MINP problem.
In [17], a context-aware dynamic resource allocation mechanism is proposed and a two-phase method is given to resolve random access contention. The proposed method is proved to be good in the performance of resource efficiency and delay.
In [18], the context-aware D2D peer selection problem is researched and an iterative matching algorithm using GS algorithm is given to achieve channel selection and power allocation.
Nevertheless, all the previous works tried to solve the context-aware resource allocation problem do not consider the dynamic characteristics of the resources. In this paper, we try to solve the context-aware resource allocation problem based on a differential game, considering the dynamic variation of resources using differential equation. Then, the resource can be allocated dynamically.

System Model
In this paper, the context-aware tasks are assumed to be several tasks with different priorities; then, we try to implement a dynamic priority-based context-aware resource allocation mechanism. Based on the priorities of different contextaware tasks, we divide all the context-aware tasks into two groups with individual priorities, which are the highpriority group and low-priority group, respectively. Assuming there are N scenarios in the high-priority group and M scenarios in the low-priority group, then, our aim is to dynamically allocate the context-aware resources to the scenarios of two groups with individual priorities.
For the context-aware tasks with individual priorities, in order to allocate service resources, we assume that there is a fog computing server in the individual priority groups to control the allocated service resources [19,20]. The fog computing server has enough computing resources to calculate and allocate the appropriate resources for the context-aware tasks based on the task priorities. It can control the whole service resource allocation process for the context-aware tasks in the proposed networks. In order to formulate the relationships between the fog computing server and the contextaware tasks, the fog computing server is regarded as the leader of service resource allocation in the researched wisdom network, and the different context-aware scenarios are considered the participants of service allocation, according to the control requirements of the fog computing server to obtain the corresponding service.
Assume the service resources required by scenarios i ði ∈ fngÞ in the high-priority group is denoted by s h,i ðtÞ, and the service resources required by scenarios iði ∈ fngÞ in the low-priority group is s l,i ðtÞ, thus, we use a linear quadratic equation to represent the utility, that is, Wireless Communications and Mobile Computing In the above functions, the control variables are s h,i ðtÞ and s l,i ðtÞ, which are the service resources allocated for the scenarios. Based on the differential game framework, in order to obtain the optimal solutions for the service resources allo-cation, we need to formulate the utility functions given in (1) into an observation time duration ½0, T. Therefore, the utility function in the observation time duration can be expressed as follows: where η h,i ðtÞ and η l,i ðtÞ are the unit cost brought by using the fog computing server for resource allocation. Through the discount parameter e −rt , the fog computing server can decide whether to allocate more service resources to different situational awareness at the current time. Solving the above formulas, the optimal resource allocation schemes are available, which can be expressed as follows: For the whole system, its assignable service resources for context-aware are limited. The total service resources will be dynamically varied with resource allocation. Once the resources are allocated to the context-aware tasks, the available service resources would decrease accordingly. It is assumed that, at the moment t, the service resources that are available to be allocated are indicated as xðtÞ, and the dynamic variation of the available resources is In the above formula, the initial value of the available service resources is assumed to be x 0 and δ is the system loss caused by the allocation process of the service resources. It is a constant value and depends on the entire wisdom network. α and β are weight parameters.
Because the service resources are allocated according to the priorities of different scenarios, once the resources are allocated to the high-priority scenarios, the service resources that can be allocated to the low-priority scenarios are reduced accordingly. It is assumed that the impact of the allocation of service resources is affected by grouping. There is an interaction between high-priority grouping and low-priority grouping, and resource allocation within the same group will also affect each other. Let us suppose that the allocated resources are denoted by ∑ n i=1 s h,i ðtÞ in the high-priority group, the service resources allocated to the low-priority group are ∑ m i=1 s l,i ðtÞ, and the cross-impact cost caused by the service resource allocation can be expressed as ε l h ∑ n i=1 s h,i ðtÞ and ε h l ∑ m i=1 s l,i ðtÞ , respectively. The influence cost within the same group can be expressed as ε h h ∑ n i=1 s h,i ðtÞ and ε l l ∑ m i=1 s l,i ðtÞ, respectively. Based on the above descriptions of the additional cost for resource allocation, for the central service resource allocator, it needs to maximize the benefits brought by the service resource allocation of each scenario grouping, and the revenue function can be expressed as follows, From formula (1), we can know that the optimal service resources that can be allocated for each scenario is controlled by η h,i ðtÞ and η l,i ðtÞ, that is, the allocated resources are controlled by the unit cost brought by using the fog computing server for service resource allocation, which is set by the fog computing server. When the fog computing server determines the unit cost of service resource, it will announce the unit cost to the different priority groups for context-aware tasks. The scenarios in the group pay to the fog computing server based on the unit cost to obtain the corresponding allocated resources and complete the awareness. In this process, the optimal unit cost paid to the fog computing server for resource allocation can be obtained from equations (5) and (6).

Game Analysis
Based on the objective function constructed in the previous section, in the next step, we will solve the optimal service resource allocation problem constructed in the previous section based on the Bellman dynamic programming and use 3 Wireless Communications and Mobile Computing the fog computing server to control the unit cost to achieve service resource allocation of context-aware for individual groups with different priorities. Definition 1. If there are continuous differential functions V h,i ðt, xÞ and V l,i ðt, xÞ that can satisfy the given differential equations in (7)-(10), then formulas (5) and (6)) have feedback Nash equilibrium solutions, where Given the vale function V h,i ðt, xÞ and V l,i ðt, xÞ, and the optimal allocated resources in the previous section, we can get the derivation function of the value function. Substituting the optimally allocated service resources of formula (3) into formulas (7) and (8), the optimization objective functions are earned as follows: Solving the above formulas, the optimal service cost η h,i ðtÞ and η l,i ðtÞ can be denoted as follows: Especially, V h,i x ðt, xÞ and V l,i x ðt, xÞ are the derivative of the continuous differential functions on the statement. Theorem 2. The continuous differential function V h,i ðt, xÞ and V l,i ðt, xÞ can be expressed as follows: where the parameters fA h,i ðtÞ, A l,i ðtÞg and parameters fB h,i ðtÞ, B l,i ðtÞg are given as follows:

Wireless Communications and Mobile Computing
Proof. Solving the differential equations given by equations (17)- (20): Correspondingly, we can get the optimal unit cost, which are denoted by η h,i ðtÞ and η l,i ðtÞ, as follows: And the optimal service resources obtained for different context-aware tasks in each group are given as follows: A context-aware conflict resolution algorithm is also given in this section, that is, an algorithm for optimal allocation of context-aware service resources, based on the constructed system model. Based on the system model, initialized values should be given to all the context-aware tasks at the beginning; then, the objective functions for the resource allocation can be formulated. Given the objective functions, using the Bellman dynamic programming techniques, we can obtain the optimal solutions for the resource allocation problems. The specific algorithm 1 flow is as follows.

Simulations and Verifications
In this section, we will verify numerically the conflict resolution model constructed in the previous section. Supposing that the wisdom network contains two context-aware groups with individual priorities, and each group has 5 scenes, that is, n = 5 and m = 5. The time duration is set to 10 minutes. The other parameters settings are given in Table 1.
To obtain the optimal service resource allocation solutions and the optimal unit cost for using the fog computing server, we first perform numerical simulation on the parameters fA h,i ðtÞ, A l,i ðtÞg in the continuous differential function V h,i ðt, xÞ and V l,i ðt, xÞ, to obtain the change trend shown in Figure 1. The trend of the parameters fA h,i ðtÞ, A l,i ðtÞg in the continuous differential function V h,i ðt, xÞ and V l,i ðt, xÞ are given. We assume that group H has a higher priority than group L; then, the optimal unit cost for using the fog computing server in group H is lower than the optimal unit cost for using the fog computing server for group L, as shown in Figure 2. For each scenario, it is focused on the optimal service resources that can be allocated. Figure 3 shows the change over time of the optimal service resources that can be obtained by the scenarios in each group. It is obvious that 5 Wireless Communications and Mobile Computing the high-priority group can obtain more service resources than the low-priority group.

Conclusions
This paper proposes a conflict resolution model of context awareness based on a differential game. Because different context awareness tasks have different priority characteristics, when allocating service resources for scenarios, resource allocation conflicts will occur due to different priorities. Considering the dynamic characteristics of wisdom network resource allocation, this paper models the dynamic allocation of service resources based on the continuous differentiable state equation of differential game and groups different situation perceptions with priorities and constructs the objective function of utility maximization by grouping. The optimal result of the objective function is solved by the Berman dynamic programming method. The optimal result of service resource allocation is the output.  Input. Objective functions for optimal allocation of service resources Output. Optimal solutions for service unit cost and resource allocation 1. Initialization. For the context-aware tasks in different priority groups, based on formulas (5) and (6), we construct the objective functions for optimal allocation of service resources 2. Collect the parameter setting scheme for the objective function 3. According to Definition 1, we construct the continuous differential functions of individual priority groups 4. According to Theorem 2, we solve continuous differential function expressions of different priority groups 5. Solve and obtain the optimal service resource allocation solutions and the optimal unit cost for using the fog computing server according to formulas (25)-(28) 6. End

Data Availability
The data used to support the findings of this study are included within the article.

Conflicts of Interest
The authors declare no conflict of interest.