Blockchain technology has the characteristics of data anti-tampering and anti-forgery, which can provide solution ideas for the secure storage and transmission of data in distributed networks. The study applies blockchain technology to data auditing, constructs an aggregated signature based on conditional identity anonymization to protect user privacy, simplifies the auditing computation by using homomorphic hash function, and deploys three kinds of smart contracts on the blockchain to design a blockchain-based data integrity auditing scheme. For the privacy protection problem, a blockchain privacy protection model based on differential privacy is constructed by integrating the differential privacy policy into the blockchain smart contract layer. The experimental results show that the data integrity auditing scheme has superior blockchain storage cost and time overhead, and the average time overhead under different dynamic operations is below 30ms. The privacy protection model also exhibits high efficiency, with encryption and decryption times of 0.075s and 0.063s, respectively, under the largest data file, and a significant speed advantage in all phases of operation. The proposed scheme in this paper meets the needs of data integrity and privacy protection, and can provide efficient services for users.