More and more works use blockchain to improve the data security of integrated edge computing and Internet of Things (IoT) system. However, there are some problems of Proof-of-Work (PoW) that hinder the application, such as high energy consumption, low resource utilization efficiency and insufficient incentive. In this paper, we present a cooperative PoW named relay mining based PoW (Relay-PoW) to reduce energy consumption and improve resource utilization efficiency, where the nodes can mine blocks together under the management of edge server. We further propose parallel relay mining method to increase the throughput, where the nodes can mine blocks with multiple heights in a pipeline manner. In addition, we design supervision group mechanism to ensure the security, where the edge server evaluates the trust values of the nodes according to the capability and quality, and eliminates abnormal nodes timely. Finally, we propose a Shapley-based reward allocation strategy (SRAS) to encourage node to participate in Relay-PoW. Experimental results show that Relay-PoW can effectively decrease the energy consumption, improve the throughput and resource utilization efficiency, SRAS can motivate nodes to cooperate, and they all have a better performance than other methods.