More and more abundant e-health applications and services emerge with the development of IoT technology. The diversified demands lead to the rapid development of the computing capability of a vast set of devices. However, some devices, limited by volume, do not have enough computing resource, and thus cannot satisfy the requirements of e-health applications. Using task migration, the resource-saturated ecosystem can help these resource-constrained devices under a reasonable payoff. In this article, we divide the process of task migration into two phases, namely, the selection of the IoT device, which receives the task from other device, and the bargaining process. Here, we denote an IoT device that offloads tasks to other devices as source device, and an IoT device that provides computing services to other devices as target device. We propose the DIMADQN algorithm, which solves the partial information problem by swapping the status information and exchanging the gradient to select the optimal target device. We use the heuristic bargaining algorithm to maximize the profit of the participants of the task migration in order to increase the enthusiasm of each device. © 2018 IEEE.