Ship accident risk assessment method and device based on knowledge graph and electronic equipment

By constructing a knowledge graph-based method for ship accident risk assessment, the problem that existing technologies cannot effectively consider the differences between ships and the mutual influence of factors is solved, and high-precision ship accident risk prediction and assessment is achieved.

CN115994688BActive Publication Date: 2026-05-26WUHAN UNIV OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN UNIV OF TECH
Filing Date
2023-02-10
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing technologies cannot effectively take into account the differences between different ship types and the mutual influence between factors, resulting in low accuracy, low efficiency, and weak universality in ship accident risk assessment.

Method used

A knowledge graph-based method for ship accident risk assessment is constructed. By building a database, a random forest model, and an ontology relationship model, knowledge is extracted and integrated, and the weights of the decision tree are adjusted to achieve high-precision prediction of ship accident risks.

Benefits of technology

It improves the accuracy and efficiency of ship accident risk assessment, and can take into account the differences between different ship types and the mutual influence of grounding factors, supporting high-precision prediction of ship overloading and grounding risk assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115994688B_ABST
    Figure CN115994688B_ABST
Patent Text Reader

Abstract

This invention relates to a knowledge graph-based method, apparatus, and electronic device for assessing ship accident risks. The method includes: constructing a database of ship accident risks; constructing a first random forest model based on the database; constructing a ship accident risk ontology relationship model based on knowledge graph theory, according to the entities in the database and the relationships between entities; extracting knowledge from the database based on the ship accident risk ontology relationship model; fusing the extracted knowledge from the database to construct a knowledge graph; adjusting the weights of each decision tree in the first random forest model according to the knowledge graph to obtain a second random forest model; and inputting target ship data into the second random forest model to obtain a prediction result of the target ship's accident risk. This invention enables high-precision prediction and assessment of ship overloading or grounding risks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus and electronic device for ship accident risk assessment based on knowledge graphs. Background Technology

[0002] With the rapid development of global shipping, the number of ships is increasing, which greatly increases the risk of ship accidents, posing a huge challenge to safe navigation and traffic supervision.

[0003] Currently, ship grounding risk assessment is mainly based on historical grounding accidents or ship trajectory data. This includes using ship grounding risk simulation methods (nonlinear finite element method) and fuzzy calculation, which assign certain probability ranges to strong winds, water depth, current, visibility, and human factors in the water area to assess the risk of ship grounding.

[0004] These methods fail to take into account the differences between different vessel bodies, the mutual influence between different factors, and the handling of grounding. Summary of the Invention

[0005] In view of this, it is necessary to provide a knowledge graph-based method, device, and electronic device for ship accident risk assessment to solve the problems of low accuracy, low efficiency, and weak universality in target ship accident risk assessment.

[0006] To address the aforementioned problems, this invention provides a knowledge graph-based method for assessing ship accident risks, comprising:

[0007] Build a database of ship accident risks;

[0008] Construct a first random forest model based on the database;

[0009] Based on knowledge graph theory, a ship accident risk ontology relationship model is constructed according to the entities in the database and the relationships between entities.

[0010] Knowledge extraction is performed on the database based on the aforementioned ship accident risk ontology relationship model.

[0011] The database after knowledge extraction will be fused to construct a knowledge graph;

[0012] The second random forest model is obtained by adjusting the weights of each decision tree in the first random forest model based on the knowledge graph.

[0013] The target ship data is input into the second random forest model to obtain the prediction result of the target ship's accident risk.

[0014] In some possible implementations, the ship accident risk ontology model includes information on ship grounding or overloading, accident analysis information, and response decisions:

[0015] The information on a ship running aground or being overloaded includes the time of the accident, the location of the accident, and the ship involved.

[0016] The accident analysis information includes the causes and consequences of the accident;

[0017] The decision-making process includes locating the vessel involved in the accident, detecting the area around the vessel, and optimizing and adjusting navigational aids.

[0018] In some possible implementations, the database includes structured data; constructing a first random forest model based on the database includes: constructing the first random forest model based on the structured data.

[0019] In some possible implementations, the database also includes semi-structured and unstructured data; the knowledge extraction from the database based on the ship accident risk ontology relationship model includes:

[0020] The structured data is directly mapped and populated into the ship grounding risk ontology model;

[0021] The semi-structured data is processed by a wrapper to extract knowledge, and the semi-structured data after knowledge extraction is then populated into the ship grounding risk ontology model.

[0022] The unstructured data is used to extract knowledge through a deep learning model, and the extracted unstructured data is then used to fill the ontology relationship model of ship grounding risk.

[0023] In some possible implementations, the knowledge extraction from the unstructured data using a deep learning model includes:

[0024] Entity extraction is performed on the unstructured data based on a deep learning model;

[0025] Multi-BiLSTMA models of different sizes are constructed based on BiLSTM and Attention mechanisms, and relation extraction is performed on the unstructured data based on the Multi-BiLSTMA models of different sizes.

[0026] In some possible implementations, the entity extraction from the unstructured data based on a deep learning model includes:

[0027] Extracting character features of ship accident risk based on the ELMo model;

[0028] Based on the character features, the Bi-LSTM+CRF model is used to obtain the named entity recognition of ship accident risk.

[0029] In some possible implementations, the process of constructing a knowledge graph by fusing knowledge from the extracted database includes:

[0030] The database after knowledge extraction is subjected to entity alignment, entity disambiguation and data classification to obtain a knowledge-fused database.

[0031] Storing the database in a graph database to build a knowledge graph.

[0032] In some possible implementations, a second random forest model is obtained by adjusting the weights of each decision tree in the first random forest model based on the knowledge graph, including:

[0033] The feature data of the knowledge graph is input into the first random forest model, and the weights of each decision tree in the first random forest model are adjusted to obtain the second random forest model.

[0034] On the other hand, the present invention also provides a knowledge graph-based ship accident risk assessment device, comprising:

[0035] Database building unit, used to build a database of ship accident risks;

[0036] The first random forest model construction unit is used to construct a first random forest model based on the database.

[0037] The ship accident risk ontology relationship model construction unit is used to construct a ship accident risk ontology relationship model based on knowledge graph theory and according to the entities in the database and the relationships between the entities.

[0038] The database knowledge extraction unit is used to extract knowledge from the database based on the ship accident risk ontology relationship model.

[0039] The knowledge graph construction unit is used to fuse knowledge from the database after knowledge extraction to construct a knowledge graph.

[0040] The second random forest model construction unit is used to adjust the weights of each decision tree in the first random forest model according to the knowledge graph to obtain the second random forest model.

[0041] The ship accident risk prediction unit is used to input target ship data into the second random forest model to obtain the prediction result of the target ship accident risk.

[0042] On the other hand, the present invention also provides an electronic device, including a memory and a processor, wherein,

[0043] The memory is used to store programs;

[0044] The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the knowledge graph-based ship accident risk assessment method described in any of the above possible implementations.

[0045] The beneficial effects of the above embodiments are as follows: The knowledge graph-based ship accident risk assessment method provided by this invention first constructs a database of ship accident risks, then constructs a first random forest model based on the database, and then constructs a ship accident risk ontology relationship model based on the entities in the database and the relationships between entities according to knowledge graph theory. Next, knowledge is extracted from and fused from the database based on the ship accident risk ontology relationship model to construct a knowledge graph. Then, the weights of each decision tree in the first random forest model are adjusted according to the knowledge graph to obtain a second random model. Finally, the target ship data is input into the second random forest model to obtain the prediction result of the target ship's accident risk. This invention extracts and fuses knowledge from three different data structures based on knowledge graph theory to obtain a ship risk accident knowledge graph, thus considering the differences between different ship entities, the mutual influence of grounding factors, and shortcomings in grounding accident handling, and can support high-precision prediction of ship overloading and assessment of ship grounding risk. Attached Figure Description

[0046] Figure 1 A schematic diagram of an embodiment of the knowledge graph-based ship accident risk assessment method provided by the present invention;

[0047] Figure 2 A schematic diagram of the ontological relationship model of ship accident risk;

[0048] Figure 3 A schematic diagram of an embodiment of a knowledge graph-based ship accident risk assessment device provided by the present invention;

[0049] Figure 4 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation

[0050] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0051] Figure 1 This is a schematic flowchart of an embodiment of the knowledge graph-based ship accident risk assessment method provided by the present invention, as shown below. Figure 1 As shown, the knowledge graph-based method for ship accident risk assessment includes:

[0052] S101. Construct a database of ship accident risks;

[0053] S102. Construct a first random forest model based on the database;

[0054] S103. Based on knowledge graph theory, construct a ship accident risk ontology relationship model according to the entities in the database and the relationships between entities;

[0055] S104. Extract knowledge from the database based on the aforementioned ship accident risk ontology relationship model;

[0056] S105. The knowledge-extracted database is fused to construct a knowledge graph.

[0057] S106. Adjust the weights of each decision tree in the first random forest model according to the knowledge graph to obtain the second random forest model;

[0058] S107. Input the target ship data into the second random forest model to obtain the prediction result of the target ship's accident risk.

[0059] Compared with existing technologies, the knowledge graph-based ship accident risk assessment method provided in this embodiment first constructs a database of ship accident risks, then builds a first random forest model based on the database, and then constructs a ship accident risk ontology relationship model based on the entities in the database and the relationships between entities according to knowledge graph theory. Next, knowledge is extracted from and fused from the database based on the ship accident risk ontology relationship model to construct a knowledge graph. Then, the weights of each decision tree in the first random forest model are adjusted according to the knowledge graph to obtain a second random model. Finally, the target ship data is input into the second random forest model to obtain the prediction result of the target ship's accident risk. This invention extracts and fuses knowledge from three different data structures based on knowledge graph theory to obtain a ship risk accident knowledge graph, thus considering the differences between different ship entities, the mutual influence of grounding factors, and shortcomings in grounding accident handling, and can support high-precision prediction of ship overloading and assessment of ship grounding risk.

[0060] It should be noted that in step S101, a database of ship accident risks is constructed, which includes structured data, semi-structured data and unstructured data.

[0061] In some embodiments of the present invention, such as Figure 2 The diagram shows a ship accident risk ontology model. In step S103, the ship accident risk ontology model includes information on ship grounding or overloading, accident analysis information, and handling decisions.

[0062] The information on a ship running aground or being overloaded includes the time of the accident, the location of the accident, and the ship involved.

[0063] The accident analysis information includes the causes and consequences of the accident;

[0064] The decision-making process includes locating the vessel involved in the accident, detecting the area around the vessel, and optimizing and adjusting navigational aids.

[0065] In a specific embodiment of the present invention, a ship accident risk ontology relationship model is constructed, with the following being an example of a grounding accident:

[0066] At 02:43 on August 18, 2022, the vessel Yuhang 72 ran aground in the Jiujiang South #5 red buoy area of ​​the Jiujiang Waterway. Upon receiving the report, the Jiujiang Navigation Administration's 10103 vessel immediately set sail for the scene, arriving at the accident area at 03:06. Based on the situation at the scene, it was determined that the grounded vessel had run aground in the channel due to exceeding its draft. A navigation aid vessel was used to immediately inspect the navigation aids at the scene and locate the grounded vessel. Simultaneously, the water depth in the surrounding area was assessed to determine the remaining usable depth for subsequent navigation aid optimization and adjustment to restore navigation. At 04:30, Deputy Director Ke Changzhun, along with the head of the navigation section, arrived at the scene to direct operations. After a thorough analysis of the situation, a temporary navigation aid optimization and adjustment plan was quickly formulated. At 05:50, Channel 10103 began optimizing and adjusting the navigation marks on site, completing the optimization and adjustment of Jiujiang South #4 and Jiujiang South #5 red buoys in just 20 minutes. After the adjustment, the grounded vessel was placed outside the channel, and navigation on site was restored in a timely manner, ensuring the safety of dredging operations.

[0067] The entity annotation results are as follows:

[0068] Vessel involved in the accident: Yuhang 72

[0069] Cause of the accident: "Excessive draft" navigation in violation of regulations

[0070] Accident location: Waters near Jiujiang South #5 Red Buoy in Jiujiang Waterway

[0071] Consequences of the accident: grounding

[0072] Accident handling entity: Jiujiang Navigation Administration of the Yangtze River (10103)

[0073] Accident response plan: Locating the grounded vessel, detecting the water depth in the area surrounding the grounded vessel, and optimizing and adjusting navigation marks.

[0074] In some embodiments of the present invention, in step S102, the database includes structured data; constructing a first random forest model based on the database includes: constructing the first random forest model based on the structured data.

[0075] It should be noted that structured data is processed using database tools. Structured data is expressed and analyzed by establishing a two-dimensional table structure, which includes entities, attributes, and tuples. Semi-structured data is a special form of structured data that does not conform to relational database or other forms of data table structure, but includes tags or other markers to separate semantic elements and maintain the hierarchical structure of records and data fields. Unstructured data includes text, images, and PDF data, which are data without a fixed structure.

[0076] In some embodiments of the present invention, in step S104, the database further includes semi-structured data and unstructured data; the knowledge extraction from the database based on the ship accident risk ontology relationship model includes:

[0077] The structured data is directly mapped and populated into the ship grounding risk ontology model;

[0078] The semi-structured data is processed by a wrapper to extract knowledge, and the semi-structured data after knowledge extraction is then populated into the ship grounding risk ontology model.

[0079] The unstructured data is used to extract knowledge through a deep learning model, and the extracted unstructured data is then used to fill the ontology relationship model of ship grounding risk.

[0080] In a specific embodiment of the present invention, knowledge extraction for structured data regarding ship grounding or overloading risks involves extracting relevant data and using graph mapping or D2RQ (Accessing Relational Databases as Virtual RDF Graphs) data processing tools to convert it into an RDF (Resource Description Framework) model or attribute graph model and store it in a graph database (such as Neo4j, JanusGraph, HugeGraph, Nebula, gStore, DGraph, OrientDB, ArangoDB, etc.) to complete the knowledge extraction for ship grounding or overloading risks. Knowledge extraction for semi-structured data regarding ship grounding or overloading risks is accomplished through manual methods, semi-automatic methods, or fully automatic wrappers. Taking web page data as an example, the development of a wrapper based on manual methods first involves manually analyzing the structure and code of the web page and writing data extraction expressions for web pages related to ship overdraft-grounding accidents. These expressions can generally be in the form of XPath expressions, CSS selector expressions, etc. This method is suitable for knowledge extraction from simple, structurally stable related websites. Supervised learning-based wrapper induction is a semi-automated approach. It first learns webpage information extraction rules from labeled training data on ship grounding or overloading risk assessment. Then, it extracts information from webpages with similar structures. The typical development process follows steps such as "webpage cleaning, data labeling, supervised wrapper space generation, and knowledge extraction effect evaluation." This method relies on long-term manual maintenance and supervised wrapper updates. Fully automated methods, on the other hand, cluster large-scale websites related to ship grounding or overloading risk, analyze repetitive patterns in similar webpages, and then use automated wrappers to extract knowledge about these risks.

[0081] In some embodiments of the present invention, the step of extracting knowledge from the unstructured data using a deep learning model includes:

[0082] Entity extraction is performed on the unstructured data based on a deep learning model;

[0083] Multi-BiLSTMA models of different sizes are constructed based on BiLSTM and Attention mechanisms, and relation extraction is performed on the unstructured data based on the Multi-BiLSTMA models of different sizes.

[0084] It should be noted that for unstructured data, entity recognition extracts semantic information word features from the sequence text by incorporating contextual relationships based on the ELMo (Embeddings from Language Models) model. Simultaneously, it obtains contextual features of the sequence text through a Bi-LSTM (Bi-directional Long Short-Term Memory) recurrent neural network, and uses CRF (Conditional Random Fields) to label and extract the sequence with the highest probability. In some embodiments of the present invention, the entity extraction from the unstructured data based on the deep learning model includes:

[0085] Extracting character features of ship accident risk based on the ELMo model;

[0086] Based on the character features, the Bi-LSTM+CRF model is used to obtain the named entity recognition of ship accident risk.

[0087] In a specific embodiment of the present invention, named entity recognition is implemented using Bi-LSTM+CRF, and the specific steps are as follows:

[0088] Input layer: For each training text, word segmentation and part-of-speech tagging are performed first. The part-of-speech tag for each character is the part-of-speech tag of the word to which that character belongs. Each character in the text and its corresponding part-of-speech tag sequence is the input to the model.

[0089] Word Vector Representation Layer: This paper first trains word vectors using a large-scale corpus of waterborne traffic texts, including the word vectors of most commonly used Chinese characters. In addition, a vector representation for each part-of-speech tag is required, which can be generated through a process similar to word vector training. After the word vectors and part-of-speech tag vectors are constructed, for each input character, the word vector and part-of-speech tag vector representation can be obtained by looking up a table. Finally, these two vectors are concatenated to obtain the feature vector representation of the character.

[0090] Bidirectional LSTM hidden layer: This consists of two LSTM hidden layers, one forward and one backward. Let the input word vector at the current time step be E. t The output of the previous forward hidden layer unit is The output of the backward hidden layer unit is The outputs of the forward and backward hidden layer units at the current time are respectively and

[0091] Bidirectional LSTM output layer and attention layer: Each output unit is connected to both the forward and backward LSTM hidden layer units, resulting in an output g. t Finally, the weight matrix G is obtained.

[0092] CRF layer: Chained Conditional Random Field annotation layer. It trains a conditional probability model of the output sequence with respect to the input sequence by combining the output sequence of a bidirectional LSTM with the given annotation sequence. During decision-making, given the output vector sequence of the bidirectional LSTM hidden layer, it obtains the probability vector of each word belonging to each entity label.

[0093] Output layer: Obtain the entity label y corresponding to each character by using the probability vector of each character belonging to each entity label.

[0094] It should be noted that the adaptive gating mechanism introduced by LSTM determines that LSTM units store the current state and remember the current information. Although LSTM can store information for a long time, information is easily lost during long-distance propagation. Therefore, we use LSTM in combination with Attention. Unlike LSTM, each step of the Attention mechanism does not depend on the result of the previous step, and can capture global dependency information in one step. It can effectively improve the information loss problem caused by long-distance propagation in LSTM. Attention is combined with LSTM for relation extraction tasks. Multi-BiLSTMA is used because BiLSTM and Attention have good complementarity. However, a fixed BiLSTM can only learn information in one specific dimension. By setting different BiLSTMs, a Multi-BiLSTMA model is constructed, which can learn features with dependency information in multiple dimensions. In some embodiments of the present invention, the construction of Multi-BiLSTMA models of different sizes based on BiLSTM and Attention mechanisms, and the relation extraction of the unstructured data based on the Multi-BiLSTMA models of different sizes, specifically includes the following steps:

[0095] Step 1: Input Layer Let S = w1, w2... be a sentence with two named entities, w i Let S represent the i-th character in the sentence. S is mapped to the corresponding word vector using a lookup table. The lookup table can be obtained through initialization or can be a pre-trained one; this description uses the initialization method. If the sentence length is L, the sentence after mapping to vectors can be represented as X = [x1, x2, ... x...]. l ], where x i ∈RD It is the i-th character w i The input layer can be represented as a vector, where D is the dimension of the vector. If the dictionary size is V, then the input layer can be represented as X∈R. V×D This process can be represented as X = Embedding(s).

[0096] Step 2: In this description, the Multi-BiLSTMA layer consists of three BiLSTMA units. Each BiLSTMA unit consists of a BiLSTM layer and an Attention layer. The BiLSTMA receives data from the input layer and uses a forward LSTM and a backward LSTM to form a BiLSTM layer, which is used to extract deeper features from the embedding.

[0097] This process can be summarized as follows:

[0098] Step 3: The Attention layer merges information from each time step in the BiLSTM layer and calculates the information that has the greatest impact on the extraction result. This process can be summarized as A = Attention(H).

[0099] Step 4: After concatenating the outputs of the three BiLSTMA units, a fully connected layer is used to fully connect the previous layer, classifying the information learned by the model. The size of the hidden layer is equal to the number of relation types, which is 7. This process can be summarized as D = Dense(A).

[0100] To obtain better experimental results, a softmax layer is used to normalize the output of the fully connected layer, yielding the final classification result. In general, this process can be summarized as Y = soft max(D). Entity relationships are established based on pattern matching; examples of patterns are as follows:

[0101] [Accident Information] includes [Accident Time]

[0102] [Accident Information] includes [Accident Location]

[0103] [Accident Information] includes [the vessel involved in the accident].

[0104] The vessel involved in the accident ran aground at the accident site.

[0105] The vessel involved in the accident ran aground at [the time of the accident].

[0106] Accident analysis includes [cause of the accident].

[0107] Accident analysis includes [accident consequences].

[0108] The vessel ran aground because of the cause of the accident.

[0109] Accident handling should be based on the consequences of the accident.

[0110] The knowledge extraction of ship accident risk is based on the analysis results of ship overloading or grounding events using a ship accident risk ontology relationship model. This is achieved by combining top-down pattern layer construction and bottom-up feature layer construction.

[0111] It should be noted that knowledge fusion achieves entity alignment by merging and logically associating entities with the same semantics identified in databases of different structures (such as ship grounding investigation reports, maritime safety supervision information tables, and maritime safety supervision summary tables); it also achieves entity linking and disambiguation by linking to corresponding entities already existing in the database and merging different descriptions of the same attribute. Furthermore, it standardizes and unifies descriptions of different formats. In some embodiments of the present invention, in step S105, the knowledge fusion of the database after knowledge extraction to construct a knowledge graph includes:

[0112] The database after knowledge extraction is subjected to entity alignment, entity disambiguation and data classification to obtain a knowledge-fused database.

[0113] Storing the database in a graph database to build a knowledge graph.

[0114] In a specific embodiment of the present invention, the knowledge fusion steps are as follows:

[0115] Data preprocessing stage

[0116] The quality of the raw data directly affects the final linking results. Different datasets often describe the same entity differently, and normalizing this data is a crucial step in improving the accuracy of subsequent linking. Data preprocessing techniques include syntactic regularization and data regularization.

[0117] Record link

[0118] Suppose two entities have records x and y, and the value of x and y on the i-th attribute is x. i y i The link is recorded in the following two steps:

[0119] Attribute similarity: The attribute similarity vector is obtained by combining the similarity of individual attributes [sim(x1, y1), sim(x2, y2), ..., sim(x... n y n )],

[0120] Entity similarity: The similarity of an entity is obtained based on the attribute similarity vector.

[0121] Blocks

[0122] From all entity pairs in a given database, select potentially matching record pairs as candidate blocks, and minimize the size of each candidate block as much as possible. This ensures coverage while minimizing the size of each block, excluding obviously unnecessary or irrelevant entities. This approach aims to reduce the need for exact matches while maintaining coverage. Common block segmentation methods include:

[0123] Block partitioning method based on hash function: For record x, hash(x) = h i Then x maps to block C, which is bound to the keyword h. i superior.

[0124] Neighbor classification: Canopy clustering; sorted neighbor algorithm; Red-Blue Set Cover.

[0125] Load balancing

[0126] To ensure that the number of entities in all blocks is roughly the same, the performance improvement from block partitioning is guaranteed. The simplest method is to perform multiple MapReduce operations.

[0127] Results Evaluation

[0128] Evaluation metrics: accuracy, recall, F-score, and overall algorithm runtime.

[0129] Finally, the high-performance NoSQL graph database Neo4j is used to store the constructed knowledge graph, which facilitates subsequent analysis and application of the results based on the knowledge graph.

[0130] In some embodiments of the present invention, in step S106, adjusting the weights of each decision tree in the first random forest model according to the knowledge graph to obtain a second random forest model includes:

[0131] The feature data of the knowledge graph is input into the first random forest model, and the weights of each decision tree in the first random forest model are adjusted to obtain the second random forest model.

[0132] In a specific embodiment of the present invention, the knowledge graph stores m pieces of feature data, and each piece of feature data has k independent variables. The independent variables are ship dimensions (maximum dimensions: overall length, overall width, clearance height, ship form dimensions: length between perpendiculars, molded width, molded length, molded draft), displacement (light ship displacement, full load displacement, loaded displacement), deadweight (total deadweight, net deadweight), speed, time, location, geographical features, meteorological factors, etc. The feature data of the knowledge graph is processed as the input of the first random forest model; each time k (k < m) pieces of feature data are randomly and with replacement drawn from the m pieces of ship accident risk knowledge graph feature data to form a new training set. Because it is random sampling with replacement, it is possible that a certain piece of data is drawn multiple times, or it is also possible that a certain piece of data is not drawn at all. Each time a training set is used to train a decision tree.

[0133] During the process of training a decision tree, at each node, i independent variables are randomly selected from j independent variables for branch growth. The more independent variables are selected, the better the training effect of the decision tree. Finally, a trained second random forest model is obtained, and the target ship data is input into the second random forest model to obtain the prediction result of the target ship accident risk.

[0134] After randomly sampling with replacement n times, at the end of training, n decision trees trained by different training sets can be obtained. According to the prediction results of these n decision trees, following the principle of "the minority obeys the majority", a more accurate and reasonable final prediction result is obtained.

[0135] In this embodiment, n = 400 and i = 10 (i < j) are set. Among them, the prediction results of 36 decision trees are normal navigation, and the prediction results of 364 decision trees are grounding. According to the principle of "the minority obeys the majority", the final prediction result is grounding.

[0136] To better implement the ship accident risk assessment method based on the knowledge graph in the embodiments of the present invention, correspondingly, on the basis of the ship accident risk assessment method based on the knowledge graph, as Figure 3 shown, the embodiments of the present invention also provide a ship accident risk assessment device based on the knowledge graph. A ship accident risk assessment device 300 includes:

[0137] A database construction unit 301 for constructing a database of ship accident risks;

[0138] A first random forest model construction unit 302 for constructing a first random forest model according to the database;

[0139] The ship accident risk ontology relationship model construction unit 303 is used to construct a ship accident risk ontology relationship model based on knowledge graph theory according to the entities in the database and the relationships between the entities.

[0140] The database knowledge extraction unit 304 is used to extract knowledge from the database based on the ship accident risk ontology relationship model.

[0141] Knowledge graph construction unit 305 is used to fuse the knowledge extracted database to construct a knowledge graph.

[0142] The second random forest model construction unit 306 is used to adjust the weights of each decision tree in the first random forest model according to the knowledge graph to obtain the second random forest model.

[0143] The ship accident risk prediction unit 307 is used to input the target ship data into the second random forest model to obtain the prediction result of the target ship accident risk.

[0144] The knowledge graph-based ship accident risk assessment device 300 provided in the above embodiments can realize the technical solution described in the above embodiment of the knowledge graph-based ship accident risk assessment method. The specific implementation principle of each module or unit can be found in the corresponding content of the above embodiment of the knowledge graph-based ship accident risk assessment method, which will not be repeated here.

[0145] like Figure 4 As shown, the present invention also provides an electronic device 400. The electronic device 400 includes a processor 401, a memory 402, and a display 403. Figure 4 Only some components of the electronic device 400 are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.

[0146] In some embodiments, processor 401 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 402 or process data, such as the knowledge graph-based ship accident risk assessment method of the present invention.

[0147] In some embodiments, processor 401 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 401 may be local or remote. In some embodiments, processor 401 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, intranet, multi-cloud, etc., or any combination thereof.

[0148] In some embodiments, memory 402 may be an internal storage unit of electronic device 400, such as a hard disk or memory of electronic device 400. In other embodiments, memory 402 may also be an external storage device of electronic device 400, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 400.

[0149] Furthermore, the memory 402 may include both internal storage units of the electronic device 400 and external storage devices. The memory 402 is used to store application software and various types of data installed on the electronic device 400.

[0150] In some embodiments, display 403 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 403 is used to display information from electronic device 400 and to display a visual user interface. Components 401-403 of electronic device 400 communicate with each other via a system bus.

[0151] In one embodiment, when processor 401 executes the knowledge graph-based ship accident risk assessment program in memory 402, the following steps can be implemented:

[0152] Build a database of ship accident risks;

[0153] Construct a first random forest model based on the database;

[0154] Based on knowledge graph theory, a ship accident risk ontology relationship model is constructed according to the entities in the database and the relationships between entities.

[0155] Knowledge extraction is performed on the database based on the aforementioned ship accident risk ontology relationship model.

[0156] The database after knowledge extraction will be fused to construct a knowledge graph;

[0157] The second random forest model is obtained by adjusting the weights of each decision tree in the first random forest model based on the knowledge graph.

[0158] The target ship data is input into the second random forest model to obtain the prediction result of the target ship's accident risk.

[0159] It should be understood that when the processor 401 executes the knowledge graph-based ship accident risk assessment program in the memory 402, in addition to the functions mentioned above, it can also perform other functions, as detailed in the description of the corresponding method embodiments above.

[0160] Furthermore, this embodiment of the invention does not specifically limit the type of electronic device 400 mentioned. Electronic device 400 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the invention, electronic device 400 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0161] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0162] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A knowledge graph-based method for assessing ship accident risks, characterized in that, include: Build a database of ship accident risks; Construct a first random forest model based on the database; Based on knowledge graph theory, a ship accident risk ontology relationship model is constructed according to the entities in the database and the relationships between entities. Knowledge extraction is performed on the database based on the aforementioned ship accident risk ontology relationship model. The database after knowledge extraction will be fused to construct a knowledge graph; The feature data of the knowledge graph is input into the first random forest model, and the weights of each decision tree in the first random forest model are adjusted to obtain the second random forest model. The target ship data is input into the second random forest model to obtain the prediction result of the target ship's accident risk.

2. The knowledge graph-based ship accident risk assessment method according to claim 1, characterized in that, The ship accident risk ontology model includes a ship grounding risk ontology model or overloading information, accident analysis information, and handling decisions: The information on a ship running aground or being overloaded includes the time of the accident, the location of the accident, and the ship involved. The accident analysis information includes the causes and consequences of the accident; The decision-making process includes locating the vessel involved in the accident, detecting the area around the vessel, and optimizing and adjusting navigational aids.

3. The knowledge graph-based ship accident risk assessment method according to claim 1, characterized in that, The database includes structured data; constructing a first random forest model based on the database includes: constructing the first random forest model based on the structured data.

4. The knowledge graph-based ship accident risk assessment method according to claim 2, characterized in that, The database also includes semi-structured and unstructured data; the knowledge extraction from the database based on the ship accident risk ontology relationship model includes: The structured data is directly mapped and populated into the ship grounding risk ontology model; The semi-structured data is processed by a wrapper to extract knowledge, and the semi-structured data after knowledge extraction is then populated into the ship grounding risk ontology model. The unstructured data is used to extract knowledge through a deep learning model, and the extracted unstructured data is then used to fill the ontology relationship model of ship grounding risk.

5. The knowledge graph-based ship accident risk assessment method according to claim 4, characterized in that, The step of extracting knowledge from the unstructured data using a deep learning model includes: Entity extraction is performed on the unstructured data based on a deep learning model; Multi-BiLSTMA models of different sizes are constructed based on BiLSTM and Attention mechanisms, and relation extraction is performed on the unstructured data based on the Multi-BiLSTMA models of different sizes.

6. The knowledge graph-based ship accident risk assessment method according to claim 5, characterized in that, The entity extraction from the unstructured data based on the deep learning model includes: Extracting character features of ship accident risk based on the ELMo model; Based on the character features, the Bi-LSTM+CRF model is used to obtain the named entity recognition of ship accident risk.

7. The knowledge graph-based ship accident risk assessment method according to claim 1, characterized in that, The process of fusing knowledge from the extracted database to construct a knowledge graph includes: The database after knowledge extraction is subjected to entity alignment, entity disambiguation and data classification to obtain a knowledge-fused database. Storing the database in a graph database to build a knowledge graph.

8. A knowledge graph-based ship accident risk assessment device, characterized in that, include: Database building unit, used to build a database of ship accident risks; The first random forest model construction unit is used to construct a first random forest model based on the database. The ship accident risk ontology relationship model construction unit is used to construct a ship accident risk ontology relationship model based on knowledge graph theory and according to the entities in the database and the relationships between the entities. The database knowledge extraction unit is used to extract knowledge from the database based on the ship accident risk ontology relationship model. The knowledge graph construction unit is used to fuse knowledge from the database after knowledge extraction to construct a knowledge graph. The second random forest model construction unit is used to input the feature data of the knowledge graph into the first random forest model and adjust the weights of each decision tree in the first random forest model to obtain the second random forest model. The ship accident risk prediction unit is used to input target ship data into the second random forest model to obtain the prediction result of the target ship accident risk.

9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the knowledge graph-based ship accident risk assessment method according to any one of claims 1 to 7.