The identification of protein complexes from protein interaction networks is crucial in the understanding of protein function, cellular processes and disease mechanisms. Existing methods commonly rely on the assumption that protein interaction networks are highly reliable, yet in reality, there is considerable noise in the data. In addition, these methods fail to account for the regulatory roles of biomolecules during the formation of protein complexes, which is crucial for understanding the generation of protein interactions. To this end, we propose a SpatioTemporal constrained RNA–protein heterogeneous network for Protein Complex Identification (STRPCI). STRPCI first constructs a multiplex heterogeneous protein information network to capture deep semantic information by extracting spatiotemporal interaction patterns. Then, it utilizes a dual-view aggregator to aggregate heterogeneous neighbor information from different layers. Finally, through contrastive learning, STRPCI collaboratively optimizes the protein embedding representations under different spatiotemporal interaction patterns. Based on the protein embedding similarity, STRPCI reweights the protein interaction network and identifies protein complexes with core-attachment strategy. By considering the spatiotemporal constraints and biomolecular regulatory factors of protein interactions, STRPCI measures the tightness of interactions, thus mitigating the impact of noisy data on complex identification. Evaluation results on four real PPI networks demonstrate the effectiveness and strong biological significance of STRPCI. The source code implementation of STRPCI is available from https://github.com/LI-jasm/STRPCI.