Smart city refers to the information system with Internet of things and cloud computing as the core technology and government management and industrial development as the core content, forming a large-scale, heterogeneous and dynamic distributed Internet of things environment between different Internet of things. There is a wide demand for cooperation between equipment and management institutions in the smart city. Therefore, it is necessary to establish a trust mechanism to promote cooperation, and based on this, prevent data disorder caused by the interaction between honest terminals and malicious terminals. However, most of the existing research on trust mechanism is divorced from the Internet of things environment, and does not consider the characteristics of limited computing and storage capacity and large differences of Internet of things devices, resulting in the fact that the research on abstract trust mechanism cannot be directly applied to the Internet of things; On the other hand, various threats to the Internet of things caused by security vulnerabilities such as collision attacks are not considered. Aiming at the security problems of cross domain trusted authentication of Intelligent City Internet of things terminals, a cross domain trust model (CDTM) based on self-authentication is proposed. Unlike most trust models, this model uses self-certified trust. The cross-domain process of internet of things (IoT) terminal can quickly establish a trust relationship with the current domain by providing its trust certificate stored in the previous domain interaction. At the same time, in order to alleviate the collision attack and improve the accuracy of trust evaluation, the overall trust value is calculated by comprehensively considering the quantity weight, time attenuation weight and similarity weight. Finally, the simulation results show that CDTM has good anti collusion attack ability. The success rate of malicious interaction will not increase significantly. Compared with other models, the resource consumption of our proposed model is significantly reduced.