To address the problems of high manual dependence, complex data processing, and low construction efficiency in constructing knowledge graphs for rail transit operation and maintenance, this paper proposes an automated knowledge graph construction method based on large language models. First, two-stage domain-specific prompt templates for rail transit operation and maintenance are designed for domain concept layer generation and operation and maintenance data extraction, respectively. Second, the zero-shot learning capability of large language models is employed to automatically generate knowledge graph data that conform to RDF syntax specifications. Finally, a prompt-driven knowledge graph construction framework is developed to automatically transform rail transit operation and maintenance metadata into RDF knowledge graphs and support integration with existing knowledge graphs. The experimental results show that, compared with the general prompt, the proposed method improves entity extraction accuracy from 81.2% to 93.8%, an increase of 12.6 percentage points; the completeness of the concept layer increases from 68.4% to 91.6%; and the accuracy of complex relation extraction increases from 46.7% to 78.9%. In the comparison with three triple extraction methods, namely OpenNRE, the Language Technology Platform (LTP), and Bert4Keras,
| 科 Family | 属数 Number of genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) | 属 Genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) |
|---|---|---|---|---|---|---|
| 鹅膏菌科Amanitaceae | 2 | 11 | 5.26 | 鹅膏菌属 Amanita | 10 | 4.78 |
| 小菇科 Mycenaceae | 2 | 12 | 5.74 | 丝盖伞属 Inocybe | 5 | 2.39 |
| 多孔菌科 Polyporaceae | 8 | 14 | 6.70 | 蜡蘑属 Laccaria | 5 | 2.39 |
| 红菇科 Russulaceae | 3 | 23 | 11.00 | 小皮伞属 Marasmius | 6 | 2.87 |
| 小菇属 Mycena | 11 | 5.26 | ||||
| 光柄菇属 Pluteus | 5 | 2.39 | ||||
| 红菇属 Russula | 17 | 8.13 | ||||
| 栓菌属 Trametes | 5 | 2.39 |