Under the intelligent inspection scenario, the intelligent inspection robot will generate a large amount of real-time sensing data in the process of autonomous inspection ,which needs to be processed immediately. The limited battery life and computing capacity of the intelligent inspection terminal will cause problems such as long fault location time and slow response for incident handling. Due to the hardware conditions at the network’s edge, it is difficult for the traditional MEC system to ensure that the inspection data are processed in real-time when the inspection terminals are dense. Therefore, the article considers combining the D2D (Device-to-Device) communication technology with the MEC system to further improve the computing capability of the cellular network through collaborative processing between intelligent inspection terminals. The following problem is that each inspection terminal can choose too many offloading nodes. In this paper, we consider both cellular and multiplexed communication modes. We hace studied the collaborative task offloading problem that minimizes the weighted sum of robot device energy consumption and task delay in the MEC-D2D scenario with the constraints of task deadline and the channel interference of cellular communication users. To solve this problem, we construct a new general graph with weights to D2D link assignment based on the quantized computation and communication models. Based on this, we propose a solution based on graph matching. We also model the optimization problem in this paper as a terminal channel game problem, analyze the structural properties of the game, and prove the existence of a Nash equilibrium for the game. We design a two-layer distributed channel game algorithm to solve the above problem and quantitatively compare its performance metrics with respect to the centralized optimal solution and the single-layer offloading strategy. The numerical results confirm that the proposed algorithm achieves excellent computational offloading performance and good scalability as user size increases.