With the widespread adoption of edge computing, Deep Neural Networks (DNN) inference tasks are gradually deployed on edge computing nodes. The inference and decision-making process of intelligent services is moved to the edge side, reusing edge resources to provide ubiquitous services. However, during the service process, due to constrained edge resources or factors such as terminal mobility, DNN inference tasks may experience long delays or service interruptions, affecting the timeliness and continuity of the services. To address the problem of deteriorated communication conditions and reduced data transmission efficiency during terminal mobility, which leads to decreased service quality or even interruptions, a dynamic deployment method for DNN inference tasks based on distributed proximal policy optimization (DPPO) is proposed. Building upon an edge-terminal collaborative architecture for dynamic deployment of DNN inference tasks, this method takes into account the terminal's location, communication conditions, and the availability of resources in accessible edge nodes. The process involves DNN model caching, inference computation offloading, as well as communication and computation resource allocation. The experimental results demonstrate that the proposed method can adapt to the dynamic environment of the edge and achieve the integration and on-demand allocation of edge multidimensional resources, effectively ensuring service continuity.