Incorporating knowledge graphs as auxiliary information to enhance recommendation systems can improve the representations learning of users and items. Recommendation methods based on knowledge graph can introduce user-item interaction learning into the item graph, focusing only on learning the node vector representations within a single graph; alternatively, they can treat user-item interactions and item graphs as two separate graphs and learn from each graph individually. Learning from two graphs has natural advantages in exploring original information and interaction information, but faces two main challenges: 1) in complex graph connection scenarios, how to adequately mine the self-information of each graph, and 2) how to merge interaction information from the two graphs while ensuring that user-item interaction information predominates. Existing methods do not thoroughly explore the simultaneous mining of self-information from both graphs and effective interaction information, leading to the loss of valuable insights. Considering the success of contrastive learning in mining self-information and auxiliary information, this paper proposes a dual-graph contrastive learning recommendation method based on knowledge graphs (KGDC) to explore a more accurate representations of users and items in recommendation systems based on external knowledge graphs. In the learning process within the self-graph, KGDC has strengthened and represented the information of different connecting edges in both graphs, and extracted the existing information more fully. In interactive information learning, KGDC reinforces the interaction relationship between users and items in the external knowledge graph, realizing the leading role of the main task. We have conducted a series of experiments on three standard datasets, and the results show that the proposed method can achieve better results.