## 1 Introduction
For instance, the after-school counseling agencies need to send an advertisement to the college student with poor grades, but there is no effective method for message applications to find these students. Therefore, the message applications need a special delivery function to compare the attribute values of nodes and to optimize the data transmission process. In addition, when getting adequate information about the attribute characteristics of nodes, the message carrier begins to make the appropriate transmission decisions for messages. However, how to efficiently use the collected statistics to forward messages to the destination profile is another new issue. To solve the above problems, we propose the Predict and Forward algorithm, which is an efficient routing-delivery scheme based on node profile in opportunistic networks. According to the optimal stopping theory, this strategy consists of two phases: studying the state of the network and making the message delivery decisions. Moreover, we propose a new message model, Prelearn, which allows messages to be sent to a destination profile identified by their attribute characteristics. We also present a specific message delivery function, which is used to compare the attribute characteristics of nodes and to find the destination profile. Meanwhile, we propose a probability prediction matrix based on the historical encounter information of nodes, which contains the probabilities of the future meeting between nodes. The message carrier in the network employs the information carried by the probability prediction matrix to select the appropriate relay node as the next hop. In conclusion, the Predict and Forward scheme is a novel routing-delivery scheme, which implements the optimal transmission for Prelearn messages through the node profile and a probability prediction matrix. The contributions of this paper are listed as follows:  
1. By defining a special message delivery function, the message applications implement end-to-end data communication based on node profile instead of specific network addresses. The state of the network and the attribute characteristics of nodes can be easily obtained by Prelearn message, and the destination profile can be found by the message delivery function. According to the strategy of updating and predicting the probability of the future meeting between nodes, we establish the relationship between historical information and future encounters. The source node can select the suitable relay nodes through the information of the future meeting, and the efficient and sustainable data transmission occurs. * To avoid missing the optimal transition moment, the optimal stopping theory provides a way to select the best transition moment between studying the state of the network and making the message delivery decisions. Therefore, the method of exploring the network with a single message, can not only provide enough information about the state of the network but also optimize the data transmission process. * According to the simulation results on Opportunistic Networking Environment (ONE), the Predict and Forward routing algorithm shows enhanced performances in increasing the delivery ratio and reducing the delay of end-to-end data transmission.