Optimization Method of Fog Computing High Offloading Service Based on Frame of Reference

: The cost of offloading tasks is a crucial parameter that influences the task selection of fog nodes. Low-cost tasks can be completed quickly, while high-cost tasks are rarely chosen. Therefore, it is essential to design an effective incentive mechanism to encourage fog nodes to actively participate in high-cost offloading tasks. Current incentive mechanisms generally increase remuneration to enhance the probability of participants selecting high-cost tasks, which inevitably leads to increased platform costs. To improve the likelihood of choosing high-cost tasks, we introduce a frame of reference into fog computing offloading and design a Reference Incentive Mechanism (RIM) by incorporating reference objects. Leveraging the characteristics of the frame of reference, we set an appropriate reference task as the reference point that influences the attraction of offloading tasks to fog nodes and motivates them towards choosing high-cost tasks. Finally, simulation results demonstrate that our proposed mechanism outperforms existing algorithms in enhancing the selection probability of high-cost tasks and improving platform utility


Introduction
Fog computing is a computing model that provides users with computing, storage, and network services through Fog Node (FN) links between user terminal devices and cloud servers [1,2].It finds wide applications in various domains, such as Augmented Reality [3] and Wise Information Technology of med [4,5].In these fields, fog nodes must provide high-computational offloading services actively.For example, in augmented reality [3], in order to provide users with good real-time interaction capabilities, most of their tasks require a large amount of memory and computing resources, and are sensitive to delay.This means that fog nodes must actively choose such tasks to provide offloading services.However, due to the sensitivity of fog nodes to offloading costs, low-cost tasks are more likely to be selected for completion under the same cost-remuneration ratio.Consequently, high-cost tasks may be left unattended leading to service interruptions for applications with significant computational requirements [6], adversely affecting users' experience.Therefore, it is necessary to design a reasonable incentive mechanism to encourage fog nodes to select high-cost computing offloading tasks actively [7].
In order to address this issue, the existing incentive mechanisms in fog computing, such as auction mechanism [8] and Game Theory methods [9], generally believe that the selection probability of a specific type of task can only be enhanced by increasing its remuneration [10].This will inevitably increase the platform budget and lead to a decrease in the final utility.The frame of reference refers to another object selected as a standard to determine the position of the research object and describe its motion [11].Research on frame of reference [12] indicates that different frames of reference yield different states of affairs, and the attraction of an option to an individual is affected by the reference point.Therefore, incorporating a specific reference item to the selected set will increase the attraction of an original option.
The above frame of reference theory is incorporated into fog computing offloading in this paper to establish the incentive mechanism RIM with reference objects.Based on the frame of reference, we establish an attraction function for tasks assigned to fog nodes.Aiming at high-cost tasks, we analyze the reference effect of different tasks to enhance the selection probability of target tasks.Additionally, we establish the tendency model of fog nodes and different reference tasks are designed for different types of fog nodes to modify their tendency, so as to improve the overall task offloading rate and reduce the platform utility.

Related Work
At present, there have been several studies conducted on the incentive mechanism of computing offloading, which can be primarily categorized into monetary and non-monetary approaches.The next section will provide an introduction to each of these mechanisms.

Monetary Incentive Mechanism
Reference [13] proposed a double auction mechanism to study the video caching problem in dense heterogeneous networks, which maximizes social welfare by encouraging video service providers and mobile operators to reflect real caching needs and bids.In [14], a resource allocation mechanism for mobile edge computing of industrial Internet of Things based on double auction is proposed, which improves the utility of fog nodes by double auction pricing.In [9], the task offloading problem of mobile edge computing in ultra-dense networks is studied.Game Theory is used to design the task offloading strategy scheme, which minimizes the delay in the network and saves the battery life of the mobile user device.Reference [15] proposed to use Game Theory to reduce the execution cost of social groups in fog computing, that is, energy consumption and delay.

Non-Monetary Incentive Mechanism
Reference [16] proposed an enhanced framework combined with a reputation mechanism.Mobile phone users who help others will receive a lot of virtual currency.When a client user wants to uninstall a task, it broadcasts a request to all adjacent users.Neighbors can calculate the number of floppy disk coins according to the resources required to perform the task.The client user selects a user as the offloading node to perform the task according to the neighbor's bid and their reliability or reputation.Reference [17] proposed a similar incentive mechanism based on reputation and credit.When the user needs to offload the computing task to the offloading node, the reputation value of the node will be reduced, and the reduced part will be added to the reputation value of the offloading node.After each offloading task is completed, the user will receive updated reputation and credit information from the interactive peer.
The main problem in the current research on the incentive mechanism of fog computing lies in the assumption that the attraction of the task to the fog nodes of the auction or Game subject is unaffected by external factors.In other words, the higher the remuneration, the higher the attraction, the stronger the incentive effect [18].The research on frame of reference indicates that individuals will be influenced by the reference point when making choices, and introducing a reference item among alternatives will increase the attraction of the original choice.By applying this theory, these problems above can be effectively addressed.

Design and Analysis of RIM
This section introduces the frame of reference for the fog computing offloading system.Firstly, the system model composed of the physical model and the logical model is introduced, and then the incentive mechanism RIM based on the frame of reference is introduced in detail.

Physical Model
In the fog computing offloading scenario, the fog network contains I fog nodes (I ≥ 2) and J tasks (J ≥ 2).The communication between the fog node and the user terminal device is relayed through the intermediate platform.The computing offloading platform supports multiple tasks.Each task can only be performed on one fog node, and each fog node can perform multiple offloading tasks at the same time.The cost of some tasks is high, while the cost of other tasks is low.Because most fog nodes are more willing to complete tasks with low cost, the completion rate of tasks with high cost is usually low.Table 1 lists the parameters and related descriptions involved in this paper.The cost of task τ j r j The remuneration of task τ j χ Cost reference factor γ Remuneration reference factor n type The total number of fog nodes participating in τ t ype tasks The attraction value of task to fog node i when the reference point is m δ i The tendency coefficient of fog node i to task remuneration Figure 1 shows the physical model before and after introducing the incentive mechanism.The completion rate of the high-cost tasks in the left part of Figure 1 is significantly lower compared to that of the low-cost tasks.The right part of Figure 1 demonstrates the impact of introducing an incentive mechanism, resulting in a significant improvement in the completion rate of the high-cost task after incorporating a reference task.The specific process of fog computing offloading is defined as follows: (1) Task publishing: According to the task information of this round, the platform classifies the computing tasks, designs the reference tasks for the target tasks, and publishes the information of the computing tasks and the reference tasks to the edge nodes together.The information includes the unloading cost of the computing task and the remuneration available for completing the task; (2) Task selection: the fog node selects the calculation task according to the attraction of the task and submits the quotation application to the platform; (3) Task allocation: the platform selects the winning node and assigns the tasks; (4) Performing the offloading task: the fog node performs the offloading task assigned by the platform and returns the result; (5) Payment: the platform pays the task remuneration to the fog node that completes tasks.
In this paper, the clock frequency is used to quantify the computing power of fog nodes and mobile devices.The tasks of mobile device τ j are represented by (r j , c j ), where r j represents the remuneration of computing tasks, and c j represents the cost required to calculate tasks.The resource state of fog node i is represented by a binary group ( f i , δ i ), where f i denotes the clock frequency of fog node i, and δ i denotes the tendency of fog node i to task remuneration.
The goal of incentive mechanism design based on frame of reference in this paper is to make the mechanism meet the following three expected characteristics: (1) Authenticity: no matter how much other fog nodes bid, if no fog node can improve its utility by submitting a bid different from its true valuation, the mechanism is authentic.(2) Individual rationality: in the mechanism, no fog node performs tasks with a return lower than its cost, that is, the utility of the fog node is not negative.(3) Computational efficiency: the mechanism can be run in a polynomial time.

Logical Model
Figure 2 shows the specific incentive steps of the RIM mechanism.The platform takes the average remuneration value and average cost value of all tasks as the reference point.Step 1 involves the platform categorizing tasks into three distinct categories based on their reference point: high-cost and high-reward, low-cost and low-reward, and other miscellaneous tasks.In Step 2, the platform designs reference task parameters with optimal reference effect by taking the high-cost and high-reward task as its target.Following this, in Step 3, the platform publishes all tasks including the reference task to fog nodes.Subsequently, in Step 4, fog nodes select a task to complete and make an offer to the platform while updating their propensity coefficient in Step 5. Finally, in Step 6, dynamic division of fog nodes occurs according to changing tendency coefficients which affects different types of fog node's reference task design.

Task Classification
This section classifies the computing tasks that need to be offloaded in the environment.Firstly, the average remuneration r ave = 1 J ∑ J j=1 r j and the average cost c ave = 1 J ∑ J j=1 c j of j tasks in the environment are calculated, and then the tasks are divided into three categories based on the average value: if the remuneration of the task is higher than the average value, and the cost of the task is also higher than the average value, then the task is assigned to the class A with high remuneration and high cost.The tasks whose task remuneration and cost are lower than the average value are assigned to class B with low remuneration and low cost.The remaining tasks will be assigned to class C. The specific process is shown in Algorithm 1.

Algorithm 1 Task classification
if r j > r ave &&c j > c ave then 5: else if r j < r ave &&c j < c ave then 7: end if 10: end for 11: return τ A , τ B , τ c ; Algorithm 1 divides the tasks into three categories according to the task information published by mobile devices in the environment.Each type of task τ type (type ∈ {A, B, C}) contains two attributes τ type (r type , c type ) of remuneration r type and cost c type .The average value of this kind of task is taken as its attribute value.At this time, the reference point of the task in the environment is m(r ave , c ave ).
In order to reflect the comprehensive attraction of computing tasks to fog nodes, the attraction function of class type(type ∈ {A, B, C}) tasks based on reference points is constructed.The fog node determines whether to participate in the offloading task according to the attraction value of each type of task.When the attraction value of one type of task is greater than that of other types of tasks, the fog node chooses to participate in the offloading task.
In order to eliminate the difference in the dimension of the values of the two attributes, it is necessary first to scale the original data so that the dimensions of the two attributes are on the same scale.This paper uses linear normalization to scale the value of the remuneration to the same dimension as the cost, as shown in Formula (1): where r i ′ and r i represent the values before and after data normalization, respectively; r max , r min , c max and c min represent the maximum and minimum values of the two attributes in the sample data, respectively.
In this paper, the attraction values of the task on the two attributes are added to obtain the overall attraction value of the task.The higher the attraction value of the task, the more likely it is to be selected by the fog node.The attraction function of τ type based on the reference point is shown in Formula (2): where M r type | r ave denotes the remuneration attraction of task τ type based on the reference point's remuneration r ave ; N c type | c ave denotes the cost attraction of task τ type based on the reference point's cost c ave .According to the definition of frame of reference, the attractiveness of the remuneration above the reference point to the task is positive, and the attractiveness of the remuneration below the reference point to the task is negative.The time cost attribute is the opposite of the remuneration attribute.Therefore, we design the remuneration and time cost attraction functions as shown in Formulas ( 3) and ( 4), respectively: where 0 < α = β < 1 denotes the marginal diminishing sensitivity of returns and losses to the attraction.λ > 1 indicates loss aversion, that is, the change in the loss interval is steeper than the gain interval.This is because, compared with the reference point, the more the remuneration, the more the income, and the less the remuneration, the greater the loss.
The acquisition of the same unit is not as affected by the loss of the same unit.Similarly, the higher the cost than the reference point, the greater the loss.

Design of Reference Task
In this paper, the task in class A is the target task τ goal (r goal , c goal ) = τ A (r A , c A ), then the task in class B is its competitive task τ compete (r compete , c compete ) = τ B (r B , c B ), and the reference task τ decoy (r decoy , c decoy ) is to be designed.Since the reference task needs to form a reference relationship with τ goal , the remuneration reference factor χ and the cost reference factor γ are used to reflect the relationship between the two types of tasks in terms of attributes.And the attribute values of the reference task are designed, where .

Definition 1. (Reference effect
).The effect of the reference effect is defined by the intensity coefficient is the difference between the attraction difference between the target task and the competitive task after adding the reference task and the attraction difference between the target task and the competitive task before adding the reference task, as shown in Equation ( 5): According to the definition of the formula, E > 0 indicates that a positive reference effect has occurred, and the larger the value of E, the better the reference effect on the target task.E < 0 indicates that a negative reference effect has occurred, and the smaller the value of E, the better the reference effect on the competitive task.E = 0 indicates that there is no reference effect.Theorem 1.When the positive reference function E > 0 is obtained, the range of the effective reference factor is χ ∈ [ Proof of Theorem 1.After adding the reference task τ decoy (r decoy , c decoy ), Then, according to Definition 1, the attraction Formula (2) is substituted into Formula (5) to expand E = ((M(r and the reference point formula is simplified to obtain χ ∈ [ , +∞).Taking the intersection, we can, respectively, obtain the range of remuneration reference factor and cost reference factor that produce positive reference effect χ ∈ [ Theorem 1 discusses the value range of the effective reference factor when obtaining the positive reference effect combined with the reference effect discussed in this paper, that is, the reference task is equal to the target task in terms of remuneration, and the cost is higher than the target task.When the reference factors are χ = 1 and γ = f rac2c A − c B c A , respectively, the maximum reference effect is obtained.
According to the reference factor obtained by Theorem 1, the reference task is designed and added to the task set.The specific process is as shown in Algorithm 2: add task τ decoy to Γ; 9: end if 10: return Γ = τ goal , τ compete , τ decoy ; Algorithm 2 first calculates the time reference factor value and the remuneration reference factor value to obtain the maximum reference effect according to the task attribute, and then designs the reference task (lines 2-4) according to the value.Finally, the reference task is added to the original task set and published in the form of three types of tasks (lines 5-9).

The Tendency Change in Fog Nodes
In this model, we only consider the two attributes of remuneration and cost of computing tasks.Therefore, for fog nodes, only their remuneration tendency and cost tendency are considered.By defining the remuneration tendency coefficient δ i ∈ [0, 1] of the fog node, the cost tendency coefficient of the fog node is 1 − δ i .δ i > 0.5 means the remunerationoriented node; δ i < 0.5 means the cost-oriented node; δ i = 0.5 means the non-oriented node.The tendency value of the second round node to the class task is shown in Formula (6): where P k i, type represents the tendency value of fog node i to task τ type (type ∈ {A, B}), the task remuneration attraction value M r type | r ave and the task cost attraction value N c type | c ave are obtained by Formulas (3) and (4), respectively.
Next, the tendency model of fog nodes is established.The fog node will dynamically adjust its tendency coefficient according to each round of the task set.If the fog node is more inclined to the target task than the competitive task, it will increase its tendency coefficient.That is to say, it is more inclined to remuneration-based tasks.On the contrary, it will reduce their tendency coefficient.That is, it is more inclined to cost-based tasks.If the tendency degree of the fog node to the target task is equal to the competitive task, or when the tendency coefficient of the fog node has reached 0 or 1, the tendency coefficient will not be changed.The specific update rules are shown in Formula (7): where δ k+1 i represents the tendency coefficient of fog node i in round k + 1(k ≥ 0), and ∆y is the increase or decrease in the tendency coefficient.The influence of the reference effect on the tendency is reflected in the degree of tendency change, so ∆y is obtained by the tendency ratio of the fog node on the two attributes of remuneration and cost, as shown in Formula (8): According to the results of task classification in Section 3.
, that is, the change of the reference point makes the attraction of the target task increase.Therefore, the tendency value of the fog node to the target task is increased, and the total number of selected target tasks is increased.
Next, we discuss how fog nodes select tasks.In order to make more fog nodes participate in the offloading of high-cost tasks (i.e., tasks in class A), the tendency value of fog nodes to tasks in class A should be increased as much as possible.For the remunerationoriented node, because the tendency coefficient δ i > 0.5 is applicable to the situation discussed in Section 3.2.2 of this paper, according to Theorem 1, P k i,A > P k i,B is valid obviously.Therefore, the remuneration-oriented node will choose the tasks in class A. Through Lemma 1, it can be seen that after adding the reference task, under the action of the RIM mechanism, the tendency value of the non-oriented node to the tasks in class A will be greater than the tasks in class B. For the cost-oriented node, the range of its tendency coefficient for tendency reversal is discussed by Theorem 2.
Theorem 2. If the cost-oriented node is to be reversed to the remuneration-oriented node after a round of task selection, the value range of the tendency coefficient Proof of Theorem 2. It is assumed that the type of task selected by the fog node in the two rounds changes, that is, the tendency value of the fog node in the round k − 1 is and in the round k is P k i,A > P k i,B .According to Formula (7), the tendency coefficient changes to δ k+1 i = δ k i + ∆y > 0.5 in the round k + 1, indicating that the tendency reversal occurs.The inequality is expanded according to Formula (8): According to the design of the reference task, γ > 1, then c ′ ave > c ave .Then, N B − N A > 0, the same as M A − M B > 0. The simplified inequality is shown in Formula ( 9): The left side of Formula ( 9) is a quadratic function about , solve the inequality according to the properties of the quadratic function.Firstly, it is known that a = (N B − N A ) > 0 indicates that the function opening is upward, so the solution of the original inequality is 2(N B −N A ) > 0.5 does not meet, discard.Simplifying another solution, the value range of δ k i is: Theorem 2 discusses the range of the tendency coefficient of the cost-oriented node that can reverse under the reference effect.On the whole, when the tendency coefficient of the fog node satisfies , the fog node can improve the tendency to the target task under the influence of the reference task, so as to select the target task.

Analysis of Node Quotation
After selecting the task, the fog node determines the quotation of the task according to the cost and its tendency to the task.C i,j (c j , f i ) represents the cost of the fog node i selecting task τ j , and , where c j represents the time required for the task τ j to be offloaded, and f i represents the clock frequency of the fog node i.
According to the above analysis, the quotation model of the fog node is established.The quotation b i,j of the computing task τ j by the fog node i is related to the cost of completing the task and the tendency to the task, as shown in Formula (10): where T represents all task types, T = {A, B, decoy}.type * represent the task types that the node chooses to offload, and T − type * represents other class tasks.The selection of fog nodes and tasks is represented by the matching matrix X, as shown in Equation ( 11): All elements of the first round are zero.After the fog node quotes, the matrix element corresponding to the fog node i and task τ j is a i,j = 1, otherwise it is a i,j = 0.If the matching matrix has at most one element of 1 in each column, the matching matrix is output.Otherwise, the task τ j is selected by multiple fog nodes, and fog nodes are counterselected.This process determines the fog node that wins the task and the final transaction price of the task through the Vickrey auction.That is, the fog node with the lowest quotation becomes the task winner, and the second lowest quotation b ′ i,j of the round is the final remuneration f b i,j to be paid for the task.At the same time, the matching matrix elements corresponding to the successfully matched fog nodes and tasks are set to a i,j = 1, and the other aspects of the column are modified to 0.
Therefore, if the fog node participates in the quotation and finally obtains the task, the utility of the fog node is defined as the difference between the transaction price of the task and its quotation for the task; otherwise, the utility of the fog node is 0, as shown in Formula (12): According to the analysis of the behavior pattern of fog nodes in Section 3.2.3,firstly, the tendency of fog nodes to tasks will change with the addition of reference tasks.Then, the fog node selects the task type according to the tendency value, and quotes the selected task according to the cost and tendency.Based on this, this paper proposes a fog node selection algorithm under the RIM mechanism, as shown in Algorithm 3.

Algorithm 3 Task selection
Input: Γ = τ goal , τ compete , τ decoy , I Output: X, f b i,j , Γ k 1: 1. Initialize:X = 0; k = 1; 2: for i = 1 : I do 3: 4: else if P k i,A < P k i,B then 8: end if 12: for j = 1 : J do 13: b i,j = C i,j (c j , f i ) − max(P i,type * − P i,T−type * ); Select max b i,j in type * as the final task quotation of the node i 16: end for 17: for j = 1 : J do 18: select the optimal bid b i,j and set a i,j = 1 in X; end if 24: end for 25: return X, f b i,j , Γ k ; In Algorithm 3, all elements of the matching matrix are initialized to 0. Then, update the tendency coefficient of all fog nodes according to the Section 3.2.3fog node tendency update strategy (lines 2-11) .Then, according to the fog node quotation formula in this section, the quotation of each fog node for each task is calculated, and the highest quotation is selected as the final task quotation of the fog node (lines 12-16).Then, traverse all tasks and the matching matrix elements corresponding to the task and the fog node with the lowest quotation are set to 1 (lines [17][18].When the number of fog nodes for the task quotation is greater than 1, the second-lowest quotation is used as the final task remuneration (lines [19][20].Otherwise, the failed task is added to the failed task set to wait for the next round to be selected (lines 21-24).

Task Pushing
According to the range of the tendency coefficient of the cost-oriented nodes that reverse tendency under the reference effect obtained by Theorem 2, we divide the fog nodes into the following three groups: (1) No Trend Reversal group (NTR): the node tend to neutral and remuneration, that is, (2) Tendency reversal group (TR): the node that can change from the cost-oriented to the remuneration-oriented under the influence of the reference task, that is, , 0.5 .
(3) Tendency reversal influence group (TRI): the node that always is remunerationoriented no matter how to design the reference task, that is, ].
Because the tendency coefficient is variable, the group of fog nodes also changes dynamically.n type represents the total number of three types of fog nodes, type ∈ {NTR, TR, TRI}.
According to the classification, we mainly design reference tasks for TR and TRI to reduce the quotation of nodes, and discuss the design of reference factors through Theorem 3.
Theorem 3.For TR, the best result is obtained when Proof of Theorem 3. In order to reduce the quotation b i,j of nodes in TR, it is necessary to increase P i,A − P i,B .Let L = P i,A − P i,B , bringing this into Formula ( 6) can obtain Therefore, it can be seen that the reference factor χ and γ are positively correlated with L = P i,A − P i,B .Combined with Theorem 1, it can be seen that the best effect is obtained when Similarly, for the nodes in TRI, it is necessary to increase L = P i,A − P i,B .According to the discussion of Theorem 1, it can be inferred that the task in class B is the target task, and the best effect is obtained when Next, we add different reference tasks to push tasks to nodes for different types of fog nodes.The specific process is as shown in Algorithm 4.
In Algorithm 4, the fog nodes are divided into three groups: NTR, TR and TRI, according to the tendency coefficient (lines 1-9).If there is a task in the failure task set, the failed task is first reclassified by Algorithm 1.Then, the bait task attributes are redesigned according to the characteristics of three groups of fog nodes.Then, the bait task is added to the task set to push the three groups of fog nodes (lines 10-27).set end for 27: end while 28: return Γ k+1 type 3.2.6.Example Next, this paper illustrates the situation of fog node selection task and the change in the tendency coefficient before and after adding reference task through an example.The parameter settings of offloading tasks and fog nodes in the environment are shown in Tables 2 and 3. First of all, τ 3 is the reference task, and the reference points before and after the reference task are m(r ave , c ave ) = m(7, 7) and m ′ (r ′ ave , c ′ ave ) = m ′ (8, 10), respectively.The task attributes are r A = r goal = 10,c

Algorithm 4 Task pushing
According to Theorem 2, the tendency coefficient range of the cost tendency node with tendency reversal is δ k i ∈ (0.35, 0.5).Therefore, only the fog nodes with the tendency coefficient falling in this interval will have a tendency reversal.Next, the fog node is calculated as an example.

Utility Analysis and Mechanism Evaluation
This section will theoretically evaluate the RIM mechanism proposed in this paper from two aspects: utility and mechanism.Section 3.3.1 analyzes the transaction price of the task, the number of offloading tasks and the utility of the platform.Section 3.3.2evaluates the performance of RIM mechanism.

Utility Analysis
This section compares the utility of the mechanism of this paper.Firstly, it is proved theoretically by Lemma 2 that under the mechanism of this paper, the final transaction price of the task will be reduced.Then, through Lemma 4, it is proved that the mechanism of this paper improves the platform utility.
The utility of the platform is the cost of local execution of all offloading tasks minus the compensation required to offload to the fog node, as shown in Formula (13): where f j represents the clock frequency of the task τ j , C j (c j , f j ) represents the cost of the task executed locally, and f b i,j is the remuneration that the task ultimately needs to pay.Before calculating the utility of the platform, Lemma 2 is used to analyze the change in f b i,j before and after the RIM mechanism.
Lemma 2. The task transaction price under the RIM mechanism is lower than that without the RIM mechanism.
Proof of Lemma 2. In lines 15 to 17 of Algorithm 3, the final transaction price of the task is the second lowest quotation of the fog node in this round, and the quotation of the fog node is given by Formula (10).The cost of the task and the clock frequency of the fog node are the objective environment, and the effect of the RIM mechanism is the same.Therefore, the quotation discussed here is only determined by the tendency of the fog node to the task.The higher the tendency value, the lower the quotation of the fog node.
(1) For NTR, the added reference term increases the tendency coefficient of the fog node, thereby increasing the tendency value of the task in class A, so that P k i,A − P k i,B > 0. (2) For TR, the reference term is added to reverse the fog node from the cost-oriented to the remuneration-oriented, thereby increasing the tendency value of the task in class A, so that P k i,A − P k i,B > 0.
(3) For TRI, the added reference item reduces the tendency coefficient of fog nodes, thereby increasing the tendency value for the task in class B, so that P k i,A − P k i,B > 0. In summary, the RIM mechanism overall reduces the fog node 's bid for the task.Therefore, the final transaction price of the task determined at the second low price is also reduced.
Lemma 3. The platform utility under the RIM mechanism is more significant than that without the RIM mechanism.
Proof of Lemma 3.According to the analysis results of Theorem 3, it can be seen that under the task pushing algorithm of RIM mechanism, the number of offloaded tasks of each type of fog node will be improved.As stated in Lemma 2, the remuneration paid to fog nodes under RIM is lower than the case without RIM.According to Formula (13), the platform utility under the RIM mechanism is more significant than that without the RIM mechanism.
It can be concluded that the RIM mechanism improves the platform utility while improving the task offloading ratio.

Mechanism Evaluation
The previous section analyzes and compares the utility of the RIM mechanism in this paper.This section theoretically evaluates the performance of the mechanism in this paper, including authenticity, individual rationality and computational efficiency, which are proved by Lemmas 4, 5 and 6, respectively.Lemma 4. The RIM mechanism is authentic.
Proof of Lemma 4. In the design process of the RIM mechanism, this paper uses a thirdparty service platform as an auctioneer to collect information, match and determine the final transaction remuneration.More importantly, the auctioneer has publishing and supervision functions.When the auctioneer detects that the bid of the fog node is higher than the actual utility, it has the right to cancel the bid of the fog node, that is, b i,j = 0. Therefore, the fog node benefits the most only when submitting real task selection and price, effectively ensuring the authenticity of the RIM mechanism.
Lemma 5.The RIM mechanism is individually rational.
Proof of Lemma 5.According to Formula (12) and Algorithm 3, this paper sets the sub-low price as the final transaction price, so the quotation of fog node must not be higher than the final transaction price, that is, b i,j ≤ f b i,j = b ′ i,j .Therefore, the utility is non-negative, ensuring the individual rationality of the RIM mechanism.Lemma 6.The RIM mechanism is computationally efficient.
Proof of Lemma 6.The algorithm with the highest time complexity in RIM is Algorithm 3. First, of all, for each fog node, it is necessary to calculate its tendency value to the target task and the competitive task, so as to update its tendency coefficient.Then, for each task fog node, the corresponding quotation is calculated and the highest value is selected, so the time complexity of the fog node is O(I J).Similarly, when the platform selects fog nodes, it also requires sorting their offers, leading to a time complexity of O(J IlogI) on the platform side.In summary, considering that the number of fog nodes is usually greater than 2, the overall time complexity of Algorithm 3 is O(I JlogI).This means that the RIM algorithm converges in polynomial time relative to I and J, and the lemma is proved.

Simulation
In order to evaluate the effect of the reference-based RIM mechanism, we model the fog computing offloading system and simulate the mechanism.This paper analyzes the impact of the RIM mechanism through experiments and compares it with the PMMRA mechanism [19].PMMRA is a classical incentive mechanism considering multi-node and multi-task in computational offloading system.This experiment uses Java language to simulate on the IntelliJ IDEA platform in the OSX environment.

Experiment Setting
In order to ensure the fairness of the experimental comparison, the basic parameter settings of RIM are the same as the values of PMMRA.The parameter settings of the experiment are shown in Table 4.
The clock frequency of fog node i and mobile device j r j [2,20] The remuneration of task τ j c j [200,2000] The cost of task τ j δ i (0, 1) The tendency coefficient of fog node i to task remuneration In the experiment, we consider scenarios where the number of offloading tasks ranges from 5 to 50, and the number of fog nodes ranges from 10 to 60.The CPU clock frequency of each fog node and mobile device is randomly set to 1 to 1.5 GHz.Since different tasks have different execution features, the expected pay for each task varies from 2 to 20, and the time cost varies from 200 to 2000.The fog node tendency coefficient is 0.5 in the range of 0-1, and 1 is the normal distribution of the variance.

Analysis of Reference Parameters
This section analyzes the impact of the remuneration reference factor χ and the cost reference factor γ on the RIM mechanism.By referring to the effect intensity coefficient and the target task selection rate, the pros and cons of the mechanism are reflected, that is, the ratio of the number of fog nodes of the target task to the total number of fog nodes is selected.These two represent the effect of the frame of reference theoretically and practically.Here, the parameter χ increases from 0 to 1, increasing by 0.1; the parameter γ is from 1 to 2, also increasing by 0.1.At this time, the number of unloading tasks in the environment is 50, and the number of fog nodes is 30.
As shown in Figure 3, according to Theorem 1, as the remuneration reference factor χ increases, the negative reference effect gradually decreases, and then the positive reference effect gradually increases.With the rise of the cost reference factor γ, the reference effect rises first and then decreases, and the reference term fails when γ > 1.7.The positive reference effect will increase with the increase in the remuneration reference factor within a certain range.This is because the increase in the remuneration reference factor leads to decreased distance between the target item and the reference point in the remuneration dimension, while the distance between the competition item and the reference point in the remuneration dimension increases.According to the definition of task attraction in Section 3.2.1, the attraction of the target item is slightly lower than that before the reference item is added, while the attraction of the competition item is significantly lower than that before the reference item is added.Finally, the attraction of the target item is higher than that of the competition item.On the whole, when χ = 1, γ > 1.6 is optimal.
Figure 4 is the selection rate of the target task in the experiment.It can be seen that the trend is basically consistent with the intensity coefficient value, indicating that the model in this paper is correct.

Evaluation of Task Selection
When the number of unloading tasks is constant, with an increase in the number of fog nodes, the selected cases of τ A and τ B , and the selected cases before and after adding τ decoy , are represented by τ A , τ B , τ goal and τ compete , respectively.As shown in Figure 5, the number of fog nodes selected τ A and τ B is basically the same before adding the reference task.However, following the addition of the reference task, there is a significant increase in the number of fog nodes selecting τ goal compared to those selecting τ compete .And, the number of fog nodes selected τ decoy is close to 0, primarily because τ decoy , being the reference task, lacks significant attraction compared to τ goal .So, few fog nodes will select it.It can be seen from Figure 5 that the RIM mechanism promotes the fog node to choose to offload high-cost tasks and the overall task offloading rate.
As shown in Figure 6, the distribution of the time cost of successfully unloaded tasks is shown.After adding the reference task, the task unloading rate with high time cost is higher.The black and red points represent the distribution under the PMMRA mechanism and the RIM mechanism, respectively.It can be seen that the number of task offloading with high time cost under the RIM mechanism is more than that under the PMMRA mechanism.This is because the reference item changes the reference point of the node, and the number of fog nodes selected to participate in the high time cost increases.

Number of Completed Tasks
This section compares the changes in the number of completed tasks when the total number of fog nodes in the environment remains 30 under the RIM mechanism and the PMMRA mechanism.
It can be seen from Figure 7 that the RIM mechanism is significantly better than the PMMRA mechanism in the number of completed tasks.

Platform Utility
The following subsection presents a comparative analysis of the impact of RIM and PMMRA on platform utility, considering 25 and 50 offloading tasks, respectively.In this scenario, the fog node propensity coefficient follows a normal distribution with a mean value of 0.5 bits within the range of 0-1, while maintaining a variance of 1.
RIM exhibits significantly higher platform utility than PMMRA for different total numbers of fog nodes, as illustrated in Figure 8, when there are 25 offloading tasks.Under the influence of RIM, computing tasks align with their tendency, leading to increased participation of fog nodes and reduced transaction rewards for successful offloading tasks.Consequently, the overall utility is enhanced.Figure 9 demonstrates that when there are 50 offloading tasks, the platform utility of RIM surpasses that of PMMRA.From Figures 8 and 9, it can be seen that the RIM mechanism can improve the high-cost task offloading rate and the overall task offloading rate without increasing the remuneration of fog nodes.

Conclusions
This paper primarily investigates the integration of reference frame theory into fog computing offloading.Subsequently, an incentive mechanism called RIM is established based on the characteristics of frame of reference to enhance the selection process for target tasks in fog nodes.Initially, tasks are categorized based on reference points, and task attractiveness is modeled from a task attribute perspective.Next, the impact of reference tasks on offloading numbers for target tasks is analyzed, and a design incorporating reference tasks into the original task set is proposed.Furthermore, a propensity model for fog nodes is developed by classifying nodes according to price and propensity value, followed by pushing new task sets with different types of reference tasks.The experimental results show that RIM can improve the offloading rate of the overall task without increasing the platform's expenditure and ensuring the platform's utility.
In this study, we implement the RIM mechanism in the fog node selection task stage.By adding reference tasks to the task set, the node's tendency to remuneration and cost is changed to promote the offloading rate of the overall task and ensure the utility of the platform.In the near future, we will explore the different characteristics of nodes and expand other attributes of computing tasks, and conduct in-depth analysis of the node selection task model to achieve more accurate node segmentation and task matching.

2 . 1 ,Lemma 1 .
δ i (M A − M B ) indicates the tendency change in fog nodes from B to A in remuneration attribute.(1 − δ i )(N B − N A ) represents the tendency change caused by the improvement in the fog node from class A to class B in cost attribute.Under the RIM mechanism, the total number of selected target tasks increases.Proof of Lemma 1.According to the derivation of Theorem 1, after adding the reference task τ decoy , O(τ goal

Figure 3 .
Figure 3.The influence of the reference factor on intensity coefficient.

Figure 4 .
Figure 4.The influence of the reference factor on the selection rate of target task.

Figure 5 .
Figure 5.Comparison of the number of fog node selections for each type of task.

Figure 6 .
Figure 6.Comparison of the cost distribution of completing tasks under different mechanisms.

Figure 7 .
Figure 7.Comparison of the number of completed tasks under different mechanisms.

Figure 8 .
Figure 8.Comparison of platform utility under different mechanisms when task number is 25.

Figure 9 .
Figure 9.Comparison of platform utility under different mechanisms when task number is 50.

Author
Contributions: D.L., C.Y. and Y.T. designed the project and drafted the manuscript.C.Y. and Y.T. wrote the code.J.L. performed the analysis.All authors have read and agreed to the published version of the manuscript.

Table 1 .
Common symbols and meanings.