Aiming at the actual needs of network security problems faced by the power monitoring systems, research on ontology construction technology was carried out. Based on existing domain ontology automation construction technologies, a power grid monitoring domain ontology named SafeAgent was proposed from unstructured text data. Using methods such as machine learning, natural language processing and association rules to realize extraction of ontology concepts. Futhermore, this study accomplished the mining of relationships between concepts, and perfecting of the domain ontology automation construction scheme. The experimental verification shows that the method proposed in this study can complete the automatic construction of domain ontology with higher accuracy while overcoming reliance on human and expert knowledge.