As a modern communication paradigm, Artificial intelligence based Internet of Things (AIoT) can provide an interactive platform across the globe to enrich the quality of networking services. With the AIoT paradigm, coded distributed computing (CDC) has recently emerged to be a promising solution to address the straggling effects in conventional distributed computing systems. In this article, we propose a novel CDC control scheme in the AIoT platform. Based on the cooperative game theory, the main challenges of our scheme are i) the <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">k</i> value decision for the CDC process, and ii) edge node resource allocation for offloading tasks. Using the ideas of coalition game and <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">weighted Nash social welfare solution (WNSWS)</i> , our proposed scheme is developed as a two-phase game model to achieve a mutually desirable solution. At the first phase, a dynamic coalition formation is proceeded to select the most adaptable edge nodes for the offloading subtasks. At the second phase, the <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">WNSWS</i> is adopted to effectively share each edge node’s computing resource. Based on the jointly design of these two cooperative games, we explore the synergy effect to optimize the CDC process. In the edge assisted distributed computing infrastructure, our reciprocal combinative approach can provide a fair-efficient solution through the sequential interactions of edge nodes and AIoT devices. In the performance evaluation, we provide extensive simulation analyses to show our scheme’s superiority by comparing with the existing baseline protocols.