With the rise of the Internet of Things (IoT) and fifth‐generation (5G) networks, which have led to a surge in data processing and increased data transfer time, traditional cloud computing could no longer meet the needs of workers, so edge computing has emerged. Edge computing could meet the demand for low time consumption by processing data at the edge of the network and then transmitting it to a third‐party platform. However, since the credibility of the third‐party platform is unknown which can easily leak the privacy of workers. For the transparent mechanism of blockchain, a two‐stage privacy protection mechanism based on blockchain is proposed to solve this problem. In the first stage, this paper proposes a double disturbance localized differential privacy (DDLDP) algorithm to disturb the location information of workers. In the second stage, all the sensing data are uploaded to the blockchain through edge nodes, processed by the edge cloud, and fed back to the requester. Blockchain technology not only guarantees the integrity of sensing data, but also prevents the possibility of third‐party platforms from leaking workers' privacy. Through extensive performance evaluation and comparative experiments on real data sets, the DDLDP algorithm could effectively protect the privacy of workers and has higher service quality and data availability.