In recent years, the exponential increase in the number of smart cars has generated massive amounts of data, and the traditional Internet of Vehicles(IoV) interaction model is inadequate in terms of data protection, key management, data storage, concurrency performance and response speed. This paper proposes a dual-chain IoV system, based on smart contracts to improve the centralized authentication and data storage methods, which improves performance while preventing single point of failure, identity forgery, data tampering, and privacy leakage caused by malicious attacks. The dual-chain IoV system automatically generates, updates and revokes key pairs for vehicles through the Chinese SM2 algorithm to achieve two-way authentication of peer nodes, after which sensitive data are stored encrypted in the distributed file system IPFS, and keyword matching search is achieved by block retrieval algorithm in data query occasions. Simulation experiments show that the system proposed in this paper has good security and performance, can meet the real-time and stability of high-speed vehicle data transmission,.and has better practicability and advancement.