The application discloses a shipping
accident analysis method, comprising the following steps: constructing a shipping accident
knowledge graph; inputting a question, searching the shipping accident
knowledge graph by using a search enhancement generation method, and generating an answer; wherein the search enhancement generation method comprises the following steps: analyzing the question by using a large
language model, generating a
query statement, searching the shipping accident
knowledge graph according to the
query statement, outputting nodes and edges matched with the
query statement from the shipping accident knowledge graph, generating a
Bayesian network according to the matched nodes and edges, generating a query result according to the
conditional probability of a target node and its parent nodes and / or the
posterior probability of the target node and its child nodes in the
Bayesian network, inputting the query result into the large
language model, and generating an answer according to the query result by the large
language model. The application further discloses a shipping
accident analysis device, a
computer device and a storage medium. By using a large language model combined with a knowledge graph to extract and store shipping accident data, and by using a
Bayesian network analysis model to analyze the shipping accident data, the
occurrence probability of a complete cause-and-effect chain from causes to results of an accident can be obtained, so that objective and accurate causes and effects of a complex shipping accident can be sorted out, and reliable conclusion opinions can be provided for subsequent shipping business.