1 Introduction

In recent years, wireless communication and network technologies are developing rapidly, and intelligent mobile devices are quickly connected to the Internet. The explosion of data [1] and the emergence of real-time multiprocessor [2] brings a good beginning to the Socially Aware Networks (SAN). SAN is a new type of network integrating the Delay Tolerant Network (DTN) [3], Cyber-Physical System (CPS) and Social Network Analysis Theory [3,4,5], which mainly takes the social connections or characteristics between mobile nodes as the basis of network communication.

SAN combines computer science, humanities and social science and cognitive science to promote human-centered intelligent communication by revealing memory regulation [6] of human activities. It can perceive and utilize the context information of nodes, and provide services for human beings more intelligently through context awareness computing [7,8,9,10]. SAN is one of the important development directions of mobile ad hoc network, and it brings new opportunities for the development of computer network [11]. Nowadays, the extensive use of social network applications makes SAN enter the eyes of many researchers in academia and industry [12, 13]. Therefore, in-depth study of SAN is helpful to further promote the development of universal network.

There are still many problems to be solved in SAN, especially designing effective message forwarding algorithms [14,15,16,17]. Although nodes’ social relations are in a relatively stable and social activities have a certain regularity in the SAN, but due to nodes’ resource-constrained and dynamic network topology changes, nodes will not be willing to sacrifice their own resources to forward messages to others, and will prevent routing to work properly. As a result, the transmission success rate will be lower, and the network performance will be degraded. So, the selfishness of the nodes in the network [18,19,20] is a problem that needs to be solved.

At present, the solution to the selfishness of nodes is mainly to design incentive mechanism to encourage selfish nodes to participate in cooperation. The existing classic incentive mechanism can be divided into three categories: reputation-based incentive mechanism, virtual currency-based incentive mechanism and game-based incentive mechanism. Reputation-based incentive mechanism [21,22,23,24] is mainly to check the behavior of the node according to the reputation table in each node, and judge whether the node can be trusted, then select the node with large reputation value as the forwarding node. The main purpose of incentive mechanism based on virtual currency [25,26,27] is to virtualize the process of message forwarding into a form of currency transaction. First pricing the message, and then obtaining the corresponding currency after the message forwarding. However, the process of message forwarding in game-based incentive mechanism [28,29,30,31,32] is to turn it into a bargaining process between both parties. Therefore, both parties will maximize their own interests and the nodes can help to forward the message after they both agree the pricing. All the three incentive mechanisms only pursue the cooperation between nodes and do not consider the influence of the nodes’ states on the behavior of nodes. Such mechanism not only fails to improve network performance, but also speeds up the consumption of resources. This can make it impossible for nodes to communicate normally, thus further degrading network performance. And traditional currency-based incentive mechanism requires the participation of the third party, which is difficult to achieve without infrastructure [33] and fixed equipment.

Literature [34] has proposed Bargaining based Incentive Protocol (BIP). It is a kind of incentive mechanism based on business model. It mainly considers the message properties, nodes’ residual resource and environmental properties such as wealth, then respectively designs the bidding function for the buyer (source node) and the asking price function for the seller (the forwarding nodes). If the seller’s asking price is less than or equal to the buyer’s bidding, this will suggest that the forwarding node are happy to receive messages and obtain the buyer’s offering virtual currency. But if it is larger than the bidding, the forwarding deal will be abandoned and then they will start to trade the next message. However, energy consumption also affects whether a node is willing to forward messages. While the designed bidding function and asking price function both ignore the influence of energy factors on pricing and the opacity of information between the two parties may lead to the problem of node’s false offer.

In literature [35], a game-based incentive strategy (GIS) has be proposed, which mainly adopts the three-time bargaining game mechanism without the supervision of a third-party organization, so that both parties can forward messages at a reasonable price and successfully complete the transaction. Although GIS can restrain the problem of false pricing to a certain extent, there are still some problems such as the information of both sides is not open and the currency is insufficient. Moreover, the mechanism of three times bargaining will lead to the high delay of message delivery and excessive energy consumption.

All of the above incentive strategies encourage the nodes to cooperate with each other and optimize the network, but they all have their own problems, so Equivalent Exchange Based Data Forwarding Incentive Scheme (EEIS) will be proposed in this paper. In this incentive scheme, it comprehensively considers the nodes’ resource states such as cache, energy, wealth and message attributes, and the messages pricing function is designed for the nodes, which enables the both parties to negotiate twice. At the same time, the relevant resources information and wealth status of nodes are also disclosed, so as to suppress the false pricing of nodes.

2 Network Model and Hypothesis

In this paper, SAN is abstracted as a disconnected directed graph G = (v, e), where vertex v represents a node in the socially aware networking, and edge e represents the encounter connection between two nodes.

In socially aware networking, the nodes have limited energy and cache. If the energy of nodes is exhausted, the nodes will no longer be able to communicate with each other. Similarly, if the nodes’ cache space is used up, the nodes will be unable to receive messages. Therefore, in order to ensure the operation of network, nodes will try their best to save their own resources, resulting in serious packets loss behavior. This fully reflects the selfishness of nodes. As can be seen from Fig. 1, the delivery ratio of messages decreases significantly due to the selfish nodes’ joining the network.

Figure. 1
figure 1

The effect of selfish nodes on message delivery ratio.

Because the “store-carry-forward” method is applied to transmit messages in the socially aware networking, all source nodes forward messages to the destination nodes by mainly moving and meeting with relay nodes according to the specific routing algorithm. In socially aware networking, the routing algorithms can be divided into single-copy routing and multi-copy routing on the basis of the number of messages copies in the network. Multi-copy routing needs a lot of cache and consumes a lot of energy, so Prophet routing algorithm [36] is mainly applied in this paper to explain the proposed incentive scheme.

The following assumptions are put forward to analyze in this paper:

  1. 1)

    If the relay node is a selfish node and not the destination node of messages, it will not receive any messages from any nodes.

  2. 2)

    Nodes’ selfishness is rational. Nodes will pursue their own maximum interests under the conditions of their own circumstances. At this time, nodes will only consider whether it is beneficial to receive messages at present, but not consider whether there will be problems such as insufficient currency after forwarding messages.

  3. 3)

    Selfish nodes are not malicious nodes. They do not intentionally delete messages in their own cache, but treat equally all messages in the cache space. At the same time, selfish nodes will actually bid on the basis of their own situation according to the pricing method in this paper.

  4. 4)

    Each node has defined initial currency and initial energy. The node mainly conducts messages forwarding transactions through payment of currency and energy consumption.

3 Equivalent Exchange Based Data Forwarding Incentive Scheme

An equivalent-exchange-based data forwarding incentive scheme (EEIS) will be proposed in this paper. On the basis of the virtual currency incentive mechanism, it will mainly add the bargaining model based on equivalent exchange. In EEIS, both sides of the transaction will negotiate the message price according to the node’s own resource status and the size of messages. After the price negotiation is completed, the message forwarding process and the transaction process will be carried out. This algorithm is mainly to manage their own virtual currency by the nodes themselves. After each message is forwarded, the sending node will immediately pay the certain currency to the relay node. And it does not require a third-party institution to monitor the messages transaction process.

EEIS is mainly composed of three parts: nodes’ resource status, equivalent-exchange model and message forwarding scheme. The resource state is a key factor for the node’s message pricing. The equivalent-exchange model is the process of two nodes’ negotiation and transaction about messages to be forwarded, and the message forwarding scheme is the process of the node’s forwarding the message to the meeting node.

3.1 Resource State

In the network, the resource status is directly related to whether the node is willing to forward the message, which will also affect the respective pricing of the message by both nodes. Therefore, the data forwarding incentive algorithm mainly considers some relatively important attributes such as the remaining cache space of the node, the remaining energy of the node, the wealth status of the node, and the size of the message.

3.1.1 Node’s Remaining Cache Space

The remaining cache space of nodes can be expressed as percentage, which mainly reflects the current storage capacity of nodes. Therefore, the node’s remaining cache percentage \( {B}_{p_i} \) can be seen in Formula (1), where i denotes the node \( i,\kern1em {B}_{p_i}, \) represents the remaining cache space percentage of node \( i,\kern1em {B}_{left_i}, \) denotes the remaining cache of node i at the current moment, and \( {B}_{init_i} \) represents the initial cache space of node i.

$$ {B}_{p_i}=\frac{B_{left_i}}{B_{init_i}} $$
(1)

It can be seen from Formula (1) that the larger the node’s remaining buffer space, the larger the node’s the storage capacity. So that it is easier for the node to receive messages sent from other nodes.

3.1.2 Node’s Remaining Energy

Similarly, the remaining energy of a node can also be expressed as a percentage, which mainly embodies whether the node can forward messages, so the remaining energy percentage \( {E}_{p_i} \) of node i is visible in Formula (2). In Formula (2), i denotes the node \( i,\kern1em {E}_{p_i}, \) represents the remaining energy percentage of node \( i,\kern1em {E}_{left_i}, \) denotes the remaining energy of node i at the current moment, and \( {E}_{init_i} \) represents the initial energy of node i..

$$ {E}_{p_i}=\frac{E_{left_i}}{E_{init_i}} $$
(2)

It can be known form Formula (2) that the more remaining energy a node has, the more messages it sends, and the easier the node cooperates with other nodes.

3.1.3 Node’s Wealth

The node’s wealth denotes the amount of virtual currency held by the current node. Nodes will decide whether they are willing to forward messages to other nodes according to the amount of currency they currently own. It can be known from the Formula (3) that the wealth Ri of node i can be divided into three states: rich, general and poor. When \( {V}_i(t)<{V}_{poor_{\mathrm{min}}}, \) the wealth status of node i is poor; when, the wealth status of node i is rich; otherwise, the wealth status of node i is general state.

$$ {R}_i=\left\{\begin{array}{c}\frac{V_i(t)}{V_{poor_{\mathrm{min}}}},\kern1.75em \mathrm{Poor}\ \mathrm{Status}\\ {}1,\kern2.75em \mathrm{General}\ \mathrm{Status}\\ {}\frac{V_i(t)}{V_{rich_{\mathrm{max}}}},\kern1.75em \mathrm{Rich}\ \mathrm{Status}\end{array}\right. $$
(3)

In Formula (3), Vi(t) is the amount of virtual currency held by node i at time \( t,\kern1em {V}_{poor_{\mathrm{min}}} \) denotes the threshold of the minimum amount of virtual currency owned by node i when the wealth status of node i is poor. \( {V}_{rich_{\mathrm{max}}} \) represents the threshold of maximum amount of virtual currency owned by node i when the wealth status of node i is rich. And the condition \( {V}_{rich_{\mathrm{max}}}>{V}_{poor_{\mathrm{min}}} \) must be satisfied.

3.1.4 Message Size

At all nodes in the network, the message size is proportional to the energy consumption and the use of cache space. The lager the message size, the more the consumed energy, and the larger the occupied cache space, so the message size is also an essential factor for the message pricing.

3.2 Equivalent Exchange Model

In Socially Aware Networking, the message forwarding process is abstracted as a currency transaction process in EEIS. When two nodes meet, the buyer is the party that needs to send messages, and the seller is the other party that receives messages. The buyer uses the virtual currency it owns to purchase the seller’s forwarding service, and the seller obtains the certain virtual currency by selling its service. However, in the process of both parties’ transactions, both sides must understand the other side’s resource state, wealth status and their respective pricing for the message, which inhibits nodes from making false pricing.

3.2.1 Source Node’s Bidding Function

Here the source node represents the node that wants to send messages. Before the source node forwards message, it needs to consider its remaining resource state and wealth status, so as to make its reasonable price for messages, and pay the forwarding node the corresponding amount of virtual currency. If the remaining buffer space of the source node is insufficient, it will send messages at a relatively high price in order to reduce the pressure. However, considering that messages are not suitable for long-term storage in the cache, the source node will utilize the price as a factor so as to promote it to send messages as soon as possible. Therefore, while the source node’s wealth status is rich, it will price messages based on the node’s remaining resource state and wealth status. But while its wealth status is poor, it will only consider the node’s resource state. Hence the bidding function of the source node is expressed as

$$ P=M\times \left[\alpha \times \left(1-{B}_s\right)+\beta \times \left(1-{E}_s\right)\right]\times {R}_s^{\hbox{'}} $$
(4)

In which, M is the size of the message to be sent, P is the source node’s pricing for the message, Bs represents the remaining cache percentage of the source node s, and Es represents the remaining energy percentage of the source node s. \( {R}_s^{\hbox{'}} \) denotes the wealth status of the source node s, and \( {R}_s^{\hbox{'}}=\left\{\begin{array}{c}{R}_s,\kern0.5em \mathrm{Rich}\ \mathrm{Status}\\ {}1,\kern2em \mathrm{Others}\end{array}\right.. \) Moreover, α and β are weights, which represent the influence of the remaining cache and remaining energy of the source node s on the pricing for the message, and α + β = 1. At this time, the experiment in Fig. 2 proves that the values of α and β are both 0.5 respectively, which are the most appropriate.

Figure 2
figure 2

The effect of weights on message delivery rate.

It can be seen from Formula (4) that when Rs > 1, that is, the wealth status of node s is rich, it is willing to realize the message forwarding at a relatively high price. On the contrary it will pay a lower price. When the message takes up the node’s cache for a long time, it will cause the node’s remaining cache Bs to become smaller and the node needs to pay a higher reward while forwarding messages. Therefore, if the node sends the message as soon as possible, it will relieve the pressure on the cache and pay a relatively low price.

3.2.2 Forwarding Node’s Pricing Function

The forwarding node means the node that receives messages. Similarly, it must also consider its own remaining resource state and wealth status before the forwarding node receives messages, so as to set a reasonable price for messages to be received and obtain a certain amount of virtual currency from the source node. If the forwarding node’s wealth status is poor, it will receive messages at a low price. Thereby it needs to forwarding more messages to acquire more virtual currency and alleviate its own wealth crisis. Of course, if the forwarding node’s remaining resource is inadequate, then it will set a higher price to receive messages. Therefore, when its wealth status is poor, it will consider its own remaining resource state and wealth status, otherwise, it will only consider the node’s resource state. Hence the pricing function of the forwarding node is expressed as

$$ S=M\times \left[\lambda \times \left(1-{B}_f\right)+\omega \times \left(1-{E}_f\right)\right]\times {R}_f^{\hbox{'}} $$
(5)

In which, M is the size of the message to be sent, S is the forwarding node’s pricing for the message, Bf represents the remaining cache percentage of the forwarding node f, and Ef represents the remaining energy percentage of the forwarding node \( f.\kern1em {R}_f^{\hbox{'}} \) denotes the wealth status of the forwarding node f, and \( {R}_f^{\hbox{'}}=\left\{\begin{array}{c}{R}_f,\kern0.5em \mathrm{Poor}\ \mathrm{Status}\\ {}1,\kern1.75em \mathrm{Others}\end{array}\right.. \) Moreover, λ and ω are weights, which represent the influence of the remaining cache and remaining energy of the forwarding node f on the pricing for the message, and λ + ω = 1. At this time, the experiment in Fig. 2 proves that the values of λ and ω are both 0.5 respectively, which are the most appropriate.

It can be seen from Formula (5) that when Rf < 1, that is, the wealth status of node f is poor, it will receive more messages at a relatively low price to obtain more virtual currency. When the node continues to forward messages, its remaining buffer space will be larger and the price for messages will also become lower, which promotes the forwarding of messages. When the node’s resource is insufficient, it is unwilling to receive messages, and the price for message will become higher, which may cause both parties to abandon the transaction. Therefore, the node will receive messages from other nodes as much as possible if its own conditions permit.

3.2.3 Trade Rules

When the source node meets the forwarding node, both sides start negotiation and transaction for the message that needs to be forwarded. The trading rules of EEIS are shown in Fig. 3, and the specific description is as follows (both nodes must understand each other’s message prices, resource state and wealth status):

  1. (1)

    For the message to be sent, the price given by the source node s is denoted as P; for the message to be received, the price given by the forwarding node f is denoted as S. If S ≤ P, the transaction between the two parties will be successful and the message forwarding will be completed. Then continue the next message’s forwarding transaction.

  2. (2)

    If S > P, the source node s and the forwarding node f cannot negotiate successfully, then both sides re-price respectively the message according to both parties’ the remaining resource state and wealth status and make second price negotiation.

  3. (3)

    The rules for second bargaining are divided into the following three situations:

Figure. 3
figure 3

Message forwarding transaction process

a. If the wealth status of the forwarding node f is rich, that is Rf ≥ 1, the price given by the source node s will be still P, and the forwarding node f discounts the price S according to the encounter probability to try the next bargaining to complete the message forwarding trade. The price given by the forwarding node after the discount is

$$ {S}_{discount}=S\times p $$
(6)

Where Sdiscount is the discounted price of the forwarding node f, S is the initial message pricing of the forwarding node f, and p is the encounter probability between the forwarding node and the destination node.

b. If the wealth status of the forwarding node f is poor and that of the source node s is rich, that is Rf < 1 and Rs ≥ 1, then the price given by the forwarding node f will be still S. When the remaining resource of the source node s is sufficient, there is no pressure at this time, so the price it gives can be slightly increased to try the next negotiation and complete the message forwarding transaction; When the remaining resource of the source node s is inadequate, it wants to forward the message as soon as possible. At this time, the source node s needs to increase the price of the message according to its own resource state and wealth status to try the next negotiation and complete the forwarding transaction. Therefore, the price raised by the source node s is

$$ {P}_{raise}=P\times {R}_s\times \frac{B_s+{E}_s}{B_s^2+{E}_s^2} $$
(7)

Where Praise is the increased price of source node s, P is the original message price of source node s, s, Rs is the current wealth status of source node s, Bs is the remaining cache percentage of source node s, and Es is the remaining energy percentage of source node s.

c. If the wealth status of the source node s and the forwarding node f is both poor, that is Rf < 1 and Rs < 1, then both sides need to change their message pricing. The changed price of forwarding node f is calculated according to Formula (6), and that of source node s is

$$ {P}_1=P\times {R}_s $$
(8)

Where P1 is the changed price of source node s, P is the original price of source node s, and Rs is the current wealth status of source node s.

  1. (4)

    If the source node and the forwarding node negotiate successfully for the second time, the message forwarding transaction will be completed, and then the forwarding trade for the next message will be continued. If the both sides’ negotiation fails, the message forwarding trade will be abandoned and the next message forwarding transaction will be started.

The pseudo-code of the message forwarding transaction process is shown in Algorithm 1. Algorithm 1 describes the two-time negotiation process of messages forwarding between the nodes. Algorithm input: P, the price of source node s for message m; S, the price of forwarding node f for message m; Rs, the wealth status of node s; Rf, the wealth status of node f; probability, the encounter probability between node f and the destination node of message m; Bs, the remaining buffer space percentage of source node s; Es, the remaining energy percentage of node s. First, compare price P and S made respectively by node s and node f for message m. If P is greater than or equal to S, node s forwards message m and pay half virtual currency of the sum of P and S as the trade price to node f. Otherwise, according to the respective wealth status of source node s and forwarding node f, two nodes respectively make re-pricing P1and S1, then compare them again. If P1 is greater than or equal to S1, node s forwards message m and pay half virtual currency of the sum of P1 and S1 as the trade price to node f. If two nodes’ bargaining twice still fails, the forwarding transaction of message m will be given up and continue the forwarding trade of the next message.

figure h

3.3 Game Analysis

The message forwarding process can be seen as a two-stage game, that is whether the source node s chooses to send the message and whether the forwarding node f chooses to receive the message, as shown in Fig. 4.

Figure. 4
figure 4

Game process of message forwarding

Assuming that at time t, for message m, the price given by source node s is P, the price given by forwarding node f is S, and P is less than or equal to S. At this time, if source node s does not choose to send the message, then at time t + 1, when node s wants to send messages, it must consider the cost of it in term of cache and energy.

  1. (1)

    Since the energy of the source node s is strictly decreasing, at time t + 1, when node s wants to forward messages, the price calculated according to Formula (4) will be increased. Therefore, the part of the additional expenditure is expressed as

$$ {l}_1=\frac{M}{E_s}\times {L}_1\times \gamma \times {R}_s $$
(9)

In which, L1 represents the length of message to be forwarded by source node s at time t + 1, Es is the remaining energy percentage of source node s at time t + 1, Rs is the wealth status of node s at the current time, and M is the length of message m.

  1. (2)

    Since the source node s does not send the message m at time t, resulting that a part of the buffer space is occupied. At time t + 1, when node s wants to forward messages, the price calculated according to Formula (4) will be also increased. Hence, the part to spend more is expressed as

$$ {l}_2=\frac{M}{B_s}\times {L}_2\times \eta \times {R}_s $$
(10)

In which, Bs is the remaining cache of source node s at time t + 1, Rs is the wealth status of node s at the current moment, M is the length of message m, and L2 is the length of the message to be forwarded by source node s at time t + 1.

In Summary, the cost of source node s choosing not to forward message m at time t is at least

$$ l=\min \left\{{l}_1,{l}_2\right\} $$
(11)

Similarly, if the forwarding node f does not choose to receive the message m at time t, then it will not receive any currency at this time, and its pricing may become higher at the next moment, which will eventually lead to lower cost savings or even trade failure. But if the node f chooses to receive message m at time t, then the cost it saves is expressed as

$$ C=P-S,\kern1.75em C>0>-l $$
(12)

Therefore, if the source node s and the forwarding node f choose to send and receive messages at time t, their obtained gains will be much greater than the gains when they choose not to send and receive, that is, (S, R) is the optimal choice. Hence, the source node s is willing to forward messages, and the forwarding node f is also willing to receive messages. And after node f receives messages, it will also forward messages as soon as possible.

4 Data Forwarding Scheme

In Socially Aware Networking, all nodes will use Prophet routing algorithm for messages forwarding, and the encounter probability is used as the measurement unit. Figure 5 describes the general messages forwarding process. Assuming that message m is a message in the buffer space of source node s, and node d is the destination node of message m. The specific forwarding process is as follow:

Figure. 5
figure 5

Messages forwarding process

When the source node s and the forwarding node f encounter, if the meeting probability of the forwarding node f and the destination node d is greater than that of the source node s and the destination node d, then the source node s will send a request information about purchasing the forwarding service to the forwarding node f. After the forwarding node f (it needs to ensure that it is not the destination node of the message m) receives the request information, the source node s and the forwarding node f will enter the message forwarding transaction stage. According to formula (4) and formula (5), they first calculate their own prices, and then the two parties begin to negotiate the message price. After the negotiation is successful, the forwarding node f will return the information about confirming the sale of forwarding services to the source node s, indicating that the forwarding node f can receive the message m. The source node s starts to send the message m to the forwarding node f after receiving the confirmation message. After the message M is forwarded, the source node s will pay the negotiated certain virtual currency to the forwarding node f and then the message m will be deleted in the cache of the source node s.

In the messages forwarding process, each node maintains an information table, which stores the remaining resources state, wealth status, message price of the source node and the forwarding node. Both parties can check this table to determine whether the other party has made false pricing for the message.

5 Experimental Results and Analysis

5.1 Experimental Environment

On PC Lenovo, CPU 3.60GHz, Memory 16.0GB, OS Windows 10 and Software IntelliJ IDEA, this paper applies the ONE (Opportunistic Network Environment) [37] simulation platform for experiments. In the experiments, the performance analysis of the EEIS algorithm is mainly divided into two situations.

Situation 1: Compare NotWith_EEIS, With_EEIS these two algorithms for performance analysis under different numbers of selfish nodes.

NotWith_EEIS algorithm, there are probably selfish nodes in the network, but the selfish nodes do not forward any messages for other nodes. Only when it encounters the destination node, it can forward the carried messages to the destination node.

With_EEIS algorithm, there are selfish nodes in the network, but selfish nodes will forward messages to other nodes according to the EEIS algorithm.

Situation 2: Compare EEIS, BIP, GIS these three algorithms for performance analysis on Prophet Routing under different simulation time and messages TTL.

  1. (1)

    EEIS algorithm, all nodes in the network are selfish nodes, but selfish nodes will forward messages to other nodes according to the EEIS algorithm.

  2. (2)

    BIP algorithm, all nodes in the network are selfish nodes, but selfish nodes will forward messages to other nodes according to the BIP algorithm. In the BIP algorithm, the two nodes make price for the message according to the message’s remaining TTL and the node’s remaining cache, but the two parties of transaction only negotiate the price once. If it succeeds, then trading and forwarding. Otherwise, the transaction is abandoned and the next message is to be traded and forwarded.

  3. (3)

    GIS algorithm, all nodes in the network are selfish nodes, but selfish nodes will forward messages to other nodes according to the GIS algorithm. In GIS algorithm, the relay node first bids on the message, and if the sending node accepts this price, it will forward and trade. Otherwise, the sending node re-bids. At this time, the relay node will forward and trade if it accepts price. Or else the relay node will bid again, and then the sending node must accept this price and carry out the forwarding transaction.

The detailed simulation parameters are shown below Table 1.

Table 1 Basic parameters of simulation experiment

The simulation experiment parameter settings of the two cases are basically the same. The only difference is that in situation 1, 60 messages per hour will be generated, while a message every 25 to 35 s will be generated in situation 2.

5.2 Network Performance Parameters

This paper mainly uses the following three parameters to evaluate and compare the network performance of the above mechanisms to verify the availability of the data forwarding incentive algorithm.

5.2.1 Delivery Ratio

The delivery ratio of messages refers to the ratio of the number of successfully delivered messages to the total number of created messages, it can be expressed as.

$$ delivery\_ prob=\frac{nrofDelivered}{nrofCreated} $$
(13)

Where delivery _ prob is the delivery ratio, nrofDelivered is the number of successfully delivered messages, nrofCreated is the total number of created messages.

5.2.2 Average Latency

The average latency refers to the average time required for messages from creation to delivery successfully, it can be expressed as

$$ latency\_ avg=\frac{\sum \begin{array}{c}1\\ {} Count\end{array}\left( DeliveryTime- CreatTime\right)}{Count} $$
(14)

In which, latency _ avgis the average latency for the successful delivery of the messages, DeliveryTime is the time when the messages is delivered to the destination node, CreatTime is the time the messages is created, Count is the total number of messages successfully delivered.

5.2.3 Network Overhead

The network overhead refers to the ratio of the difference between the number of relay times of messages sent from the source node to the destination node and the number of successfully delivered messages to the total number of successfully delivered message, it can be expressed as

$$ overhead\_ ratio=\frac{\left( nrof\operatorname{Re} layed- nrofDelivered\right)}{nrofDelivered} $$
(15)

Where overhead _ ratio is network overhead for successful messages delivery, nrof Re layed is the number of hops passed during messages sending, and nrofDelivered is the total number of messages successfully delivered.

5.3 Simulation Results Analysis

(1) The influence of the number of selfish nodes on network performance.

Figure 6 describes the performance comparison of two algorithms of NotWith_EEIS and With_EEIS in term of delivery ratio, average latency and network overhead as the number of selfish nodes changes. It can be seen from the figure that With_EEIS algorithm has achieved better network performance. With the continuous joining of selfish nodes, the network overhead can be reduced while maintaining the delivery ratio and average latency. Figure 6(a) describes the comparison of the delivery ratio of two algorithms. With the change in the number of selfish nodes, the delivery ratio of NotWith_EEIS algorithm continues to decrease, and the messages delivery ratio of With_EEIS algorithm is almost the same as that of NotWith_EEIS algorithm when the number of selfish nodes is zero. Therefore, there is almost no impact on the EEIS’s delivery ratio as the selfish nodes add. Figure 6(b) describes the average latency comparison of two algorithm. The number of selfish nodes keeps increasing, and the average latency of NotWith_EEIS algorithm is reduced, but the average latency of With_EEIS algorithms are basically the same as that of NotWith_EEIS algorithm when the number of selfish nodes is zero. Figure 6(c) compares the network overhead of these two algorithms. With the continuous addition of selfish nodes, the network overhead of NotWith_EEIS algorithm drops sharply, and the network overhead of With_EEIS algorithm also continues to drop and is lower than that of NotWith_EEIS algorithm when the number of selfish nodes is zero. Therefore, after applying the EEIS algorithm, the selfish nodes will actively cooperate with other nodes and forward messages in order to earn virtual currency, so that messages are successfully forwarded to the destination nodes instead of being rejected or discarded.

Figure. 6
figure 6

Performance comparison of various algorithms under different numbers of selfish nodes

(2) The effect of different simulation time on network performance.

Figure 7 describes the performance comparison of EEIS, BIP and GIS these three algorithms in terms of messages delivery ratio, average latency and network overhead as the simulation time changes. It can be seen from Fig. 7(a) that with the change of simulation time, the delivery ratio of EEIS has always been better that that of BIP and GIS, and the reason for the gradual decrease in delivery ratio is that the number of messages generated becomes even larger as time increases, and the energy for sending messages is reduced. When the energy is insufficient, the messages are discarded, which causes the messages delivery ratio of these three algorithms to drop. It can be seen from Fig. 7(b) that the average latency of GIS and BIP are lower than EEIS. When the simulation time is less than 18 h, the average latency of these three algorithms is in a decreasing state. This is because the number of messages that need to be forwarded increases as the simulation time goes by, and the speed at which the messages are successfully delivered is far less than the speed at which they are generated. Therefore, the average latency of three algorithms has been declining. But when the simulation time exceeds 18 h, the average latency of EEIS shows an upward trend, while BIP first rises and then falls, GIS has been in a downward state. This is due to insufficient energy or currency of nodes in GIS over time, resulting in messages being discarded. The reason for the increasing in EEIS and BIP is that the increasing in simulation time causes more messages to be forwarded, so that the time to successfully receive messages will be extended. It can be seen from Fig. 7(c) that the network overhead of EEIS algorithm is lower than that of GIS algorithm, but higher than that of BIP algorithm. This is because the EEIS algorithm requires two bargaining between nodes which BIP requires one bargaining and GIS requires three bargaining between nodes, so the number of messages forwarding in EEIS is greater than that in the BIP algorithm, and lower than that in GIS algorithm.

Figure. 7
figure 7

Performance comparison of various algorithms under different simulation times

(3) The impact of different TTL on network performance.

Figure 8 describes the performance comparison of EEIS, BIP and GIS these three algorithms in terms of messages delivery ratio, average latency and network overhead as the messages TTL increases. It can be seen from Fig. 8(a) that as the messages TTL changes, the delivery ratio of EEIS algorithm is higher than that of BIP and GIS. From Fig. 8(b), we can see that the average latency of EEIS, BIP and GIS algorithms have little difference. It can be seen from Fig. 8(c) that the network overhead of EEIS algorithm is generally lower than that of the GIS algorithm, but higher than that of BIP algorithm. This is because the EEIS algorithm requires two bargaining between nodes, while GIS requires three bargaining, and BIP only needs one bargaining. Therefore, the number of messages forwarding in EEIS is more than that in BIP and less than that in GIS.

Figure. 8
figure 8

Performance comparison of various algorithms under different messages TTL

6 Conclusion

For the selfishness of nodes in socially aware networking, this paper proposes an incentive scheme EEIS based on equivalent exchange. EEIS mainly abstracts messages forwarding into a two-party transaction process, and introduces an equivalent exchange model, so that both sides in the transaction can obtain maximum benefits through virtual currency, thereby encouraging selfish nodes to participate rationally in the messages forwarding process and forward messages for other nodes. Experimental results show that EEIS algorithm can effectively motivate nodes to participate in cooperation, and it still has a better messages delivery ratio under the condition of limited resources.

Although the EEIS algorithm can effectively incentivize nodes, the paper does not take into account the fact that the messages are discarded due to insufficient currency after the messages are forwarded, and whether the messages are successfully forwarded to the destination node, etc. Therefore, we will further study the issues of whether the currency can be overdrawn first to forward the messages and confirm that the messages is successfully forwarded to the destination node.