In mobile opportunistic networks, messages are transmitted through opportunistic contacts between nodes. Hence, the successful delivery of messages heavily relies on the mutual cooperation among nodes in the network. However, due to limited network resources such as node energy and cache space, nodes tend to be selfish, and they are unwilling to actively participate in message forwarding. In response to this challenge, lots of incentive mechanisms have been proposed. However, most of them rely on single incentives, there are issues such as inadequate handling of selfish nodes and vulnerability to malicious attacks, which ultimately lead to poor incentive effects. Therefore, in this paper, a Dual Incentive mechanism based on Graph attention neural network and Contract (DIGC) is introduced to encourage active participation of network nodes in data transmission. This incentive mechanism is divided into two steps. In the first step, the graph attention neural network is used to evaluate the reputation of nodes to achieve the goal of reputation-based incentive, and blockchain is employed to store and manage node reputation to ensure security and transparency. In the second step, an incentive based on contract theory is introduced, where personalized contracts were designed based on the different resources owned by nodes, thereby establishing a reward mechanism to encourage collaborative transmission. Extensive simulations based on two real-life mobility traces have been done to evaluate the performance of our DIGC compared with other existing incentive mechanisms. The results show that, our proposed mechanism can greatly improve throughput and reduce average delay while ensuring the overall delivery performance of the network.