With the development of industry 5.0,the operational data need to be collected and uploaded in real time in the practical Internet of Things (IoT).To describe and analyze the working state of the IoT more precisely,high accurate and real-time data are required.Then,in practical applications,many different types of IoT data are stored together without classifying,which could reduce the efficiency of data analysis.In order to improve the efficiency of data analysis in the hybrid data storage environment,it is necessary to use the method of data shunting in the process of data upload to realize the classified storage of data.However,the traditional data shunting method shunts the plaintext data according to its source identity,during which the source information on the plaintext data will leak the identity and privacy of the IoT devices.Therefore,how to realize the classified storage of these IoT data through the data shunting without revealing the privacy has become an urgent problem to be solved in the security management of the IoT data.In this paper,a new privacy-preserving IoT data filtering scheme is proposed.On the basis of maintaining the context and device identity privacy,each data filtering rule is set by a filtering trapdoor,which is computed from the identity of the data source device.Then,the data can be classified and routed by the relay nodes following the given rules in the data uploading phase,from which the heterologous data can be classified and the homologous data are stored together,which can help further data access control and data analysis.Experiment results show that our scheme is efficient and practical.