Data confidentiality and availability in an open network environment are essential for Internet of Vehicles (IoV). Encryption technology can only ensure user privacy, but impedes the optimal use of vehicular data. As a solution, public key encryption with equality test (PKEET) is proposed. However, most existing PKEET schemes rely on the homogeneity of communication parties and reliability of algorithms. The former requires both communication parties to be under the same cryptographic system, while the latter requires cloud server (CS) is a semi-honest entity. To address the challenge, we propose a heterogeneous signcryption scheme with equality test, named CP-HSCET, which allows CS to verify whether the plaintexts corresponding to ciphertexts are equal without unsigncrypting, thus enhancing the availability. It also enables an IoV device in certificateless (CLC) cryptosystem to signcrypt messages and send them to another device in public key infrastructure (PKI)-based cryptosystem, thus achieving higher availability. To overcome the reliability problem, we incorporate blockchain technology into our algorithm, thus eliminating the dependence on an honest (or semi-honest) CS. We also prove its security notions and design it to satisfy confidentiality, integrity, non-repudiation, and authentication. Finally, we implement our scheme with Hyperledge Fabric and compare the proposed scheme with other four comparison schemes. The result shows that it reduces by 35.49%, 53.79%, 80.15% and 30.37% of other four schemes in terms of computation time at 500 ciphertexts. Therefore, our solution is the most suitable for IoV environments, where most of the devices have lower computational power.