Inter-cluster multi-hop routing mechanism is a method to calculate a route for a transfer of data between a source node and a destination node via at least one intermediate node in a network. By means of a time-based competitive clustering algorithm, DEBUC partitions all nodes into clusters of unequal size, such that clusters closer to the base station are smaller in size. However, DEBUC does not consider multiple concentric layers around the base station, and the effects of event-based networks where the data generation rate at each node is a function of phenomena in the environment. [PERSON] et al. proposed a trusted and energy efficient routing protocol for wireless sensor networks (TERP), it is a reliable and energy-efficient routing algorithm based on the destination-sequenced distance-vector protocol (DSDV), which fully accounts for the fact that in a wireless sensor network, the energies of the nodes are limited and the life cycle is short. The DSDV routing algorithm is based on the idea of the classical Bellman-Ford routing algorithm with certain improvements. Every mobile station maintains a routing table that lists all available destinations, the number of hops to reach the destination and the sequence number assigned by the destination node. The sequence number is used to distinguish stale routes from new ones to avoid the formation of loops. The stations periodically transmit their routing tables to their immediate neighbors. TERP considers the security issues that arise during the process of passing data from one node to another and is consequently able to greatly improve the security of data communication. However, the result shows that TERP takes longer time than DSDV because of the amount of information sent to each node, which may increase the delay jitter and have a certain impact on the network [9]. [PERSON] et al. applied ant-colony optimization to solve the routing problem, considering the real-time performance requirements and the limited energy of the wireless sensor network. Their algorithm limits the scope of the search for the next node based on the search angle and uses a direction-based pheromone designed to guide the ant colony to reach the destination node. However, the WSN routing protocols is vulnerable, which has not be designed and realized routing protocol with security mechanism [10]. To balance the load and prolong the lifetime of a wireless sensor network, [PERSON] et al. proposed a clustering routing protocol, CRT2 FLACO, based on fuzzy logic and ant-colony optimization. The residual energy, the number of neighboring nodes and the distance to the base station for each node are considered in the fuzzy logic to balance the load; in addition, the cluster heads are linked into a chain using the ACO algorithm to reduce transmission energy consumption. The CRT2 FLACO protocol can effectively balance the network load and save energy so as to prolong the network lifetime. However, the rules in this protocol are fixed and defined by experience [11]. There exist some shortcomings of the papers described above. For example, the complexity of the algorithm may be very high, the security of the nodes during communication may not be taken into account, the convergence rate may be slow, which may make the algorithm prone to stagnation, or the energy consumption of the nodes may not be considered. To address these problems, this paper proposes a multi-attribute pheromone ant secure routing algorithm based on reputation value (MPASR). The algorithm considers the safety concerns for the nodes during the process of transmitting data. Moreover, the concept of a node's reputation value is introduced, and the node reputation values, the residual node energies, and the transmission delay are combined to define the pheromone used in ant-colony optimization to improve communication security, protect the network's life cycle, and ultimately provide a better routing service. The main contributions of this paper are as follows:  
1.