In the contemporary landscape of edge computing, the deployment of services with stringent real-time requirements on edge devices is increasingly prevalent. However, the challenge of designing an effective service deployment strategy that optimally leverages both cloud and edge resources to deliver high-quality services in production environments persists, primarily due to resource constraints in edge devices. To tackle this issue, we introduce an adaptive service deployment algorithm that utilizes speedup weights for cloud-edge collaborative environments(SWD-AD). This algorithm is crafted by comparing task execution times in both cloud and edge settings and integrating Speedup Weights with resource consumption metrics. During task cluster operations, service-specific task processing data is collected, and cumulative Speedup Weights are computed. Based on this metric, a dynamic service adjustment policy is implemented to facilitate service migration between cloud and edge, optimizing resource allocation. Our performance evaluation experiments reveal that this strategy notably reduces the average response time of tasks by 29.38% and 25.86% compared to Swarm and kubernetes (K8s) algorithms, respectively.