Abstract
Mobile agent is a kind of program which can transfer via asynchronous mode independently in the sensor network with outstanding prospects in application. However, due to the openness of the sensor network, mobile agents are facing the threat of security, such as being stolen and modified. How to protect sensors from attacks of malicious mobile agents becomes an important issue in the field. Traditional access control strategies such as hybrid encryption mechanism, partial results of the package, and other methods have some defects in the application. We design a multisensor interaction trust model with complete β distribution and introduce incomplete β distribution to optimize the trust model according to the actual situation of detection data loss for mobile agent system in the wireless sensor networks. In addition, the introduction of the malicious behavior feedback mechanism ensures the security of sensors in the mobile agent system. The experimental results show that the reputation model of incomplete β distribution can simulate the actual situation well, resist the attacks of malicious agents, and ensure the security of sensors in the system.
Introduction
In recent years, with the rapid development of sensor network technology, the information on the Internet is growing rapidly, and the structure of the network is more and more complex. The demand for sensor network technology is growing, which promotes the development of distributed technology. In this context, the mobile agent technology, which combines the advantages of the traditional distributed computing model and the agent technology, makes a significant contribution to the progress of the network technology.
Mobile agent is a program that can carry the code, data, and the implementation of the state. It migrates in accordance with the established route between the sensors in the network. The mobile agent can move from one sensor node to another, and it can continue to execute from the breakpoint in a new location. As a new distributed computing model, mobile agent can effectively improve sensor network performance, reduce network traffic, and improve the utilization of resources. The transmission mechanism of the code to the data transfer is adapted to the development of the existing network technology and the demand of the network application.
With the emergence of each new network technology, people consider the issue of its security first. As a new computing model, mobile agent is widely used in the field of distributed computing, distributed information inquiry, and electronic commerce. Although it has advanced features and broad application prospects, security has become one of the most important factors that hinder its further development.
The security of mobile agent technology is mainly in the following aspects:
Mobile agent server security;
Security of mobile agent in transmission;
Security of mobile agent in mobile agent server;
According to the security threats of mobile agent server, researchers put forward some solutions, such as code signing, 1 state verification, 2 historical path recording method, 3 and sandbox mechanism 4 . In the security of mobile agent transfer process, researchers put forward some solutions, such as asymmetric encryption method, 5 a mixed variety of encryption mechanisms, 6 and pretty good privacy (PGP) encryption algorithm 7 . In the security of mobile agent in mobile agent server, solutions are partial results encapsulation mechanism, 8 hardware protection strategy, 9 the black box method, 10 and so on.
To ensure the security of mobile agent system, the ideal situation is to achieve a complete trust relationship between the mobile agent and the agent running environment. The agent servers accept the interactive application of mobile agents with the relatively high degree of trust.
Therefore, this article introduces a trust mechanism with incomplete β distribution to enhance the security of the mobile agent system in WSNs. The β distribution is a density function as the conjugate prior distribution for binomial distribution and Bernoulli distribution. Its parameters can be seen as pseudo count, which can be directly reflected in the interaction results of the reputation model. However, the malicious actions of sensors can result in incomplete data. Therefore, the traditional β distribution is not suitable for establishing credit model. So we improved mobile agent reputation system using the incomplete β distribution for those incomplete conditions. We detected for malicious sensor nodes with time degradation characteristics. In the simulation, the accuracy of agent selection and failed interaction times are both improved.
The rest of this article is organized as follows. Section “Related work” is about related works of mobile agent, server, and transmission security. Section “Mobile agent reputation system” describes a reputation model for mobile agent. Section “Improved trust model of mobile agent based on incomplete β distribution” improves trust model of mobile agent based on incomplete β distribution. Section “Malicious sensor detection mechanism based on incomplete β distribution” is simulation analysis and section “Simulation and result analysis” draws conclusions.
Related work
Mobile agent technology has been derived from artificial intelligence. Since then, the academic community began the research work of mobile agents.
Research on security of mobile agent server
Researchers have put forward some kind of solutions.
Code signing
Mobile agent server needs to carry out a series of security operations, such as access control, privilege allocation. These measures are based on the identity verification mechanism, and the code signature proposed by Stoopman et al. 1 is the most common method. This method is that the owners of the mobile agent make the digital signature in the mobile agent information and code.
State verification
Mobile agent is in urgent need of a state monitoring mechanism to protect its own security. The state verification method is put forward in Walton et al. 2 The running state of the mobile agent is identified by the state identification function. The execution status of the mobile agent is abnormal, and then the corresponding access rights are assigned by agent status and execution status. However, this method is appropriate for the mobile agent server with complete access control mechanism. The target server is utilized to monitor the running state of the mobile agent and to combine the type of mobile agent to allocate the corresponding access rights.
Historical path recording method
In the paper, the method of historical path record is put forward, which is commonly used in Yuan et al. 3 The method records the information of the mobile agent during the migration process. The target node can decide whether to grant the mobile agent access rights by viewing the historical information. Then the method needs to verify the information of the entire historical platform.
Sandbox mechanism
In addition, a sandbox mechanism is proposed in the literature. 4 The mechanism enhances the security of the server nodes by limiting the authority of the mobile agent. However, some needed resources cannot be used by mobile agents for the limit of operation authority.
Research on transmission security of mobile agent
Asymmetric encryption method
An asymmetric encryption method is proposed in the literature. 5 This method is based on the public key and private key encryption and decryption, which are used in the field of information security currently. The disadvantage of the non-symmetric encryption method is that the encryption and decryption speed is slow, and it is not suitable for the encryption of a large amount of data.
Mixed variety of encryption mechanisms
A variety of encryption mechanisms are combined in Chen et al. 6 This method has been used to solve the security problem of mobile agent in a certain degree.
PGP encryption algorithm
In the paper, 7 an algorithm using PGP is proposed to encrypt the mobile agent. PGP technology is a kind of encryption algorithms based on RSA (RSA algorithm proposed by Ron Rivest, Adi Shamir and Leonard Adleman) public key encryption, which can improve the transmission efficiency and improve the information security. But it is not easy to use the PGP algorithm to encrypt the mobile agent.
Research on security of mobile agent in mobile agent server
Partial results encapsulation mechanism
Partial results encapsulation mechanism is presented in Dechthummarong et al., 8 whose main idea is to encapsulate the implementation results of mobile agents in different nodes in order to check whether the mobile agent is tempered by malicious sensor in future. According to different types of mobile agents, different packaging mechanisms, such as the use of an encryption mechanism, the digital signature mechanism for mobile agents, the contents of the package include the mobile agent in the various nodes of the various operations, operating results.
Hardware protection strategy
The hardware protection strategy is proposed in the literature. 9 The most common is the use of Java Card and software to ensure the security of mobile agents. Java Card protection mechanism can effectively ensure the data integrity and privacy of mobile agents. However, the hardware protection strategy is dependent on hardware, so it is difficult to use in large scale. And tamper resistant hardware can only provide limited resources, which limits the efficiency of mobile agents.
Black box method
Black box method is proposed in the article. 10 Black box is usually used to package mobile agent information, including encapsulation data of mobile agent, codes and execution states. Mobile agent is just a black box by looking from outside and the sensor node can only get the input or output information of mobile agent. The mobile agent can resist the attacks of malicious sensors through the black box method. However, in the process of input and output, the black box method cannot protect mobile agent security. Security risks still exist.
Research on reputation system
In recent years, the research on reputation system has attracted many attentions, and some trust management models have been proposed. In 1996, Blaze et al. 11 first proposed the concept of trust management. “Authorisation delegation” is used to solve the “stranger” licensing issues. FAPtrust model 12 is composed of four parts, which includes direct trust, recommendation trust, incentive function, and active degree. Direct trust is evaluated based on the historical performance of the node. Recommendation reputation is evaluated from the third node. The weight of these factors is set up using fuzzy analytic hierarchy process theory based on entropy weight method.
Pirzada and Mcdonald 13 propose a trust model based on analyzing network packet data and an aggregation mechanism, where nodes calculate trust according to multiple observed events, including passive acknowledgements, packet precision, salvaging information, gratuitous route replies, and black-lists.
A trust model based on the recommendation trust was introduced in Wang et al. 14 It can prevent a node with higher service trust value to defame a normal node by distinguish between the service trust value and recommendation trust value.
Mobile agent reputation system
The reputation system of β distribution-based mobile agent
Reputation formal model description
The mobile agent reputation system is used for the mobile agent to initiate an interactive application to the sensor. The sensor determines whether the mobile agent is credible according to the reputation system and decides whether to accept the interaction with the agent. Main process includes establishing reputation model based on β distribution, reputation updating reputation integration, and behavior decision. All the relevant symbols and variables are described in Table 1.
Signification of variables in this article.
Definition 1 (reputation)
Mobile agent is a kind of program that can transfer in the network with established routes independently. As shown in Figure 1, (a, b, c, d, i, f) is a set of sensor nodes. a-b-c-d-i is the established route for the agent j. After running on the sensors a-b-c-d, the agent j applies interaction to the sensor i. And the sensor i makes decision according to the reputation of agent j. Reputation is evaluation of an agent or a sensor by a other sensor, considered as a probability distribution. Reputation is divided into direct and indirect reputation. Direct reputation refers to the sensor i getting the direct evaluation of an agent j according to the reputation of the system, expressed by (Xij) D .

Route of mobile agent and trust model.
If it just relies on direct supervision to establish the reputation of information algorithm, the convergence time will be very large, and it will consume a lot of resources. Using indirect reputation solves the above problems. If the sensor i gets the reputation evaluation of agent j by another sensor d, with (Xij)1D to express, it is called one-degree indirect reputation. If a sensor i gets the reputation evaluation of an agent j through sensor f and sensor b with (Xij)2D to express, it is called two-degree indirect reputation. And so on, in the whole model, there is three-degree indirect reputation, four-degree indirect reputation, and so on. Mobile agent transfer process with the security problem occurs frequently; hence, the value of the information is not high. Therefore, we only consider the one-degree and two-degree indirect reputation. The comprehensive reputation of a mobile agent is derived from the direct reputation and indirect reputation weighted sum, as shown in formula (1). a1 and a2 are the correlation coefficients, a1 + a2 = 1. They can be set according to different network environments
Definition 2 (trust)
Trust Tij is a kind of subjective expectation of sensor (or agent) j’s behavior in the future in sensor i. It is the statistical expectation of the probability distribution of the reputation. Tij indicates the trust of sensor i to agent (or sensor) j. Different from reputation, trust is a numerical value, as shown in formula (2)
Definition 3 (judge)
When an agent launches an interactive application to a sensor, the sensor will determine the reputation of the agent. The determining behavior Aij depends on the trust value of j in i. In this article, we use variable reputation threshold to decide the value of Aij
When Aij is trusted, the sensor agrees the application of the interactive agent; on the contrary, the application is rejected. The specific calculation method of
Definition of reputation model
This section describes an example of a basic system based on a Bayesian formula. The system is designed for the mobile agent reputation. First of all, take a brief description of the Bayesian formula and then describe the mobile agent reputation system based on the β distribution.
Bayesian formula 15 is used to calculate the probability of the reputation. According to the principle of probability theory, the expression of Bias formula is as follows
H1, H2,…, Hn is a division of the sample space.
P(A|Hj)/total probability is called Likelihood, which is an adjustment factor making the estimated probability closer to the true probability. In the trust model, in the period t, take the prior probability
Many distributions, such as β distribution, Gauss distribution, Poisson distribution, Dirichlet distribution, can be expressed in reputation system. 16 Our reputation system is based on the β probability density function which can be used to represent probability distributions of binary events. 17 The mathematical analysis leading to the expression for posteriori probability estimates of binary events can be found in many text books on probability theory 18 and we will only present the results here. Posteriori probabilities of binary events can be represented as β distributions. The β-family of probability density functions is a continuous family of functions indexed by the two parameters a and b.
The β distribution is denoted as β(a, b), which is usually introduced by γ function
When x represents a sensor, and t represents another sensor,
If an agent has not requested interaction, the value of
Improved trust model of mobile agent based on incomplete β distribution
Trust model based on incomplete β distribution
We previously established the reputation model of mobile agent based on β distribution, and defined the reputation function and trust. And we given credit to update, integration, and decision-making behavior of specific methods. But in the testing process of mobile agent, the
But, in actual cases, due to some special reasons, for example, malicious sensors, the destruction of the agent or the data in the sensor may be lost, so
Therefore, the traditional β distribution is not suitable to establish the credit model. In this chapter, according to the principle of the Bayesian formula and distribution, the improvement of mobile agent reputation system was established based on incomplete β distribution, which is a generalization of the β function. The definite integral of the β function is replaced by an indefinite integral. Incomplete β function is as follows
λ1, λ2 are called incomplete parameters, among them 0 < λ1 < λ2 < 1. Function values can be checked in this article. 21
If λ1 = 0 and λ2 = 1, then formula (9) is β function. The reputation function equation (7) can also be expressed as following based the other form of β function
According to formula (10), we defined reputation function based on the incomplete β distribution as follows
Practical sensor agent detection may not fully record the success and failure times. According to the principle of probabilistic, examining the successful interaction probability between sensor and agent, we can get
Because
Obtain its expected value as following
The reputation model based on incomplete β distribution applies to the real interaction scenarios of sensors and mobile agents, which can calculate mobile agent credibility more accurately and identify malicious agents.
However, how to set the value of λ2 to adapt to the dynamic network environments needs further study in incomplete β distribution. Under normal circumstances, if the sensor agent network does not suffer large-scale attacks or data loss, we believe that the sensor can record times of successful interaction and failed interaction completely and build reputation system with complete β distribution model improving the efficiency of the network.
Reputation update
When agent x interacts with sensor t, sensor t decides whether to accept the application by calculating the x agent reputation value. The reputation value is obtained by direct reputation and indirect reputation. The direct reputation can be obtained by mathematical expectation of reputation function of agent x on sensor t. For the mobile agent reputation system of indirect reputation, we mainly consider the one-degree indirect reputation and the two-degree indirect reputation. One-degree indirect reputation refers to the reputation value of agent x for sensor t getting from sensor y. The one-degree indirect reputation has been analyzed and demonstrated in detail in the literature 20 as formula (13), so we will focus on the derivation of two-degree indirect reputation in the following

The two-degree indirect reputation.
Same to the one-degree indirect reputation, B, D and U represent the probability of trust, not trust, and uncertainty, respectively.
22
Then, according to the metric map, 22 the above parameters are mapped to the reputation system
The r and s are the parameters in the reputation model, which represent the successful interaction times and failed interaction times, respectively.
Taking formula (15) into formula (14) can get the two-degree indirect reputation
Reputation integration
Sensors need to verify the mobile agent through the direct and indirect reputation. Updating reputation based on β distribution or incomplete β distribution is equivalent to updating two parameters. 21 From formulas (1), (13), and (16), we can get the reputation integration formula
Sensor behavior decision
Through the definition of the reputation model, the reputation updating and integration, sensors get the trust value of the mobile agents. By comparing the trust value with the threshold value, sensors determine whether the mobile agent is credible and decide whether to accept the interaction with the agent. The judgement rule is as formula (3). And in this article, we use the variable reputation threshold
We assume that an agent accessed to the sensor with r times successfully and s times unsuccessfully in a period time Δt. Successful accesses indicate that the sensor believes that the agent is trusted. But it cannot rule out the error or malicious agent sneaking successfully. We assume that there are r1 times of malicious access in r times of access. Similarly, there are s1 times of failed access for normal agents’ application. Rejected agents run properly on a subsequent sensor, which indicates that the agents are normal.
We assume data will be updated after each period time Δt. We also consider the period of time m*Δt. The time sequence is denoted as (t1, t2,…, tm). t1 is the latest time period, and tm is the earliest time period. Times of malicious access can be denoted as
F is the initial credit rate value, and its value should be set based on the specific environmental needs. We set F = 0.5 in this article. Credit rate reflects the reputation level of agents which apply for interaction to the sensor in the system. When the value of
In the threshold iterative algorithm, the threshold is expressed as the product of the change of the credit and the historical reputation of agents successfully interactive with the sensor. And the weight of the historical reputation is the factor of time. The influence factor of time is denoted as
This method can change the reputation threshold according to the network conditions for every sensor to guarantee that the threshold setting is more reasonable and the sensor is more accurate to the agent’s trust behavior in a period of time.
Malicious sensor detection mechanism based on incomplete β distribution
For the reputation model proposed in this article, when the agent applies to a sensor for interaction, the sensor considers the agent’s direct reputation and recommendation reputation from other sensors to make decisions. The recommended reputation is from other sensors in the network. There are some malicious sensors inevitably resulting in the recommendation reputation unbelievable. In this section, a malicious sensor detection mechanism is presented.
As shown in Figure 3, execution path of mobile agent x is a-b-c-d-z. Agent x has executed on the sensors a, b, c, d, and applies for interaction to the sensor z. Sensor z has direct reputation with sensors b and d.

Reputation relationship between sensors and agent.
Consequently, sensors b and d can provide recommendation reputation about agent x to the sensor z. Similarly, we assume that there are number of intermediate (sensors) (Y1Y2…Yi…Ym) that can provide recommendation about agent x to the sensor z. There are direct trust relationships between sensor z and the intermediate sensors, and intermediate sensors also have direct trust relationships with agent x.
The direct trust value of intermediate sensor node Yi to agent x is TYix. The expected value of direct trust value of agent x in all intermediate sensors is as follows
In the absence of malicious recommendation or a small amount of malicious sensors, the expected value is a good reaction of the real trust value of agent x. The difference between direct trust value of agent x in sensor Yi and the expected value is
If Δ is large, it indicates that the trust value of agent x in the sensor Yi departs from actual values. Expectation of trust value of intermediate sensor nodes in sensor z is
The difference between trust value of sensor z to a certain sensor node Yi and the above expectation is
Δ′ is the difference value between the trust value for the intermediate sensor node Yi in sensor z and the average trust value for all the intermediate sensor nodes. If Δ′ meets the following inequality, then the x might be malicious
In the above equation,
Simulation and result analysis
In an open network, there will be malicious agents or sensors and false recommendation or malicious service inevitably. In this regard, the reputation value of malicious sensor nodes will be correspondingly reduced as punishment, which makes these sensor nodes become untrusted or lose the opportunity to be selected at a later interaction, and encourages honest and reliable service.
In the following comparison algorithms, we selected two algorithms FAPtrust 12 and SWRT trust. 14 The trust model of FAPtrust consists of four parts, which are direct trust, recommendation trust, incentive function, and active degree. Direct trust is evaluated based on the historical performance of the agent. Recommendation reputation is evaluated from third-party sensor nodes. The incentive function is the punishment mechanism of malicious sensor nodes. The active degree represents the interaction frequency of sensor nodes recently. The value of trust in the SWRT trust reputation model is divided into two parts: direct reputation and recommended reputation value. Direct reputation value is the experience of the sensor to the assessment agency. Recommended reputation consists of recommendation value by a third party to the assess sensor node and the trust value of the third party in the sensor. A third-party recommendation value is decided by two factors: the similarity degree between sensors and the third-party sensor nodes; the historical recommendation reliability of the third-party sensor nodes.
The algorithm in this article also uses the direct trust and recommended trust of third parties. The difference is that this article is based on incomplete β distributed trust model, which is a kind of good simulation to the actual probability distribution. We consider not only the direct trust value but also the one-degree indirect trust and the two-degree indirect trust. A rigorous evaluation of the intermediate sensors is carried out to enhance the tolerance to dynamic changes in the network.
The proposed model is implemented on the simulation platform NS-2 (Network Simulator, version2). Sensor nodes communicate with each other using ZigBee protocol.
The number of sensors is 20, and the number of mobile agents is 50 in the network. The initial threshold value is set to 0.6. There is no malicious sensor in the network. We detect the reputation of mobile agents in the network using different algorithms, such as incomplete β distribution, SWRT trust model, FAPtrust, and traditional β distribution. In the case of different proportions of malicious agents, the accuracies of agent selection using different algorithms are shown in Figure 4. Times of transactions failed are shown in Figure 5.

Accuracy of agent selection and percentage of malicious agent.

Times of failed interaction and percentage of malicious agent.
As shown in Figure 4, horizontal ordinate represents the percentage of malicious agents in the scene. The ordinate represents the accuracy of selection. Accepting normal agents and rejecting malicious agents are correct selections. The opposite are wrong choices. So the ordinate is the metric of sensor nodes’ selection for mobile agents. There is no data loss in this scene, so the effectiveness of incomplete β distribution algorithm and the β distribution algorithm is quite similar. It is clear that the accuracy of incomplete β distribution algorithm is better than SWRT trust model. With the gradually increasing proportion of malicious agents, accuracy of FAPtrust algorithm decreases rapidly but the accuracy of incomplete β distribution algorithm is relatively high, more than 85% when the proportion of malicious agents is 40%, which shows that the incomplete β distribution is still useful in the case of a lot of malicious agents existing.
In Figure 5, the horizontal ordinate represents the percentage of malicious agents in the scene. The ordinate represents the times of failed interaction. Failed interaction means a sensor accepts malicious agent’s application.
According to Figures 4 and 5, it can be seen that with the number of malicious agents increasing, there is a reduction in the number of transaction failures in the incomplete beta distribution and beta distribution model. The reason is the introduction of the variable threshold. When the number of malicious agents is large, the threshold also increases accordingly, and the sensor can be effectively protected against attacks by malicious agents. However, in the FAP and SWRT trust model, when the proportion of malicious agents is increased, sensor security is under great threat.
The initial set has 10 normal agents and 10 malicious agents interacting with the sensors, and initial trust value of all sensors and agents is 0.6. Every 10 s, there are 10 new normal agents and 10 malicious agents joining. Interaction frequency of agents with the sensors is 1 times per second. During this time, trust values of malicious agents and normal agents interacting with sensors are shown in Figure 6. If malicious attacks and interference that leads to data loss do not happen in the outside, we set λ1 = 0, λ2 = 1 in the incomplete beta distribution.

Average trust value of normal agents and malicious agents over time.
In Figure 6, the ordinate represents the trust value of agents. For agents continuing to interact with the sensors, successful continuing interaction makes the trust value of the agents increase. For the malicious agents, continued lower level of trust makes its trust value decrease with time.
It can be seen from Figure 6 that the reputation accumulation of normal agents and the reputation punishment of malicious agents are relatively slow in the SWRT trust algorithm. The accumulation of reputation is not uniform in FAPtrust algorithm. After the first successful interaction, the trust value has considerable changes. In reputation model of incomplete β distribution, the reputation value of each agent changes more smoothly because of variable threshold, which reduces the probability of sudden change of reputation.
At the start of interaction, based on initial test results, we set the initial trust of all sensors and agents value to 0.66. And every agent interacts with sensors 10 times in accordance with the established route. With the increase of the normal transaction number, the agents will gradually gain trust accumulation. Because of the malicious behavior in the fourth and seventh interactions, trust value has decreased. And it may be a deliberate act of agents. The agent obtains a higher value of trust by the start of normal interaction and then implements a malicious attack on the sensor.
Reputation accumulation of normal agents and the reputation reduction of malicious agents are relatively slow in SWRT trust model. From Figure 7, we can see each agent’s reputation value fluctuation is small in the SWRT trust algorithm, and punishment for the malicious behavior of the malicious agent is not serious. It means that it can not avoid continuous attack of malicious agents. In FAPtrust model, the trust value rise too fast after the first normal interaction, so malicious behaviors are likely to succeed in the next interactions. Here, the malicious behavior is punished more severely in the incomplete β distribution reputation model, and it is relatively stable in the accumulation of the normal agents’ reputation, which effectively reduces the threat of malicious agents. And it can effectively prevent the harm caused by malicious behaviors on the sensor, while the accumulation of reputation does not change too fast to prevent malicious agents from gaining high reputation accumulation through the deliberate acts.

Trust value of agents with time.
There are 50 sensors and 50 mobile agents in the network, in which the number of malicious agents is 10, and the proportion of malicious sensors gradually increased. Agents interact with sensors 10 times according to an established route. The initial trust value is set to 0.67, and the threshold value is set to 0.6. The data record is not complete. When the proportion of malicious sensor increases the accuracy of agent selection is as Figure 8.

Accuracy of agent selection with malicious sensors.
As Figure 8 shows, it is easy to suffer from malicious recommendation from malicious sensors without malicious sensor detection mechanism. With the rise of malicious sensors percentage, accuracy of mobile agent selection rapidly declines. In the incomplete β distribution, we can adjust the value of λ2 according to the incomplete data recording, λ2 = 0.5, so that the reputation distribution is more close to the actual situation. And detecting the malicious sensors excludes interference of malicious sensors, and kicks out these sensors from mobile agent tour route, which enhances the security in mobile agents.
There are 50 sensors and 50 mobile agents in the network. Malicious agents and malicious sensors exist in the network, and there is a case of data loss. We set λ1 = 0, λ2 = 0.8 in the incomplete β distribution model. Also the initial threshold is set to 0.6, and the initial trust value of mobile agents is 0.66. With the proportion of malicious agents and malicious sensors gradually increasing, the accuracy of agent selection and failed transaction times includes cases that normal sensors are attacked and normal agent accesses malicious sensor, are as Figures 9 and 10, respectively.

Accuracy of agent selection and percentage of malicious sensor nodes and agents.

Times of failed interaction and percentage of malicious agents and sensors.
In the case of the presence of malicious agents and malicious sensors in the network, the network status of mobile agents becomes more complex. With the increasing proportion of malicious sensors and malicious agents, malicious sensors recommend malicious agents, so that the selection accuracy of FAP and SWRT model is rapidly declining.
Due to the addition of the malicious sensor detection mechanism. In the β distribution and incomplete β distribution that will detect the malicious recommendation of sensors, the normal agents will remove malicious sensors from its tour route, which reduces the number of failed transactions greatly.
Conclusion
In increasingly complex network environment, the security of mobile agent system has become increasingly important. The formal reputation model is introduced into the interactive environment of mobile agents, and the results performed well. In this article, according to incomplete data records in the actual scene, a reputation model based on incomplete β distribution is proposed, and the value of the parameter needs to be studied further. In the mobile agent system, not only the reputation value of the agent is considered, but also the detection mechanism for potentially malicious sensors and the feedback mechanism are introduced, which makes the mobile agent system run more safely, and protects the system from the risk of attack.
Footnotes
Academic Editor: Juan Cano
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by NSFC (61372108, 61401033), and National Science and Technology Pillar Program Project (2015BAI11B01).
