The invention provides a tunnel risk reasoning method fusing a
knowledge graph and a large
language model, which comprises the following steps of: obtaining structured
monitoring data and unstructured text data, adopting methods such as field
standardization for the structured
monitoring data to realize a unified format, adopting methods such as
sentence segmentation and word segmentation for the unstructured text data to realize the unified format, and obtaining the structured
monitoring data and the unstructured text data; the method comprises the following steps of: extracting entities from data by utilizing a model, extracting a relationship between the entities based on the entities, forming basic triads, forming a sub-graph by the basic triads, integrating to form a
knowledge graph, generating a
natural language, extracting the sub-graph related to the
natural language from the
knowledge graph, and converting the sub-graph into a sub-graph in a vector form by utilizing a
graph embedding algorithm. The entities and the relation paths of the entities serve as explicit reasoning clues, the
natural language, the sub-maps in the vector form and the explicit reasoning clues are input into a large
language model, natural language output is generated, multi-
source data information is integrated, and high-precision and interpretable tunnel risk early warning is output through the large
language model.