With the continuous progress of knowledge graph technology, knowledge graph has become a powerful tool to represent complex knowledge. Taking the course of fundamentals of digital electronic technology as an example, this paper constructs a clear knowledge graph of university courses. In addition to helping students build their capacity for analytical and creative thought as well as their understanding of problem-solving, this can also increase teachers’ ability to impart knowledge. Firstly, we develop datasets of entity and relation. Then, we create an appropriate ontology to capture the hierarchical concepts and structure of the course. Finally, we propose an information extraction model based on gated graph attention networks (GGAT), which can dynamically regulate the information flow via gating mechanisms and multi-head attention mechanisms. Our model is evaluated on a public dataset and demonstrates its superiority over existing models in named entity recognition and relation extraction.